Data processing method and device based on block chain and readable storage medium

By verifying the commitment information of the block proposal node and decrypting encrypted transactions in the blockchain network, the problem of blockchain nodes being biased towards specific transaction data is solved, and fair on-chain recording and secure storage of transaction data are achieved.

CN120956433APending Publication Date: 2025-11-14TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410592533.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-13
Publication Date
2025-11-14

AI Technical Summary

Technical Problem

When creating blocks, blockchain nodes may favor certain types of transaction data, leading to unfair storage of transaction data on the chain and affecting the fairness of transaction data storage on the chain.

Method used

The validity of the block proposal is verified by obtaining the commitment information of the block proposal node. If the verification is successful, the fragment private key of the target building node is passed to the key management contract, combined into a reconstructed private key to decrypt the encrypted transaction, generate a decrypted transaction block, and broadcast it to the blockchain network for consensus processing, ensuring the fairness of the transaction data.

Benefits of technology

This improves the fairness of uploading transaction data to the blockchain, prevents blockchain nodes from selectively selecting transaction data based on transaction content, and ensures data security and fairness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120956433A_ABST
    Figure CN120956433A_ABST
Patent Text Reader

Abstract

The invention discloses a block chain-based data processing method and device, and a readable storage medium. The method comprises the steps of obtaining commitment information corresponding to a first block proposal node; the commitment information is obtained by signing a first transaction block generated by the target construction node by the first block proposal node according to a node private key corresponding to the first block proposal node; performing validity verification on the commitment information according to a node public key corresponding to the first block proposal node to obtain a commitment verification result corresponding to the commitment information, and if the commitment verification result indicates that verification is passed, transmitting a first fragment private key corresponding to the target construction node into a key management contract; and if the number of the first fragment private keys in the key management contract reaches a threshold value, combining the first fragment private keys in the key management contract into a reconstructed private key, and decrypting the encrypted transaction in the first transaction block according to the reconstructed private key to obtain a decrypted transaction. By adopting the method and the device, the uplink fairness of the transaction data can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of blockchain technology, and in particular to a blockchain-based data processing method, device, and readable storage medium. Background Technology

[0002] Due to its decentralized and immutable nature, blockchain technology effectively ensures the security of on-chain data. Therefore, an increasing number of individuals and businesses are submitting transaction data to blockchain nodes, requesting that these nodes store their transaction data on the blockchain to prevent malicious tampering. Because transaction block capacity is limited, blockchain nodes need to select a portion of the transaction data to be uploaded to the blockchain, package it into blocks, and then store the transaction data on the blockchain in block form. Currently, the transaction data submitted to the blockchain network is publicly transparent to the blockchain nodes. However, when creating blocks, blockchain nodes may favor packaging certain types of transaction data into blocks, preventing some types of transaction data from being packaged into blocks for on-chain storage, thus affecting the fairness of transaction data upload. Summary of the Invention

[0003] This application provides a blockchain-based data processing method, device, and readable storage medium, which can improve the fairness of uploading transaction data to the blockchain.

[0004] This application provides a blockchain-based data processing method, which is executed by a target building node and includes:

[0005] Obtain the commitment information corresponding to the first block proposal node; the commitment information is obtained by the first block proposal node signing the first transaction block generated by the target building node based on the node private key corresponding to the first block proposal node; the commitment information is used to indicate that the first block proposal node has not changed the first transaction block; the first transaction block includes encrypted transactions;

[0006] The validity of the commitment information is verified based on the public key of the node corresponding to the first block proposal node, and the commitment verification result corresponding to the commitment information is obtained. If the commitment verification result indicates that the verification is successful, the private key of the first fragment corresponding to the target building node is passed to the key management contract.

[0007] If the number of first fragment private keys in the key management contract reaches a threshold, the first fragment private keys in the key management contract are combined into a reconstructed private key. The encrypted transactions in the first transaction block are decrypted using the reconstructed private key to obtain the decrypted transaction. The decrypted transaction is used to replace the encrypted transaction in the first transaction block to obtain the second transaction block. The second transaction block is broadcast to the blockchain network by the first block proposal node for consensus processing.

[0008] This application provides a blockchain-based data processing method, which is executed by a first block proposal node, and includes:

[0009] Based on the private key of the first block proposal node, the first transaction block generated by the target building node is signed to obtain the commitment information corresponding to the first block proposal node; the commitment information is used to indicate that the first block proposal node has not changed the first transaction block; the first transaction block includes encrypted transactions;

[0010] The commitment information is broadcast in the blockchain network so that when the commitment information is verified based on the public key of the first block proposal node, the respective first fragment private key is sent to the key management contract; the multiple block building nodes in the blockchain network include the target building node;

[0011] If the first fragment private key corresponding to the target building node is passed to the key management contract, and the number of first fragment private keys in the key management contract reaches the threshold, then the second transaction block is obtained and broadcast to the blockchain network for consensus processing.

[0012] The second transaction block includes a decryption transaction, which is the process by which the target building node decrypts the encrypted transactions in the first transaction block using the reconstructed private key. The reconstructed private key is obtained by combining the first fragment private key from the key management contract.

[0013] This application provides, in one aspect, a blockchain-based data processing device applied to a target building node, comprising:

[0014] The commitment information acquisition module is used to obtain the commitment information corresponding to the first block proposal node. The commitment information is obtained by the first block proposal node signing the first transaction block generated by the target building node based on the node private key corresponding to the first block proposal node. The commitment information is used to indicate that the first block proposal node has not changed the first transaction block. The first transaction block includes encrypted transactions.

[0015] The commitment information verification module is used to verify the validity of the commitment information based on the public key of the node corresponding to the first block proposal node, and obtain the commitment verification result corresponding to the commitment information. If the commitment verification result indicates that the verification is successful, the private key of the first fragment corresponding to the target building node is passed to the key management contract.

[0016] The transaction decryption module is used to combine the first fragment private keys in the key management contract into a reconstructed private key if the number of fragment private keys in the first transaction block reaches a threshold. The reconstructed private key is then used to decrypt the encrypted transactions in the first transaction block to obtain the decrypted transaction. The decrypted transaction is used to replace the encrypted transaction in the first transaction block to obtain the second transaction block. The second transaction block is broadcast to the blockchain network by the first block proposal node for consensus processing.

[0017] The blockchain-based data processing device further includes: a first transaction block generation module, which is used for:

[0018] Retrieve M encrypted candidate transactions from the transaction pool, and obtain the first transaction resource consumption and transaction capacity of the i-th candidate transaction among the M candidate transactions; M is a positive integer, and i is a positive integer less than or equal to M;

[0019] The ratio between the resource consumption and transaction capacity of the first transaction corresponding to the i-th candidate transaction is determined as the selection evaluation value corresponding to the i-th candidate transaction;

[0020] Obtain the selection evaluation values ​​corresponding to M candidate transactions, and sort the M candidate transactions in descending order based on the selection evaluation values ​​to obtain the sorted M candidate transactions;

[0021] The first t candidate transactions from the sorted M candidate transactions are determined as encrypted transactions. The encrypted transactions are encapsulated into the first transaction block and sent to the first block proposal node. The sum of the transaction capacities corresponding to the t candidate transactions is less than or equal to the block capacity, where t is a positive integer less than or equal to M.

[0022] Specifically, the commitment information verification module is used for:

[0023] Obtain the public key of the node corresponding to the first block proposal node, decrypt the commitment information according to the node public key to obtain the first digest information corresponding to the commitment information, and perform a hash operation on the commitment information according to the hash function to obtain the second digest information corresponding to the commitment information.

[0024] If the first summary information is the same as the second summary information, then the verification result of the commitment information is determined to indicate that the verification is successful;

[0025] If the first summary information is different from the second summary information, then the commitment verification result corresponding to the commitment information indicates that the verification failed.

[0026] The number of block building nodes in the blockchain network is N, where N is an integer greater than or equal to the threshold; the N block building nodes include the target building node, and the commitment information verification module is specifically used for:

[0027] If the verification result indicates that the verification is successful, the second fragment private key corresponding to the target building node is split into N first sub-fragment private keys, and the N first sub-fragment private keys are distributed to N block building nodes; one first sub-fragment private key is used to distribute to one block building node;

[0028] Receive the second sub-fragment private keys corresponding to N-1 block building nodes other than the target building node, combine the first sub-fragment private key distributed to the target building node and the N-1 second sub-fragment private keys into the first fragment private key corresponding to the target building node, and pass the first fragment private key corresponding to the target building node into the key management contract.

[0029] The commitment information verification module is also used for:

[0030] Invoke the key management contract and, based on the key generation logic within the contract, generate a joint private key for the nodes associated with N block building nodes;

[0031] Based on the key splitting logic in the key management contract, the node's joint private key is split into N second fragment private keys;

[0032] Through a key management contract, a second fragment private key is allocated to the target building node from N second fragment private keys; one second fragment private key is used to allocate to a block building node.

[0033] Specifically, the transaction decryption module is used for:

[0034] If the number of first fragment private keys in the key management contract reaches the threshold, then K first fragment private keys in the key management contract are obtained; K is used to represent the threshold.

[0035] Based on the interpolation function and the sorting position of the K first fragment private keys, the interpolation results corresponding to the K first fragment private keys are obtained. The product between the j-th first fragment private key and the interpolation result corresponding to the j-th first fragment private key is determined as the candidate key expression corresponding to the j-th first fragment private key; j is a positive integer less than or equal to K.

[0036] The candidate key expressions corresponding to the K first fragment private keys are summed to obtain the key reconstruction expressions corresponding to the K first fragment private keys. The constant terms in the key reconstruction expressions are determined as the reconstructed private keys.

[0037] The blockchain-based data processing device also includes a retransmission message sending module, which is used for:

[0038] If the verification result indicates that the verification failed, a commitment retransmission message is sent to the first block proposal node; the commitment retransmission message is used to instruct the first block proposal node to broadcast the regenerated commitment information in the blockchain network.

[0039] The blockchain-based data processing device further includes: a second transaction block generation module, which generates the second transaction block for:

[0040] Replace the encrypted transactions in the first transaction block with the decrypted transactions to obtain a candidate transaction block. Add the commitment information to the block header of the candidate transaction block to obtain the second transaction block. Send the second transaction block to the first block proposal node.

[0041] Alternatively, the decryption transaction can be sent to the first block proposal node, so that the first block proposal node can update the first transaction block based on the decryption transaction and commitment information, thus obtaining the second transaction block.

[0042] One embodiment of this application provides a blockchain-based data processing device, which is applied to a first block proposal node, and the device includes:

[0043] The commitment information generation module is used to sign the first transaction block generated by the target building node based on the private key of the first block proposal node, and obtain the commitment information corresponding to the first block proposal node; the commitment information is used to indicate that the first block proposal node has not changed the first transaction block; the first transaction block includes encrypted transactions;

[0044] The commitment information broadcasting module is used to broadcast commitment information in the blockchain network, so that when multiple block building nodes in the blockchain network determine that the commitment information has been verified based on the public key of the node corresponding to the first block proposal node, they will send their respective first fragment private keys to the key management contract; the multiple block building nodes in the blockchain network include the target building node;

[0045] The transaction block acquisition module is used to acquire the second transaction block if the first fragment private key corresponding to the target building node is passed to the key management contract and the number of the first fragment private keys in the key management contract reaches the threshold, and then broadcast the second transaction block to the blockchain network for consensus processing.

[0046] The second transaction block includes a decryption transaction, which is the process by which the target building node decrypts the encrypted transactions in the first transaction block using the reconstructed private key. The reconstructed private key is obtained by combining the first fragment private key from the key management contract.

[0047] The blockchain-based data processing device further includes a transaction block selection module, which is used for:

[0048] Receive transaction blocks generated by multiple block building nodes, and obtain the second transaction consumption resources of the transaction blocks generated by multiple block building nodes;

[0049] The transaction block corresponding to the second transaction with the largest resource consumption is designated as the first transaction block.

[0050] Specifically, the commitment information generation module is used for:

[0051] Obtain the block root hash and block height from the first transaction block. Fill the block root hash and block height with data to obtain random fill data. Split the random fill data to obtain P segments of fill data; P is an integer greater than 1.

[0052] Obtain the l-th input data of the compression function; when l is 1, the l-th input data includes the initial compressed data and the first segmented padding data in P segmented padding data; when l is not 1, the l-th input data includes the (l-1)-th output data of the compression function and the k-th segmented padding data in P segmented padding data; l is a positive integer less than or equal to P;

[0053] The l-th input data is compressed according to the compression function to obtain the l-th output data corresponding to the compression function. The p-th output data corresponding to the compression function is determined as the compressed information.

[0054] The compressed information is encrypted using the private key of the node that proposed the first block, thus obtaining the commitment information corresponding to the node that proposed the first block.

[0055] The blockchain network also includes a second block proposal node, which is used to receive the second transaction block broadcast by the first block proposal node, and generate a root hash to be verified based on the decryption transaction in the second transaction block; when the root hash to be verified is inconsistent with the block root hash in the commitment information, the second block proposal node is used to generate a vote against the second transaction block.

[0056] This application provides a computer device, including: a processor, a memory, and a network interface; the processor is connected to the memory and the network interface, wherein the network interface is used to provide data communication functions, the memory is used to store computer programs, and the processor is used to call the computer programs so that the computer device executes the methods in the embodiments of this application.

