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

By using delegated nodes to generate hash summaries and randomly sorted transaction summary pools in the blockchain network, the problem of unfair blockchain transaction sorting is solved, ensuring the fairness and security of the transaction order.

CN120707277APending Publication Date: 2025-09-26TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410368357.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-03-26
Publication Date
2025-09-26

AI Technical Summary

Technical Problem

The order of blockchain transactions can be manipulated by accounting nodes, resulting in unfair transaction order, affecting transaction execution time and user asset security.

Method used

The hash summary of the business transaction is obtained through the delegate node, the target transaction summary is generated, and it is broadcast to the blockchain node to form a transaction summary pool. The generated blocks are randomly sorted to ensure the fairness of the transaction order and the consistency of the execution order is guaranteed through consensus verification.

Benefits of technology

It achieves fair sorting of blockchain transactions, avoids malicious manipulation, and improves the security of business clients transferring digital resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120707277A_ABST
    Figure CN120707277A_ABST
Patent Text Reader

Abstract

The invention discloses a data processing method, device and equipment based on a block chain and a readable storage medium, and the method comprises the steps: carrying out the hash abstract calculation of a business transaction, and obtaining a target transaction abstract; sending the first to-be-packaged data carrying the target transaction abstract to a block chain node, so that the block chain node generates a first block containing the first to-be-packaged data through a transaction abstract pool; if it is detected that the block chain node successfully performs consensus on the first block, sending second to-be-packaged data carrying the business transaction to the block chain node, so that the block chain node generates a second block according to the second to-be-packaged data, and performing consensus verification on the second block through a target transaction abstract in the first block and a transaction execution result; and if the consensus of the second block is successful, the execution sequence of the business transaction in the second block is consistent with the execution sequence of the target transaction abstract in the first block. Fair sorting of business transactions can be realized, and the security of transferring digital resources by the business client is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a blockchain-based data processing method, apparatus, device, and readable storage medium. Background Art

[0002] Currently, the order of transactions packaged within a blockchain is generally determined by the accounting nodes that package the blocks. For example, the order of transactions is determined by the time they arrive at the accounting nodes and the level of transaction fees. However, because blockchain transactions often involve digital resources in smart contracts, existing blockchain systems already disclose the details of transactions when packaging them. This poses the risk of accounting nodes manipulating the transaction order for their own profit (or fees), or even users privately manipulating the transaction order.

[0003] Sorting transactions by the time they arrive at the accounting node is susceptible to the geographic distance between the user and the accounting node, making it impossible to guarantee true fairness. Sorting by transaction fees allows users to maliciously increase transaction fees to improve the order of their transactions, disrupting the balance of fair transaction sorting. This makes the execution order of business transactions within the block susceptible to malicious manipulation, making it impossible to guarantee the openness, fairness, and impartiality of the transaction order. The order of transactions directly affects the execution time of transactions, resulting in the increase or decrease in the amount of users' digital resources directly affected by the order of transactions, thus compromising the security of users' assets. Summary of the Invention

[0004] The embodiments of the present application provide a blockchain-based data processing method, apparatus, device, and readable storage medium, which can achieve fair sorting of business transactions and improve the security of digital resource transfer by business clients.

[0005] On the one hand, an embodiment of the present application provides a data processing method based on blockchain, including:

[0006] The entrusting node obtains the business transaction corresponding to the business client, calculates the hash summary of the business transaction, and obtains the target transaction summary;

[0007] Sending the first data to be packaged that carries the target transaction digest to a blockchain node, so that the blockchain node generates a first block containing the first data to be packaged through a transaction digest pool; the transaction digest pool includes multiple transaction digests from the delegating node, and the multiple transaction digests include the target transaction digest in the first data to be packaged;

[0008] If it is detected that the blockchain node has successfully reached consensus on the first block, the second data to be packaged carrying the business transaction will be sent to the blockchain node, so that the blockchain node will generate a second block based on the second data to be packaged, and the second block will be consensus-verified through the target transaction summary in the first block and the transaction execution result; the transaction execution result is obtained by executing the business transaction in the second block; if the consensus on the second block is successful, the execution order of the business transactions in the second block is consistent with the execution order of the target transaction summary in the first block.

[0009] The entrusting node obtains the business transaction corresponding to the business client, including:

[0010] Obtain an invitation request sent by the business client, generate commitment data based on the invitation request, and send the commitment data and commitment signature information to the business client, so that when the business client successfully verifies the commitment signature information using the public key of the delegation node, it generates a delegation request based on the commitment data, the initial transaction, and the business signature information; the commitment signature information is obtained by signing the commitment data using the private key of the delegation node; the business signature information is obtained by signing the initial transaction using the private key of the business client;

[0011] Receive the delegation request sent by the business client, and generate a business transaction based on the initial transaction and business signature information in the delegation request.

[0012] Among them, the invitation request includes the initial transaction and the first service value, the second service value and the third service value; the first service value refers to the value of the digital resources that the business client needs to transfer to the entrusting node when the entrusting node successfully entrusts the target transaction summary to the blockchain node; the second service value refers to the value of the digital resources that the business client needs to transfer to the blockchain node when the blockchain node successfully reaches a consensus on the first block; the third service value refers to the value of the digital resources that the business client needs to transfer to the blockchain node when the blockchain node successfully reaches a consensus on the second block.

[0013] Among them, the commitment data includes the default compensation value for the initial transaction; the default compensation value refers to the value of the digital resources that the entrusting node needs to transfer to the business client when the target transaction summary fails to be delegated to the blockchain node through the entrusting node.

[0014] Among them, also include:

[0015] The target transaction summary is signed based on the private key of the delegation node to obtain summary delegation signature information, and the first data to be packaged is generated based on the target transaction summary and the summary delegation signature information; the summary delegation signature information is used to instruct the blockchain node to add the first data to be packaged to the transaction summary pool of the blockchain node when the blockchain node verifies the summary delegation signature information.

[0016] On the one hand, the embodiments of the present application provide another data processing method based on blockchain, including:

[0017] Obtaining the first data to be packaged sent by the delegating node, and adding the first data to be packaged to a transaction summary pool; the transaction summary pool includes multiple transaction summaries from the delegating node, the multiple transaction summaries including the target transaction summary in the first data to be packaged, and the target transaction summary is obtained by performing a hash digest calculation on the business transaction sent by the business client by the delegating node;

[0018] Generate a first block containing the first data to be packaged, and perform consensus verification on the first block;

[0019] If the consensus on the first block is successful, the second data to be packaged containing the business transaction sent by the delegate node is obtained and added to the transaction summary pool;

[0020] When the second block containing the second data to be packaged is obtained, consensus verification is performed on the second block using the target transaction summary and transaction execution result in the first block; the transaction execution result is obtained by executing the business transactions in the second block; if the consensus on the second block succeeds, the execution order of the business transactions in the second block is consistent with the execution order of the target transaction summary in the first block.

[0021] The first data to be packaged includes a target transaction digest and digest delegation signature information, where the digest delegation signature information is obtained by signing the target transaction digest based on the private key of the delegation node. Generating a first block containing the first data to be packaged includes:

[0022] Verify the summary delegation signature information. If the summary delegation signature information passes the verification, randomly sort the target transaction summaries to obtain the first transaction list.

[0023] A first block is generated using a first transaction list and digest delegation signature information; the first transaction list is used to indicate the execution order of target transaction digests in the first block.

[0024] The verification of the summary entrustment signature information includes:

[0025] Decrypt the summary delegation signature information based on the public key of the delegation node to obtain the hash value to be verified and generate the target hash value of the target transaction summary;

[0026] If the hash value to be verified is the same as the target hash value, the signature verification is confirmed to be successful;

[0027] If the hash value to be verified is different from the target hash value, the signature verification is determined to have failed, and an error message is returned to the delegate node.

[0028] The second data to be packaged includes business transactions and transaction entrustment signature information, where the transaction entrustment signature information is obtained by signing the business transaction based on the private key of the entrusting node. The method further includes:

[0029] Verify the transaction entrustment signature information. If the transaction entrustment signature information is verified, obtain the first transaction list in the first block, sort the business transactions based on the execution order of the target transaction summary in the first transaction list, and obtain the second transaction list;

[0030] The second block is generated through the second transaction list and the transaction entrustment signature information; the second transaction list is used to indicate the execution order of business transactions in the second block.

[0031] When the second block containing the second data to be packaged is obtained, consensus verification is performed on the second block using the target transaction summary and the transaction execution result in the first block, including:

[0032] When a second block containing the second data to be packaged is obtained, an execution order for the target transaction digest is obtained from the first block;

[0033] If it is verified that the execution order of the business transactions in the second block is consistent with the execution order of the target transaction summary, the business transactions are executed according to the execution order of the business transactions in the second block to obtain the transaction execution result;

[0034] If the transaction execution result is verified to be consistent with the target transaction execution result for the second block sent by the blockchain master node, the first consensus vote for the second block is broadcast to the consensus network; the first consensus vote is a consensus approval vote;

[0035] Obtain the second consensus vote for the second block sent by the consensus network. If the proportion of consensus approval votes in the first consensus vote and the second consensus vote meets the block consensus condition, the second block consensus is determined to be successful.

[0036] Among them, also include:

[0037] If a breach of contract compensation request from the business client to the entrusting node is obtained, the second transaction list in the second block is compared with the first transaction list in the first block;

[0038] If the second transaction list is different from the first transaction list, it is determined that the target transaction summary has failed to be delegated in the blockchain node, the breach compensation value in the breach compensation request is obtained, and the digital resource with the breach compensation value in the delegation node is transferred to the business client.

[0039] Among them, also include:

[0040] If it is detected that the entrusting node fails to entrust the target transaction summary in the blockchain node, the entrusting node that generated the target transaction summary is determined as the node to be updated, and the reputation level of the node to be updated is updated;

[0041] If the updated reputation level is lower than the reputation threshold, the node to be updated will be added to the node abnormality list; the delegated node in the node abnormality list does not have the authority to interact with the business client for data.

[0042] On the one hand, an embodiment of the present application provides a data processing device based on blockchain, including:

[0043] The digest processing module is used to entrust the node to obtain the business transaction corresponding to the business client, perform hash digest calculation on the business transaction, and obtain the target transaction digest;

[0044] a first sending module, configured to send first data to be packaged that carries a target transaction digest to a blockchain node, so that the blockchain node generates a first block containing the first data to be packaged through a transaction digest pool; the transaction digest pool includes multiple transaction digests from the delegating node, and the multiple transaction digests include the target transaction digest in the first data to be packaged;

[0045] The second sending module is used to send the second data to be packaged carrying the business transaction to the blockchain node if it is detected that the blockchain node has successfully reached consensus on the first block, so that the blockchain node generates a second block based on the second data to be packaged, and performs consensus verification on the second block through the target transaction summary and the transaction execution result in the first block; the transaction execution result is obtained by executing the business transaction in the second block; if the consensus on the second block is successful, the execution order of the business transactions in the second block is consistent with the execution order of the target transaction summary in the first block.

[0046] In a possible implementation, the summary processing module is used to perform the following operations when the entrusting node obtains the business transaction corresponding to the business client:

[0047] Obtain an invitation request sent by the business client, generate commitment data based on the invitation request, and send the commitment data and commitment signature information to the business client, so that when the business client successfully verifies the commitment signature information using the public key of the delegation node, it generates a delegation request based on the commitment data, the initial transaction, and the business signature information; the commitment signature information is obtained by signing the commitment data using the private key of the delegation node; the business signature information is obtained by signing the initial transaction using the private key of the business client;

[0048] Receive the delegation request sent by the business client, and generate a business transaction based on the initial transaction and business signature information in the delegation request.

[0049] In one possible implementation, the invitation request includes an initial transaction and a first service value, a second service value, and a third service value; the first service value refers to the value of the digital resources that need to be transferred from the business client to the delegating node when the delegating node successfully delegates the target transaction summary to the blockchain node; the second service value refers to the value of the digital resources that need to be transferred from the business client to the blockchain node when the blockchain node successfully reaches a consensus on the first block; and the third service value refers to the value of the digital resources that need to be transferred from the business client to the blockchain node when the blockchain node successfully reaches a consensus on the second block.

[0050] In one possible implementation, the commitment data includes a default compensation value for the initial transaction; the default compensation value refers to the value of the digital resources that the delegating node needs to transfer to the business client when the target transaction summary fails to be delegated to the blockchain node through the delegating node.

[0051] In a possible implementation, the summary processing module is further configured to perform the following operations:

[0052] The target transaction summary is signed based on the private key of the delegation node to obtain summary delegation signature information, and the first data to be packaged is generated based on the target transaction summary and the summary delegation signature information; the summary delegation signature information is used to instruct the blockchain node to add the first data to be packaged to the transaction summary pool of the blockchain node when the blockchain node verifies the summary delegation signature information.

[0053] On the one hand, an embodiment of the present application provides another blockchain-based data processing device, including:

[0054] a digest acquisition module configured to acquire the first data to be packaged sent by the delegating node and add the first data to be packaged to a transaction digest pool; the transaction digest pool includes multiple transaction digests from the delegating node, the multiple transaction digests including a target transaction digest in the first data to be packaged, the target transaction digest being obtained by performing a hash digest calculation on the business transaction sent by the business client by the delegating node;

[0055] A consensus verification module, configured to generate a first block containing first data to be packaged, and perform consensus verification on the first block;

[0056] A transaction acquisition module is configured to obtain the second data to be packaged carrying the business transaction sent by the entrusting node if the consensus on the first block is successful, and add the second data to be packaged to the transaction summary pool;

[0057] The transaction verification module is used to, when obtaining the second block containing the second data to be packaged, perform consensus verification on the second block using the target transaction summary and the transaction execution result in the first block; the transaction execution result is obtained by executing the business transactions in the second block; if the consensus of the second block succeeds, the execution order of the business transactions in the second block is consistent with the execution order of the target transaction summary in the first block.

[0058] In one possible implementation, the first data to be packaged includes a target transaction digest and digest delegation signature information, where the digest delegation signature information is obtained by signing the target transaction digest based on the private key of the delegation node. When the consensus verification module is used to generate a first block including the first data to be packaged, it is specifically used to perform the following operations:

[0059] Verify the summary delegation signature information. If the summary delegation signature information passes the verification, randomly sort the target transaction summaries to obtain the first transaction list.

[0060] A first block is generated using a first transaction list and digest delegation signature information; the first transaction list is used to indicate the execution order of target transaction digests in the first block.