[0057] One aspect of this application provides a computer-readable storage medium storing a computer program adapted to be loaded by a processor and executed by the method described in this application.

[0058] One embodiment of this application provides a computer program product, which includes a computer program stored in a computer-readable storage medium; a processor of a computer device reads the computer program from the computer-readable storage medium and executes the computer program, causing the computer device to perform the method of this application embodiment.

[0059] In this embodiment, after receiving the instruction broadcast by the first block proposer that the commitment information of the first transaction block containing encrypted transactions has not been changed, the target building node can verify the validity of the commitment information based on the public key of the node corresponding to the first block proposer. If the verification result of the commitment information indicates that the verification is successful, the target building node transmits the first fragment private key corresponding to the key management contract. If the target building node detects that the number of first fragment private keys in the key management contract has reached a threshold, it combines the first fragment private keys in the key management contract into a reconstructed private key, and decrypts the encrypted transactions in the first transaction block based on the reconstructed private key to obtain a decrypted transaction. This decrypted transaction is used to replace the encrypted transactions in the first transaction block to obtain a second transaction block. The second transaction block is broadcast by the first block proposer to the blockchain network for consensus processing, and then the consensus result of the second transaction block determines whether to store the second transaction block in the blockchain. Therefore, in this embodiment of the application, the transactions in the first transaction block are encrypted transactions. As a result, the target building node cannot selectively select transaction data to generate a transaction block based on the specific content of the transaction. When the first block proposing node receives the transaction block submitted by the block building node, it also cannot obtain the plaintext transactions in the transaction block. Therefore, it cannot selectively select transaction blocks to be uploaded to the chain based on the transaction content contained in the transaction block, thereby improving the fairness of the transaction data upload to the chain. Attached Figure Description

[0060] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0061] Figure 1 This is a schematic diagram of a system architecture provided in an embodiment of this application;

[0062] Figure 2 This application provides a time-series interaction of a blockchain-based data processing method. Figure 1 ;

[0063] Figure 3This is a schematic diagram of a key splitting method provided in an embodiment of this application;

[0064] Figure 4 This is a schematic diagram illustrating a transaction block selection method provided in an embodiment of this application;

[0065] Figure 5 This is a schematic diagram illustrating the on-chaining of transaction data provided in an embodiment of this application;

[0066] Figure 6 This application provides a time-series interaction of a blockchain-based data processing method. Figure 2 ;

[0067] Figure 7 This is a schematic diagram illustrating the generation of a fragmented private key according to an embodiment of this application;

[0068] Figure 8 This is a schematic diagram of the structure of a blockchain-based data processing device provided in an embodiment of this application. Figure 1 ;

[0069] Figure 9 This is a schematic diagram of the structure of a blockchain-based data processing device provided in an embodiment of this application. Figure 2 ;

[0070] Figure 10 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation

[0071] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.

[0072] To facilitate understanding of the technical solutions proposed in the embodiments of this application, the technical terms involved in the embodiments of this application will be explained below.

[0073] This application relates to blockchain technology. Blockchain is a decentralized infrastructure with distributed storage characteristics. Specifically, it is a data structure that organizes data blocks in chronological order using a linked list-like manner. It can securely store data with sequential relationships that can be verified within the system, and uses cryptography to ensure that the data is immutable and unforgeable.

[0074] The underlying blockchain platform can include modules for basic services, smart contracts, and operations management. The basic service module is deployed on all blockchain node devices to verify the validity of business requests. After consensus is reached on valid requests, they are recorded in storage. For a new business request, the basic service first performs interface adaptation parsing and authentication (interface adaptation), then encrypts the business information using a consensus algorithm (consensus management), and transmits it completely and consistently to the shared ledger (network communication) for recording and storage. The smart contract module is responsible for contract registration, publication, triggering, and execution. Developers can define contract logic using a programming language and publish it to the blockchain (contract registration). Based on the contract terms, execution is triggered by calling keys or other events to complete the contract logic. It also provides functions for contract upgrades and cancellations. The operations management module is mainly responsible for deployment, configuration modification, contract settings, cloud adaptation, and real-time status visualization during product launch, such as alarms, network status management, and node device health status management.

[0075] Smart contracts can be understood as computer programs running on a distributed ledger (i.e., blockchain) with pre-defined rules, states, and conditional responses. They encapsulate, verify, and execute complex behaviors of distributed nodes to complete information exchange, value transfer, and asset management. Based on the distributed architecture and consensus algorithms of blockchain, smart contracts allow users who do not trust each other to complete transactions without any trusted third-party intermediaries or authorities. Furthermore, digital smart contracts can be flexibly embedded in various tangible or intangible assets, transactions, and data to achieve active or passive asset and information management and control, gradually building programmable smart assets and systems.

[0076] Please see Figure 1 , Figure 1 This is a schematic diagram of a system architecture provided in an embodiment of this application. For example... Figure 1 As shown, the system may include a transaction submission node 10f and a blockchain network 100a. The transaction submission node 10f is used to send transaction data to the blockchain network 100a and request blockchain nodes in the blockchain network 100a to store the transaction data in the blockchain. The transaction submission node 10f can be an electronic device outside the blockchain network 100a, or it can be a blockchain node in the blockchain network 100a; this embodiment does not limit this. Furthermore, this embodiment does not limit the number of transaction submission nodes 10f; there may be one or multiple transaction submission nodes 10f.

[0077] The blockchain network 100a may include one or more blockchain nodes; however, this embodiment does not limit the number of blockchain nodes. Figure 1As shown, blockchain network 100a includes blockchain nodes 10a, 10b, 10c, and 10d. Each blockchain node in blockchain network 100a (e.g., blockchain nodes 10a, 10b, 10c, and 10d) can be used to maintain the same blockchain (e.g., ...). Figure 1 The blockchain 10e shown in the diagram allows any two blockchain nodes in the blockchain network 100a to form a peer-to-peer network. This peer-to-peer network can employ a peer-to-peer protocol, which is an application-layer protocol running on top of the Transmission Control Protocol (TCP). In a distributed system, any electronic device, such as a server or terminal device, can join and become a blockchain node.

[0078] In this embodiment of the application, each blockchain node in the transaction submission node 10f and the blockchain network 100a can be referred to as a computer device. The computer device can be a terminal device, a server, or a system composed of terminal devices and servers. This embodiment of the application does not limit this.

[0079] The terminal device may include, but is not limited to, personal computers, smartphones, tablets, laptops, handheld computers, mobile internet devices (MIDs), wearable devices (such as smartwatches, smart bracelets, etc.), smart voice interaction devices, smart home appliances (such as smart TVs, etc.), in-vehicle devices, aircraft, and other electronic devices. This application does not limit the type of terminal device.

[0080] A server can be a standalone physical server, a server cluster or distributed system consisting of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms.

[0081] To ensure data interoperability between blockchain nodes, data connections can exist between each blockchain node. For example, there is a data connection between blockchain node 10a and blockchain node 10c, between blockchain node 10a and blockchain node 10d, between blockchain node 10b and blockchain node 10c, and so on. It is understood that blockchain nodes can transmit data or blocks through these data connections. Each blockchain node in the blockchain network has a unique node identifier, and each blockchain node can store the node identifiers of other blockchain nodes that are connected to it. This allows it to broadcast acquired data or generated blocks to other blockchain nodes based on their node identifiers. For example, blockchain node 10a can maintain a list of node identifiers, which stores the node names and node identifiers of other blockchain nodes, as shown in Table 1.

[0082] Table 1

[0083] Node Name Node identifier Blockchain node 10b AAAAA Blockchain node 10c BBBBB … … Blockchain node 10d CCCCC

[0084] The node identifier can be an Internet Protocol (IP) address used to interconnect networks, or any other information that can be used to identify a node in a blockchain network. Table 1 uses IP addresses as an example for illustration only.

[0085] Assuming the node identifier of blockchain node 10a is FFFFF, then blockchain node 10a can send transaction data to blockchain node 10d through the node identifier CCCCC, and blockchain node 10d can determine that the transaction data was sent by blockchain node 10a through the node identifier FFFFF. Similarly, blockchain node 10d can send a block awaiting consensus to blockchain node 10c through the node identifier BBBBB, and blockchain node 10c can determine that the block awaiting consensus was sent by blockchain node 10d through the node identifier CCCCC. Data transmission between other nodes is also in the same way, so it will not be elaborated further.

[0086] It is understood that the above data connection is not limited to the connection method. It can be connected directly or indirectly through wired communication, or directly or indirectly through wireless communication, or through other connection methods. This application does not impose any restrictions on this.

[0087] Understandably, each blockchain node, in the course of normal operation, can receive transaction submissions from other nodes (e.g., Figure 1The transaction submission node 10f) sends transaction data and generates blocks based on the received transaction data, thus storing the transaction data on the blockchain in the form of blocks. Since the transaction block capacity is limited, blockchain nodes need to select a portion of the transaction data to be uploaded to the blockchain and package it into a block. However, the transaction data submitted to the blockchain network is public and transparent to the blockchain nodes. When creating blocks, blockchain nodes may favor packaging certain types of transaction data into blocks, causing some types of transaction data to be unable to be encapsulated into blocks for on-chain storage, thus affecting the fairness of transaction data uploading to the blockchain.

[0088] To improve the fairness of transaction data upload to the blockchain, this application embodiment divides blockchain nodes in the blockchain network into block building nodes and block proposal nodes. Block building nodes are responsible for receiving transaction data sent by transaction submitting nodes and packaging the transaction data into transaction blocks. Block proposal nodes are nodes selected from block building nodes for block publication and consensus. In this application embodiment, before sending transaction data to block building nodes, transaction submitting nodes can encrypt the transaction data to obtain encrypted transactions, and then send the encrypted transactions to block building nodes. That is, the transactions received by block building nodes are encrypted transactions, and the building nodes cannot selectively select transaction data to generate transaction blocks based on the specific content of the transactions. When block proposal nodes receive transaction blocks submitted by block building nodes, they cannot obtain the plaintext transactions in the transaction blocks, and therefore cannot selectively select transaction blocks for upload based on the transaction content contained in the transaction blocks, thereby improving the fairness of transaction data upload to the blockchain.

[0089] The method for uploading transaction data to the blockchain as described in the embodiments of this application is described in detail below. Specifically, please refer to... Figure 2 , Figure 2 This application provides a time-series interaction of a blockchain-based data processing method. Figure 1 This blockchain-based data processing method can be executed interactively by the target building node and the first block proposal node. The target building node and the first block proposal node can be... Figure 1 The blockchain nodes in the blockchain network shown. For example... Figure 2 As shown, the blockchain-based data processing method may include steps S101 to S105, wherein:

[0090] Step S101: Sign the first transaction block generated by the target building node according to the private key of the first block proposal node to obtain the commitment information corresponding to the first block proposal node.

[0091] In this embodiment of the application, the blockchain network may include multiple block proposal nodes. The first block proposal node is one of the block proposal nodes included in the blockchain network. The first block proposal node is mainly used to select a transaction block from multiple transaction blocks generated by the block building node for consensus within the current consensus cycle.

[0092] Understandably, each consensus cycle requires the re-selection of a first block proposer from among multiple block proposers. For example, the block proposers in the blockchain network include: Block Proposal Node 1, Block Proposal Node 2, and Block Proposal Node 3. After the genesis block (block height 0) is generated, Block Proposal Node 1 becomes the first block proposer for the current consensus cycle. Block Proposal Node 1 selects a transaction block with a block height of 1 (e.g., transaction block 1) from among the multiple transaction blocks submitted by the block building node for consensus processing. After storing transaction block 1 on the blockchain, Block Proposal Node 2 becomes the first block proposer for the next consensus cycle. Block Proposal Node 2 selects a transaction block with a block height of 2 (e.g., transaction block 2) from among the multiple transaction blocks submitted by the block building node for consensus processing, and so on. Alternatively, the first block proposal node can be selected through voting. Before broadcasting the transaction block to the blockchain network for consensus, a voting process can be initiated to select the first block proposal node for the current consensus period. The number of votes received by each block proposal node in the blockchain network is counted, and the block proposal node with the largest number of votes in the blockchain network is determined as the first block proposal node for the current consensus period.

[0093] The first transaction block is a transaction block selected by the first block proposing node from multiple transaction blocks generated by the block building nodes. Specifically, the first transaction block is the transaction block that will undergo consensus processing. In this embodiment, the block building node that generates the first transaction block can be referred to as the target building node. The first transaction block contains an encrypted transaction, which is a transaction obtained by encrypting the original transaction using the joint public key of the N block building nodes. Here, N represents the number of block building nodes in the blockchain network, and N is an integer greater than 1. The specific value of N can be 2, 3, 10, or 100, etc.

[0094] Encrypted transactions obtained by using the joint public key of the nodes can only be decrypted using the joint private key corresponding to the joint public key. The joint public key and joint private key are joint key pairs generated by the key management contract for N block-building nodes. The joint public key can be made public to all nodes; both blockchain nodes within the blockchain network and nodes outside the blockchain network can use it to encrypt data or verify the validity of digital signatures. The joint private key can be used to decrypt data encrypted with the joint public key, generate digital signatures, and perform identity verification. Generally, the security of the joint private key is crucial for protecting sensitive information and ensuring the credibility of digital signatures. Therefore, the joint private key is usually held by the owner of the joint key pair (a block-building node in the blockchain network) or entrusted to a trusted key management object for safekeeping. For example, the joint private key can be entrusted to any block-building node in the blockchain network for safekeeping. However, this key management method can lead to excessive single-point management authority for the block building node. If the trustworthiness of the block building node cannot be guaranteed, for example, if the block building node is attacked or actively leaks the node's joint private key, it may cause the leakage of encrypted transaction object data, resulting in a decline in data security.

[0095] To address the aforementioned issue of excessive single-point authority, Distributed Key Generation (DKG) technology can be used to generate a fragmented key pair (including a fragmented public key and a fragmented private key) for each of the N block-building nodes. Any K fragmented private keys can be combined to reconstruct the node's unified private key, but no K-1 fragmented private keys can be combined to reconstruct the node's unified private key. In other words, this key recovery method does not require collecting all N fragmented private keys; only a portion is needed for key reconstruction. This prevents the loss of some fragmented private keys, thus improving the fault tolerance of key reconstruction. Furthermore, even if some fragmented private keys are lost, other block-building nodes cannot use these fragmented private keys to recover the node's unified private key, thereby improving the security of the node's unified private key and consequently, data security. Here, K represents the key reconstruction threshold, which is a positive integer greater than 1 and less than or equal to N. The specific value of K can be 2, 3, 4, 5, or N, etc.

[0096] Among them, the key management contract refers to the smart contract used to generate node joint key pairs and split node joint key pairs. After the key management contract is deployed in the blockchain, the block building nodes in the blockchain network can call the key management contract to obtain their own fragment private keys.

[0097] Any block-building node in the blockchain network can deploy the key management contract on the blockchain. For ease of understanding, this application embodiment describes the deployment of the key management contract by the target block-building node as an example. Specifically, the target block-building node can obtain the contract parameter information associated with the key generation contract, compile the contract parameter information into virtual machine bytecode, determine the compiled virtual machine bytecode as the key contract data corresponding to the key generation contract, and submit the key contract data to the blockchain network for on-chain processing, thereby completing the deployment of the key management contract on the blockchain.

[0098] The contract parameters may include, but are not limited to: node identifiers corresponding to the N block building nodes, the key reconstruction threshold k, key generation logic, and key splitting logic. The number of block building nodes N and the threshold k can be adjusted by the block building nodes through upgrading the key management contract after reaching a consensus. The key generation logic can refer to the algorithm used to generate the node joint key pair, and may include, but is not limited to, algorithms such as the RAS (Rivest-Shamir-Adleman) algorithm, the knapsack algorithm, and the elliptic curve cryptography (ECC) algorithm. The key splitting logic can refer to the algorithm used to split the session key, and may include, but is not limited to, the cryptographic secret sharing algorithm, the Shamir secret sharing algorithm (also known as the threshold secret sharing algorithm), and the linear secret sharing algorithm.

[0099] After the key management contract is deployed in the blockchain, any block building node in the blockchain network (e.g., the target building node) can invoke the key management contract. According to the key generation logic in the key management contract, it generates a node joint public key (EnsemblePubKey) and a node joint private key (EnsemblePriKey) associated with N block building nodes. According to the key splitting logic in the key management contract, it splits the node joint private key into N fragment private keys (for ease of description, the fragment private keys obtained through the key management contract can be called second fragment private keys). The second fragment private key is a partial element of the node joint private key, and each second fragment private key (PriKey) is a component of the node joint private key. i Each of these corresponds to a fragment public key (PubKey). i N fragmented public keys can be aggregated to generate a node-unified private key (EnsemblePriKey == MultiParty([PubKey)). iMultiParty represents the key aggregation function; through the key management contract, a second fragment private key is allocated to a block building node (e.g., the target building node) from N second fragment private keys, and a fragment public key matching the second fragment private key is allocated to the block building node (e.g., the target building node); a second fragment private key is used to allocate to a block building node, and N block building nodes obtain their respective second fragment private keys from the key management contract.

[0100] For ease of description, this application uses an example where the number of block construction nodes N is 3 and the threshold K is 2 to describe the key splitting process. Specifically, please refer to... Figure 3 , Figure 3 This is a schematic diagram illustrating a key splitting method provided in an embodiment of this application. For example... Figure 3 As shown, the block building nodes in the blockchain network can include block building node 21a, block building node 21b, and block building node 21c. All three nodes have completed distributed key registration in the key management contract. They can call the key management contract to generate a node joint key pair (including a node joint public key 27a and a node joint private key 27b). The node joint public key 27a can be stored in the key management contract, and all nodes can obtain it from the contract for data encryption and signature verification.

[0101] Specifically, the process of generating the node joint key pair may include: calling the key management contract, generating a first key random number and a second key random number according to the key generation logic in the key management contract, and obtaining the Euler function value between the first key random number and the second key random number; obtaining a third key random number, and then generating the node joint public key 27a according to the third key random number and the product between the first key random number and the second key random number; and generating the node joint private key 27b according to the third key random number, the Euler function value, and the product between the first key random number and the second key random number.

[0102] The first and second key random numbers can be two unequal integers. For example, any two coprime positive integers can be used as the first and second key random numbers. The Euler's totient function value can be generated based on the first and second key random numbers. For example, the Euler's totient function value can be expressed as... in, Let represent the Euler's totient function value, u represent the first key random number, and v represent the second key random number. Then, a value can be randomly selected from integers that are coprime to the Euler's totient function value and less than it as the third key random number. In other words, the third key random number e satisfies... And the third key random number e and the Euler totient function value They are coprime numbers.

[0103] Furthermore, the product r between the first key random number u and the second key random number v is obtained through the key management contract, and a node joint public key 27a is generated based on the third key random number e and the product r. The node joint public key 27a can be represented as (r, e); based on the third key random number e, the Euler totient function value... Obtain a candidate value d such that the third key random number e and the Euler totient function value are... The candidate value d satisfies: Here, mod represents modulo operation. Then, based on the candidate value d and the product r, a node joint private key 27b is generated, which can be represented as (r, d). It is understood that, in this embodiment, constructing the node joint key pair using the first key random number and the second key random number can improve the security of the node joint key pair.

[0104] like Figure 3 As shown, to prevent the risk of data leakage due to a single point of failure in the node's joint private key 27b, the key management contract, after the node's joint key pair, can split the node's joint private key 27b according to the key splitting logic in the key management contract to obtain second fragment private keys (e.g., fragment private keys 29a, 29b, and 29c) matching the number of block building nodes. One second fragment private key is assigned to one block building node. The key management contract can assign different second fragment private keys to different block building nodes. The second fragment private keys are not publicly disclosed; each block building node stores its own second fragment private key. For example, fragment private key 29a is assigned to block building node 21a, fragment private key 29b is assigned to block building node 21b, and fragment private key 29c is assigned to block building node 21c. Block building node 21a can call the key management contract to obtain the fragment private key 29a assigned to it by the key management contract, but cannot obtain fragment private keys 29b and 29c; similarly, block building node 21b can call the key management contract to obtain the fragment private key 29b assigned to it by the key management contract, but cannot obtain fragment private keys 29a and 29c; block building node 21c can call the key management contract to obtain the fragment private key 29c assigned to it by the key management contract, but cannot obtain fragment private keys 29a and 29b.

[0105] like Figure 3 As shown, each second fragment private key can be used to derive its corresponding fragment public key (PubKey). i For example, the public key corresponding to fragment private key 29a is fragment public key 28a, the public key corresponding to fragment private key 29b is fragment public key 28b, and the public key corresponding to fragment private key 29c is fragment public key 28c. The key management contract can send public key 28a to block building node 21a, public key 28b to block building node 21b, and public key 28c to block building node 21c. Public keys 28a, 28b, and 28c can also be stored in the key management contract. All nodes can obtain public keys 28a, 28b, and 28c from the key management contract for data encryption and signature verification. Any node can use threshold signature technology, such as the Multi-party Elliptic Curve Digital Signature Algorithm (ECDSA), to aggregate fragment public keys 28a, 28b, and 28c to generate a node joint public key 27a.

[0106] The process of splitting the node's joint private key can include: obtaining a fourth key random number according to the key splitting logic in the key management contract, and obtaining K-1 fragmentation coefficients. The fourth key random number can be a randomly generated value, such as the product of the first and second key random numbers, or a value generated from the current timestamp. All K-1 fragmentation coefficients are different and less than the fourth key random number. In other words, K-1 different values ​​less than the fourth key random number can be arbitrarily selected as fragmentation coefficients. Further, a key splitting function is constructed based on the node's joint private key, the fourth key random number, and the K-1 fragmentation coefficients, and N second fragment private keys are determined within this function. The key splitting function refers to the function used for key splitting.

[0107] For ease of understanding, the expression of the key splitting function in this application embodiment is: Let's take y as an example. a This represents the second fragment private key, where Key represents the node's joint private key, and h b Let represent the fragmentation coefficient, x represent the a-th block building node, where a is a positive integer less than or equal to N, and x and a have the same value. g represents the fourth key random number. Assuming the node's joint private key 27b (Key = 13) is 13, the fragmentation coefficient h1 = 10, and the fourth key random number g = 17, substituting these values ​​into the key splitting function... The second fragment private key corresponding to the block building node can be obtained. For example, the fragment private key 29a corresponding to block building node 21a can be y1 = (13 + 10 × 1) mod 17 = 6, the fragment private key 29b corresponding to block building node 21b can be y2 = (13 + 10 × 2) mod 17 = 16, and the fragment private key 29c corresponding to the initial block building node 21c can be y3 = (13 + 10 × 3) mod 17 = 9. Any two of the fragment private keys 29a, 29b, and 29c can be combined to generate the node's combined private key 27b.

[0108] To prevent block-building nodes from being biased due to the transaction content itself when creating blocks, thus preventing certain types of transaction data from being encapsulated into blocks for on-chain storage, transaction submitting nodes can encrypt transaction data using the joint public key of the block-building node before submitting it to the block-building node. This results in encrypted candidate transactions, which are then submitted to the block-building node. Upon receiving the encrypted candidate transactions from the transaction submitting node, the block-building node cannot selectively select transaction data to generate transaction blocks based on the specific content of the candidate transactions. Similarly, when the first block proposal node receives the transaction blocks submitted by the block-building node, it cannot obtain the plaintext transactions within the transaction blocks. Therefore, it cannot selectively select transaction blocks for on-chain storage based on the transaction content contained in the transaction blocks, thereby improving the fairness of transaction data on-chain storage.

[0109] Please see Figure 4 , Figure 4 This is a schematic diagram illustrating a transaction block selection method provided in an embodiment of this application. For example... Figure 4 As shown, transaction submission node 20a can encrypt the transaction data to be uploaded to the chain (e.g., transaction data tx11) based on the node's joint public key (EnsemblePuKey) to obtain the encrypted candidate transaction tx11. Encrypt Among them, candidate transaction tx11 Encrypt It can be represented as tx11 Encrypt =MultiEncrypt(tx11,Amoount) bid ,tx11 size ), where MultiEncrypt represents the encryption function; Amount bid Indicates candidate transaction tx11 Encrypt The first transaction consumes resources, when candidate transaction tx11 Encrypt After the transaction is successfully uploaded to the blockchain, the transaction submission node 20a will transfer the resource consumption of the first transaction to the candidate transaction tx11. EncryptThe block building node that performs the packaging (e.g., block building node 21a); ​​tx11 size The indicated transaction capacity is used to represent candidate transactions tx11 Encrypt The size in bytes.

[0110] The transaction data tx11 can be a single transaction or a bundle of multiple sub-transactions. This embodiment uses bundled transaction data as an example to describe the encapsulation process of the transaction data tx11. Transaction submission node 20a detects a sub-transaction tx2 in the blockchain network. Sub-transaction tx2 indicates exchanging 10,000 units of the first digital resource for 100 units of the second digital resource, with a minimum acceptable exchange of 90 units of the second digital resource. At this point, transaction submission node 20a can insert sub-transaction tx1 before sub-transaction tx2. Sub-transaction tx1 indicates that 10,000 units of first digital resources will be exchanged for 100 units of second digital resources before sub-transaction tx2, with a minimum acceptable exchange of 90 units of second digital resources. Sub-transaction tx3 is inserted after sub-transaction tx2. Sub-transaction tx3 indicates that the second digital resources obtained by sub-transaction tx1 will be converted into first digital resources. Sub-transaction tx4 is inserted after sub-transaction tx3. Sub-transaction tx4 indicates that 20 units of first transaction consumption resources will be transferred to the block building node. Sub-transactions tx1, tx2, tx3, and tx4 are combined into transaction data tx11 (tx11 = [tx1, tx2, tx3, tx4]).

[0111] Understandably, after the first sub-transaction tx1 in transaction data tx11 is executed, assuming it can exchange for 98 units of second digital resources, the resource conversion rate between the first and second digital resources decreases. This causes the second sub-transaction tx2, which could have exchanged for 98 units of second digital resources, to potentially only exchange for 95 units. However, due to this reduced conversion rate, after the third sub-transaction tx3 in transaction data tx11 is executed, exchanging 98 units of second digital resources for first digital resources will result in an exchange for more than 10,000 units of first digital resources. Therefore, after transaction data tx11 is completed, the transaction submission node 20a can obtain a certain amount of reward resources (Amount). MEV This reward resource (Amount) can be used. MEV A portion of the resources are used as the first transaction resource consumed by the block building node.

[0112] It can be seen that when transaction data tx11 is executed in the order of sub-transactions tx1, tx2, tx3, and tx4, the transaction submission node 20a can obtain as many reward resources as possible. Therefore, transaction submission node 20a hopes that the block building node will package the transaction data tx11 according to the combined order in the transaction data tx11, and does not want the block building node to change the order of the sub-transactions in the transaction data tx11, which would reduce the reward resources obtained by transaction submission node 20a; it also does not want the block building node to choose not to package the specific transaction content of transaction data tx11 into the transaction block after obtaining it, thus affecting the fairness of the on-chain of transaction data tx11. Therefore, in this embodiment of the application, transaction submission node 20a can call the key management contract to obtain the node joint public key, and encrypt the transaction data tx11 according to the node joint public key to obtain candidate transaction tx11. Encrypt Then it is submitted to block building node 21a. Because candidate transaction tx11 Encrypt The transaction is obtained by encrypting the joint public key of the nodes. The private key of the second fragment corresponding to node 21a, which is used to construct the block, cannot be used to verify the candidate transaction tx11. Encrypt Decryption yields candidate transaction tx11 Encrypt The corresponding plaintext transaction, therefore, based on candidate transaction tx11 Encrypt The specific content in the transaction block was not selected to be included in the transaction block; it was also impossible to process the candidate transaction tx11. Encrypt By modifying the transaction details, the security of transaction data can be improved.

[0113] like Figure 4 As shown, block building node 21a receives candidate transaction tx11 Encrypt After that, the candidate transaction tx11 can be... Encrypt The transaction is added to its own transaction pool for packaging. This transaction pool can be used to temporarily cache transactions that have not yet been packaged into a block. At the same time, block building node 21a can add candidate transactions tx11. Encrypt The transaction message is broadcast to the other block-building nodes in the blockchain network, such as block-building nodes 21b and 21c. After receiving the transaction message, block-building nodes 21b and 21c can also select the candidate transaction tx11 from the transaction message. Encrypt Stored in its own transaction pool.

[0114] Similarly, transaction submission object 20b can call the key management contract to obtain the node's joint public key, and encrypt the transaction data tx22 using the node's joint public key to obtain the encrypted candidate transaction tx22. EncryptThen it is submitted to the block building node (e.g., block building node 21b). Block building node 21b receives the candidate transaction tx22. Encrypt Then, it is broadcast to block builder nodes 21a and 21c. Candidate transaction tx22 Encrypt It can be a single transaction or a combined transaction resulting from multiple sub-transactions. The transaction submission object 20c can call the key management contract to obtain the node's joint public key, and encrypt the transaction data tx33 using the node's joint public key to obtain the encrypted candidate transaction tx33. Encrypt Then it is submitted to the block building node (e.g., block building node 21c). Block building node 21c receives the candidate transaction tx33. Encrypt Then, it is broadcast to block builder nodes 21a and 21b. Candidate transaction tx33 Encrypt It can be a single transaction or a combination of multiple sub-transactions.

[0115] like Figure 4 As shown, block building node 21a can package the encrypted candidate transactions in the transaction pool into transaction block 22a and submit transaction block 22a to the first block proposal node 23a; block building node 21b can package the encrypted candidate transactions in the transaction pool into transaction block 22b and submit transaction block 22b to the first block proposal node 23a; block building node 21c can package the encrypted candidate transactions in the transaction pool into transaction block 22c and submit transaction block 22c to the first block proposal node 23a.

[0116] In this embodiment, since the candidate transactions in the transaction pool are encrypted, the block building node can select transactions to be uploaded to the blockchain based on the resource consumption of the first transaction among the candidate transactions. For example, the top t candidate transactions in the transaction pool with the highest resource consumption can be identified as encrypted transactions and encapsulated into a transaction block, thereby improving the fairness of transaction data upload to the blockchain. t is a positive integer, and its specific value can be 1, 5, 10, or 20, etc. Alternatively, the selection of transactions to be uploaded to the blockchain can also be based on the resource consumption and transaction capacity of the candidate transactions, thereby improving the fairness of transaction data upload to the blockchain.

[0117] For ease of understanding, this application embodiment uses block building node 21a as an example to describe the process of generating transaction blocks. The transaction pool in block building node 21a may include M encrypted candidate transactions, where M represents the number of encrypted candidate transactions in the transaction pool of block building node 21a, and M is a positive integer, which can be 1, 5, 10, or 100, etc. The process of generating transaction block 22a may include: block building node 21a can obtain M encrypted candidate transactions from the transaction pool, and obtain the first transaction consumption resources and transaction capacity of the i-th candidate transaction among the M candidate transactions; i is a positive integer less than or equal to M, and the specific value of i can be 1, 2, 3, or M, etc.; further, block building node 21a will set the first transaction consumption resources (Amount) corresponding to the i-th candidate transaction... bid ) and transaction capacity txi size The ratio between them is determined as the selection evaluation value txi corresponding to the i-th candidate transaction. index (txi index =Amount bid / txi size The process involves: obtaining the selection evaluation values ​​corresponding to M candidate transactions; sorting the M candidate transactions in descending order based on their selection evaluation values ​​to obtain the sorted M candidate transactions; identifying the first t candidate transactions from the sorted M candidate transactions as encrypted transactions; encapsulating the encrypted transactions into transaction block 22a; and sending transaction block 22a to the first block proposal node 23a. The block body of transaction block 22a may include the encrypted transaction. Here, the sum of the transaction capacities corresponding to the t candidate transactions is less than or equal to the block capacity (e.g., 1MB), and t is a positive integer less than or equal to M.

[0118] The block header of transaction block 22a may include the block root hash, the block height, and the block height. height Information such as timestamps and difficulty values ​​is included. Specifically, after determining t candidate transactions, block building node 21a can identify the t candidate transactions as leaf nodes of the Merkle tree, obtain the transaction hashes corresponding to the t candidate transactions, and determine the Merkle root corresponding to the Merkle tree based on the t transaction hashes. The Merkle root is the block root hash of transaction block 22a.

[0119] Block building node 21a can sum up the resource consumption of the first transaction of the t candidate transactions contained in transaction block 22a to obtain the transaction block resource consumption (Amount) of transaction block 22a. block The transaction block consumes resources (Amount). block A portion of the resources in the transaction are identified as the second transaction's consumed resources (Amount). buildAfter transaction block 22a is successfully uploaded to the chain, block building node 21a transfers the resources consumed by the second transaction to the first block proposal node 23a.

[0120] It is understandable that when the first block proposal node 23a receives a transaction block submitted by a block building node, it cannot obtain the plaintext transactions within the transaction block, and therefore cannot selectively select transaction blocks for on-chain processing based on the transaction content contained in the transaction block. In this case, the first block proposal node 23a can select blocks to be consensused based on the second transaction resource consumption of the transaction block, thereby improving the fairness of transaction data on-chain processing. Specifically, the first block proposal node 23a can receive transaction blocks generated by multiple block building nodes, such as transaction block 22a, transaction block 22b, and transaction block 22c; obtain the second transaction resource consumption of transaction block 22a, transaction block 22b, and transaction block 22c; and determine the transaction block corresponding to the largest second transaction resource consumption (e.g., transaction block 22a) as the block to be consensused. In this embodiment, the block to be consensused can be referred to as the first transaction block, such as... Figure 4 As shown, transaction block 22a is the first transaction block, and the block building node 21a that generated transaction block 22a is the target building node.

[0121] To prevent the first block proposal node from tampering with the transactions in the first transaction block, after receiving the first transaction block, the first block proposal node needs to broadcast a commitment that the first transaction block has not been changed, so as to improve the data security of the first transaction block and the fairness of the transaction data on the chain.

[0122] Specifically, please see Figure 5 , Figure 5 This is a schematic diagram illustrating the on-chain processing of transaction data provided in an embodiment of this application. After selecting transaction block 22a (the first transaction block) generated by block building node 21a (the target building node) as the block to be reached for consensus, the first block proposal node 23a can sign transaction block 22a according to the private key of the node corresponding to the first block proposal node 23a, thereby obtaining the commitment information (header) corresponding to the first block proposal node 23a. commitment This commitment information is used to indicate that the first block proposal node 23a has not changed transaction block 22a. This commitment information can be represented as: header commitment =(block) height MerkleRoot, signature), where block heightThis indicates the block height of transaction block 22a; MerkleRoot indicates the root hash of transaction block 22a; and signature indicates the digital signature corresponding to the first block proposal node 23a.