[0061] In one possible implementation, the consensus verification module is used to verify the digest delegation signature information by performing the following operations:

[0062] Decrypt the summary delegation signature information based on the public key of the delegation node to obtain the hash value to be verified and generate the target hash value of the target transaction summary;

[0063] If the hash value to be verified is the same as the target hash value, the signature verification is confirmed to be successful;

[0064] If the hash value to be verified is different from the target hash value, the signature verification is determined to have failed, and an error message is returned to the delegate node.

[0065] In one possible implementation, the second data to be packaged includes a business transaction and transaction delegation signature information. The transaction delegation signature information is obtained by signing the business transaction based on the private key of the delegation node. The consensus verification module is further configured to perform the following operations:

[0066] Verify the transaction entrustment signature information. If the transaction entrustment signature information is verified, obtain the first transaction list in the first block, sort the business transactions based on the execution order of the target transaction summary in the first transaction list, and obtain the second transaction list;

[0067] The second block is generated through the second transaction list and the transaction entrustment signature information; the second transaction list is used to indicate the execution order of business transactions in the second block.

[0068] In one possible implementation, the transaction verification module is configured to, upon obtaining the second block containing the second data to be packaged, perform the following operations when performing consensus verification on the second block using the target transaction summary and the transaction execution result in the first block:

[0069] When a second block containing the second data to be packaged is obtained, an execution order for the target transaction digest is obtained from the first block;

[0070] If it is verified that the execution order of the business transactions in the second block is consistent with the execution order of the target transaction summary, the business transactions are executed according to the execution order of the business transactions in the second block to obtain the transaction execution result;

[0071] If the transaction execution result is verified to be consistent with the target transaction execution result for the second block sent by the blockchain master node, the first consensus vote for the second block is broadcast to the consensus network; the first consensus vote is a consensus approval vote;

[0072] Obtain the second consensus vote for the second block sent by the consensus network. If the proportion of consensus approval votes in the first consensus vote and the second consensus vote meets the block consensus condition, the second block consensus is determined to be successful.

[0073] In one possible implementation, the consensus verification module is further configured to perform the following operations:

[0074] If a breach of contract compensation request from the business client to the entrusting node is obtained, the second transaction list in the second block is compared with the first transaction list in the first block;

[0075] If the second transaction list is different from the first transaction list, it is determined that the target transaction summary has failed to be delegated in the blockchain node, the breach compensation value in the breach compensation request is obtained, and the digital resource with the breach compensation value in the delegation node is transferred to the business client.

[0076] In one possible implementation, the consensus verification module is further configured to perform the following operations:

[0077] If it is detected that the entrusting node fails to entrust the target transaction summary in the blockchain node, the entrusting node that generated the target transaction summary is determined as the node to be updated, and the reputation level of the node to be updated is updated;

[0078] If the updated reputation level is lower than the reputation threshold, the node to be updated will be added to the node abnormality list; the delegated node in the node abnormality list does not have the authority to interact with the business client for data.

[0079] An embodiment of the present application provides a computer device, including: a processor, a memory, and a network interface;

[0080] The processor is connected to the memory and the network interface, wherein the network interface is used to provide data communication functions, and the memory is used to store computer programs. When the computer program is executed by the processor, the computer device executes the method provided in the embodiment of the present application.

[0081] On the one hand, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. The computer program is suitable for being loaded and executed by a processor so that a computer device having the processor executes the method provided by the embodiment of the present application.

[0082] In one aspect, an embodiment of the present application provides a computer program product, comprising 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 provided in the embodiment of the present application.

[0083] In the embodiment of the present application, a business transaction corresponding to a business client is obtained by a delegation node, a hash summary is calculated for the business transaction to obtain a target transaction summary, and the first data to be packaged carrying the target transaction summary is first broadcast to the blockchain node, which is then stored in a transaction summary pool by the blockchain node. Since the blockchain node can only obtain the target transaction summary, and the target transaction summary is a hash value, the blockchain node is invisible to the complete content of the business transaction. The transaction summary can be randomly obtained from the transaction summary pool to generate the first block, thereby ensuring the randomness of the execution order of the transaction summaries in the first block, thereby ensuring the fairness of the execution order of the transaction summaries in the first block. When the consensus of the first block is successful, the delegate node can broadcast the second to-be-packaged data carrying the business transaction to the blockchain node, so that the blockchain node can package the business transaction into the second block according to the execution order of the target transaction summary in the first block, and perform consensus verification on the second block through the target transaction summary and the transaction execution result of the business transaction in the second block. This can ensure that the execution order of the business transaction in the second block is consistent with the execution order of the target transaction summary in the first block, thereby ensuring the fairness of the execution order of the business transaction, and avoiding the loss of digital resources caused by malicious manipulation of the execution order of business transactions in the block, thereby achieving fair sorting of business transactions and improving the security of digital resource transfer by business clients. BRIEF DESCRIPTION OF THE DRAWINGS

[0084] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0085] Figure 1 This is a schematic diagram of the structure of a blockchain network provided by an embodiment of the present application;

[0086] Figure 2 This is a schematic diagram of a blockchain-based data processing scenario provided by an embodiment of the present application;

[0087] Figure 3 This is a flowchart of a data processing method based on blockchain provided by an embodiment of the present application. Figure 1 ;

[0088] Figure 4 This is a flowchart of a data processing method based on blockchain provided by an embodiment of the present application. Figure 2 ;

[0089] Figure 5 This is a flowchart of a data processing method based on blockchain provided by an embodiment of the present application. Figure 3 ;

[0090] Figure 6 This is a flowchart of a data processing method based on blockchain provided by an embodiment of the present application. Figure 4 ;

[0091] Figure 7 This is a schematic diagram of the structure of a data processing device based on blockchain provided in an embodiment of the present application. Figure 1 ;

[0092] Figure 8 This is a schematic diagram of the structure of a data processing device based on blockchain provided in an embodiment of the present application. Figure 2 ;

[0093] Figure 9 It is a structural diagram of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0094] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0095] It is understandable that in the specific implementation of this application, the user data involved, when the following embodiments of this application are applied to specific products or technologies, needs to obtain user permission or consent, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of the relevant regions.

[0096] Among them, if it is necessary to collect object (such as user, etc.) data in this application, a prompt interface or pop-up window will be displayed before or during the collection. The prompt interface or pop-up window is used to remind the user that certain data is currently being collected. Only after the user confirms the prompt interface or pop-up window, the relevant steps for data acquisition will be started, otherwise the process will end. Moreover, the acquired user data will be used in reasonable and legal scenarios or purposes. Optionally, in some scenarios where user data needs to be used but has not been authorized by the user, authorization can be requested from the user, and the user data can be used when the authorization is passed.

[0097] The embodiments of the present application relate to blockchain technology, which will be specifically described through the following embodiments.

[0098] Blockchain is the carrier and organizational method for running blockchain technology. Blockchain technology (BT), also known as distributed ledger technology, is an internet database technology characterized by decentralization, openness, and transparency, allowing everyone to participate in database records. Blockchain technology is a distributed infrastructure and computing method that uses a block chain data structure to verify and store data, a distributed node consensus algorithm to generate and update data, cryptography to ensure the security of data transmission and access, and smart contracts composed of automated script code to program and operate data.

[0099] To facilitate understanding, the following will explain blockchain and its related concepts:

[0100] Blockchain: Blockchain is a novel application model of computer technologies, integrating distributed data storage, peer-to-peer transmission, consensus mechanisms, and encryption algorithms. It primarily organizes data in chronological order and encrypts it into a ledger, rendering it tamper-proof and forgery-proof. It also enables data verification, storage, and updates. A blockchain is essentially a decentralized database, in which every node stores an identical blockchain. A blockchain network can categorize nodes as consensus nodes and business nodes, with consensus nodes responsible for network-wide consensus. The process by which transaction data is written to the ledger in a blockchain network can be described as follows: a resource client sends transaction data to a business node. This data is then relayed between business nodes in the blockchain network until it is received by a consensus node, which then packages the transaction data into a block and reaches consensus with other consensus nodes. Once consensus is reached, the block containing the transaction data is written to the ledger.

[0101] A block is a data packet carrying transaction data on a blockchain network. It is a data structure marked with a timestamp and the hash value of the previous block. Blocks are verified and validated through the network's consensus mechanism, confirming the transactions within them. A block consists of a block header and a block body. The block header records metadata about the current block, including the current version number, the hash value of the previous block, a timestamp, a random number, and the hash value of the Merkle root. The block body records detailed data generated over a period of time, including all verified transactions within the current block and other information generated during the block creation process. It can be considered a form of ledger. Furthermore, detailed data in the block body can include a unique Merkle root generated through the Merkle tree hashing process, which is recorded in the block header.

[0102] Hash value: Also known as information characteristic value or characteristic value, a hash value is generated by converting input data of any length into a cryptographically encoded form, producing a fixed output. The original input data cannot be retrieved by decrypting the hash value; it is a one-way encryption function. In a blockchain, each block (except the initial block) contains the hash value of the previous block, which is called the parent block of the current block. Hash values ​​are the core foundation and most important aspect of the potential of blockchain technology, preserving the authenticity of recorded and viewed data and the integrity of the blockchain as a whole.

[0103] Transaction: It is an atomic change in the state of ledger data on the blockchain and a record of its process and results.

[0104] Digital resources: Unique cryptographic tokens used to represent media resources (also known as digital assets) that can be traded on the blockchain.

[0105] Account: A blockchain account with an account address. The account address is a unique address generated on the blockchain using a public-private key pair, and is used to identify the unique address of a blockchain account.

[0106] Assets: Rights and interests that can be issued, circulated, stored, and traded on the blockchain and used to complete payment and clearing services.

[0107] See Figure 1 , Figure 1 This is a schematic diagram of the structure of a blockchain network provided by an embodiment of this application. Figure 1 As shown, the network architecture may include a business client 100, a delegate node 200, and a blockchain network. The number of business clients 100 may be at least one, and the number of delegate nodes 200 may be at least one, which is not limited in this application. The business client 100 may establish data connections with one or more of the delegate nodes 200 and the blockchain network, respectively, and exchange data with the delegate node 200 and the blockchain network through the data connections. The delegate node 200 may also establish data connections with the business client 100 and the blockchain network. The aforementioned data connections are not limited to the connection method and may be directly or indirectly connected via wired communication, directly or indirectly connected via wireless communication, or through other methods, which is not limited in this application.

[0108] A blockchain network can include both business nodes and consensus nodes. When there are multiple servers, these servers can include both business nodes and consensus nodes. Together, these nodes form the blockchain network, and both consensus nodes and business nodes store the same blockchain. Before a block can be added to the blockchain, it must be agreed upon by the consensus nodes in the blockchain network. Only after consensus is achieved can the block be added to the blockchain. While business nodes do not participate in block consensus, they help disseminate block and voting information, as well as synchronize status. Both consensus nodes and business nodes can be referred to as blockchain nodes.

[0109] It is understandable that transactions or block transfers can be carried out between blockchain nodes through the above-mentioned data connection. The blockchain network can realize data connection between blockchain nodes based on node identification. Each blockchain node in the blockchain network has a corresponding node identification, and each of the above-mentioned blockchain nodes can store the node identifications of other blockchain nodes with which it is connected, so that the acquired data or generated blocks can be broadcast to other blockchain nodes based on the node identifications of other blockchain nodes. For example, blockchain node 1 in the blockchain network can maintain a node identification list as shown in Table 1, which stores the node names and node identifications of other blockchain nodes:

[0110] Table 1

[0111] Node Name Node ID Blockchain Node 1 AAA.AAA.AAA.AAA Blockchain Node 2 BBB.BBB.BBB.BBB Blockchain Node 3 CCC.CCC.CCC.CCC … … Blockchain node n EEE.EEE.EEE.EEE

[0112] The node identifier can be an Internet Protocol (IP) address or any other information that can be used to identify a blockchain node in a blockchain network. Table 1 uses the IP address as an example. For example, blockchain node 1 can send information (e.g., transaction data) to blockchain node 2 using the node identifier BBB.BBB.BBB.BBB, and blockchain node 2 can determine that the information was sent by blockchain node 1 using the node identifier AAA.AAA.AAA.AAA.

[0113] In the blockchain, before a block is put on the chain, it must pass the consensus of the consensus nodes in the blockchain network. Only after the consensus is passed can the block be added to the blockchain. It is understandable that when the blockchain is used in some scenarios of government or commercial organizations, not all participating nodes in the blockchain (i.e., the blockchain nodes in the above blockchain network) have sufficient resources and necessity to become consensus nodes of the blockchain. For example, in Figure 1 In the blockchain network shown, blockchain nodes 10a, 10b, 10c, 10d, ..., and 10n can be considered consensus nodes. Consensus nodes in a blockchain network participate in consensus, i.e., reaching consensus on blocks (containing a batch of transactions) and voting on them. Non-consensus nodes, on the other hand, do not participate in consensus but help disseminate block and voting information, as well as synchronize their status.

[0114] It is understood that when the blockchain network adopts the Byzantine consensus mechanism to achieve block consensus, the assembly of blocks and the initiation of consensus are usually completed by the master node (also known as the block node). Figure 1The blockchain network shown can use the Byzantine consensus mechanism to achieve block consensus. At this time, a blockchain node with a consensus function, for example, blockchain node 10a, after determining that the block of the current block height is successfully on the chain, needs to determine the master node corresponding to the block corresponding to the next block height in order to complete the consensus operation for the block of the next block height.

[0115] The blockchain nodes in the blockchain network can be installed with a resource client, which can be used to implement resource management business functions and realize communication connections with decentralized application clients based on the resource management business functions.

[0116] A resource client is a tool responsible for managing and storing a user's digital resources. For example, it can be used to transfer digital resources to other accounts or receive digital resources transferred from other accounts. This resource client can be a hardware device or a software program. In this application, the target object's resource client can establish a communication connection with the decentralized application client to enable operations such as authorized login for the target object.

[0117] It is understandable that with the widespread deployment of various decentralized applications on the blockchain and the increase in user activities on the blockchain, general users can use a blockchain key management tool wallet (also known as a decentralized wallet, simply called a wallet) to log in when using decentralized applications. The address in the blockchain key management tool (wallet) corresponds to a user on the blockchain. The decentralized application can obtain the user address from the key management tool through some interfaces. In order to solve the problem that the Dapp (Decentralized Application) backend cannot trust the user address used when logging in to the decentralized application.

[0118] Specifically, the business client 100 can send a delegation request to the delegation node 200, and the delegation node 200 can generate a business transaction based on the delegation request. The delegation node 200 can perform a hash digest calculation on the business transaction to obtain a target transaction digest. The hash digest calculation can be a one-way operation that maps data of any length to a fixed-length message digest through a hash function to generate a fixed-length hash value, which can also be called a hash digest. The target transaction digest can be a hash value. For example, the hash function can be MD5 (Message Digest Algorithm 5, message digest algorithm), SHA-256 (Secure Hash Algorithm 256, 256-bit hash algorithm), etc. The delegation node can be a node used to process transactions initiated by the business client and to broadcast the transaction summary and business transaction in sequence. It does not need to run the blockchain accounting program and can be a trusted client equal to the business client.

[0119] The delegating node 200 may send the first data to be packaged, carrying the target transaction digest, to any blockchain node in the blockchain network (e.g., blockchain node 10a). The blockchain node 10a may store the target transaction digest in a transaction digest pool. The transaction digest pool may also store other transaction digests sent by the delegating node 200. The blockchain node 10a may generate a first block containing the first data to be packaged from the transaction digest pool, and the blockchain node 10a may perform consensus verification on the first block.

[0120] Among them, the blockchain node will put the received transaction summary into the transaction summary pool and wait for confirmation. The transaction summary pool can be a temporary data structure for storing transaction summaries. Since the transaction summary is a hash value, the blockchain node 10a can only obtain the transaction summary, and the transaction summary is a hash value, so the business transaction is opaque to the blockchain node 10a, that is, the blockchain node is not visible to the complete content of the business transaction. When the blockchain node 10a generates the first block through the transaction summary pool, it can better randomly sort the transaction summaries.

[0121] It's understood that all blockchain nodes in a blockchain network can function as both consensus nodes and ledger nodes. Consensus nodes are nodes that participate in consensus verification. Consensus verification is the process by which all nodes in a consensus network reach agreement on a particular issue, such as determining whether a block should be added to the blockchain or verifying the validity of a transaction. Consensus nodes collectively constitute the blockchain network and can also help propagate block and voting information, synchronizing data status with each other. Ledger nodes are blockchain nodes that have been granted ledger rights and are responsible for packaging new blocks and adding them to the blockchain.

[0122] If the entrusting node 200 detects that the blockchain node 10a has successfully reached a consensus on the first block, it will send the second data to be packaged carrying the business transaction to any blockchain node in the blockchain network (for example, it can be the blockchain node 10b). The blockchain node 10b can generate a second block based on the second data to be packaged and the execution order of the transaction summary in the first block, thereby ensuring that the execution order of the business transaction in the second block is consistent with the execution order of the target transaction summary in the first block.

[0123] When blockchain node 10a obtains the second block containing the second data to be packaged, blockchain node 10a can perform consensus verification on the second block using the target transaction summary and transaction execution result in the first block. The transaction execution result is obtained by executing the business transaction in the second block. The transaction execution result can be the value of the digital resources of both parties involved in the business transaction after the business transaction is completed.

[0124] Among them, digital resources can be various digital assets and data stored on the blockchain. Digital resources can be trusted digital rights certificates with unique characteristics in the blockchain network. They are a type of data object that can record and process multi-dimensional and complex attributes on the blockchain, and have the characteristics of security, transparency, and non-tamperability.

[0125] It can be understood that if the second block is verified successfully using the target transaction digest and transaction execution results in the first block, the second block consensus is determined to be successful, and the execution order of the business transactions in the second block is consistent with the execution order of the target transaction digests in the first block. Since the execution order of the target transaction digests in the first block is randomly sorted without transparency, by ensuring that the execution order of the business transactions in the second block is consistent with the execution order of the target transaction digests in the first block, the execution order of the business transactions in the second block is also randomized, ensuring a fair ordering of the execution order of the business transactions.

[0126] In the embodiment of the present application, a business transaction corresponding to a business client is obtained by a delegation node, a hash summary is calculated for the business transaction to obtain a target transaction summary, and the first data to be packaged carrying the target transaction summary is first broadcast to the blockchain node, which is then stored in a transaction summary pool by the blockchain node. Since the blockchain node can only obtain the target transaction summary, and the target transaction summary is a hash value, the blockchain node is invisible to the complete content of the business transaction. The transaction summary can be randomly obtained from the transaction summary pool to generate the first block, thereby ensuring the randomness of the execution order of the transaction summaries in the first block, thereby ensuring the fairness of the execution order of the transaction summaries in the first block. When the consensus of the first block is successful, the delegate node can broadcast the second to-be-packaged data carrying the business transaction to the blockchain node, so that the blockchain node can package the business transaction into the second block according to the execution order of the target transaction summary in the first block, and perform consensus verification on the second block through the target transaction summary and the transaction execution result of the business transaction in the second block. This can ensure that the execution order of the business transaction in the second block is consistent with the execution order of the target transaction summary in the first block, thereby ensuring the fairness of the execution order of the business transaction, and avoiding the loss of digital resources caused by malicious manipulation of the execution order of business transactions in the block, thereby achieving fair sorting of business transactions and improving the security of digital resource transfer by business clients.

[0127] See Figure 2 , Figure 2 This is a schematic diagram of a data processing scenario based on blockchain provided by an embodiment of the present application. Figure 2 As shown,

[0128] The business client 100 can send a delegation request to the delegation node 200. The delegation request can include the data structure of a common blockchain transaction. The delegation request can include the initial transaction (i.e., the transaction initiated by the business client 100), the node information of the delegation node (which can be the address of the delegation node, service name, etc.), and the relevant service value (handling fee). The delegation node 200 can generate a business transaction based on the delegation request. The delegation request can be expressed as DTX=<TX,Submitter,SFee,HFee> , where DTX is the delegation request, TX is the business transaction, Submitter is the node information of the delegation node, SFee can be called the first service value, which is the digital resource collected by the delegation node 200 when the transaction summary of the business transaction TX is uploaded to the chain, and HFee can be called the second service value, which is the digital resource collected by the blockchain node when the transaction summary of the business transaction TX is uploaded to the chain.

[0129] The delegating node 200 may perform a hash digest calculation on the business transaction TX to obtain a target transaction digest TX.Hash. The hash digest calculation may be a one-way operation that maps data of any length into a fixed-length message digest using a hash function, generating a fixed-length hash value, also known as a hash digest. The target transaction digest may be a hash value. Examples of hash functions include MD5 and SHA-256.

[0130] The blockchain network may include blockchain node A, blockchain node B and blockchain node C. The delegation node 200 may send the first to-be-packaged data carrying the target transaction digest TX.Hash to any blockchain node in the blockchain network (for example, it may be blockchain node A). The blockchain node A may be provided with a transaction summary pool 1. The blockchain node A may store the target transaction digest TX.Hash in the transaction summary pool 1. The transaction summary pool 1 may also store other transaction digests sent from the delegation node 200.

[0131] It's understood that all blockchain nodes in a blockchain network can function as both consensus nodes and ledger nodes. Consensus nodes are nodes that participate in consensus verification. Consensus verification is the process by which all nodes in a consensus network reach agreement on a particular issue, such as determining whether a block should be added to the blockchain or verifying the validity of a transaction. Consensus nodes collectively constitute the blockchain network and can also help propagate block and voting information, synchronizing data status with each other. Ledger nodes are blockchain nodes that have been granted ledger rights and are responsible for packaging new blocks and adding them to the blockchain.

[0132] Blockchain node A can be a node that has obtained accounting rights in a blockchain network. Upon obtaining accounting rights, blockchain node A in the blockchain network can run accounting program 1 to package blocks in transaction summary pool 1. Upon obtaining accounting rights, blockchain node B can run accounting program 2 to package blocks in transaction summary pool 2. Blockchain node C can run accounting program 3 to package blocks in transaction summary pool 3 upon obtaining accounting rights. Accounting program 1, accounting program 2, and accounting program 3 can be the same accounting program and can be used to randomly obtain pending transactions from the transaction summary pool, maintain the blockchain's world state data, and so on. Transaction summary pool 1, transaction summary pool 2, and transaction summary pool 3 can be sub-transaction pools stored in the installed blockchain nodes, or they can be the same transaction pool obtained by synchronizing state data. This is not a limitation in the present embodiment.

[0133] Among them, blockchain node A will put the received transaction summary into the transaction summary pool and wait for confirmation. The transaction summary pool can be a temporary data structure for storing transaction summaries. Since the transaction summary is a hash value, blockchain node A can only obtain the transaction summary, and the transaction summary is a hash value, so the business transaction is opaque to blockchain node A, that is, blockchain node A cannot see the complete content of the business transaction. When blockchain node A generates the first block through the transaction summary pool, it can better randomly sort the transaction summaries.

[0134] The process of blockchain node A storing the target transaction summary TX.Hash to transaction summary pool 1 can be expressed as DPool←<TX.Hash,Submitter,SFee,HFee> , DPool is transaction summary pool 1. Blockchain node A can randomly obtain a transaction summary from transaction summary pool 1 through accounting program 1 to generate a first block containing the transaction summary. Blockchain node A can then perform consensus verification on the first block. Consensus verification can be performed in the blockchain network, where all consensus nodes need to vote on the first block to determine whether the first block should be added to the blockchain. The consensus algorithm in the voting process can be implemented through proof of work, proof of stake, etc., and this embodiment of the present application does not limit this.

[0135] If the entrusting node 200 detects that the blockchain node 10a has successfully reached consensus on the first block, it will send the business transaction TX to any blockchain node in the blockchain network (for example, blockchain node C). Blockchain node C may be provided with a transaction summary pool 3. Blockchain node C may store the business transaction TX in the transaction summary pool 3. The transaction summary pool 3 may also store other business transactions sent by the entrusting node 200. Blockchain node C may obtain the business transaction TX corresponding to the target transaction summary TX.Hash, determine the execution order of the business transaction TX based on the execution order of the target transaction summary TX.Hash in the first block, and generate a second block based on the business transaction TX and the execution order through the accounting program 3. This ensures that the execution order of the business transactions in the second block is consistent with the execution order of the target transaction summary in the first block.

[0136] When blockchain node A obtains the second block containing the business transaction, it can verify the consensus of the second block by using the target transaction digest TX.Hash in the first block, the execution order of the first block, and the transaction execution result. The transaction execution result is obtained by executing the business transaction TX in the second block. The transaction execution result can be the value of the digital resources of both parties involved in the business transaction after the business transaction is completed.

[0137] Among them, digital resources can be various digital assets and data stored on the blockchain. Digital resources can be trusted digital rights certificates with unique characteristics in the blockchain network. They are a type of data object that can record and process multi-dimensional and complex attributes on the blockchain, and have the characteristics of security, transparency, and non-tamperability.

[0138] It can be understood that if the second block is verified successfully using the target transaction digest and transaction execution results in the first block, the second block consensus is determined to be successful, and the execution order of the business transactions in the second block is consistent with the execution order of the target transaction digests in the first block. Since the execution order of the target transaction digests in the first block is randomly sorted without transparency, by ensuring that the execution order of the business transactions in the second block is consistent with the execution order of the target transaction digests in the first block, the execution order of the business transactions in the second block is also randomized, ensuring a fair ordering of the execution order of the business transactions. In the embodiment of the present application, a business transaction corresponding to a business client is obtained by a delegation node, a hash summary is calculated for the business transaction to obtain a target transaction summary, and the first data to be packaged carrying the target transaction summary is first broadcast to the blockchain node, which is then stored in a transaction summary pool by the blockchain node. Since the blockchain node can only obtain the target transaction summary, and the target transaction summary is a hash value, the blockchain node is invisible to the complete content of the business transaction. The transaction summary can be randomly obtained from the transaction summary pool to generate the first block, thereby ensuring the randomness of the execution order of the transaction summaries in the first block, thereby ensuring the fairness of the execution order of the transaction summaries in the first block. When the consensus of the first block is successful, the delegate node can broadcast the second to-be-packaged data carrying the business transaction to the blockchain node, so that the blockchain node can package the business transaction into the second block according to the execution order of the target transaction summary in the first block, and perform consensus verification on the second block through the target transaction summary and the transaction execution result of the business transaction in the second block. This can ensure that the execution order of the business transaction in the second block is consistent with the execution order of the target transaction summary in the first block, thereby ensuring the fairness of the execution order of the business transaction, and avoiding the loss of digital resources caused by malicious manipulation of the execution order of business transactions in the block, thereby achieving fair sorting of business transactions and improving the security of digital resource transfer by business clients.

[0139] See Figure 3 , Figure 3 This is a flowchart of a data processing method based on blockchain provided by an embodiment of the present application. Figure 1 , the data processing method based on blockchain can be executed by a delegate node, which can be Figure 1The following is an example of a delegate node 200. The data processing method is described below by taking the delegate node as an example. The data processing method based on blockchain may include at least the following steps S101 to S103:

[0140] Step S101: The entrusting node obtains the business transaction corresponding to the business client, calculates the hash digest of the business transaction, and obtains the target transaction digest;

[0141] Specifically, the delegation node may obtain the business transaction corresponding to the business client, perform hash digest calculation on the business transaction, and obtain the target transaction digest.

[0142] Hash digest calculation can be a one-way operation that maps data of arbitrary length into a fixed-length message digest using a hash function, generating a fixed-length hash value, also known as a hash digest. The target transaction digest can be a hash value. Hash functions can be, for example, MD5 or SHA-256. A delegate node can be a node responsible for processing transactions initiated by a business client and for broadcasting transaction summaries and business transactions in sequence. It does not need to run a blockchain accounting program and can be a trusted client on par with the business client.

[0143] Step S102: Sending the first data to be packaged that carries the target transaction digest to a blockchain node, so that the blockchain node generates a first block containing the first data to be packaged through a transaction digest pool; the transaction digest pool includes multiple transaction digests from the delegating node, and the multiple transaction digests include the target transaction digest in the first data to be packaged;

[0144] Specifically, the delegating node can send the first unpacked data containing the target transaction summary to any blockchain node in the blockchain network. All blockchain nodes in the blockchain network can function as both consensus nodes and ledger nodes. Consensus nodes are nodes that participate in consensus verification. Consensus verification is the process by which all nodes in the consensus network reach consensus on a particular issue, such as determining whether a block should be added to the blockchain or verifying the validity of a transaction. Consensus nodes collectively constitute the blockchain network and can also help propagate block and voting messages, synchronizing data status with each other. Ledger nodes can be blockchain nodes that have been granted ledger rights or are responsible for packaging new blocks and adding them to the blockchain.