[0123] Step S102: Broadcast the commitment information corresponding to the first block proposal node.

[0124] Step S103: Verify the validity of the commitment information based on the public key of the node corresponding to the first block proposal node, and obtain the commitment verification result corresponding to the commitment information. If the commitment verification result indicates that the verification is successful, then pass the first fragment private key corresponding to the target building node into the key management contract.

[0125] like Figure 5 As shown, after generating the commitment information, the first block proposal node 23a can broadcast the commitment information in the blockchain network, for example, to block building nodes (e.g., block building nodes 21a, 21b, and 21c). Furthermore, the first block proposal node 23a can also pass the commitment information into the key management contract, where the block building nodes can retrieve the commitment information. After receiving the commitment information, block building nodes 21a, 21b, and 21c can verify the validity of the commitment information based on the public key corresponding to the first block proposal node 23a, obtaining the commitment verification result. The validity verification of the commitment information may include, but is not limited to: verifying whether the digital signature carried in the commitment information is the digital signature of the first block proposal node 23a, verifying whether the generation timestamp of the commitment information is within the commitment validity period, or verifying whether the commitment information contains the block root hash corresponding to transaction block 22a, etc.

[0126] like Figure 5 As shown, when block building node 21a determines that the commitment verification result corresponding to the commitment information indicates successful verification, the commitment information can be deemed valid, and block building node 21a can transmit the fragment private key 24a belonging to block building node 21a to the key management contract; when block building node 21b determines that the commitment verification result corresponding to the commitment information indicates successful verification, it can transmit the fragment private key 24b belonging to block building node 21b to the key management contract. Here, fragment private key 24a and fragment private key 24b can both be referred to as the first fragment private key. Fragment private key 24a and fragment private key 24b can be the aforementioned second fragment private key, or a derived fragment private key (SPriKey) generated based on the second fragment private key. i This application does not limit the scope of the embodiments.

[0127] Optionally, when block building node 21a determines that the commitment verification result of the commitment information corresponding to the first block proposal node 23a indicates that the verification has failed, it indicates that the commitment information may have been tampered with during transmission. In this case, block building node 21a can send a commitment retransmission message to the first block proposal node 23a. This commitment retransmission message is used to instruct the first block proposal node 23a to broadcast the regenerated commitment information in the blockchain network. That is, after receiving the commitment retransmission message sent by block building node 21a, the first block proposal node 23a needs to re-sign transaction block 22a according to the node private key corresponding to the first block proposal node 23a to obtain the regenerated commitment information, and then broadcast the regenerated commitment information in the blockchain network. Optionally, when block building node 21a detects that the commitment verification result corresponding to the regenerated commitment information still indicates that the verification has failed, it can terminate the subsequent processing flow.

[0128] Step S104: If the number of first fragment private keys in the key management contract reaches the threshold, the first fragment private keys in the key management contract are combined into a reconstructed private key. The encrypted transactions in the first transaction block are decrypted based on the reconstructed private key to obtain the decrypted transactions.

[0129] It is understandable that during the block consensus phase, it is necessary to obtain the plaintext transactions in the transaction block. Therefore, it is necessary to decrypt the encrypted transactions in the first transaction block. In this embodiment, the target building node that generates the first transaction block can decrypt the encrypted transactions in the first transaction block. Specifically, after the target node determines that the commitment verification result indicates successful verification, it checks whether the number of first fragment private keys in the key management contract has reached a threshold threshold K. When the number of first fragment private keys in the key management contract reaches the threshold threshold K, it obtains K first fragment private keys from the key management contract; K is used to represent the threshold threshold. Based on the interpolation function and the sorting position of the K first fragment private keys, the interpolation result corresponding to the K first fragment private keys is obtained. The product between the j-th first fragment private key and the interpolation result corresponding to the j-th first fragment private key is determined as the candidate key expression corresponding to the j-th first fragment private key; j is a positive integer less than or equal to K, and the specific value of j can be 1, 2...K. The candidate key expressions corresponding to the K first fragment private keys are accumulated to obtain the key reconstruction expression corresponding to the K first fragment private keys. The constant term in the key reconstruction expression is determined as the reconstruction private key. Then, the encrypted transaction (tx) in the first transaction block is encrypted based on the reconstruction private key. Encrypt Decrypt the transaction to obtain the decrypted transaction.

[0130] In the embodiments of this application, the interpolation function l j (x) can be expressed by the following formula (1):

[0131]

[0132] Among them, l j (x) represents the interpolation function; a represents the number of the a-th block building node in the blockchain network, where a is a positive integer and its value is different from that of j; This represents the set of IDs for the block building nodes. The value of x is the same as that of K; a This represents the sorting position of the first fragment private key corresponding to the a-th block building node in the blockchain network; x j This indicates the sorting position of the first fragment private key corresponding to the j-th block building node.

[0133] In this embodiment, the key reconstruction expression corresponding to the K first fragment private keys can be represented by the following formula (2):

[0134] L(x)=Σ j=1 F(j)l j (x) (2)