[0145] Blockchain nodes can put the data to be packaged into the transaction summary pool. In other words, the transaction summary pool also contains transaction summaries waiting for confirmation. The transaction summary pool can be a temporary data structure for storing transaction summaries. Since the transaction summary is a hash value, the blockchain node can randomly sort the transaction summaries when generating the first block through the transaction summary pool.

[0146] The blockchain node can store the target transaction summary in a transaction summary pool. The transaction summary pool can also store other transaction summaries sent by the delegate node. The blockchain node can generate a first block containing the first data to be packaged from the transaction summary pool. The blockchain node can perform consensus verification on the first block. Consensus verification can be performed in the blockchain network, where all consensus nodes need to vote on the first block to determine whether the first block should be added to the blockchain. The consensus algorithm used in the voting process can be implemented through proof of work, proof of stake, etc., which is not limited in this embodiment of the present application.

[0147] Step S103: If it is detected that the blockchain node has successfully reached consensus on the first block, the second data to be packaged carrying the business transaction is sent to the blockchain node, so that the blockchain node generates a second block based on the second data to be packaged, and performs consensus verification on the second block through the target transaction summary and the transaction execution result in the first block; the transaction execution result is obtained by executing the business transaction in the second block; if the consensus on the second block is successful, the execution order of the business transactions in the second block is consistent with the execution order of the target transaction summary in the first block.

[0148] Specifically, if the delegating node detects that the blockchain nodes have successfully reached consensus on the first block, it will send the second data to be packaged, carrying the business transaction, to any blockchain node in the blockchain network. The blockchain node may store the second data to be packaged, carrying the business transaction, in a transaction summary pool. The transaction summary pool may also store other data to be packaged sent by the delegating node. The blockchain node may obtain the second data to be packaged from the transaction summary pool based on the execution order of the transaction digests in the first block to generate the second block, thereby ensuring that the execution order of the business transactions in the second block is consistent with the execution order of the target transaction digests in the first block.

[0149] The blockchain node that generates the first and second blocks can be the same, or different blockchain nodes that have obtained accounting rights, and this is not a limitation in the present embodiment. When the blockchain node obtains the second block containing the second data to be packaged, the blockchain node can perform consensus verification on the second block using the target transaction summary and transaction execution result in the first block. The transaction execution result is obtained by executing the business transaction in the second block, and the transaction execution result can be the value of the digital resources of both parties involved in the business transaction after the business transaction is completed.

[0150] Among them, digital resources can be various digital assets and data stored on the blockchain. Digital resources can be trusted digital rights certificates with unique characteristics in the blockchain network. They are a type of data object that can record and process multi-dimensional and complex attributes on the blockchain, and have the characteristics of security, transparency, and non-tamperability.

[0151] It can be understood that if the second block is verified successfully using the target transaction digest and transaction execution results in the first block, the second block consensus is determined to be successful, and the execution order of the business transactions in the second block is consistent with the execution order of the target transaction digests in the first block. Since the execution order of the target transaction digests in the first block is randomly sorted without transparency, by ensuring that the execution order of the business transactions in the second block is consistent with the execution order of the target transaction digests in the first block, the execution order of the business transactions in the second block is also randomized, ensuring a fair ordering of the execution order of the business transactions. In the embodiment of the present application, a business transaction corresponding to a business client is obtained by a delegation node, a hash summary is calculated for the business transaction to obtain a target transaction summary, and the first data to be packaged carrying the target transaction summary is first broadcast to the blockchain node, which is then stored in a transaction summary pool by the blockchain node. Since the blockchain node can only obtain the target transaction summary, and the target transaction summary is a hash value, the blockchain node is invisible to the complete content of the business transaction. The transaction summary can be randomly obtained from the transaction summary pool to generate the first block, thereby ensuring the randomness of the execution order of the transaction summaries in the first block, thereby ensuring the fairness of the execution order of the transaction summaries in the first block. When the consensus of the first block succeeds, the delegate node can broadcast the second data to be packaged containing the business transaction to the blockchain node, so that the blockchain node can package the business transaction into the second block according to the execution order of the target transaction summary in the first block, and verify the consensus of the second block based on the target transaction summary and the transaction execution result of the business transaction in the second block. This can ensure that the execution order of the business transaction in the second block is consistent with the execution order of the target transaction summary in the first block, thus ensuring the fairness of the execution order of the business transactions, and preventing the execution order of the business transactions in the block from being maliciously manipulated and causing digital resource loss, thus achieving fair sorting of business transactions and improving the security of digital resource transfer by business clients. Figure 4 , Figure 4 This is a flowchart of a data processing method based on blockchain provided by an embodiment of the present application. Figure 2 , the data processing method based on blockchain can be executed by a delegate node, which can be Figure 1 The following is an example of a delegate node 200. The data processing method is described below by taking the delegate node as an example. The data processing method based on blockchain may include at least the following steps S201 to S205:

[0152] Step S201, obtain the invitation request sent by the business client, generate commitment data based on the invitation request, and send the commitment data and commitment signature information to the business client, so that the business client can send a delegation request based on the commitment data, the initial transaction and the business signature information when the commitment signature information is successfully verified through the public key of the delegation node; the commitment signature information is obtained by signing the commitment data based on the private key of the delegation node; the business signature information is obtained by signing the initial transaction based on the private key of the business client; receive the delegation request sent by the business client, and generate a business transaction based on the initial transaction and business signature information in the delegation request.

[0153] Specifically, the delegation node may obtain the invitation request sent by the business client. The invitation request may be a delegation that submits information without the signature of the business client. The invitation request may include the initial transaction PreTX and the first service value SFee, the second service value HFee, and the third service value TXFee. The invitation request PreDTX may be expressed as PreDTX=<PreTX,Submitter,SFee,HFee> . Among them, the first service value SFee refers to the value of the digital resources that need to be moved from the business client to the entrusting node when the entrusting node successfully entrusts the target transaction summary to the blockchain node. The second service value HFee refers to the value of the digital resources that the business client needs to transfer to the blockchain node when the blockchain node successfully reaches a consensus on the first block. The third service value TXFee refers to the value of the digital resources that the business client needs to transfer to the blockchain node when the blockchain node successfully reaches a consensus on the second block. Among them, in order to ensure the security of the digital resources of the business client, the initial transaction PreTX may not carry the signature information of the business client, but may carry the hash value of the signature information of the business client. Submitter is the node information of the entrusting node, which may be the address of the entrusting node, service name, etc.

[0154] The delegating node can receive the invitation request sent by the business client and generate commitment data based on the invitation request. The commitment data may include a default compensation value. The default compensation value refers to the value of the digital resources that the delegating node must transfer to the business client if the target transaction summary fails to be delegated to the blockchain node through the delegating node. The delegating node can sign the commitment data using its private key to obtain delegation signature information. Delegation failure can occur when the delegating node fails to broadcast the business transaction within a specified delegation time limit.

[0155] The delegation node can send a commitment request to the business client. The commitment request PreCommit can be expressed as PreCommit=<PreTX,Submitter,VFee> The commitment request PreCommit can include commitment data and delegation signature information. VFee is the breach of contract compensation value in the commitment data. Submitter is the node information of the delegation node. The delegation signature information can be included in Submitter.

[0156] When the business client successfully verifies the commitment signature information using the public key of the delegating node, it can generate a delegation request Commit based on the commitment data, the initial transaction PreTX, and the business signature information. The business client can add the business signature information for the initial transaction PreTX to the commitment request. The business client can send the delegation request Commit to the delegating node. The delegation request Commit can be expressed as Commit=<PreTX,Submitter,VFee> The PreTX in the Commit request can contain business signature information. The commitment signature information is obtained by signing the commitment data with the private key of the delegating node, and the business signature information is obtained by signing the initial transaction with the private key of the business client.

[0157] The delegating node may receive a delegation request (Commit) from the business client and generate a business transaction (TX) based on the initial transaction (PreTX) and business signature information in the delegation request. The business transaction (TX) may be generated by authorizing the delegating node with the digital resources corresponding to the initial transaction (PreTX) in the business client's account. The business transaction (TX) may also be the same as the initial transaction (PreTX), which is not a limitation in this embodiment of the present application.

[0158] Step S202: Calculate the hash summary of the business transaction to obtain the target transaction summary;

[0159] For details, please refer to the above Figure 3 The specific description of the hash summary calculation in step S101 of the corresponding embodiment will not be repeated here in this embodiment of the present application.

[0160] Step S203: Sign the target transaction digest based on the private key of the delegation node to obtain summary delegation signature information, and generate the first data to be packaged based on the target transaction digest and the summary delegation signature information; the summary delegation signature information is used to instruct the blockchain node to add the first data to be packaged to the transaction summary pool of the blockchain node when the blockchain node verifies the summary delegation signature information.

[0161] Specifically, the delegating node may sign the target transaction digest based on its private key to obtain digest delegation signature information. The delegating node may then generate the first data to be packaged based on the target transaction digest and the digest delegation signature information. The digest delegation signature information is used to instruct the blockchain node to add the first data to be packaged to its transaction digest pool when the blockchain node verifies the digest delegation signature information.

[0162] Step S204: Sending the first data to be packaged that carries the target transaction digest to the blockchain node, so that the blockchain node generates a first block containing the first data to be packaged through a transaction digest pool; the transaction digest pool includes multiple transaction digests from the delegating node, and the multiple transaction digests include the target transaction digest in the first data to be packaged;

[0163] Specifically, the delegation node may send the first data to be packaged carrying the target transaction summary to the blockchain node that obtains the accounting right in the blockchain network.

[0164] It's understood that all blockchain nodes in a blockchain network can function as both consensus nodes and ledger nodes. Consensus nodes are nodes that participate in consensus verification. Consensus verification is the process by which all nodes in a consensus network reach agreement on a particular issue, such as determining whether a block should be added to the blockchain or verifying the validity of a transaction. Consensus nodes collectively constitute the blockchain network and can also help propagate block and voting information, synchronizing data status with each other. Ledger nodes are blockchain nodes that have been granted ledger rights and are responsible for packaging new blocks and adding them to the blockchain.

[0165] Blockchain nodes can place the data to be packaged into the transaction summary pool. In other words, the transaction summary pool also contains the target transaction summary. The transaction summary pool can also store other transaction summaries sent by the delegate node. The blockchain node will place the received transaction summary into the transaction summary pool for confirmation. The transaction summary pool can be a temporary data structure for storing transaction summaries. Because the blockchain node can only obtain the transaction summary, and the transaction summary is a hash value, the business transaction is opaque to the blockchain node. That is, the blockchain node cannot see the complete content of the business transaction. When the blockchain node generates the first block through the transaction summary pool, it can better randomly sort the transaction summaries.

[0166] The blockchain node can randomly sort the transaction summaries in the target transaction summary pool to obtain a first transaction list, which is used to indicate the execution order of the target transaction summaries in the first block. The blockchain node can generate a first block containing the first data to be packaged through the first transaction list. The first block can be represented as Block NThe process of generating the first block through the first data to be packaged can be expressed as Block N =[ <TX i .Hash,Submitter i ,SFee i ,HFee i >], where i represents the transaction summary TX of the blockchain node packaged by the transaction summary pool i i .Hash. Each transaction summary contains the node information of the delegate node Submitter i , and the first service value SFee corresponding to the transaction summary i and the second service value HFee i .

[0167] The blockchain nodes may perform consensus verification on the first block. Consensus verification may involve all consensus nodes in the blockchain network voting on the first block to determine whether the first block should be added to the blockchain. The consensus algorithm used in the voting process may be implemented using proof-of-work, proof-of-stake, or the like, and is not limited in this embodiment of the present application.

[0168] In step S205, if it is detected that the blockchain node has successfully reached consensus on the first block, the second data to be packaged carrying the business transaction is sent to the blockchain node, so that the blockchain node generates a second block based on the second data to be packaged, and performs consensus verification on the second block through the target transaction summary and the transaction execution result in the first block; the transaction execution result is obtained by executing the business transaction in the second block; if the consensus on the second block is successful, the execution order of the business transactions in the second block is consistent with the execution order of the target transaction summary in the first block.

[0169] Specifically, the delegate node can detect the blocks generated by the blockchain node in real time. After the blockchain node successfully reaches consensus on the first block, the delegate node can detect the transaction summary in the first transaction list in the first block. For a business transaction TX, if the transaction summary TX.Hash that is the same as the business transaction TX is detected in the first transaction list, the detection process can be expressed as DTX.TX.Hash==Block N .TX i .Hash, TX i .Hash indicates the first block NThe transaction summary of the first transaction list in the blockchain network. The entrusting node can broadcast the business transaction TX to the entire blockchain network. Specifically, it can be to send the second data to be packaged carrying the business transaction TX to the blockchain node that obtains the accounting right in the blockchain network. The blockchain node that generates the first block and the second block can be the same, or they can be different blockchain nodes that obtain the accounting right. The embodiment of the present application does not limit this. For example, the second data to be packaged carrying the business transaction TX is sent to the blockchain node. The blockchain node can store the second data to be packaged carrying the business transaction in the transaction summary pool. The transaction summary pool can also store other data to be packaged sent from the entrusting node. The blockchain node can obtain the second data to be packaged in the transaction summary pool based on the execution order of the transaction summary in the first block (which can be the first transaction list) to generate the second block, thereby ensuring that the execution order of the business transaction in the second block is consistent with the execution order of the target transaction summary in the first block.

[0170] In the embodiment of the present application, a business transaction corresponding to a business client is obtained by a delegation node, a hash summary is calculated for the business transaction to obtain a target transaction summary, and the first data to be packaged carrying the target transaction summary is first broadcast to the blockchain node, which is then stored in a transaction summary pool by the blockchain node. Since the blockchain node can only obtain the target transaction summary, and the target transaction summary is a hash value, the blockchain node is invisible to the complete content of the business transaction. The transaction summary can be randomly obtained from the transaction summary pool to generate the first block, thereby ensuring the randomness of the execution order of the transaction summaries in the first block, thereby ensuring the fairness of the execution order of the transaction summaries in the first block. When the consensus of the first block is successful, the delegate node can broadcast the second to-be-packaged data carrying the business transaction to the blockchain node, so that the blockchain node can package the business transaction into the second block according to the execution order of the target transaction summary in the first block, and perform consensus verification on the second block through the target transaction summary and the transaction execution result of the business transaction in the second block. This can ensure that the execution order of the business transaction in the second block is consistent with the execution order of the target transaction summary in the first block, thereby ensuring the fairness of the execution order of the business transaction, and avoiding the loss of digital resources caused by malicious manipulation of the execution order of business transactions in the block, thereby achieving fair sorting of business transactions and improving the security of digital resource transfer by business clients.

[0171] On the other hand, by setting the first service number and the second service number, it can be ensured that the entrusting node has sufficient motivation to generate the transaction summary for broadcasting, and that the blockchain node can obtain the transaction summary in time to package and generate the first block. In addition, a breach of contract compensation value is set through the commitment data between the business client and the entrusting node. The specific content of the commitment data can be found in the above Figure 4The description of step S201 of the corresponding embodiment is not repeated here in the embodiment of the present application. The entrusting node can broadcast the transaction content in a timely manner. When the entrusting node broadcasts it in an untimely manner, the business client can send a breach of contract compensation request to the blockchain node. The blockchain node can compare and detect the second transaction list in the second block with the first transaction list in the first block. If it is detected that the transaction summary of the business transaction is successfully uploaded to the first block of the blockchain, but within the entrustment time limit promised by the entrusting node, the receipt status of the first block is not detected as unexecuted in the subsequent blocks of the blockchain, it means that the complete information of the first block is not saved in the subsequent blocks, that is, the execution order of the business transaction in the second block (the second transaction list) is inconsistent with the execution order of the transaction summary in the first block (the first transaction list), and the initial transaction entrusted by the business client is breached. The blockchain node can transfer the digital resources of the breach of contract compensation value to the business client for compensation, avoiding further loss of the digital resources of the business client and protecting the rights and interests of the business client in entrustment.

[0172] See Figure 5 , Figure 5 This is a flowchart of a data processing method based on blockchain provided by an embodiment of the present application. Figure 3 , the data processing method based on blockchain can be executed by a blockchain node, and the blockchain node can be Figure 1 Any blockchain node in the blockchain network shown, for example, can be blockchain node 10a. The following will be described using the data processing method executed by a blockchain node as an example. The blockchain-based data processing method can include at least the following steps S301-S306:

[0173] Step S301: Obtain the first data to be packaged sent by the delegating node and add the first data to be packaged to a transaction summary pool; the transaction summary pool includes multiple transaction summaries from the delegating node, and the multiple transaction summaries include the target transaction summary in the first data to be packaged. The target transaction summary is obtained by performing a hash summary calculation on the business transaction sent by the business client by the delegating node.

[0174] Specifically, blockchain nodes can function as both consensus nodes and ledger nodes. Consensus nodes are nodes that participate in consensus verification. Consensus verification is the process by which all nodes in a consensus network reach consensus on a particular issue, such as determining whether a block should be added to the blockchain or verifying the validity of a transaction. Consensus nodes collectively constitute the blockchain network and can also help propagate block and voting messages, synchronizing data status with each other. Ledger nodes are blockchain nodes that have been granted ledger rights and are responsible for packaging new blocks and adding them to the blockchain.

[0175] The delegating node may sign the target transaction digest based on its private key to obtain digest delegation signature information. The delegating node may then generate the first data to be packaged based on the target transaction digest and the digest delegation signature information. The digest delegation signature information is used to instruct the blockchain node to add the first data to be packaged to its transaction digest pool when the blockchain node verifies the digest delegation signature information.

[0176] A blockchain node may be provided with a transaction summary pool. The blockchain node may obtain the first data to be packaged sent by the delegating node and add the first data to the transaction summary pool. The transaction summary pool includes multiple transaction summaries from the delegating node, including a target transaction summary in the first data to be packaged. The target transaction summary is calculated by the delegating node through a hash digest of the business transaction sent by the business client.

[0177] Hash digest calculation can be a one-way operation that maps data of arbitrary length into a fixed-length message digest using a hash function, generating a fixed-length hash value, also known as a hash digest. The target transaction digest can be a hash value. Hash functions can include, for example, MD5 and SHA-256. A delegate node can be a node that processes transactions initiated by a business client and broadcasts the transaction digest and then the business transaction. It does not need to run the blockchain accounting program and can be a trusted client on par with the business client. The transaction digest pool can be a temporary data structure that stores transaction digests. Since the transaction digest is a hash value, blockchain nodes can only obtain the transaction digest. Since the transaction digest is a hash value, business transactions are opaque to blockchain nodes, meaning that the blockchain nodes do not see the full content of the business transactions. This allows blockchain nodes to better randomly sort the transaction digests when generating the first block using the transaction digest pool.

[0178] Step S302: Verify the digest delegation signature information. If the digest delegation signature information passes the verification, randomly sort the target transaction digests to obtain a first transaction list. Generate a first block using the first transaction list and the digest delegation signature information. The first transaction list is used to indicate the execution order of the target transaction digests in the first block.

[0179] Specifically, the blockchain node can verify the summary delegation signature information. The summary delegation signature information is obtained based on the delegation node's signature on the transaction summary. The process of verifying the summary delegation signature information can be: decrypting the summary delegation signature information based on the delegation node's public key to obtain the hash value to be verified, and generating the target hash value of the target transaction summary; if the hash value to be verified is the same as the target hash value, it is determined that the verification is successful; if the hash value to be verified is different from the target hash value, it is determined that the verification has failed, and an error prompt message is returned to the delegation node.

[0180] If the digest delegation signature information is verified, the target transaction digests are randomly sorted to generate a first transaction list. Based on the first transaction list and the digest delegation signature information, the blockchain node can use the accounting program in the blockchain node to obtain transaction digests from the transaction summary pool and generate the first block. The first transaction list indicates the execution order of the target transaction digests in the first block.

[0181] The blockchain node can generate a first block containing the first data to be packaged through the first transaction list and the transaction summary pool. The first block can be represented as Block N The process of generating the first block through the first data to be packaged can be expressed as Block N =[ <TX i .Hash,Submitter i ,SFee i ,HFee i >], where i represents the transaction summary TX of the blockchain node packaged by the transaction summary pool i i .Hash. Each transaction summary contains the node information of the delegate node on which it is calculated. i , and the first service value SFee corresponding to the transaction summary i and the second service value HFee i The first service value SFee refers to the value of the digital resources that need to be transferred from the business client to the entrusting node when the entrusting node successfully entrusts the target transaction summary to the blockchain node. The second service value HFee refers to the value of the digital resources that need to be transferred from the business client to the blockchain node when the blockchain node successfully reaches consensus on the first block. N The transaction summary TX can also be packaged i The third service value TXFee required for .Hash refers to the value of the digital resources that the business client needs to transfer to the blockchain node when the blockchain node successfully reaches consensus on the second block.

[0182] Step S303: performing consensus verification on the first block;

[0183] Specifically, the blockchain nodes may perform consensus verification on the first block. Consensus verification may involve all consensus nodes in the blockchain network voting on the first block to determine whether the first block should be added to the blockchain. The consensus algorithm used in the voting process may be implemented using proof-of-work, proof-of-stake, etc., and is not limited in this embodiment of the present application.

[0184] Step S304: If the consensus on the first block is successful, the second data to be packaged carrying the business transaction sent by the delegating node is obtained, and the second data to be packaged is added to the transaction summary pool;

[0185] Specifically, if the blockchain nodes successfully reach consensus on the first block, the delegate node can detect the transaction digest in the first transaction list in the first block. For a business transaction TX, if the transaction digest TX.Hash that is the same as the business transaction TX is detected in the first transaction list, the detection process can be expressed as DTX.TX.Hash==Block N .TX i .Hash, TX i .Hash indicates the first block N The entrusting node may broadcast the business transaction TX to the entire blockchain network, and may send the second to-be-packaged data carrying the business transaction TX to a blockchain node that has obtained bookkeeping rights in the blockchain network. The blockchain node that generates the first block and the second block may be the same, or may be different blockchain nodes that have obtained bookkeeping rights, and this embodiment of the present application does not impose any restrictions on this.

[0186] The blockchain node can obtain the second data to be packaged that carries the business transaction sent by the entrusting node. The blockchain node can put the second data to be packaged into the transaction summary pool. In other words, the transaction summary pool also includes the business transaction. The transaction summary pool can also store other data to be packaged sent by the entrusting node.

[0187] Step S305: Verify the transaction entrustment signature information. If the transaction entrustment signature information is verified, obtain the first transaction list in the first block, sort the business transactions based on the execution order of the target transaction digest in the first transaction list, and obtain a second transaction list; generate a second block based on the second transaction list and the transaction entrustment signature information; the second transaction list is used to indicate the execution order of the business transactions in the second block.

[0188] Specifically, the blockchain node can verify the transaction entrustment signature information. When the transaction entrustment signature information is verified, the first transaction list in the first block is obtained, and the business transactions are sorted based on the execution order of the target transaction summary in the first transaction list to obtain the second transaction list.

[0189] The blockchain node can obtain the business transaction TX corresponding to the target transaction summary TX.Hash, determine the execution order of the business transaction TX based on the execution order of the target transaction summary TX.Hash in the first block, and generate the second block through the accounting program based on the business transaction TX and the execution order, so as to ensure that the execution order of the business transactions in the second block is consistent with the execution order of the target transaction summary in the first block.

[0190] The second transaction list is used to indicate the execution order of business transactions in the second block. The second block can be represented as Block N+K The process of generating the second block through the second data to be packaged can be expressed as Block N+K =[ <TX i ,Submitter i ,SFee i ,HFee i >], where i represents the business transaction TX packaged by the blockchain node through the transaction summary pool i i Business transactions can include complete transaction content, such as the node information of the delegate node Submitter i , the first service value SFee corresponding to the transaction summary i and the second service value HFee i , Third service value TXFee i .

[0191] It is understandable that in the second block N+K The first block is added to the block body N Complete transaction information and the first block N The receipt root of the actual execution receipt is recorded in the second block N+K The receipt root can be the first block of the block. N The root hash value calculated by the Merkle tree. This root hash value can be used to quickly verify the validity and integrity of the receipt. In the blockchain, the Merkle tree is a data structure used to quickly verify the integrity and consistency of data. It can be used to perform hash calculations on transaction data, block data, etc. and generate a root hash value.

[0192] Step S306: When a second block containing the second data to be packaged is obtained, the execution order for the target transaction summary is obtained from the first block; if it is verified that the execution order of the business transactions in the second block is consistent with the execution order of the target transaction summary, the business transactions are executed in accordance with the execution order of the business transactions in the second block to obtain a transaction execution result; if it is verified that the transaction execution result is consistent with the target transaction execution result for the second block sent by the blockchain master node, the first consensus vote for the second block is broadcast to the consensus network; the first consensus vote refers to a consensus approval vote; the second consensus vote for the second block sent by the consensus network is obtained, and if the proportion of the consensus approval votes in the first consensus vote and the second consensus vote meets the block consensus condition, it is determined that the second block consensus is successful.

[0193] Specifically, the blockchain nodes that generate the first block and the second block can be different blockchain nodes that obtain the accounting rights. The node that generates the first block can be called the blockchain node Block N .Miner, the node that generates the second block can be called the blockchain master node Block N+K .Miner.

[0194] When the blockchain node Block N When the Miner obtains the second block containing the second data to be packaged, it obtains the execution order of the target transaction summary from the first block (which can be the first transaction list), and the blockchain node Block N .Miner can verify the execution order of business transactions in the second block and the first transaction list.

[0195] If the blockchain node Block N If the miner verifies that the execution order of the business transactions in the second block is consistent with the execution order of the target transaction summary, it will execute the business transactions according to the execution order of the business transactions in the second block, and obtain the transaction execution result. The transaction execution result can be the value of the digital resources of both parties involved in the business transaction after the business transaction is completed. Digital resources can be various digital assets and data stored on the blockchain. Digital resources can be unique and trusted digital rights certificates in the blockchain network. They are data objects that can record and process multi-dimensional and complex attributes on the blockchain, and they have the characteristics of security, transparency, and immutability.

[0196] Blockchain node N .Miner can verify the consensus of transaction execution results. If the transaction execution results are verified to be consistent with the blockchain master node Block N+KIf the target transaction execution result for the second block sent by the Miner is consistent, the first consensus vote (which may be a consensus approval vote) for the second block is broadcast to the consensus network.

[0197] Blockchain node N The miner can obtain the second consensus vote for the second block sent by the consensus network. If the proportion of consensus approval votes in the first and second consensus votes meets the block consensus condition, the second block consensus is determined to be successful. The block consensus condition can be that the proportion of consensus approval votes in the first and second consensus votes is greater than a certain preset threshold, which is not limited in this embodiment of the application.

[0198] In the second block N+K After the consensus is successful, the blockchain node Block N .Miner can calculate the third service value TX Fee generated by the business transaction TX. The third service value TX Fee can be used to generate the first block of the blockchain node Block N .Miner and the blockchain master node Block that generates the second block N+K .Miner. For example, the third service value TX Fee can be divided among the blockchain nodes Block N .Miner and Blockchain Masternode N+K .Miner is divided equally among them, and the process can be expressed as Balance[Block N .Miner]+=DTX.TX.TXFee / 2 and Balance[Block N .Miner]+=DTX.TX.TXFee / 2, where Balance refers to the storage location of each account address and its digital resources in the world state.

[0199] It is understood that the embodiment of the present application does not give the third service value TX Fee entirely to the blockchain node Block that generates the first block. N .Miner, can ensure the blockchain master node Block N+K .Miner has enough motivation to package business transaction TX, while also ensuring the blockchain node Block N .Miner packaged transaction summary TX.Hash contribution.

[0200] Optionally, the business client can monitor the data on the blockchain in real time (or query the block data after a period of time). If the transaction summary of the business transaction is detected in a certain block of the blockchain (which can be the first block), N) is successfully uploaded to the chain, but within the commission period promised by the entrusting node, it is not included in the subsequent blocks of the blockchain (which can be the second block N+K ) detects that the receipt status of the first block (which can be the receipt and receipt root) is not executed, which means that the complete information of the first block is not saved in the subsequent block, which means that the second block Block N+K The execution order of business transactions (second transaction list) and the first block N The execution order of the transaction summaries in (first transaction list) is inconsistent.