[0135] Where L(x) represents the key reconstruction expression corresponding to the K first fragment private keys; F(j) represents the j-th first fragment private key.

[0136] For ease of understanding, this application embodiment uses a threshold value of 2 as an example to describe the decryption process of encrypted transactions in the first transaction block. Figure 5 As shown, when block building node 21a (target building node) detects that the key management contract contains fragment private key 24a (first fragment private key) and fragment private key 24b (first fragment private key), it indicates that the number of first fragment private keys in the key management contract has reached the threshold. At this time, fragment private keys 24a and 24b in the key management contract can be obtained. Assuming that the sorting position x1 of fragment private key 24a is 1, the value F(1) of fragment private key 24a is 145; the sorting position x2 of fragment private key 24b is 2, the value F(2) of fragment private key 24b is 150, and the sorting positions x1=1 of fragment private key 24a and x2=2 of fragment private key 24b are substituted into the interpolation function l j (x), we can obtain the interpolation result l1(x) corresponding to fragment private key 24a and the interpolation result l2(x) corresponding to fragment private key 24b.

[0137] The interpolation result l1(x) corresponding to the fragment private key 24a can be represented by the following formula (3):

[0138]

[0139] The interpolation result l2(x) corresponding to the fragment private key 24b can be represented by the following formula (4):

[0140]

[0141] Furthermore, the block building node 21a can perform a multiplication operation on the fragment private key 24a and the interpolation result l1(x) corresponding to the fragment private key 24a to obtain the candidate key expression H1(x) corresponding to the fragment private key 24a, and perform a multiplication operation on the fragment private key 24b and the interpolation result l2(x) corresponding to the fragment private key 24b to obtain the candidate key expression H2(x) corresponding to the fragment private key 24b.

[0142] The candidate key expression H1(x) corresponding to fragment private key 24a can be represented by the following formula (5):

[0143] H1(x)=F(1)l1(x)=145(2-X) (5)

[0144] The candidate key expression H2(x) corresponding to the fragment private key 24b can be represented by the following formula (6):

[0145] H2(x)=F(2)l2(x)=150(x-1) (6)

[0146] The candidate key expression H1(x) corresponding to fragment private key 24a and the candidate key expression H2(x) corresponding to fragment private key 24b are summed to obtain the key reconstruction expression L(x) corresponding to fragment private key 24a and fragment private key 24b. The key reconstruction expression L(x) can be expressed by the following formula (7):

[0147] L(x)=H1(x)+H2(x)=145(2-x)+150(x-1)=140+5x (7)

[0148] In the key reconstruction expression L(x) shown in formula (7), the constant term 140 is the reconstructed private key 25a, which can then be used to reconstruct the encrypted transaction (tx) in transaction block 22a (the first transaction block). Encrypt Decrypt the transaction to obtain the decrypted transaction.

[0149] like Figure 5 As shown, after decrypting the encrypted transactions in transaction block 22a to obtain the decrypted transactions, block building node 21a can send the decrypted transactions to the first block proposal node 23a; correspondingly, the first block proposal node 23a receives the decrypted transactions and updates transaction block 22a according to the decrypted transactions and the commitment information corresponding to the first block proposal node 23a, resulting in the following... Figure 5The transaction block 26a shown is the second transaction block. Specifically, after receiving the decrypted transaction, the first block proposal node 23a can replace the encrypted transaction in transaction block 22a with the decrypted transaction to obtain a candidate transaction block, and add the commitment information to the block header of the candidate transaction block, thus obtaining transaction block 26a. In other words, all transactions in transaction block 26a are plaintext transactions.

[0150] Optionally, after obtaining the decrypted transaction, the block building node 21a can also replace the encrypted transaction in transaction block 22a with the decrypted transaction to obtain a candidate transaction block, and add the commitment information corresponding to the first block proposal node 23a to the block header of the candidate transaction block to obtain transaction block 26a, and send transaction block 26a to the first block proposal node 23a.

[0151] Step S105: Obtain the second transaction block and broadcast it to the blockchain network for consensus processing.

[0152] like Figure 5 As shown, after obtaining transaction block 26a (the second transaction block), the first block proposal node 23a can broadcast transaction block 26a to the blockchain network. Upon receiving transaction block 26a, the block proposal nodes in the blockchain network (e.g., block proposal nodes 40a, 40b, 40c, and 40d, etc.) perform consensus processing on transaction block 26a. This includes verifying the unverified root hash corresponding to the decrypted transactions in transaction block 26a, verifying each transaction contained in transaction block 26a, and verifying the block building node (block building node 21a) that generated transaction block 26a. After obtaining the consensus verification result corresponding to transaction block 26a, the block proposal nodes can broadcast the consensus verification result in the blockchain network. Therefore, under normal network communication, the first block proposal node can obtain the consensus verification results for transaction block 26a from each block proposal node in the blockchain network. It is understandable that block proposal nodes in a blockchain network may include the first block proposal node 23a.

[0153] Furthermore, the first block proposal node 23a can statistically analyze the consensus verification results corresponding to each block proposal node to obtain the number of consensus votes for transaction block 26a in the blockchain network, i.e., the number of nodes in the blockchain network whose verification result for transaction block 26a is passed. If the number of consensus votes is greater than or equal to a threshold (the threshold can be determined according to the consensus algorithm used in the blockchain network; for example, the threshold can be set to 2 / 3 of the number of block proposal nodes in the blockchain network), then it can be determined that transaction block 26a has reached consensus in the blockchain network. If the number of consensus votes is less than the threshold, then it can be determined that transaction block 26a has not reached consensus in the blockchain network. The consensus algorithm can include, but is not limited to, Proof of Work (PoW), Proof of Stake (PoS), DPoS, Practical Byzantine Fault Tolerance (PBFt), etc., and this embodiment does not limit the specific algorithms used.

[0154] like Figure 5 As shown, after consensus is passed, transaction block 26a can be updated in height according to the maximum block height in blockchain 10e stored by the first block proposal node 23a. The updated transaction block 26a is then stored in the local database of the first block proposal node 23a. At this point, transaction block 26a is successfully stored in blockchain 10e, and the first block proposal node 23a can broadcast the successful on-chain result of transaction block 26a in the blockchain network. When the consensus result corresponding to transaction block 26a indicates that consensus has not passed, the first block proposal node 23a can broadcast the failed on-chain result of transaction block 26a in the blockchain network to restart block consensus at the current block height.

[0155] In this embodiment, after receiving the instruction broadcast by the first block proposer that the commitment information of the first transaction block containing encrypted transactions has not been changed, the target building node can verify the validity of the commitment information based on the public key of the node corresponding to the first block proposer. If the verification result of the commitment information indicates that the verification is successful, the target building node transmits the first fragment private key corresponding to the key management contract. If the target building node detects that the number of first fragment private keys in the key management contract has reached a threshold, it combines the first fragment private keys in the key management contract into a reconstructed private key, and decrypts the encrypted transactions in the first transaction block based on the reconstructed private key to obtain a decrypted transaction. This decrypted transaction is used to replace the encrypted transactions in the first transaction block to obtain a second transaction block. The second transaction block is broadcast by the first block proposer to the blockchain network for consensus processing, and then the consensus result of the second transaction block determines whether to store the second transaction block in the blockchain. Therefore, in this embodiment of the application, the transactions in the first transaction block are encrypted transactions. As a result, the target building node cannot selectively select transaction data to generate a transaction block based on the specific content of the transaction. When the first block proposing node receives the transaction block submitted by the block building node, it also cannot obtain the plaintext transactions in the transaction block. Therefore, it cannot selectively select transaction blocks to be uploaded to the chain based on the transaction content contained in the transaction block, thereby improving the fairness of the transaction data upload to the chain.

[0156] Please see Figure 6 , Figure 6 This application provides a time-series interaction of a blockchain-based data processing method. Figure 2 This blockchain-based data processing method can be executed interactively by the target building node, the first block proposal node, and the second block proposal node. The target building node, the first block proposal node, and the second block proposal node can be... Figure 1 The blockchain nodes in the blockchain network shown. For example... Figure 2 As shown, the blockchain-based data processing method may include steps S201 to S210, wherein:

[0157] Step S201: Based on the private key of the first block proposal node, sign the first transaction block generated by the target building node to obtain the commitment information corresponding to the first block proposal node.

[0158] After generating a transaction block containing encrypted transactions, the block-building node in the blockchain network can submit this transaction block to the first block proposal node. Upon receiving transaction blocks from multiple block-building nodes, the first block proposal node can select the transaction block with the highest second-level transaction resource consumption as the first transaction block. Optionally, when selecting the first transaction block from multiple transaction blocks, the first block submission node also needs to determine whether the block size meets the capacity requirement. If the block size is greater than the capacity threshold, it will not be selected as the first transaction block; that is, the first transaction block's size must be less than or equal to the capacity threshold.

[0159] Furthermore, the first block proposal node can obtain the block root hash and block height from the first transaction block, fill the block root hash and block height with data to obtain random fill data, split the random fill data to obtain P segments of fill data; P is an integer greater than 1, and the specific value of P can be 2, 3, or 10, etc.; obtain the l-th input data of the compression function; when l is 1, the l-th input data includes the initial compressed data and the first segment of fill data in the P segments; when l is not 1, the l-th input data includes the (l-1)-th output data of the compression function and the k-th segment of fill data in the P segments; l is a positive integer less than or equal to P, and the specific value of l can be 1, 2, 3...P; compress the l-th input data according to the compression function to obtain the l-th output data corresponding to the compression function, and determine the P-th output data corresponding to the compression function as the compressed information; encrypt the compressed information according to the node private key corresponding to the first block proposal node to obtain the commitment information corresponding to the first block proposal node. This commitment information is used to indicate that the first block proposal node has not changed the first transaction block.

[0160] A compression function is used to compress input data into a fixed-length dataset. The initial compressed data is the initial state or starting value of the compression function, and its specific value can be determined based on the actual situation. Compression functions can include, but are not limited to: circular left shift functions, modular addition functions, XOR operations, Boolean functions, and permutation functions.

[0161] In this embodiment, the first block proposal node can concatenate the block root hash and block height of the first transaction block to obtain concatenated data, and then fill the concatenated data with random data to obtain randomly filled data. Optionally, to ensure data consistency, the concatenated data can be formatted first, for example, converted to binary or hexadecimal, etc. For example, in this embodiment, the number "1" can be added to the end of the concatenated data, followed by z digits "0", where z is the smallest non-negative integer satisfying I+1+z≡448mod512, I represents the length of the concatenated data, ≡ represents congruence, and mod represents modulo operation; then, a 64-bit bit string of fill data (which can be a binary representation of length I) is added to obtain the randomly filled data. It is understood that the randomly filled data is a positive integer multiple of 512, that is, the number of bits in the randomly filled data is 512×P.

[0162] Furthermore, the first block proposal node can split the 512×P-bit random padding data into P segments of 512 bits each, resulting in P segments of padding data: segment padding data 1, segment padding data 2, ..., segment padding data P, each segment being 512 bits. The initial compressed data and the P segments of padding data are then substituted into the compression function for P iterations. In the first iteration, the input data for the compression function includes the initial compressed data and segment padding data 1. The first block proposal node can call the compression function to compress the initial compressed data and segment padding data 1, obtaining the first output data of the compression function. In subsequent iterations, the input data for the compression function includes the output data of the previous compression function and the segment padding data corresponding to the current iteration. The compression function then compresses the input data for the current iteration, obtaining the output data for the current iteration, until the Pth iteration is executed, at which point the Pth output data of the compression function is determined as the compressed information. After obtaining the compressed information, it can be encrypted using the private key of the node corresponding to the first block proposal node to obtain the commitment information (header) of the first block proposal node. commitment The commitment information includes, but is not limited to: the block root hash and block height of the first transaction block, and the digital signature of the first block proposal node.

[0163] Step S202: Broadcast the commitment information corresponding to the first block proposal node.

[0164] Step S203: Verify the validity of the commitment information based on the public key of the node corresponding to the first block proposal node, and obtain the commitment verification result corresponding to the commitment information.

[0165] After generating the commitment information, the first block proposal node can broadcast the commitment information in the blockchain network. Upon receiving the commitment information, the block building nodes in the blockchain network can verify its validity using the public key of the first block proposal node, obtaining the commitment verification result. For ease of understanding, this embodiment uses the target building node (the block building node that generates the first transaction block) as an example to describe the commitment information verification process. The specific process of other block building nodes verifying commitment information can refer to the following implementation process, and will not be repeated in this embodiment.

[0166] After receiving the commitment information from the first block proposal node, the target building node can obtain the public key of the first block proposal node, decrypt the commitment information using this public key to obtain the first digest information, and then perform a hash operation on the commitment information using a hash function (the same hash function used to generate the commitment information) to obtain the second digest information. Further, the target building node can compare the first digest information with the second digest information to determine the commitment verification result. When the first digest information and the second digest information are the same, it indicates that the commitment information was signed by the first block proposal node, thus confirming that the commitment verification result indicates successful verification. When the first digest information and the second digest information are different, it indicates that the commitment information was not signed by the first block proposal node, thus confirming that the commitment verification result indicates unsuccessful verification. The hash function can be one or more of the hash functions corresponding to hash algorithms such as SHA-1, SHA-224, SHA-256, SHA-384, and SHA-512.