[0201] The business client holds the commitment data of the entrusting node, which includes the default compensation value for the initial transaction. For details about the initial transaction and the default compensation value, please refer to the above Figure 4 The description of step S201 in the corresponding embodiment will not be repeated here. N+K The execution order of business transactions (second transaction list) and the first block N The execution order of the transaction summary (the first transaction list) is inconsistent, which means that the initial transaction entrusted by the business client is in default. The above detection process can be expressed as DTX.TX.Hash==Block N .TX i .Hash, Block K+K .TX i .Receipt.Status == NULL. The transaction summary of the business transaction exists in the first block. N In the second block N+K The receipt status in Status is NULL. Status == NULL means that the business transaction TX has not been processed according to the first block. N The execution order of the transaction summary in the second block is packaged in N+K In the case of a message "TX", it may indicate that the delegate node has not broadcast the business transaction TX to the blockchain node in a timely manner.

[0202] If Status is True or False, it proves that the delegate node has broadcast the business transaction TX, and the business transaction TX corresponding to the business client is executed successfully or failed, but it means that the delegate node broadcasts the business transaction TX to the blockchain node in a timely manner, but the third service value TXFee is too low and the delegation summary is not uploaded to the chain, or in rare cases, the delegate node is down.

[0203] If the initial transaction entrusted by the business client is breached, the business client can initiate a breach compensation transaction to the blockchain node. The breach compensation transaction can include the first blockN The execution order or receipt status of the transaction summary in the , and the default compensation value VFee. For the content of the default compensation value VFee, please refer to the above Figure 4 The specific description of step S201 of the corresponding embodiment will not be repeated here in this embodiment of the present application.

[0204] If the blockchain node receives the business client's request for compensation for breach of contract from the entrusting node, it will N+K The second transaction list in the first block N The first transaction list in the second transaction list is compared and detected. If the second transaction list is different from the first transaction list, it is determined that the target transaction summary has failed to be delegated in the blockchain node. The blockchain node can obtain the breach of contract compensation value in the breach of contract compensation request and transfer the digital resource with the breach of contract compensation value in the delegation node to the business client.

[0205] Optionally, if a blockchain node detects that a delegated node has failed to delegate the target transaction summary within the blockchain node, it will identify the delegated node that generated the target transaction summary as a node to be updated. The node's reputation level will be updated, potentially by lowering it. If the updated reputation level falls below a threshold, the node will be added to a list of abnormal nodes. Delegated nodes on this list are denied permission to interact with business clients. In a specific implementation, blockchain nodes can detect DTXs that contain only transaction summaries but no business transactions, count the Submitters within them, and blacklist those Submitters that appear more frequently. This can further reduce the possibility of delegated nodes manipulating transactions and ensure the security of business clients' digital resources.

[0206] In the embodiment of the present application, a business transaction corresponding to a business client is obtained by a delegation node, a hash summary is calculated for the business transaction to obtain a target transaction summary, and the first data to be packaged carrying the target transaction summary is first broadcast to the blockchain node, which is then stored in a transaction summary pool by the blockchain node. Since the blockchain node can only obtain the target transaction summary, and the target transaction summary is a hash value, the blockchain node is invisible to the complete content of the business transaction. The transaction summary can be randomly obtained from the transaction summary pool to generate the first block, thereby ensuring the randomness of the execution order of the transaction summaries in the first block, thereby ensuring the fairness of the execution order of the transaction summaries in the first block. When the consensus of the first block is successful, the delegate node can broadcast the second to-be-packaged data carrying the business transaction to the blockchain node, so that the blockchain node can package the business transaction into the second block according to the execution order of the target transaction summary in the first block, and perform consensus verification on the second block through the target transaction summary and the transaction execution result of the business transaction in the second block. This can ensure that the execution order of the business transaction in the second block is consistent with the execution order of the target transaction summary in the first block, thereby ensuring the fairness of the execution order of the business transaction, and avoiding the loss of digital resources caused by malicious manipulation of the execution order of business transactions in the block, thereby achieving fair sorting of business transactions and improving the security of digital resource transfer by business clients.

[0207] On the other hand, by setting the first service number and the second service number, it can be ensured that the entrusting node has sufficient motivation to generate the transaction summary for broadcasting, and that the blockchain node can obtain the transaction summary in time to package and generate the first block. In addition, a breach of contract compensation value is set through the commitment data between the business client and the entrusting node. The specific content of the commitment data can be found in the above Figure 4 The description of step S201 of the corresponding embodiment is not repeated here in the embodiment of the present application. The entrusting node can broadcast the transaction content in a timely manner. When the entrusting node broadcasts it in an untimely manner, the business client can send a breach of contract compensation request to the blockchain node. The blockchain node can compare and detect the second transaction list in the second block with the first transaction list in the first block. If it is detected that the transaction summary of the business transaction is successfully uploaded to the first block of the blockchain, but within the entrustment time limit promised by the entrusting node, the receipt status of the first block is not detected as unexecuted in the subsequent blocks of the blockchain, it means that the complete information of the first block is not saved in the subsequent blocks, that is, the execution order of the business transaction in the second block (the second transaction list) is inconsistent with the execution order of the transaction summary in the first block (the first transaction list), and the initial transaction entrusted by the business client is breached. The blockchain node can transfer the digital resources of the breach of contract compensation value to the business client for compensation, avoiding further loss of the digital resources of the business client and protecting the rights and interests of the business client in entrustment.

[0208] In this embodiment of the present application, the third service value may not be fully assigned to the blockchain node that generated the first block, thereby ensuring that the blockchain master node has sufficient incentive to package business transactions while also guaranteeing the blockchain node's contribution to packaging transaction summaries. By detecting delegation requests that only contain transaction summaries but no business transactions, counting the delegation nodes involved, and blacklisting those with high frequency, the possibility of delegation nodes manipulating transactions is further reduced, thereby ensuring the security of digital resources of business clients.

[0209] See Figure 6 , Figure 6 This is a flowchart of a data processing method based on blockchain provided by an embodiment of the present application. Figure 4 The data processing method based on blockchain may at least include the following steps S401 to S405:

[0210] Step S401, sending an invitation request;

[0211] Specifically, the delegation node and the business client may constitute a delegation transaction network. The blockchain network may include a consensus network. The business client may initiate an initial transaction and send an invitation request to the delegation node. The invitation request may be a delegation that does not carry the signature information of the business client. The invitation request may include the initial transaction PreTX and the first service value SFee, the second service value HFee, and the third service value TXFee. The invitation request PreDTX may be expressed as PreDTX=<PreTX,Submitter,SFee,HFee> . Among them, the first service value SFee refers to the value of the digital resources that need to be moved from the business client to the entrusting node when the entrusting node successfully entrusts the target transaction summary to the blockchain node. The second service value HFee refers to the value of the digital resources that the business client needs to transfer to the blockchain node when the blockchain node successfully reaches a consensus on the first block. The third service value TXFee refers to the value of the digital resources that the business client needs to transfer to the blockchain node when the blockchain node successfully reaches a consensus on the second block. Among them, in order to ensure the security of the digital resources of the business client, the initial transaction PreTX may not carry the signature information of the business client, but may carry the hash value of the signature information of the business client. Submitter is the node information of the entrusting node, which may be the address of the entrusting node, service name, etc.

[0212] Step S402, returning commitment data;

[0213] Specifically, the delegating node can receive the invitation request sent by the business client and generate commitment data based on the invitation request. The commitment data may include a default compensation value. The default compensation value refers to the value of the digital resources that the delegating node must transfer to the business client if the target transaction summary fails to be delegated to the blockchain node through the delegating node. The delegating node can sign the commitment data using its private key to obtain delegation signature information.

[0214] The delegation node can send a commitment request to the business client. The commitment request PreCommit can be expressed as PreCommit=<PreTX,Submitter,VFee> The commitment request PreCommit can include commitment data and delegation signature information. VFee is the breach of contract compensation value in the commitment data. Submitter is the node information of the delegation node. The delegation signature information can be included in Submitter.

[0215] Step S403: Send a delegation request;

[0216] Specifically, when the business client successfully verifies the commitment signature information using the public key of the delegating node, it can generate a delegation request Commit based on the commitment data, the initial transaction PreTX, and the business signature information. The business signature information for the initial transaction PreTX can be added to the commitment request. The business client can send the delegation request Commit to the delegating node. The delegation request Commit can be expressed as Commit=<PreTX,Submitter,VFee> The PreTX in the Commit request can contain business signature information. The commitment signature information is obtained by signing the commitment data with the private key of the delegating node, and the business signature information is obtained by signing the initial transaction with the private key of the business client.

[0217] Step S404: Detecting on-chain data;

[0218] Specifically, the delegation node can receive the delegation request Commit sent by the business client, and generate the business transaction TX based on the initial transaction PreTX and business signature information in the delegation request. The delegation node can first calculate the hash summary of the business transaction to obtain the target transaction summary, and send the first data to be packaged carrying the target transaction summary to the blockchain node, which generates the first block containing the first data to be packaged through the transaction summary pool. The process of generating the first block can be seen above. Figure 5 The specific contents of steps S301 to S303 of the corresponding embodiment will not be repeated here in the embodiment of the present application.

[0219] If the entrusting node detects that the blockchain node has successfully reached consensus on the first block, it will send the second data to be packaged containing the business transaction to the blockchain node, and the blockchain node will generate a second block containing the second data to be packaged through the transaction summary pool. The process of generating the second block can be seen above. Figure 5 The specific contents of steps S304 to S306 of the corresponding embodiment will not be repeated here in the embodiment of the present application.

[0220] Step S405: Send a breach of contract compensation request.

[0221] Specifically, the business client can monitor the data on the blockchain in real time (or query the block data after a period of time). If the transaction summary of the business transaction is detected in a certain block of the blockchain (which can be the first block), N ) is successfully uploaded to the chain, but within the commission period promised by the entrusting node, it is not included in the subsequent blocks of the blockchain (which can be the second block N+K ) detects that the receipt status of the first block (which can be the receipt and receipt root) is not executed, which means that the complete information of the first block is not saved in the subsequent block, which means that the second block Block N+K The execution order of business transactions (second transaction list) and the first block N The execution order of the transaction summary (the first transaction list) is inconsistent, and the initial transaction entrusted by the business client is breached. The above detection process can be expressed as DTX.TX.Hash==Block N .TX i .Hash, Block N+K .TX i .Receipt.Status == NULL. The transaction summary of the business transaction exists in the first block. N In the second block N+K The receipt status in Status is NULL. Status == NULL means that the business transaction TX has not been processed according to the first block. N The execution order of the transaction summary in the second block is packaged in N+K In the case of a message "TX", it may indicate that the delegate node has not broadcast the business transaction TX to the blockchain node in a timely manner.

[0222] If Status is True or False, it proves that the delegate node has broadcast the business transaction TX, and the business transaction TX corresponding to the business client is executed successfully or failed, but it means that the delegate node broadcasts the business transaction TX to the blockchain node in a timely manner, but the third service value TXFee is too low and the delegation summary is not uploaded to the chain, or in rare cases, the delegate node is down.

[0223] If the initial transaction entrusted by the business client is breached, the business client can initiate a breach compensation transaction to the blockchain node. The breach compensation transaction can include the first block N The execution order or receipt status of the transaction summary in the , and the default compensation value VFee. For the content of the default compensation value VFee, please refer to the above Figure 4 The specific description of step S201 of the corresponding embodiment will not be repeated here in this embodiment of the present application.

[0224] If the blockchain node receives the business client's request for compensation for breach of contract from the entrusting node, it will N+K The second transaction list in the first block N The first transaction list in the second transaction list is compared and detected. If the second transaction list is different from the first transaction list, it is determined that the target transaction summary has failed to be delegated in the blockchain node. The blockchain node can obtain the breach of contract compensation value in the breach of contract compensation request and transfer the digital resource with the breach of contract compensation value in the delegation node to the business client.

[0225] In the embodiment of the present application, a business transaction corresponding to a business client is obtained by a delegation node, a hash summary is calculated for the business transaction to obtain a target transaction summary, and the first data to be packaged carrying the target transaction summary is first broadcast to the blockchain node, which is then stored in a transaction summary pool by the blockchain node. Since the blockchain node can only obtain the target transaction summary, and the target transaction summary is a hash value, the blockchain node is invisible to the complete content of the business transaction. The transaction summary can be randomly obtained from the transaction summary pool to generate the first block, thereby ensuring the randomness of the execution order of the transaction summaries in the first block, thereby ensuring the fairness of the execution order of the transaction summaries in the first block. When the consensus of the first block is successful, the delegate node can broadcast the second to-be-packaged data carrying the business transaction to the blockchain node, so that the blockchain node can package the business transaction into the second block according to the execution order of the target transaction summary in the first block, and perform consensus verification on the second block through the target transaction summary and the transaction execution result of the business transaction in the second block. This can ensure that the execution order of the business transaction in the second block is consistent with the execution order of the target transaction summary in the first block, thereby ensuring the fairness of the execution order of the business transaction, and avoiding the loss of digital resources caused by malicious manipulation of the execution order of business transactions in the block, thereby achieving fair sorting of business transactions and improving the security of digital resource transfer by business clients.

[0226] On the other hand, by setting the first service number and the second service number, it can be ensured that the entrusting node has sufficient motivation to generate the transaction summary for broadcasting, and that the blockchain node can obtain the transaction summary in time to package and generate the first block. In addition, a breach of contract compensation value is set through the commitment data between the business client and the entrusting node. The specific content of the commitment data can be found in the above Figure 4 The description of step S201 of the corresponding embodiment is not repeated here in the embodiment of the present application. The entrusting node can broadcast the transaction content in a timely manner. When the entrusting node broadcasts it in an untimely manner, the business client can send a breach of contract compensation request to the blockchain node. The blockchain node can compare and detect the second transaction list in the second block with the first transaction list in the first block. If it is detected that the transaction summary of the business transaction is successfully uploaded to the first block of the blockchain, but within the entrustment time limit promised by the entrusting node, the receipt status of the first block is not detected as unexecuted in the subsequent blocks of the blockchain, it means that the complete information of the first block is not saved in the subsequent blocks, that is, the execution order of the business transaction in the second block (the second transaction list) is inconsistent with the execution order of the transaction summary in the first block (the first transaction list), and the initial transaction entrusted by the business client is breached. The blockchain node can transfer the digital resources of the breach of contract compensation value to the business client for compensation, avoiding further loss of the digital resources of the business client and protecting the rights and interests of the business client in entrustment.

[0227] In this embodiment of the present application, the third service value may not be fully assigned to the blockchain node that generated the first block, thereby ensuring that the blockchain master node has sufficient incentive to package business transactions while also guaranteeing the blockchain node's contribution to packaging transaction summaries. By detecting delegation requests that only contain transaction summaries but no business transactions, counting the delegation nodes involved, and blacklisting those with high frequency, the possibility of delegation nodes manipulating transactions is further reduced, thereby ensuring the security of digital resources of business clients.

[0228] See Figure 7 , Figure 7 This is a schematic diagram of the structure of a data processing device based on blockchain provided in an embodiment of the present application. Figure 1 .like Figure 7 As shown, the data processing device 1 includes a summary processing module 710 , a first sending module 720 and a second sending module 730 .

[0229] The digest processing module 710 is used to entrust the node to obtain the business transaction corresponding to the business client, perform hash digest calculation on the business transaction, and obtain the target transaction digest;

[0230] A first sending module 720 is configured to send the first data to be packaged that carries the target transaction digest to a blockchain node, so that the blockchain node generates a first block containing the first data to be packaged using a transaction digest pool; the transaction digest pool includes multiple transaction digests from the delegating node, and the multiple transaction digests include the target transaction digest in the first data to be packaged;

[0231] The second sending module 730 is used to send the second data to be packaged carrying the business transaction to the blockchain node if it is detected that the blockchain node has successfully reached consensus on the first block, so that the blockchain node generates a second block based on the second data to be packaged, and performs consensus verification on the second block through the target transaction summary and the transaction execution result in the first block; the transaction execution result is obtained by executing the business transaction in the second block; if the consensus on the second block is successful, the execution order of the business transactions in the second block is consistent with the execution order of the target transaction summary in the first block.

[0232] In a possible implementation, the summary processing module 710 is configured to perform the following operations when the entrusting node obtains the business transaction corresponding to the business client:

[0233] Obtain an invitation request sent by the business client, generate commitment data based on the invitation request, and send the commitment data and commitment signature information to the business client, so that when the business client successfully verifies the commitment signature information using the public key of the delegation node, it generates a delegation request based on the commitment data, the initial transaction, and the business signature information; the commitment signature information is obtained by signing the commitment data using the private key of the delegation node; the business signature information is obtained by signing the initial transaction using the private key of the business client;

[0234] Receive the delegation request sent by the business client, and generate a business transaction based on the initial transaction and business signature information in the delegation request.

[0235] In one possible implementation, the invitation request includes an initial transaction and a first service value, a second service value, and a third service value; the first service value refers to the value of the digital resources that need to be transferred from the business client to the delegating node when the delegating node successfully delegates the target transaction summary to the blockchain node; the second service value refers to the value of the digital resources that need to be transferred from the business client to the blockchain node when the blockchain node successfully reaches a consensus on the first block; and the third service value refers to the value of the digital resources that need to be transferred from the business client to the blockchain node when the blockchain node successfully reaches a consensus on the second block.

[0236] In one possible implementation, the commitment data includes a default compensation value for the initial transaction; the default compensation value refers to the value of the digital resources that the delegating node needs to transfer to the business client when the target transaction summary fails to be delegated to the blockchain node through the delegating node.

[0237] In a possible implementation, the summary processing module 710 is further configured to perform the following operations:

[0238] The target transaction summary is signed based on the private key of the delegation node to obtain summary delegation signature information, and the first data to be packaged is generated based on the target transaction summary and the summary delegation signature information; the summary delegation signature information is used to instruct the blockchain node to add the first data to be packaged to the transaction summary pool of the blockchain node when the blockchain node verifies the summary delegation signature information.

[0239] In the embodiment of the present application, a business transaction corresponding to a business client is obtained by a delegation node, a hash summary is calculated for the business transaction to obtain a target transaction summary, and the first data to be packaged carrying the target transaction summary is first broadcast to the blockchain node, which is then stored in a transaction summary pool by the blockchain node. Since the blockchain node can only obtain the target transaction summary, and the target transaction summary is a hash value, the blockchain node is invisible to the complete content of the business transaction. The transaction summary can be randomly obtained from the transaction summary pool to generate the first block, thereby ensuring the randomness of the execution order of the transaction summaries in the first block, thereby ensuring the fairness of the execution order of the transaction summaries in the first block. When the consensus of the first block is successful, the delegate node can broadcast the second to-be-packaged data carrying the business transaction to the blockchain node, so that the blockchain node can package the business transaction into the second block according to the execution order of the target transaction summary in the first block, and perform consensus verification on the second block through the target transaction summary and the transaction execution result of the business transaction in the second block. This can ensure that the execution order of the business transaction in the second block is consistent with the execution order of the target transaction summary in the first block, thereby ensuring the fairness of the execution order of the business transaction, and avoiding the loss of digital resources caused by malicious manipulation of the execution order of business transactions in the block, thereby achieving fair sorting of business transactions and improving the security of digital resource transfer by business clients.

[0240] On the other hand, by setting the first service number and the second service number, it can be ensured that the entrusting node has sufficient motivation to generate the transaction summary for broadcasting, and that the blockchain node can obtain the transaction summary in time to package and generate the first block. In addition, a breach of contract compensation value is set through the commitment data between the business client and the entrusting node. The specific content of the commitment data can be found in the above Figure 4The description of step S201 of the corresponding embodiment is not repeated here in the embodiment of the present application. The entrusting node can broadcast the transaction content in a timely manner. When the entrusting node broadcasts it in an untimely manner, the business client can send a breach of contract compensation request to the blockchain node. The blockchain node can compare and detect the second transaction list in the second block with the first transaction list in the first block. If it is detected that the transaction summary of the business transaction is successfully uploaded to the first block of the blockchain, but within the entrustment time limit promised by the entrusting node, the receipt status of the first block is not detected as unexecuted in the subsequent blocks of the blockchain, it means that the complete information of the first block is not saved in the subsequent blocks, that is, the execution order of the business transaction in the second block (the second transaction list) is inconsistent with the execution order of the transaction summary in the first block (the first transaction list), and the initial transaction entrusted by the business client is breached. The blockchain node can transfer the digital resources of the breach of contract compensation value to the business client for compensation, avoiding further loss of the digital resources of the business client and protecting the rights and interests of the business client in entrustment.

[0241] In this embodiment of the present application, the third service value may not be fully assigned to the blockchain node that generated the first block, thereby ensuring that the blockchain master node has sufficient incentive to package business transactions while also guaranteeing the blockchain node's contribution to packaging transaction summaries. By detecting delegation requests that only contain transaction summaries but no business transactions, counting the delegation nodes involved, and blacklisting those with high frequency, the possibility of delegation nodes manipulating transactions is further reduced, thereby ensuring the security of digital resources of business clients.

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

[0243] See Figure 8 , Figure 8 This is a schematic diagram of the structure of a data processing device based on blockchain provided in an embodiment of the present application. Figure 2 .like Figure 8 As shown, the data processing device 2 includes a summary acquisition module 810 , a consensus verification module 820 , a transaction acquisition module 830 and a transaction verification module 840 .

[0244] The digest acquisition module 810 is configured to acquire the first data to be packaged sent by the delegating node and add the first data to be packaged to a transaction digest pool. The transaction digest pool includes multiple transaction digests from the delegating node, including a target transaction digest in the first data to be packaged. The target transaction digest is obtained by performing a hash digest calculation on the business transaction sent by the business client by the delegating node.

[0245] A consensus verification module 820 is configured to generate a first block containing first data to be packaged and perform consensus verification on the first block;

[0246] The transaction acquisition module 830 is configured to acquire the second data to be packaged carrying the business transaction sent by the delegating node if the consensus on the first block is successful, and add the second data to be packaged to the transaction summary pool;

[0247] The transaction verification module 840 is used to perform consensus verification on the second block using the target transaction summary and transaction execution result in the first block when the second block containing the second data to be packaged is obtained; the transaction execution result is obtained by executing the business transactions in the second block; if the consensus of the second block succeeds, the execution order of the business transactions in the second block is consistent with the execution order of the target transaction summary in the first block.

[0248] In one possible implementation, the first data to be packaged includes a target transaction digest and digest delegation signature information, where the digest delegation signature information is obtained by signing the target transaction digest based on the private key of the delegation node. When the consensus verification module 820 is used to generate the first block including the first data to be packaged, it is specifically used to perform the following operations:

[0249] Verify the summary delegation signature information. If the summary delegation signature information passes the verification, randomly sort the target transaction summaries to obtain the first transaction list.

[0250] A first block is generated using a first transaction list and digest delegation signature information; the first transaction list is used to indicate the execution order of target transaction digests in the first block.

[0251] In one possible implementation, when the consensus verification module 820 is used to verify the digest delegation signature information, it is specifically used to perform the following operations:

[0252] Decrypt the summary delegation signature information based on the public key of the delegation node to obtain the hash value to be verified and generate the target hash value of the target transaction summary;

[0253] If the hash value to be verified is the same as the target hash value, the signature verification is confirmed to be successful;

[0254] If the hash value to be verified is different from the target hash value, the signature verification is determined to have failed, and an error message is returned to the delegate node.

[0255] In one possible implementation, the second data to be packaged includes a business transaction and transaction delegation signature information. The transaction delegation signature information is obtained by signing the business transaction based on the private key of the delegation node. The consensus verification module 820 is further configured to perform the following operations:

[0256] Verify the transaction entrustment signature information. If the transaction entrustment signature information is verified, obtain the first transaction list in the first block, sort the business transactions based on the execution order of the target transaction summary in the first transaction list, and obtain the second transaction list;

[0257] The second block is generated through the second transaction list and the transaction entrustment signature information; the second transaction list is used to indicate the execution order of business transactions in the second block.

[0258] In one possible implementation, when obtaining the second block containing the second data to be packaged, the transaction verification module 840 is configured to perform the following operations when performing consensus verification on the second block using the target transaction summary and the transaction execution result in the first block:

[0259] When a second block containing the second data to be packaged is obtained, an execution order for the target transaction digest is obtained from the first block;

[0260] If it is verified that the execution order of the business transactions in the second block is consistent with the execution order of the target transaction summary, the business transactions are executed according to the execution order of the business transactions in the second block to obtain the transaction execution result;

[0261] If the transaction execution result is verified to be consistent with the target transaction execution result for the second block sent by the blockchain master node, the first consensus vote for the second block is broadcast to the consensus network; the first consensus vote is a consensus approval vote;

[0262] Obtain the second consensus vote for the second block sent by the consensus network. If the proportion of consensus approval votes in the first consensus vote and the second consensus vote meets the block consensus condition, the second block consensus is determined to be successful.

[0263] In one possible implementation, the consensus verification module 820 is further configured to perform the following operations:

[0264] If a breach of contract compensation request from the business client to the entrusting node is obtained, the second transaction list in the second block is compared with the first transaction list in the first block;

[0265] If the second transaction list is different from the first transaction list, it is determined that the target transaction summary has failed to be delegated in the blockchain node, the breach compensation value in the breach compensation request is obtained, and the digital resource with the breach compensation value in the delegation node is transferred to the business client.

[0266] In one possible implementation, the consensus verification module 820 is further configured to perform the following operations:

[0267] If it is detected that the entrusting node fails to entrust the target transaction summary in the blockchain node, the entrusting node that generated the target transaction summary is determined as the node to be updated, and the reputation level of the node to be updated is updated;

[0268] If the updated reputation level is lower than the reputation threshold, the node to be updated will be added to the node abnormality list; the delegated node in the node abnormality list does not have the authority to interact with the business client for data.

[0269] In the embodiment of the present application, a business transaction corresponding to a business client is obtained by a delegation node, a hash summary is calculated for the business transaction to obtain a target transaction summary, and the first data to be packaged carrying the target transaction summary is first broadcast to the blockchain node, which is then stored in a transaction summary pool by the blockchain node. Since the blockchain node can only obtain the target transaction summary, and the target transaction summary is a hash value, the blockchain node is invisible to the complete content of the business transaction. The transaction summary can be randomly obtained from the transaction summary pool to generate the first block, thereby ensuring the randomness of the execution order of the transaction summaries in the first block, thereby ensuring the fairness of the execution order of the transaction summaries in the first block. When the consensus of the first block is successful, the delegate node can broadcast the second to-be-packaged data carrying the business transaction to the blockchain node, so that the blockchain node can package the business transaction into the second block according to the execution order of the target transaction summary in the first block, and perform consensus verification on the second block through the target transaction summary and the transaction execution result of the business transaction in the second block. This can ensure that the execution order of the business transaction in the second block is consistent with the execution order of the target transaction summary in the first block, thereby ensuring the fairness of the execution order of the business transaction, and avoiding the loss of digital resources caused by malicious manipulation of the execution order of business transactions in the block, thereby achieving fair sorting of business transactions and improving the security of digital resource transfer by business clients.

[0270] On the other hand, by setting the first service number and the second service number, it can be ensured that the entrusting node has sufficient motivation to generate the transaction summary for broadcasting, and that the blockchain node can obtain the transaction summary in time to package and generate the first block. In addition, a breach of contract compensation value is set through the commitment data between the business client and the entrusting node. The specific content of the commitment data can be found in the above Figure 4The description of step S201 of the corresponding embodiment is not repeated here in the embodiment of the present application. The entrusting node can broadcast the transaction content in a timely manner. When the entrusting node broadcasts it in an untimely manner, the business client can send a breach of contract compensation request to the blockchain node. The blockchain node can compare and detect the second transaction list in the second block with the first transaction list in the first block. If it is detected that the transaction summary of the business transaction is successfully uploaded to the first block of the blockchain, but within the entrustment time limit promised by the entrusting node, the receipt status of the first block is not detected as unexecuted in the subsequent blocks of the blockchain, it means that the complete information of the first block is not saved in the subsequent blocks, that is, the execution order of the business transaction in the second block (the second transaction list) is inconsistent with the execution order of the transaction summary in the first block (the first transaction list), and the initial transaction entrusted by the business client is breached. The blockchain node can transfer the digital resources of the breach of contract compensation value to the business client for compensation, avoiding further loss of the digital resources of the business client and protecting the rights and interests of the business client in entrustment.

[0271] In this embodiment of the present application, the third service value may not be fully assigned to the blockchain node that generated the first block, thereby ensuring that the blockchain master node has sufficient incentive to package business transactions while also guaranteeing the blockchain node's contribution to packaging transaction summaries. By detecting delegation requests that only contain transaction summaries but no business transactions, counting the delegation nodes involved, and blacklisting those with high frequency, the possibility of delegation nodes manipulating transactions is further reduced, thereby ensuring the security of digital resources of business clients.

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