[0167] Step S204: If the verification result indicates that the verification is successful, the second fragment private key corresponding to the target building node is split into N first sub-fragment private keys, and the N first sub-fragment private keys are distributed to N block building nodes.

[0168] Step S205: Receive the second sub-fragment private keys corresponding to N-1 block building nodes other than the target building node, combine the first sub-fragment private key distributed to the target building node and the N-1 second sub-fragment private keys into the first fragment private key corresponding to the target building node, and pass the first fragment private key corresponding to the target building node into the key management contract.

[0169] In this embodiment, after the block building node verifies the commitment information corresponding to the first block proposing node, it can generate a first fragment private key from the second fragment private key distributed according to the key management contract. Then, it transmits its respective first fragment private key to the key management contract so that the target building node can decrypt the encrypted transactions in the first transaction block based on the K first fragment private keys. It is understood that transmitting the first fragment private key generated from the second fragment private key to the key management contract for decryption avoids exposing the first fragment private key, thus improving the security of the first private key fragment.

[0170] Specifically, please see Figure 7 , Figure 7 This is a schematic diagram illustrating the generation of a fragmented private key according to an embodiment of this application. For example... Figure 7 As shown, the block building nodes in the blockchain network can include block building node 21a, block building node 21b, and block building node 21c. Block building node 21a can call the key management contract to obtain fragment private key 29a, block building node 21b can call the key management contract to obtain fragment private key 29b, and block building node 21c can call the key management contract to obtain fragment private key 29c. Fragment private keys 29a, 29b, and 29c are all second fragment private keys. The process of obtaining the second fragment private key can be referred to... Figure 2 The description of step S101 shown will not be repeated here.

[0171] Block building node 21a can split fragment private key 29a into three sub-fragment private keys, and then distribute the three sub-fragment private keys to block building nodes 21a, 21b, and 21c. One sub-fragment private key is used to distribute to one block building node. For example, the expression of the key splitting function corresponding to fragment private key 29a can be f1(x) = u1 + b1x, where u1 is the specific value of fragment private key 29a, and b1 is a random number generated by block building node 21a; for ease of understanding, this embodiment uses u1 = 20 and b1 = 2 as an example for description. In this embodiment of the application, the block building node 21a can split the fragment private key 29a into sub-fragment private key 30a, sub-fragment private key 30b and sub-fragment private key 30c according to the expression f1(x) of the key splitting function corresponding to the fragment private key 29a. Among them, the sub-fragment private key 30a can be recorded as f1(1), f1(1)=20+2×1=22; the sub-fragment private key 30b can be recorded as f1(2), f1(2)=20+2×2=24; the sub-fragment private key 30c can be recorded as f1(3), f1(3)=20+2×3=26. Then, the sub-fragment private key 30a can be distributed to the block building node 21a, the sub-fragment private key 30b can be distributed to the block building node 21b, and the sub-fragment private key 30c can be distributed to the block building node 21c. Sub-fragment private keys 30a, 30b, and 30c can all be called the first sub-fragment private key.

[0172] The expression for the key splitting function corresponding to fragment private key 29b can be f2(x) = u2 + b2x, where u2 is the specific value of fragment private key 29b and b2 is a random number generated by block building node 21b. For ease of understanding, this application embodiment uses u2 = 40 and b2 = 6 as an example. In this application embodiment, block building node 21b can split fragment private key 29b into sub-fragment private key 31a, sub-fragment private key 31b and sub-fragment private key 31c according to the expression f1(x) of the key splitting function corresponding to fragment private key 29b. Sub-fragment private key 31a can be recorded as f2(1), f2(1) = 40 + 6 × 1 = 46; sub-fragment private key 31b can be recorded as f2(2), f2(2) = 40 + 6 × 2 = 52; sub-fragment private key 31c can be recorded as f2(3), f2(3) = 40 + 6 × 3 = 58. Then, the sub-fragment private key 31a can be distributed to the block building node 21a, the sub-fragment private key 31b can be distributed to the block building node 21b, and the sub-fragment private key 31c can be distributed to the block building node 21c. The sub-fragment private keys 31a, 31b, and 31c can all be called the second sub-fragment private key.

[0173] The expression for the key splitting function corresponding to fragment private key 29c can be f3(x) = u3 + b3x, where u3 is the specific value of fragment private key 29c and b3 is a random number generated by block building node 21c. For ease of understanding, this application embodiment uses u3 = 80 and b3 = 10 as an example. In this application embodiment, block building node 21c can split fragment private key 29c into sub-fragment private key 32a, sub-fragment private key 32b and sub-fragment private key 32c according to the expression f3(x) of the key splitting function corresponding to fragment private key 29c. Sub-fragment private key 32a can be denoted as f3(1), f3(1) = 80 + 10 × 1 = 90; sub-fragment private key 32b can be denoted as f3(2), f3(2) = 80 + 10 × 1 = 90. 10×2=100; Sub-fragment private key 32c can be denoted as f3(3), f3(3)=80+10×3=110. Sub-fragment private key 32a can be distributed to block building node 21a, sub-fragment private key 32b can be distributed to block building node 21b, and sub-fragment private key 32c can be distributed to block building node 21c. Sub-fragment private key 32a, sub-fragment private key 32b and sub-fragment private key 32c can all be called second sub-fragment private key.

[0174] like Figure 7 As shown, block building node 21a can combine the received sub-fragment private keys 30a, 31a, and 32a to obtain fragment private key 33a, and then privately store fragment private key 33a. Fragment private key 33a can be denoted as F1, where F1 = f1(1) + f2(1) + f3(1) = 158. Similarly, block building node 21b can combine the received sub-fragment private keys 30b, 31b, and 32b to obtain fragment private key 33b, and then privately store fragment private key 33b. Fragment private key 33b can be denoted as F2, where F2 = f1(2) + f2(2) + f3(2) = 176. Block building node 21c can combine the received sub-fragment private keys 30c, 31c, and 32c to obtain fragment private key 33c, and then privately store fragment private key 33c. Fragment private key 33c can be denoted as F3, where F3 = f1(3) + f2(3) + f3(3) = 194. Fragment private keys 33a, 33b, and 33c can all be called the first fragment private key. Any two or more of the fragment private keys 33a, 33b, and 33c can be combined to generate a reconstructed private key.

[0175] Understandably, when block building node 21a determines that the commitment verification result of the commitment information corresponding to the first block proposal node indicates that the verification has passed, it can pass the fragment private key 33a to the key management contract; similarly, when block building node 21b determines that the commitment verification result indicates that the verification has passed, it can pass the fragment private key 33b to the key management contract; and when block building node 21c determines that the commitment verification result indicates that the verification has passed, it can pass the fragment private key 33c to the key management contract.

[0176] Step S206: If the number of first fragment private keys in the key management contract reaches the threshold, the first fragment private keys in the key management contract are combined into a reconstructed private key. The encrypted transactions in the first transaction block are decrypted using the reconstructed private key to obtain the decrypted transactions.

[0177] When the target build node detects the first fragment of the private key (SPriKey) in the key management contract i When the number of fragments of private key in the key management contract reaches a threshold, the first fragment of private key can be combined into a reconstructed private key. This reconstructed private key is then used to analyze the encrypted transactions (tx) contained in the first transaction block. Encrypt Decrypt each transaction individually to obtain the decrypted transaction amount (tx). Decrypt Among them, tx Decrypt =MultiDescypt(tx Encrypt ,[SPriKey i ])=(tx,Amount bid ,tx size ), where MultiDescypt represents the decryption function and tx represents the plaintext transaction content.

[0178] Step S207: Send the decryption transaction.

[0179] After receiving the decryption transaction, the target block-building node can send the decryption transaction to the first block-building node; correspondingly, the first block-building node receives the decryption transaction.

[0180] Step S208: Update the first transaction block according to the decrypted transaction and commitment information to obtain the second transaction block.

[0181] Step S209: Broadcast the second transaction block.

[0182] After receiving the decrypted transaction, the first block proposal node can replace the encrypted transaction in the first transaction block with the decrypted transaction to obtain a candidate transaction block. It then adds the commitment information to the block header of the candidate transaction block, thus obtaining the second transaction block. This second transaction block is then broadcast to the blockchain network for consensus. The second transaction block can be represented as Block = (header...) commitment ,[txDecrypt ]).

[0183] Step S210: Generate a root hash to be verified based on the decryption transaction in the second transaction block. If the root hash to be verified is found to be inconsistent with the block root hash in the commitment information, generate a vote against the second transaction block.

[0184] In this embodiment, a block proposal node other than the first block proposal node in the blockchain network can be designated as the second block proposal node. The second block proposal node is used to verify the unverified root hash generated by the decrypted transaction in the second transaction block. Specifically, after receiving the second transaction block, the second block proposal node obtains the transaction hash corresponding to the decrypted transaction in the second transaction block, generates the unverified root hash based on the transaction hash, and then compares the unverified root hash with the commitment information header. commitment The block root hash MerkleRoot in the commitment information is compared. If the unverified root hash is found to be inconsistent with the block root hash in the commitment information, it indicates that the first block proposer has changed the encrypted transaction in the first block transaction. At this time, the second block proposer can generate a vote against the second transaction block and broadcast the vote against the second transaction block in the blockchain network. In addition, when the second block proposer detects that the first block proposer has changed the encrypted transaction in the first block transaction, it can be determined that the current first block proposer has violated the consensus protocol. At this time, penalty measures will be implemented against the first block proposer. The penalty measures may include, but are not limited to: re-electing a new first block proposer at the current block height, deducting part of the current first block proposer's equity, or removing the current first block proposer from the block proposer list.

[0185] When the second block proposal node detects that the root hash to be verified matches the block root hash in the commitment information, it can continue to verify each transaction contained in the second transaction block, as well as the block building node (target building node) that generated the second transaction block, thereby obtaining the consensus verification result corresponding to transaction block 26a. When the first block proposal node detects that the consensus verification result indicates that the consensus of the second transaction block has passed, it can store the second transaction block on the blockchain.

[0186] In this embodiment, after receiving the instruction broadcast by the first block proposer that the commitment information of the first transaction block containing encrypted transactions has not been changed, the target building node can verify the validity of the commitment information based on the public key of the node corresponding to the first block proposer. If the verification result of the commitment information indicates that the verification is successful, the target building node transmits the first fragment private key corresponding to the key management contract. If the target building node detects that the number of first fragment private keys in the key management contract has reached a threshold, it combines the first fragment private keys in the key management contract into a reconstructed private key, and decrypts the encrypted transactions in the first transaction block based on the reconstructed private key to obtain a decrypted transaction. This decrypted transaction is used to replace the encrypted transactions in the first transaction block to obtain a second transaction block. The second transaction block is broadcast by the first block proposer to the blockchain network for consensus processing, and then the consensus result of the second transaction block determines whether to store the second transaction block in the blockchain. Therefore, in this embodiment of the application, the transactions in the first transaction block are encrypted transactions. As a result, the target building node cannot selectively select transaction data to generate a transaction block based on the specific content of the transaction. When the first block proposing node receives the transaction block submitted by the block building node, it also cannot obtain the plaintext transactions in the transaction block. Therefore, it cannot selectively select transaction blocks to be uploaded to the chain based on the transaction content contained in the transaction block, thereby improving the fairness of the transaction data upload to the chain.

[0187] It is understood that in the specific implementation of this application, user information (e.g., user transaction data) and other related data may be involved. When the embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of related data must comply with the laws, regulations and standards of the relevant regions.

[0188] Please see Figure 8 , Figure 8 This is a schematic diagram of the structure of a blockchain-based data processing device provided in an embodiment of this application. Figure 1 The aforementioned blockchain-based data processing device can be applied to the target building node to execute the corresponding steps in the method provided in the embodiments of this application. For example... Figure 8 As shown, the blockchain-based data processing device 1 may include: a commitment information acquisition module 11, a commitment information verification module 12, and a transaction decryption module 13, wherein:

[0189] The commitment information acquisition module 11 is used to acquire the commitment information corresponding to the first block proposal node. The commitment information is obtained by the first block proposal node signing the first transaction block generated by the target building node based on the node private key corresponding to the first block proposal node. The commitment information is used to indicate that the first block proposal node has not changed the first transaction block. The first transaction block includes encrypted transactions.

[0190] The commitment information verification module 12 is used to verify the validity of the commitment information based on the node public key corresponding to the first block proposal node, and obtain the commitment verification result corresponding to the commitment information. If the commitment verification result indicates that the verification is successful, the first fragment private key corresponding to the target building node is passed to the key management contract.

[0191] The transaction decryption module 13 is used to combine the first fragment private keys in the key management contract into a reconstructed private key if the number of first fragment private keys in the key management contract reaches a threshold. The reconstructed private key is used to decrypt the encrypted transactions in the first transaction block to obtain the decrypted transaction. The decrypted transaction is used to replace the encrypted transaction in the first transaction block to obtain the second transaction block. The second transaction block is broadcast to the blockchain network by the first block proposal node for consensus processing.

[0192] In one possible implementation, the blockchain-based data processing device 1 may further include: a first transaction block generation module 14, the first transaction block generation module 14 being used for:

[0193] Retrieve M encrypted candidate transactions from the transaction pool, and obtain the first transaction resource consumption and transaction capacity of the i-th candidate transaction among the M candidate transactions; M is a positive integer, and i is a positive integer less than or equal to M;