[0273] See Figure 9 , Figure 9 This is a schematic diagram of the structure of a computer device provided in an embodiment of the present application. Figure 9As shown, the computer device 1000 may include: a processor 1001, a network interface 1004 and a memory 1005. In addition, the above-mentioned computer device 1000 may also include: a user interface 1003, and at least one communication bus 1002. The communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), a keyboard (Keyboard), and the user interface 1003 may optionally 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 a high-speed RAM memory, or a non-volatile memory (non-volatile memory), such as at least one disk memory. The memory 1005 may optionally also be at least one storage device located away from the aforementioned processor 1001. As Figure 9 As shown, the memory 1005 as a computer-readable storage medium may include an operating system, a network communication module, a user interface module, and a device control application.

[0274] In such Figure 9 In the computer device 1000 shown, the network interface 1004 can provide a network communication element; the user interface 1003 is mainly used to provide an input interface for the user; and the processor 1001 can be used to call the device control application stored in the memory 1005.

[0275] When the computer device 1000 is a delegate node, it can achieve:

[0276] The entrusting node obtains the business transaction corresponding to the business client, calculates the hash summary of the business transaction, and obtains the target transaction summary;

[0277] Sending the first data to be packaged that carries the target transaction digest to a blockchain node, so that the blockchain node generates a first block containing the first data to be packaged through a transaction digest pool; the transaction digest pool includes multiple transaction digests from the delegating node, and the multiple transaction digests include the target transaction digest in the first data to be packaged;

[0278] If it is detected that the blockchain node has successfully reached consensus on the first block, the second data to be packaged carrying the business transaction will be sent to the blockchain node, so that the blockchain node will generate a second block based on the second data to be packaged, and the second block will be consensus-verified through the target transaction summary in the first block and the transaction execution result; the transaction execution result is obtained by executing the business transaction in the second block; if the consensus on the second block is successful, the execution order of the business transactions in the second block is consistent with the execution order of the target transaction summary in the first block.

[0279] When the computer device 1000 is a blockchain node, it can achieve:

[0280] Obtaining the first data to be packaged sent by the delegating node, and adding the first data to be packaged to a transaction summary pool; the transaction summary pool includes multiple transaction summaries from the delegating node, the multiple transaction summaries including the target transaction summary in the first data to be packaged, and the target transaction summary is obtained by performing a hash digest calculation on the business transaction sent by the business client by the delegating node;

[0281] Generate a first block containing the first data to be packaged, and perform consensus verification on the first block;

[0282] If the consensus on the first block is successful, the second data to be packaged containing the business transaction sent by the delegate node is obtained and added to the transaction summary pool;

[0283] When the second block containing the second data to be packaged is obtained, consensus verification is performed on the second block using the target transaction summary and transaction execution result in the first block; the transaction execution result is obtained by executing the business transactions in the second block; if the consensus on the second block succeeds, the execution order of the business transactions in the second block is consistent with the execution order of the target transaction summary in the first block.

[0284] It should be understood that the computer device 1000 described in the embodiment of the present application can execute the above Figure 3 、 Figure 4 、 Figure 5 and Figure 6 The description of the data processing method in any corresponding embodiment will not be repeated here. In addition, the description of the beneficial effects of adopting the same method will not be repeated here either.

[0285] In addition, it should be noted that: the embodiment of the present application also provides a computer-readable storage medium, and the computer-readable storage medium stores a computer program, and when the processor executes the computer program, it can execute the above Figure 3 、 Figure 4 、 Figure 5 and Figure 6 The description of the above-mentioned data processing method in any corresponding embodiment will not be repeated here. In addition, the description of the beneficial effects of adopting the same method will not be repeated here. For technical details not disclosed in the computer-readable storage medium embodiment involved in this application, please refer to the description of the method embodiment of this application.

[0286] The computer-readable storage medium may be the data processing device provided in any of the aforementioned embodiments or the internal storage unit of the computer device, such as the hard disk or memory of the computer device. The computer-readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the computer device. Furthermore, the computer-readable storage medium may also include both the internal storage unit of the computer device and an external storage device. The computer-readable storage medium is used to store the computer program and other programs and data required by the computer device. The computer-readable storage medium may also be used to temporarily store data that has been displayed or is about to be displayed.

[0287] In addition, it should be noted that the present application also provides a computer program product, which includes a computer program stored in a computer-readable storage medium. The processor of the computer device reads the computer program from the computer-readable storage medium, and the processor executes the computer program, so that the computer device performs the above-mentioned Figure 3 、 Figure 4 、 Figure 5 and Figure 6 The method provided by any corresponding embodiment.

[0288] The terms "first", "second", etc. in the description, claims, and drawings of the embodiments of the present application are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "comprising" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, apparatus, product, or device comprising a series of steps or units is not limited to the listed steps or modules, but may optionally include steps or modules not listed, or may optionally include other step units inherent to these processes, methods, apparatuses, products, or devices.

[0289] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. To clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example in terms of network elements. Whether these network elements are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel may use different methods to implement the described network elements for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0290] The above disclosure is only a preferred embodiment of the present application, and certainly cannot be used to limit the scope of rights of the present application. Therefore, equivalent changes made according to the claims of the present application are still within the scope covered by the present application.

Claims

1. A data processing method based on blockchain, characterized in that: include: The entrusting node obtains the business transaction corresponding to the business client, performs hash digest calculation on the business transaction, and obtains the target transaction digest; sending the first data to be packaged that carries the target transaction digest to a blockchain node, so that the blockchain node generates a first block containing the first data to be packaged using a transaction digest pool; the transaction digest pool includes multiple transaction digests from the delegating node, and the multiple transaction digests include the target transaction digest in the first data to be packaged; If it is detected that the blockchain node has successfully reached consensus on the first block, the second data to be packaged carrying the business transaction is sent to the blockchain node, so that the blockchain node generates a second block based on the second data to be packaged, and performs consensus verification on the second block using the target transaction summary and transaction execution result in the first block; The transaction execution result is obtained by executing the business transaction in the second block; if the second block consensus is successful, the execution order of the business transaction in the second block is consistent with the execution order of the target transaction summary in the first block.

2. The method according to claim 1, characterized in that The entrusting node obtains the business transaction corresponding to the business client, including: Obtaining an invitation request sent by a business client, generating commitment data based on the invitation request, and sending the commitment data and commitment signature information to the business client, so that the business client generates a delegation request based on the commitment data, the initial transaction, and the business signature information when the commitment signature information is successfully verified using the public key of the delegation node; the commitment signature information is obtained by signing the commitment data using the private key of the delegation node; and the business signature information is obtained by signing the initial transaction using the private key of the business client; A delegation request is received from the business client, and a business transaction is generated based on the initial transaction in the delegation request and the business signature information.

3. The method according to claim 2, characterized in that The invitation request includes an initial transaction and a first service value, a second service value, and a third service value; the first service value refers to the value of the digital resources that the business client needs to transfer to the entrusting node when the entrusting node successfully entrusts the target transaction summary to the blockchain node; the second service value refers to the value of the digital resources that the business client needs to transfer to the blockchain node when the blockchain node successfully reaches a consensus on the first block; the third service value refers to the value of the digital resources that the business client needs to transfer to the blockchain node when the blockchain node successfully reaches a consensus on the second block.

4. The method according to claim 2, characterized in that The commitment data includes a default compensation value for the initial transaction; the default compensation value refers to the value of the digital resources that the delegating node needs to transfer to the business client when the target transaction summary fails to be delegated to the blockchain node through the delegating node.

5. The method according to claim 1, wherein Also includes: The target transaction digest is signed based on the private key of the delegation node to obtain summary delegation signature information, and the first data to be packaged is generated based on the target transaction digest and the summary delegation signature information; the summary delegation signature information is used to instruct the blockchain node to add the first data to be packaged to the transaction summary pool of the blockchain node when the blockchain node verifies the summary delegation signature information.

6. A data processing method based on blockchain, characterized in that: include: Obtaining first data to be packaged sent by the delegating node, and adding the first data to be packaged to the transaction summary pool; The transaction summary pool includes multiple transaction summaries from the delegation node, the multiple transaction summaries include a target transaction summary in the first data to be packaged, and the target transaction summary is obtained by performing a hash summary calculation on the business transaction sent by the business client by the delegation node; generating a first block including the first data to be packaged, and performing consensus verification on the first block; If the consensus on the first block is successful, obtaining the second data to be packaged that carries the business transaction sent by the entrusting node, and adding the second data to be packaged to the transaction summary pool; When a second block containing the second data to be packaged is obtained, consensus verification is performed on the second block using the target transaction summary and the transaction execution result in the first block; The transaction execution result is obtained by executing the business transaction in the second block; if the second block consensus is successful, the execution order of the business transaction in the second block is consistent with the execution order of the target transaction summary in the first block.

7. The method according to claim 6, characterized in that The first data to be packaged includes a target transaction digest and digest delegation signature information, where the digest delegation signature information is obtained by signing the target transaction digest based on the private key of the delegation node; Generating a first block including the first data to be packaged includes: Verifying the digest entrustment signature information, and when the digest entrustment signature information passes the verification, randomly sorting the target transaction summaries to obtain a first transaction list; A first block is generated using the first transaction list and the digest delegation signature information; the first transaction list is used to indicate the execution order of the target transaction digests in the first block.

8. The method according to claim 7, characterized in that The verifying of the summary entrusted signature information includes: Decrypting the digest delegation signature information based on the public key of the delegation node to obtain a hash value to be verified, and generating a target hash value of the target transaction digest; If the hash value to be verified is the same as the target hash value, the signature verification is determined to be successful; If the hash value to be verified is different from the target hash value, it is determined that the signature verification has failed, and an error message is returned to the delegation node.

9. The method according to claim 7, characterized in that The second data to be packaged includes a business transaction and transaction entrustment signature information, where the transaction entrustment signature information is obtained by signing the business transaction based on the private key of the entrusting node. The method further includes: Verifying the transaction entrustment signature information. If the transaction entrustment signature information passes the verification, obtaining a first transaction list in the first block, and sorting the business transactions based on the execution order of the target transaction digest in the first transaction list to obtain a second transaction list. A second block is generated using the second transaction list and the transaction entrustment signature information; the second transaction list is used to indicate the execution order of the business transactions in the second block.

10. The method according to claim 6, characterized in that When the second block containing the second data to be packaged is obtained, consensus verification is performed on the second block using the target transaction summary and the transaction execution result in the first block, including: When a second block containing second data to be packaged is obtained, obtaining an execution order for the target transaction digest from the first block; If it is verified that the execution order of the business transactions in the second block is consistent with the execution order of the target transaction digest, then the business transactions are executed according to the execution order of the business transactions in the second block to obtain a transaction execution result; If it is verified that the transaction execution result is consistent with the target transaction execution result for the second block sent by the blockchain master node, a first consensus vote for the second block is broadcast to the consensus network; the first consensus vote is a consensus approval vote; A second consensus vote for the second block sent by the consensus network is obtained, and if a ratio of consensus approval votes in the first consensus vote and the second consensus vote meets a block consensus condition, it is determined that the second block consensus is successful.

11. The method according to claim 9, characterized in that Also includes: If a breach of contract compensation request from the business client to the delegating node is obtained, comparing the second transaction list in the second block with the first transaction list in the first block; If the second transaction list is different from the first transaction list, it is determined that the target transaction summary has failed to be delegated in the blockchain node, the breach compensation value in the breach compensation request is obtained, and the digital resource with the breach compensation value in the delegation node is transferred to the business client.

12. The method according to claim 11, characterized in that Also includes: If it is detected that the entrusting node fails to entrust the target transaction summary in the blockchain node, the entrusting node that generated the target transaction summary is determined as a node to be updated, and the reputation level of the node to be updated is updated; If the updated reputation level is lower than the reputation threshold, the node to be updated is added to the node abnormality list; the delegated node in the node abnormality list does not have the authority to interact with the business client for data.

13. A data processing device based on blockchain, characterized in that: include: A digest processing module is used to entrust the node to obtain the business transaction corresponding to the business client, perform hash digest calculation on the business transaction, and obtain the target transaction digest; a first sending module, configured to send first data to be packaged that carries the target transaction digest to a blockchain node, so that the blockchain node generates a first block containing the first data to be packaged through a transaction digest pool; the transaction digest pool includes multiple transaction digests from the delegating node, and the multiple transaction digests include the target transaction digest in the first data to be packaged; a second sending module configured to send second data to be packaged that carries the business transaction to the blockchain node if it is detected that the blockchain node has successfully reached consensus on the first block, so that the blockchain node generates a second block based on the second data to be packaged, and performs consensus verification on the second block using the target transaction summary and transaction execution result in the first block; The transaction execution result is obtained by executing the business transaction in the second block; if the second block consensus is successful, the execution order of the business transaction in the second block is consistent with the execution order of the target transaction summary in the first block.

14. A data processing device based on blockchain, characterized in that: include: a summary acquisition module, configured to acquire first data to be packaged sent by the delegating node, and add the first data to be packaged to a transaction summary pool; The transaction summary pool includes multiple transaction summaries from the delegation node, the multiple transaction summaries include a target transaction summary in the first data to be packaged, and the target transaction summary is obtained by performing a hash summary calculation on the business transaction sent by the business client by the delegation node; a consensus verification module, configured to generate a first block including the first data to be packaged, and perform consensus verification on the first block; a transaction acquisition module, configured to acquire, if consensus on the first block succeeds, second data to be packaged and carried by the business transaction, sent by the delegating node, and add the second data to be packaged to the transaction summary pool; a transaction verification module, configured to, when obtaining a second block containing second data to be packaged, perform consensus verification on the second block using the target transaction summary and the transaction execution result in the first block; The transaction execution result is obtained by executing the business transaction in the second block; if the second block consensus is successful, the execution order of the business transaction in the second block is consistent with the execution order of the target transaction summary in the first block.

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 a data communication function, the memory is used to store a computer program, and the processor is used to call the program code so that the computer device executes 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, which is suitable for being loaded and executed by a processor, so that a computer device having the processor executes the method according to any one of claims 1 to 12.

17. A computer program product, characterized in that The computer program product includes a computer program, which is stored in a computer-readable storage medium and is suitable for being read and executed by a processor, so as to enable a computer device having the processor to perform the method according to any one of claims 1 to 12.