[0194] The ratio between the resource consumption and transaction capacity of the first transaction corresponding to the i-th candidate transaction is determined as the selection evaluation value corresponding to the i-th candidate transaction;

[0195] Obtain the selection evaluation values ​​corresponding to M candidate transactions, and sort the M candidate transactions in descending order based on the selection evaluation values ​​to obtain the sorted M candidate transactions;

[0196] The first t candidate transactions from the sorted M candidate transactions are determined as encrypted transactions. The encrypted transactions are encapsulated into the first transaction block and sent to the first block proposal node. The sum of the transaction capacities corresponding to the t candidate transactions is less than or equal to the block capacity, where t is a positive integer less than or equal to M.

[0197] In one possible implementation, the commitment information verification module 12 is specifically used for:

[0198] Obtain the public key of the node corresponding to the first block proposal node, decrypt the commitment information according to the node public key to obtain the first digest information corresponding to the commitment information, and perform a hash operation on the commitment information according to the hash function to obtain the second digest information corresponding to the commitment information.

[0199] If the first summary information is the same as the second summary information, then the verification result of the commitment information is determined to indicate that the verification is successful;

[0200] If the first summary information is different from the second summary information, then the commitment verification result corresponding to the commitment information indicates that the verification failed.

[0201] In one possible implementation, the number of block building nodes in the blockchain network is N, where N is an integer greater than or equal to a threshold threshold; the N block building nodes include the target building node, and the commitment information verification module 12 is specifically used for:

[0202] If the verification result indicates that the verification is successful, the second fragment private key corresponding to the target building node is split into N first sub-fragment private keys, and the N first sub-fragment private keys are distributed to N block building nodes; one first sub-fragment private key is used to distribute to one block building node;

[0203] Receive the second sub-fragment private keys corresponding to N-1 block building nodes other than the target building node, combine the first sub-fragment private key distributed to the target building node and the N-1 second sub-fragment private keys into the first fragment private key corresponding to the target building node, and pass the first fragment private key corresponding to the target building node into the key management contract.

[0204] In one possible implementation, the commitment information verification module 12 is further configured to:

[0205] Invoke the key management contract and, based on the key generation logic within the contract, generate a joint private key for the nodes associated with N block building nodes;

[0206] Based on the key splitting logic in the key management contract, the node's joint private key is split into N second fragment private keys;

[0207] Through a key management contract, a second fragment private key is allocated to the target building node from N second fragment private keys; one second fragment private key is used to allocate to a block building node.

[0208] In one possible implementation, the transaction decryption module 13 is specifically used for:

[0209] If the number of first fragment private keys in the key management contract reaches the threshold, then K first fragment private keys in the key management contract are obtained; K is used to represent the threshold.

[0210] Based on the interpolation function and the sorting position of the K first fragment private keys, the interpolation results corresponding to the K first fragment private keys are obtained. The product between the j-th first fragment private key and the interpolation result corresponding to the j-th first fragment private key is determined as the candidate key expression corresponding to the j-th first fragment private key; j is a positive integer less than or equal to K.

[0211] The candidate key expressions corresponding to the K first fragment private keys are summed to obtain the key reconstruction expressions corresponding to the K first fragment private keys. The constant terms in the key reconstruction expressions are determined as the reconstructed private keys.

[0212] In one possible implementation, the blockchain-based data processing device 1 further includes: a retransmission message sending module 15, which is used for:

[0213] If the verification result indicates that the verification failed, a commitment retransmission message is sent to the first block proposal node; the commitment retransmission message is used to instruct the first block proposal node to broadcast the regenerated commitment information in the blockchain network.

[0214] In one possible implementation, the blockchain-based data processing device 1 further includes: a second transaction block generation module 16, the second transaction block generation module 16 being used for:

[0215] Replace the encrypted transactions in the first transaction block with the decrypted transactions to obtain a candidate transaction block. Add the commitment information to the block header of the candidate transaction block to obtain the second transaction block. Send the second transaction block to the first block proposal node.

[0216] Alternatively, the decryption transaction can be sent to the first block proposal node, so that the first block proposal node can update the first transaction block based on the decryption transaction and commitment information, thus obtaining the second transaction block.

[0217] According to one embodiment of this application, the steps involved in the blockchain-based data processing method described above can be performed by... Figure 8 The various modules in the blockchain-based data processing device 1 shown are used to execute this process. For example, Figure 2 The step S103 shown can be performed by Figure 8 The commitment information verification module 12 shown is used to perform this. Figure 2 Step S104 shown can be derived from Figure 8 The transaction decryption module 13 shown is used to perform operations, etc.

[0218] Please see Figure 9 , Figure 9 This is a schematic diagram of the structure of a blockchain-based data processing device provided in an embodiment of this application. Figure 2 The aforementioned blockchain-based data processing apparatus can be applied to the first block proposal node to execute the corresponding steps in the method provided in the embodiments of this application. For example... Figure 9 As shown, the blockchain-based data processing device 2 may include: a commitment information generation module 21, a commitment information broadcasting module 22, and a transaction block acquisition module 23, wherein:

[0219] The commitment information generation module 21 is used to sign the first transaction block generated by the target building node according to the node private key corresponding to the first block proposal node, and obtain the commitment information corresponding to the first block proposal node; the commitment information is used to indicate that the first block proposal node has not changed the first transaction block; the first transaction block includes encrypted transactions;

[0220] The commitment information broadcasting module 22 is used to broadcast commitment information in the blockchain network so that when multiple block building nodes in the blockchain network determine that the commitment information has been verified based on the node public key corresponding to the first block proposal node, they will send their respective first fragment private keys to the key management contract; the multiple block building nodes in the blockchain network include the target building node;

[0221] The transaction block acquisition module 23 is used to acquire the second transaction block if the first fragment private key corresponding to the target building node is passed to the key management contract and the number of the first fragment private keys in the key management contract reaches the threshold, and broadcast the second transaction block to the blockchain network for consensus processing.

[0222] The second transaction block includes a decryption transaction, which is the process by which the target building node decrypts the encrypted transactions in the first transaction block using the reconstructed private key. The reconstructed private key is obtained by combining the first fragment private key from the key management contract.

[0223] In one possible implementation, the blockchain-based data processing device 2 may further include: a transaction block selection module 24, which is used for:

[0224] Receive transaction blocks generated by multiple block building nodes, and obtain the second transaction consumption resources of the transaction blocks generated by multiple block building nodes;

[0225] The transaction block corresponding to the second transaction with the largest resource consumption is designated as the first transaction block.

[0226] In one possible implementation, the commitment information generation module 21 is specifically used for:

[0227] Obtain the block root hash and block height from the first transaction block. Fill the block root hash and block height with data to obtain random fill data. Split the random fill data to obtain P segments of fill data; P is an integer greater than 1.

[0228] Obtain the l-th input data of the compression function; when l is 1, the l-th input data includes the initial compressed data and the first segmented padding data in P segmented padding data; when l is not 1, the l-th input data includes the (l-1)-th output data of the compression function and the k-th segmented padding data in P segmented padding data; l is a positive integer less than or equal to P;

[0229] The l-th input data is compressed according to the compression function to obtain the l-th output data corresponding to the compression function. The p-th output data corresponding to the compression function is determined as the compressed information.

[0230] The compressed information is encrypted using the private key of the node that proposed the first block, thus obtaining the commitment information corresponding to the node that proposed the first block.

[0231] In one possible implementation,

[0232] The blockchain network also includes a second block proposal node, which is used to receive the second transaction block broadcast by the first block proposal node, and generate a root hash to be verified based on the decryption transaction in the second transaction block; when the root hash to be verified is inconsistent with the block root hash in the commitment information, the second block proposal node is used to generate a vote against the second transaction block.

[0233] According to one embodiment of this application, the steps involved in the blockchain-based data processing method described above can be performed by... Figure 9 The various modules in the blockchain-based data processing device 2 shown are used to execute this process. For example, Figure 2 The step S101 shown can be performed by Figure 9 The commitment information generation module 21 shown is used to execute this. Figure 2 The step S102 shown can be performed by Figure 9 The commitment information broadcasting module 22 shown is used to execute this. Figure 2 The step S105 shown can be performed by Figure 9 The transaction block acquisition module 23 shown is used to perform operations, etc.

[0234] In this application embodiment, the terms "module" or "unit" refer to a computer program or part of a computer program that has a predetermined function and works with other related parts to achieve a predetermined goal, and can be implemented wholly or partially using software, hardware (such as processing circuitry or memory), or a combination thereof. Similarly, a processor (or multiple processors or memory) can be used to implement one or more modules or units. Furthermore, each module or unit can be part of an overall module or unit that includes the functionality of that module or unit.

[0235] According to one embodiment of this application, Figure 8 The blockchain-based data processing device 1 and Figure 9The modules in the blockchain-based data processing device 2 shown can be individually or entirely merged into one or more units, or some of these units can be further divided into at least two functionally smaller sub-units to achieve the same operation without affecting the technical effects of the embodiments of this application. The above modules are based on logical functional division. In practical applications, the function of one module can also be implemented by at least two units, or the function of at least two modules can be implemented by one unit. In other embodiments of this application, the blockchain-based data processing device 1 and the blockchain-based data processing device 2 may also include other units. In practical applications, these functions can also be implemented with the assistance of other units, and can be implemented collaboratively by at least two units.

[0236] In this embodiment, after receiving the instruction broadcast by the first block proposer that the commitment information of the first transaction block containing encrypted transactions has not been changed, the target building node can verify the validity of the commitment information based on the public key of the node corresponding to the first block proposer. If the verification result of the commitment information indicates that the verification is successful, the target building node transmits the first fragment private key corresponding to the key management contract. If the target building node detects that the number of first fragment private keys in the key management contract has reached a threshold, it combines the first fragment private keys in the key management contract into a reconstructed private key, and decrypts the encrypted transactions in the first transaction block based on the reconstructed private key to obtain a decrypted transaction. This decrypted transaction is used to replace the encrypted transactions in the first transaction block to obtain a second transaction block. The second transaction block is broadcast by the first block proposer to the blockchain network for consensus processing, and then the consensus result of the second transaction block determines whether to store the second transaction block in the blockchain. Therefore, in this embodiment of the application, the transactions in the first transaction block are encrypted transactions. As a result, the target building node cannot selectively select transaction data to generate a transaction block based on the specific content of the transaction. When the first block proposing node receives the transaction block submitted by the block building node, it also cannot obtain the plaintext transactions in the transaction block. Therefore, it cannot selectively select transaction blocks to be uploaded to the chain based on the transaction content contained in the transaction block, thereby improving the fairness of the transaction data upload to the chain.

[0237] Please see Figure 10 , Figure 10 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Figure 10As shown, the computer device 1000 can be a terminal device or a server; this is not a limitation. For ease of understanding, this application uses a computer device as a terminal device as an example. The computer device 1000 may include: a processor 1001, a network interface 1004, and a memory 1005. Furthermore, the computer device 1000 may also include: a user interface 1003, and at least one communication bus 1002. The communication bus 1002 is used to implement communication between these components. The user interface 1003 may include a display screen and a keyboard. Optionally, the user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a Wi-Fi interface). The memory 1005 may be high-speed RAM or non-volatile memory, such as at least one disk storage device. Optionally, the memory 1005 may also be at least one storage device located remotely from the aforementioned processor 1001. Figure 10 As shown, the memory 1005, which is a computer-readable storage medium, may include an operating system, a network communication module, a user interface module, and a device control application.

[0238] Among them, Figure 10 In the computer device 1000 shown, the network interface 1004 provides network communication functionality; the user interface 1003 is mainly used to provide an input interface for the user; the processor 1001 can be used to call the device control application stored in the memory 1005 to achieve:

[0239] Obtain the commitment information corresponding to the first block proposal node; the commitment information is obtained by the first block proposal node signing the first transaction block generated by the target building node based on the node private key corresponding to the first block proposal node; the commitment information is used to indicate that the first block proposal node has not changed the first transaction block; the first transaction block includes encrypted transactions;

[0240] The validity of the commitment information is verified based on the public key of the node corresponding to the first block proposal node, and the commitment verification result corresponding to the commitment information is obtained. If the commitment verification result indicates that the verification is successful, the private key of the first fragment corresponding to the target building node is passed to the key management contract.

[0241] If the number of first fragment private keys in the key management contract reaches a threshold, the first fragment private keys in the key management contract are combined into a reconstructed private key. The encrypted transactions in the first transaction block are decrypted using the reconstructed private key to obtain the decrypted transaction. The decrypted transaction is used to replace the encrypted transaction in the first transaction block to obtain the second transaction block. The second transaction block is broadcast to the blockchain network by the first block proposal node for consensus processing.

[0242] Alternatively, processor 1001 can also be used to call device control applications stored in memory 1005 to achieve:

[0243] Based on the private key of the first block proposal node, the first transaction block generated by the target building node is signed to obtain the commitment information corresponding to the first block proposal node; the commitment information is used to indicate that the first block proposal node has not changed the first transaction block; the first transaction block includes encrypted transactions;

[0244] The commitment information is broadcast in the blockchain network so that when the commitment information is verified based on the public key of the first block proposal node, the respective first fragment private key is sent to the key management contract; the multiple block building nodes in the blockchain network include the target building node;

[0245] If the first fragment private key corresponding to the target building node is passed to the key management contract, and the number of first fragment private keys in the key management contract reaches the threshold, then the second transaction block is obtained and broadcast to the blockchain network for consensus processing.

[0246] The second transaction block includes a decryption transaction, which is the process by which the target building node decrypts the encrypted transactions in the first transaction block using the reconstructed private key. The reconstructed private key is obtained by combining the first fragment private key from the key management contract.

[0247] It should be understood that the computer device 1000 described in the embodiments of this application can execute the foregoing text. Figure 2 or Figure 6 The description of the blockchain-based data processing method in the corresponding embodiments can also be performed as described above. Figure 8 The corresponding embodiment refers to the blockchain-based data processing device 1 or Figure 9 The description of the blockchain-based data processing device 2 in the corresponding embodiments will not be repeated here. Furthermore, the beneficial effects of using the same method will also not be repeated here.

[0248] Furthermore, it should be noted that this application embodiment also provides a computer-readable storage medium, which stores a computer program executed by the aforementioned blockchain-based data processing device 1 and blockchain-based data processing device 2. The computer program includes program instructions, and when the processor executes the program instructions, it can execute the aforementioned... Figure 2 or Figure 6 The description of the blockchain-based data processing method in the corresponding embodiments will not be repeated here. Similarly, the beneficial effects of using the same method will not be repeated here either. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc. For technical details not disclosed in the embodiments of the computer-readable storage medium involved in this application, please refer to the description of the method embodiments of this application. As an example, program instructions can be deployed and executed on a single computer device, or on multiple computer devices located in one location, or on multiple computer devices distributed across multiple locations and interconnected via a communication network. These multiple computer devices distributed across multiple locations and interconnected via a communication network can constitute a blockchain system.

[0249] Furthermore, it should be noted that this application also provides a computer program product or computer program, which may include computer instructions, which may be stored in a computer-readable storage medium. The processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor may execute the computer instructions, causing the computer device to perform the aforementioned actions. Figure 2 or Figure 6 The description of the blockchain-based data processing method in the corresponding embodiments is already provided and will not be repeated here. Furthermore, the beneficial effects of using the same method will also not be repeated. For technical details not disclosed in the computer program products or computer program embodiments related to this application, please refer to the description of the method embodiments of this application.

[0250] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.

[0251] The steps in the method of this application embodiment can be adjusted, combined, or deleted according to actual needs.

[0252] The modules in the device of this application embodiment can be merged, divided, and deleted according to actual needs.

[0253] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.

[0254] The above-disclosed embodiments are merely preferred embodiments of this application and should not be construed as limiting the scope of this application. Therefore, any equivalent variations made in accordance with the claims of this application shall still fall within the scope of this application.

Claims

1. A data processing method based on blockchain, characterized in that, The method is executed by the target building node, and the method includes: Obtain the commitment information corresponding to the first block proposal node; the commitment information is obtained by the first block proposal node signing the first transaction block generated by the target building node based on the node private key corresponding to the first block proposal node; the commitment information is used to indicate that the first block proposal node has not changed the first transaction block; the first transaction block includes encrypted transactions. The commitment information is validated based on the public key of the node corresponding to the first block proposal node to obtain the commitment verification result. If the commitment verification result indicates that the verification is successful, the first fragment private key corresponding to the target building node is passed to the key management contract. If the number of first fragment private keys in the key management contract reaches a threshold, the first fragment private keys in the key management contract are combined into a reconstructed private key. The encrypted transactions in the first transaction block are decrypted using the reconstructed private key to obtain a decrypted transaction. The decrypted transaction is used to replace the encrypted transactions in the first transaction block to obtain a second transaction block. The second transaction block is broadcast to the blockchain network by the first block proposal node for consensus processing.

2. The method according to claim 1, characterized in that, The method further includes: Obtain M encrypted candidate transactions from the transaction pool, and obtain the first transaction resource consumption and transaction capacity of the i-th candidate transaction among the M candidate transactions; M is a positive integer, and i is a positive integer less than or equal to M; The ratio between the resource consumption and transaction capacity of the first transaction corresponding to the i-th candidate transaction is determined as the selection evaluation value corresponding to the i-th candidate transaction; Obtain the selection evaluation values ​​corresponding to the M candidate transactions, and sort the M candidate transactions in descending order according to the selection evaluation values ​​corresponding to the M candidate transactions to obtain the sorted M candidate transactions; The first t candidate transactions from the sorted M candidate transactions are determined as the encrypted transactions, the encrypted transactions are encapsulated into the first transaction block, and the first transaction block is sent to the first block proposal node; the sum of the transaction capacities corresponding to the t candidate transactions is less than or equal to the block capacity, and t is a positive integer less than or equal to M.

3. The method according to claim 1, characterized in that, The step of validating the commitment information based on the public key of the node corresponding to the first block proposal node to obtain the commitment verification result corresponding to the commitment information includes: Obtain the public key of the node corresponding to the first block proposal node, decrypt the commitment information according to the public key to obtain the first digest information corresponding to the commitment information, and perform a hash operation on the commitment information according to the hash function to obtain the second digest information corresponding to the commitment information. If the first summary information is the same as the second summary information, then the commitment verification result corresponding to the commitment information indicates that the verification has passed; If the first summary information is different from the second summary information, then the commitment verification result corresponding to the commitment information is determined to have failed verification.

4. The method according to claim 1, characterized in that, The number of block building nodes in the blockchain network is N, where N is an integer greater than or equal to the threshold; the target building node is included among the N block building nodes. If the commitment verification result indicates that the verification is successful, then the first fragment private key corresponding to the target building node is passed to the key management contract, including: If the commitment verification result indicates that the verification is successful, then the second fragment private key corresponding to the target building node is split into N first sub-fragment private keys, and the N first sub-fragment private keys are distributed to the N block building nodes; one first sub-fragment private key is used to distribute to one block building node; Receive the second sub-fragment private keys corresponding to N-1 block building nodes other than the target building node, combine the first sub-fragment private key distributed to the target building node and the N-1 second sub-fragment private keys into the first fragment private key corresponding to the target building node, and pass the first fragment private key corresponding to the target building node into the key management contract.

5. The method according to claim 4, characterized in that, The method further includes: Invoke the key management contract and, according to the key generation logic in the key management contract, generate a node joint private key associated with N block building nodes; According to the key splitting logic in the key management contract, the node's joint private key is split into N second fragment private keys; Through the key management contract, a second fragment private key is allocated to the target building node from the N second fragment private keys; one second fragment private key is used to allocate to a block building node.

6. The method according to claim 1, characterized in that, If the number of first fragment private keys in the key management contract reaches a threshold, then the first fragment private keys in the key management contract are combined into a reconstructed private key, including: If the number of first fragment private keys in the key management contract reaches a threshold, then K first fragment private keys in the key management contract are obtained; K is used to represent the threshold. Based on the interpolation function and the sorting position of the K first fragment private keys, the interpolation results corresponding to the K first fragment private keys are obtained. The product between the j-th first fragment private key and the interpolation result corresponding to the j-th first fragment private key is determined as the candidate key expression corresponding to the j-th first fragment private key; j is a positive integer less than or equal to K. The candidate key expressions corresponding to the K first fragment private keys are summed to obtain the key reconstruction expression corresponding to the K first fragment private keys, and the constant term in the key reconstruction expression is determined as the reconstructed private key.

7. The method according to claim 1, characterized in that, The method further includes: If the commitment verification result indicates that the verification failed, a commitment retransmission message is sent to the first block proposal node; the commitment retransmission message is used to instruct the first block proposal node to broadcast the regenerated commitment information in the blockchain network.

8. The method according to claim 1, characterized in that, The method further includes: Replace the encrypted transaction in the first transaction block with the decrypted transaction to obtain a candidate transaction block. Add the commitment information to the block header of the candidate transaction block to obtain the second transaction block. Send the second transaction block to the first block proposal node; or... The decryption transaction is sent to the first block proposal node, so that the first block proposal node updates the first transaction block according to the decryption transaction and the commitment information, and obtains the second transaction block.

9. A data processing method based on blockchain, characterized in that, The method is executed by the first block proposal node, and the method includes: Based on the private key of the first block proposal node, the first transaction block generated by the target building node is signed to obtain the commitment information corresponding to the first block proposal node; the commitment information is used to indicate that the first block proposal node has not changed the first transaction block; the first transaction block includes encrypted transactions. The commitment information is broadcast in the blockchain network so that when multiple block building nodes in the blockchain network determine that the commitment information has been verified based on the node public key corresponding to the first block proposal node, they transmit their respective first fragment private keys to the key management contract; the multiple block building nodes in the blockchain network include the target building node; If the first fragment private key corresponding to the target building node is passed to the key management contract, and the number of first fragment private keys in the key management contract reaches a threshold, then the second transaction block is obtained and broadcast to the blockchain network for consensus processing. The second transaction block includes a decryption transaction, which is the encrypted transaction in the first transaction block decrypted by the target building node based on the reconstructed private key; the reconstructed private key is obtained by combining the first fragment private key in the key management contract.

10. The method according to claim 9, characterized in that, The method further includes: Receive transaction blocks generated by multiple block building nodes, and obtain the second transaction consumption resources of the transaction blocks generated by multiple block building nodes; The transaction block corresponding to the second transaction with the largest resource consumption is determined as the first transaction block.

11. The method according to claim 9, characterized in that, The step of signing the first transaction block using the private key of the first block proposal node to obtain the commitment information corresponding to the first block proposal node includes: Obtain the block root hash and block height in the first transaction block, fill the block root hash and block height with data to obtain random fill data, and split the random fill data to obtain P segment fill data; P is an integer greater than 1. Obtain the l-th input data of the compression function; when l is 1, the l-th input data includes the initial compressed data and the first segmented fill data among the P segmented fill data; when l is not 1, the l-th input data includes the (l-1)-th output data of the compression function and the k-th segmented fill data among the P segmented fill data; l is a positive integer less than or equal to P; The l-th input data is compressed according to the compression function to obtain the l-th output data corresponding to the compression function, and the p-th output data corresponding to the compression function is determined as compressed information; The compressed information is encrypted using the private key of the node corresponding to the first block proposal node to obtain the commitment information corresponding to the first block proposal node.

12. The method according to claim 9, characterized in that, The blockchain network also includes a second block proposal node, which is used to receive the second transaction block broadcast by the first block proposal node, and generate a root hash to be verified based on the decryption transaction in the second transaction block; When the root hash to be verified is inconsistent with the block root hash in the commitment information, the second block proposal node is used to generate a vote against the second transaction block.

13. A data processing device based on blockchain, characterized in that, The device is applied to a target construction node, and the device includes: The commitment information acquisition module is used to acquire commitment information corresponding to the first block proposal node; the commitment information is obtained by the first block proposal node signing the first transaction block generated by the target building node based on the node private key corresponding to the first block proposal node; the commitment information is used to indicate that the first block proposal node has not changed the first transaction block; the first transaction block includes encrypted transactions. The commitment information verification module is used to verify the validity of the commitment information based on the node public key corresponding to the first block proposal node, and obtain the commitment verification result corresponding to the commitment information. If the commitment verification result indicates that the verification is successful, the first fragment private key corresponding to the target building node is passed to the key management contract. The transaction decryption module is used to combine the first fragment private keys in the key management contract into a reconstructed private key if the number of first fragment private keys in the key management contract reaches a threshold. The reconstructed private key is then used to decrypt the encrypted transactions in the first transaction block to obtain a decrypted transaction. The decrypted transaction is used to replace the encrypted transactions in the first transaction block to obtain a second transaction block. The second transaction block is broadcast to the blockchain network by the first block proposal node for consensus processing.

14. A data processing device based on blockchain, characterized in that, The device is applied to the first block proposal node, and the device includes: The commitment information generation module is used to sign the first transaction block generated by the target building node based on the node private key corresponding to the first block proposal node, thereby obtaining the commitment information corresponding to the first block proposal node; the commitment information is used to indicate that the first block proposal node has not changed the first transaction block; the first transaction block includes encrypted transactions. The commitment information broadcasting module is used to broadcast the commitment information in the blockchain network, so that when multiple block building nodes in the blockchain network determine that the commitment information has been verified based on the node public key corresponding to the first block proposal node, they will pass their respective first fragment private keys to the key management contract; the multiple block building nodes in the blockchain network include the target building node; The transaction block acquisition module is used to acquire a second transaction block if the first fragment private key corresponding to the target building node is passed to the key management contract and the number of the first fragment private keys in the key management contract reaches a threshold, and broadcast the second transaction block to the blockchain network for consensus processing. The second transaction block includes a decryption transaction, which is the encrypted transaction in the first transaction block decrypted by the target building node based on the reconstructed private key; the reconstructed private key is obtained by combining the first fragment private key in the key management contract.

15. A computer device, characterized in that, include: Processor, memory, and network interface; The processor is connected to the memory and the network interface, wherein the network interface is used to provide data communication functions, the memory is used to store computer programs, and the processor is used to invoke the computer programs to cause the computer device to perform the method according to any one of claims 1 to 12.

16. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program adapted to be loaded and executed by a processor to cause a computer device having the processor to perform the method of any one of claims 1 to 12.

17. A computer program product, characterized in that, The computer program product includes computer instructions stored in a computer-readable storage medium, the computer instructions being adapted to be read and executed by a processor to cause a computer device having the processor to perform the method of any one of claims 1 to 12.