A data processing method and device based on a blockchain network and related equipment

By obtaining the target feature values ​​and solution results of nodes in the blockchain network, establishing a node set, and allocating reward assets based on resource consumption data, the problems of wasted computing power and unfair incentives in the traditional proof-of-work mechanism are solved, and the secure and efficient operation of the blockchain network is achieved.

CN116684114BActive Publication Date: 2025-12-19TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210175024.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-02-23
Publication Date
2025-12-19
Estimated Expiration
2042-02-23

AI Technical Summary

Technical Problem

Traditional proof-of-work mechanisms waste a lot of computing power in blockchain networks by performing meaningless hash calculations and lack fair and reasonable incentive mechanisms, which affects the security and normal operation of blockchain networks.

Method used

By obtaining the target feature values ​​and solution results of blockchain network nodes, a node set is established, and the amount of reward assets is determined based on resource consumption data, thereby achieving a fair and reasonable incentive mechanism and accurately allocating blockchain digital assets.

Benefits of technology

It effectively reduces the waste of computing power and energy, establishes a fair and reasonable incentive mechanism, and improves the security and normal operation efficiency of the blockchain network.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116684114B_ABST
    Figure CN116684114B_ABST
Patent Text Reader

Abstract

A data processing method and device based on a blockchain network and related equipment can be applied to various fields or scenarios such as cloud technology, artificial intelligence, blockchain, Internet of Vehicles, intelligent transportation, smart home, etc. The method comprises: obtaining a target feature value generated by at least one node included in the blockchain network for a target block and a solution result of a target problem smart contract; determining a node set from the at least one node according to the target feature value corresponding to each node in the at least one node and the solution result; the node set comprises nodes with a target feature value less than a feature value threshold and nodes with a solution result of solution success; and determining the amount of reward assets of each node in the node set according to resource consumption data corresponding to the target block. The embodiments of the present application can establish a fair and reasonable incentive mechanism, accurately allocate blockchain digital assets, and help maintain the security of the blockchain network.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computer, in particular to a data processing method based on a blockchain network, a data processing device based on a blockchain network, a computer device, a computer readable storage medium and a computer program product. BACKGROUND

[0002] Due to the decentralized characteristics of the blockchain, there is no participation of the centralized structure, and each node is equal, so a consensus mechanism needs to be designed to enable each node to reach a consensus when there is a difference. The proof of work mechanism is a commonly used consensus mechanism. The traditional proof of work mechanism needs to waste a lot of computing power for meaningless hash calculation, therefore, at present, some meaningful problems (for example, finding large prime numbers, polynomial complexity nondeterministic problems, machine learning, etc.) are solved in the process of proof of work, so as to put the computing power into meaningful work and reduce energy waste. However, this improved proof of work mechanism lacks a fair and reasonable incentive mechanism to allocate digital assets to each node, which is not conducive to maintaining the security of the blockchain network. SUMMARY

[0003] The embodiments of the present application provide a data processing method, device and related equipment based on a blockchain network, which can establish a fair and reasonable incentive mechanism, accurately allocate blockchain digital assets, and help maintain the security of the blockchain network.

[0004] In one aspect, the embodiments of the present application provide a data processing method based on a blockchain network, the method comprising:

[0005] obtaining a target feature value generated by at least one node included in the blockchain network for a target block and a solution result of a target problem smart contract;

[0006] determining a node set from the at least one node according to the target feature value and the solution result corresponding to each node in the at least one node; the node set includes nodes corresponding to the target feature value less than a feature value threshold and nodes corresponding to the solution result being a solution success;

[0007] determining an amount of reward assets of each node in the node set according to resource consumption data corresponding to the target block; the resource consumption data is determined according to one or both of a reference consumption asset amount and a hash round expected value corresponding to the target block.

[0008] In one aspect, the embodiments of the present application provide a data processing device based on a blockchain network, the device comprising:

[0009] The acquisition unit is configured to acquire a target feature value generated by at least one node included in the blockchain network for a target block and a solution result of a target problem smart contract;

[0010] The processing unit is configured to determine a node set from the at least one node according to the target feature value and the solution result of each node in the at least one node; the node set includes a node whose corresponding target feature value is less than a feature value threshold and a node whose corresponding solution result is a solution success.

[0011] The processing unit is further configured to determine an amount of reward assets of each node in the node set according to resource consumption data corresponding to the target block; the resource consumption data is determined according to one or both of a reference consumption asset amount and a hash round expectation value corresponding to the target block.

[0012] In an aspect, an embodiment of the present application provides a computer device, which comprises a processor, a communication interface and a memory, the processor, the communication interface and the memory are connected with each other, wherein the memory stores a computer program, and the processor is configured to invoke the computer program to execute the blockchain network-based data processing method in any possible implementation manner.

[0013] In an aspect, an embodiment of the present application provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the blockchain network-based data processing method in any possible implementation manner.

[0014] Correspondingly, an embodiment of the present application further provides a computer program product, which comprises a computer program or computer instructions, and the computer program or computer instructions are executed by a processor to implement the steps of the blockchain network-based data processing method provided by the embodiment of the present application.

[0015] Correspondingly, an embodiment of the present application further provides a computer program, which comprises computer instructions, and the computer instructions are stored in a computer readable storage medium, a processor of a computer device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions, so that the computer device executes the blockchain network-based data processing method provided by the embodiment of the present application.

[0016] The embodiment of the application can obtain a target feature value generated by at least one node included in a blockchain network for a target block and a solution result of a target problem smart contract, determine a node set from the at least one node according to the target feature value corresponding to each node in the at least one node and the solution result, the node set including nodes with a target feature value less than a feature value threshold and nodes with a solution result of solution success, determine an amount of reward assets of each node in the node set according to resource consumption data corresponding to the target block, and the resource consumption data is determined according to one or both of a reference consumption asset amount and a hash round expectation value corresponding to the target block. The above scheme can establish a fair and reasonable incentive mechanism, accurately allocate blockchain digital assets, and help maintain the security of the blockchain network. BRIEF DESCRIPTION OF DRAWINGS

[0017] In order to more clearly illustrate the technical method of the embodiments of the application, the drawings needed in the embodiment description will be briefly introduced. Obviously, the drawings in the following description are some embodiments of the application, and other drawings can be obtained by those skilled in the art without creative labor.

[0018] Figure 1 An architecture schematic diagram of a blockchain network provided by an embodiment of the application;

[0019] Figure 2 An architecture schematic diagram of a blockchain provided by an embodiment of the application;

[0020] Figure 3 A processing flow schematic diagram of an improved proof of work mechanism provided by an embodiment of the application;

[0021] Figure 4 A flow schematic diagram of a data processing method based on a blockchain network provided by an embodiment of the application Figure 1 ;

[0022] Figure 5 A flow schematic diagram of a data processing method based on a blockchain network provided by an embodiment of the application Figure 2 ;

[0023] Figure 6 A structure schematic diagram of a data processing apparatus based on a blockchain network provided by an embodiment of the application;

[0024] Figure 7 A structure schematic diagram of a computer device provided by an embodiment of the application. DETAILED DESCRIPTION

[0025] The technical methods in the embodiments of the present application will be clearly and completely described below with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work belong to the scope of protection of the present application.

[0026] It should be noted that the "first", "second", and the like described in the embodiments of the present application are only for the purpose of description, and cannot be understood as indicating or implying the relative importance of the technical features or implicitly indicating the number of the indicated technical features. Therefore, the technical features limited by "first", "second", and the like can explicitly or implicitly include at least one of the features.

[0027] Please refer to Figure 1 , Figure 1 A structural schematic diagram of a blockchain network is provided in the embodiments of the present application. The blockchain network can include a plurality of nodes, which can specifically include node 1, node 2, node 3, …, and node N. Each node can receive data sent from the outside when working normally, and perform block chaining processing based on the received data, or send data to the outside. In order to ensure data intercommunication between the nodes, information connection can exist between each node, and information transmission can be performed between the nodes through the information connection. For example, when any node in the blockchain network receives input information, other nodes in the blockchain network obtain the input information according to a consensus mechanism, and store the input information as data in shared data, so that the data stored in all nodes in the blockchain network are consistent.

[0028] It can be understood that the above information connection is not limited to the connection mode, and can be directly or indirectly connected through wired communication mode, directly or indirectly connected through wireless communication mode, or connected through other connection modes, which are not limited in the present application.

[0029] It can be understood that each node in the blockchain network has a corresponding node identifier, and each node in the blockchain network can store the node identifiers of other nodes in the blockchain network, so as to subsequently broadcast the generated block to other nodes in the blockchain network according to the node identifiers of the other nodes. Each node can maintain a node identifier list as shown in Table 1, and store the node name and node identifier in the node identifier list. The node identifier can be an IP (Internet Protocol) address and any other information that can be used to identify the node, and the IP address is only taken as an example in Table 1 for description:

[0030] Table 1

[0031] Node name Node identification Node 1 117.114.151.174 Node 2 117.116.189.145 Node 3 117.113.181.124 … … Node N xx.xx.xx.xx

[0032] Each node in the blockchain network stores a same blockchain. Referring to Figure 2 The blockchain is composed of a plurality of blocks, a genesis block includes a block header and a block body, the block header stores an input information feature value, a version number, a timestamp and a difficulty value, and the block body stores the input information; a next block of the genesis block takes the genesis block as a parent block, the next block also includes a block header and a block body, the block header stores an input information feature value of the current block, a block header feature value of the parent block, a version number, a timestamp and a difficulty value, and the like, so that the block data stored in each block in the blockchain is associated with the block data stored in the parent block, thereby ensuring the security of the input information in the block.

[0033] When generating a block in the blockchain, the data processing procedure generally includes: ① when any node in the blockchain network receives input information (such as a transaction), the transaction is broadcast to other nodes; ② a consensus mechanism is used to select a recording node from each node in the blockchain network; ③ the recording node packs a plurality of transaction records of the transaction into a block, and broadcasts the newly generated block to other nodes; ④ other nodes verify the newly generated block, and add the newly generated block to the corresponding stored blockchain after the verification is completed.

[0034] The recording node is a node that has the right to pack a block, and the recording node needs to consume its own computing resources and energy (such as electricity) in the process of packing the block. Therefore, in order to encourage each node in the blockchain network to become a recording node and maintain the normal operation of the blockchain network, a certain amount of reward is usually given to the recording node based on an incentive mechanism. Generally, there are two different incentive mechanisms: one is a block reward obtained by creating a new block, and the node that creates the block can add a special transaction in this block, selects an address as the recipient of the reward, and thereby obtains the block reward. In the existing scheme, the block reward is determined according to the generation time of the blockchain, for example, in the first to fourth years, 50 currency units are obtained for each new block created in the blockchain, and 25 currency units are obtained for each new block created in the second 4 years. One is the transaction fee contained in the transaction, and the user who proposes the transaction will give a certain transaction fee according to subjective will when initiating the transaction, and generally the more the transaction fee, the more the nodes will prefer to process the transaction first. The recording node can obtain both the block reward and the transaction fee.

[0035] Proof-of-work is a commonly used consensus mechanism. In the traditional proof-of-work mechanism, each node in the blockchain network will try to use different random numbers to calculate the feature value so that the calculated feature value can satisfy the following formula (1):

[0036] SHA256(SHA256(version+prev_hash+merkle_root+ntime+nbits+nonce)) <TARGET (1)

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

[0038] Furthermore, nodes whose calculated feature values ​​are less than the feature value threshold can act as accounting nodes. These accounting nodes package the current block and broadcast it to other nodes. Other nodes then verify whether the feature values ​​calculated by the accounting nodes are less than the feature value threshold. If the calculated feature value is less than the threshold, the accounting node adds the current block to its blockchain. The calculated feature value less than the threshold can be used as the block header feature value of the current block and added to the next block, and a corresponding random number can be added to the block header of the current block.

[0039] In traditional proof-of-work mechanisms, in order to become a ledger node and receive rewards, each node needs to continuously adjust random numbers to make the calculated feature value less than the feature value threshold. This process wastes a lot of computing power on meaningless hash calculations, resulting in energy waste.

[0040] To reduce the waste of computing power and energy, the computing power expended by each node can be redirected to solving meaningful problems. See also Figure 3 First, users can describe the problem they need to solve (such as finding large prime numbers, nondeterministic problems with polynomial complexity, machine learning, etc.) in the form of a smart contract, resulting in a problem smart contract. This problem smart contract is then inserted into a problem smart contract queue, which contains one or more problem smart contracts to be solved. For example, when solving the Diophantine equation x... 3 +y 3 +z3 = 42, the generated problem smart contract is as follows:

[0041]

[0042]

[0043] Further, in the process of proof of work, any node in the blockchain network can first randomly generate a random number (nonce), and perform a first hash calculation (hash1) according to the following formula (2) to obtain a first hash value H.

[0044] H = SHA256 (version + prev_hash + merkle_root + ntime + nbits + nonce) (2)

[0045] Then, the first hash value H is mapped to a candidate solution of the problem smart contract being solved in the problem smart contract queue. For example, for the problem smart contract corresponding to the above Diophantine equation being solved, x = -1e20 + H / [1e20 - (-1e20)], y = -1e20 + H % [1e20 - (-1e20)], and z = 1e20 + H % [1e20 - (-1e20)] in the candidate solution (x, y, z) can be obtained in the form of modulo. Then, it is verified whether the obtained candidate solution is the correct solution of the problem smart contract being solved. When the candidate solution is verified to be the correct solution of the problem smart contract being solved, it means that the problem smart contract being solved has been successfully solved, and the problem smart contract in the problem smart contract queue can be deleted. The node that obtains the correct solution of the problem smart contract broadcasts the correct solution to other nodes that are solving the problem smart contract. When the other nodes determine that the problem smart contract is solved, the next problem smart contract can be obtained from the problem smart contract list for solving.

[0046] In an implementation mode, the problem smart contract list can include the contract identifier of each problem smart contract, and the problem smart contract list is managed by a system smart contract. When a problem smart contract is successfully solved, the system smart contract deletes the contract identifier of the problem smart contract in the problem smart contract list, and broadcasts the contract identifier of the next problem smart contract to each node, so that each node solves the next problem smart contract.

[0047] In addition, in the process of verifying whether the candidate solution is the correct solution of the problem smart contract being solved by any node, the candidate solution is substituted into the solve function in the problem smart contract being solved, so that the solve function (for example, x*x*x+y*y*y+z*z*z==42) is run to verify that the problem smart contract is running on a virtual machine. At this time, the virtual machine generates an execution stack due to the verification process, and the any node can obtain one or more stack parameters from the execution stack as a running parameter S. For example, the first stack parameter, the tenth stack parameter, etc. in the execution stack are used to form the running parameter S. Then, the any node performs a second hash calculation (hash2) according to the following formula (3) using the running parameter S and the first hash value H to obtain a second hash value H1.

[0048] H1=SHA256(H,S) (3)

[0049] If the calculated second hash value H1 is greater than or equal to the characteristic value threshold, the any node will adjust the random number again (for example, add 1 to the random number) to perform a new round of first hash calculation and second hash calculation. It can be understood that each execution of the first hash calculation and the second hash calculation will perform a verification process for the problem smart contract being solved. If the calculated second hash value H1 is less than the characteristic value threshold, the any node can become a recording node and can start packaging the current block and broadcast the packaged block to other nodes.

[0050] In this improved proof of work mechanism, the recording node should get the block reward and the handling fee because it has packaged the current block, and each node that solves the problem smart contract should also get the reward given for solving the problem because it has paid the computing power. At present, the reward for solving the problem is usually determined by the subject who proposes the problem according to subjective will, but it is difficult for the subject who proposes the problem to objectively evaluate the difficulty of the problem, which leads to the subject who proposes the problem worrying about the excessive allocation of the reward, and the reward obtained by the node that solves the problem does not match the actual contribution, which is difficult to give a reward that is reasonable for all parties, and is not conducive to maintaining the safety and normal operation of the blockchain network.

[0051] In order to balance the interests of all parties, fairly and reasonably allocate rewards (in the form of a certain number of digital assets) to each node, maintain the safety and normal operation of the blockchain network, the application provides a data processing method based on a blockchain network, comprising: obtaining a target feature value generated by at least one node included in the blockchain network for a target block and a solution result of a target problem smart contract; determining a node set from the at least one node according to the target feature value corresponding to each node in the at least one node and the solution result, the node set including nodes whose corresponding target feature values are less than a feature value threshold and nodes whose corresponding solution results are successful solutions; determining the amount of reward assets of each node in the node set according to resource consumption data corresponding to the target block, the resource consumption data being determined according to one or both of a reference consumption asset amount and a hash round expected value corresponding to the target block.

[0052] In an embodiment, the data processing method based on the blockchain network provided by the application can be implemented in the form of a system smart contract, and the system smart contract can be deployed and run on each node of the blockchain network. Therefore, the data processing method based on the blockchain network provided by the application can be executed by the nodes in the blockchain network. The nodes can be terminals or servers. The server here can be a standalone physical server, a server cluster or a distributed system composed of multiple physical servers, a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDNs, and basic cloud computing services such as big data and artificial intelligence platforms. The terminal can be a smartphone, a tablet computer, a notebook computer, a desktop computer, a smart voice interaction device, a smart home appliance, a vehicle-mounted terminal, a smart bracelet, etc., but is not limited thereto.

[0053] The specific implementation of the data processing method based on the blockchain network provided by the embodiment of the application is described in detail below.

[0054] Please refer to Figure 4 , Figure 4 The flowchart of the data processing method based on the blockchain network provided by the embodiment of the application Figure 1 The data processing method can be executed by the nodes in the blockchain network. The method comprises the following steps S401-S403:

[0055] S401, obtaining a target feature value generated by at least one node included in the blockchain network for a target block and a solution result of a target problem smart contract.

[0056] The target block is a block to be packaged and generated. In a proof-of-work mechanism, nodes in the blockchain network need to calculate a second hash value for the target block, so that the second hash value is less than a characteristic value threshold. When the calculated second hash value is less than the characteristic value threshold, the node that obtains the second hash value less than the characteristic value threshold is a recording node, and the recording node can package and generate the target block.

[0057] The data processing method proposed in the present application starts to execute when the second hash value less than the characteristic value threshold is obtained, that is, when the target block is packaged and generated by the recording node.

[0058] The target problem smart contract is a successfully solved problem smart contract. When the problem smart contract P1 is successfully solved, the node that successfully solves the problem smart contract P1 will inform other nodes, and other nodes will stop solving the problem smart contract P1. The solving result of the node that successfully solves the problem smart contract P1 for the problem smart contract P1 is a successful solution, and the solving result of the node that stops solving the problem smart contract P1 for the problem smart contract P1 is a failed solution.

[0059] When a problem smart contract P1 needs to be solved, there is at least one node in the blockchain network that solves the problem smart contract P1, and any node in the at least one node performs a second hash calculation once (i.e., executes a process of verifying whether a candidate solution is a correct solution of the problem smart contract P1) for the problem smart contract P1 each time, using the obtained running parameters in the execution stack to obtain a second hash value. Then, in the process of solving the problem smart contract P1, each node in the at least one node can calculate one or more second hash values. In an implementation, the smallest second hash value can be obtained from one or more second hash values calculated by any node in the process of solving the problem smart contract P1 as a target characteristic value generated by the any node for the target block. Then, when the any node solves D (a positive integer) problem smart contracts, the target characteristic value generated by the any node for the target block is D.

[0060] In another implementation, all second hash values calculated by any node in the at least one node before obtaining a second hash value less than the characteristic value threshold can be obtained, and the smallest second hash value can be obtained from all the second hash values as a target characteristic value generated by the any node for the target block.

[0061] S402, determining a node set from the at least one node according to the target characteristic value and the solving result corresponding to each node in the at least one node; the node set includes nodes whose corresponding target characteristic values are less than the characteristic value threshold, and nodes whose corresponding solving results are successful solutions.

[0062] The target characteristic value corresponding to each node is a target characteristic value generated by each node for the target block. The solving result corresponding to each node is a solving result of each node for the target smart contract.

[0063] In an embodiment, the characteristic value threshold depends on a difficulty value of the blockchain network. Specifically, assuming that the time length consumed for generating n blocks in the past is m, and the old difficulty value is s, then the current characteristic value threshold = the set maximum characteristic value threshold / (s x n / m). If the target characteristic value corresponding to any node is less than the characteristic value threshold, it indicates that the any node has obtained a second hash value less than the characteristic value threshold, and the any node is a node that can be added to the node set, and the nodes in the node set are nodes that will be given a reward. In addition, if the solving result corresponding to any node is a solving success, it indicates that the any node has a solving result for the target problem smart contract, and the any node can be added to the node set. It should be noted that a node can have a solving result for one or more target problem smart contracts. According to the nodes included in the node set, the present application can allocate rewards to the nodes that are the nodes that record and the nodes that successfully solve the problem smart contract, and the nodes that pay for the computing power without obtaining the correct solution in the process of solving the problem smart contract cannot obtain the rewards.

[0064] S403, determining the amount of reward assets of each node in the node set according to the resource consumption data corresponding to the target block; the resource consumption data is determined according to one or both of the reference consumption asset amount and the hash round expectation value corresponding to the target block.

[0065] In the improved proof of work mechanism, each time a second hash value is calculated, a target hash operation is performed and a problem smart contract is solved. The target hash operation includes the first hash calculation and the second hash calculation described above, and is used to generate a second hash value for a target block. Therefore, the reference consumption asset amount corresponding to the target block is the number of digital assets (referred to as asset amount) consumed by performing a target hash operation and solving a problem smart contract (or running a solve function) once. The hash round expectation value corresponding to the target block refers to the expected number of target hash operations to be experienced to calculate a second hash value less than the characteristic value threshold.

[0066] In an embodiment, the resource consumption data corresponding to the target block can be determined according to one or both of the reference consumption asset amount and the hash round expectation value corresponding to the target block. For example, the reference consumption asset amount and the hash round expectation value corresponding to the target block can be multiplied to obtain the resource consumption data corresponding to the target block; or the reference consumption asset amount corresponding to the target block can be taken as the resource consumption data corresponding to the target block.

[0067] Further, the reward asset amount of each node in the node set can be determined according to the resource consumption data corresponding to the target block. For example, the resource consumption data corresponding to the target block can be taken as the asset amount that should be allocated to each node in the node set; or the asset amount allocated to each node in the node set is determined according to the contribution of each node in the node set and the resource consumption data corresponding to the target block.

[0068] According to the embodiments of the present application, the target feature value generated by at least one node included in a blockchain network for a target block and the solution result of the smart contract for a target problem can be obtained, a node set is determined from the at least one node according to the target feature value corresponding to each node in the at least one node and the solution result, the node set includes nodes whose corresponding target feature values are less than a feature value threshold and nodes whose corresponding solution results are solution success, the reward asset amount of each node in the node set is determined according to resource consumption data corresponding to the target block, and the resource consumption data is determined according to one or both of the reference consumption asset amount corresponding to the target block and the hash round expectation value; the above scheme can establish a fair and reasonable incentive mechanism, accurately allocate blockchain digital assets, and be conducive to maintaining the security of the blockchain network.

[0069] Please refer to Figure 5 , Figure 5 A flowchart of a data processing method based on a blockchain network provided by the embodiments of the present application is shown in Figure 2 The data processing method can be executed by a node in a blockchain network. The method includes the following steps S501-S505:

[0070] S501, obtaining a target feature value generated by at least one node included in the blockchain network for a target block and a solution result of a smart contract for a target problem.

[0071] S502, determining a node set from the at least one node according to the target feature value corresponding to each node in the at least one node and the solution result; the node set includes nodes whose corresponding target feature values are less than a feature value threshold and nodes whose corresponding solution results are solution success.

[0072] The detailed description of S501 and S502 can be found in S401 and S402, and the embodiments will not be described here.

[0073] S503, determining the reward asset amount of a first node in the node set according to the resource consumption data corresponding to the target block; the first node includes the node whose corresponding target feature value is less than the feature value threshold.

[0074] In an embodiment, the reference asset consumption amount corresponding to the target block is the asset consumption amount consumed by executing the target hash operation once and solving the problem smart contract once, and thus the asset consumption amount consumed by executing the target hash operation once and solving the problem smart contract once can be added to obtain the reference asset consumption amount corresponding to the target block.

[0075] Specifically, the asset consumption amount consumed by executing the target hash operation once can be obtained in two ways: one is to obtain the standard asset consumption amount of the target hash operation, which is obtained according to the gas mechanism, in which a specific gas consumption amount is provided for each operation, and the gas consumption amount corresponding to the target hash operation can be directly obtained as the standard asset consumption amount of the target hash operation. The other is to determine the asset consumption amount consumed by the actual execution of the target hash operation, for example, the target hash operation is executed 10 times, and the total asset consumption amount is 1000 gas (a unit of currency), and the asset consumption amount consumed by executing the target hash operation once is 100 gas.

[0076] In an embodiment, the asset consumption amount consumed by solving the problem smart contract once is determined by determining the average asset consumption amount of the second problem smart contract according to the total asset consumption amount and the number of solving times of the second problem smart contract, and taking the average asset consumption amount of the second problem smart contract as the asset consumption amount consumed by solving the problem smart contract once.

[0077] The second problem smart contract includes one or both of the first problem smart contract and the target problem smart contract. The first problem smart contract is a problem smart contract being solved by each node in the problem smart contract list associated with the target block. The problem smart contract list associated with the target block is a problem smart contract list processed by each node when calculating the second hash value less than the characteristic value threshold for the target block. The target problem smart contract is a problem smart contract successfully solved by the second node. Assuming that the problem smart contracts that have been solved when the second hash value less than the characteristic value threshold is calculated for the target block in the blockchain network include {Q n-k , Q n-k+1 , Q n-k+2 , ..., Q n-1 , Q n ,}, then Q n may be a problem smart contract that has not been successfully solved by each node, but has been calculated by the first node to have a second hash value less than the characteristic value threshold, or Q n may be a problem smart contract that is just solved successfully when the first node calculates the second hash value less than the characteristic value threshold, and thus Q n is a problem smart contract being solved by each node in the problem smart contract list (i.e., the first problem smart contract). And before Q n , {Qn-k Q n-k+1 Q n-k+2 ..., Q n-1 is a problem smart contract that has been successfully solved by the second node (i.e., a target problem smart contract), and in the process of solving {Q n-k Q n-k+1 Q n-k+2 ..., Q n-1} does not obtain a second hash value less than a characteristic value threshold, {Q n-k Q n-k+1 Q n-k+2 ..., Q n-1} is deleted from the list of problem smart contracts.

[0078] Because the amount of assets consumed by the solve function in different problem smart contracts is not the same, and even the same solve function consumes different amounts of assets due to the size of the numerical value processed. Therefore, in order to obtain the amount of assets consumed by solving a problem smart contract once, the present application obtains the total consumption asset amount and the number of solving times of the second problem smart contract, and obtains the asset amount consumed by solving a problem smart contract once (average consumption asset amount) according to the total consumption asset amount / number of solving times.

[0079] It should be noted that the second problem smart contract includes one or both of the first problem smart contract and the target problem smart contract, and when the second problem smart contract includes the first problem smart contract and the target problem smart contract, the obtained average consumption asset amount is closer to the asset amount consumed by solving a problem smart contract once required by the present application.

[0080] In an embodiment, the expected value of the hash round corresponding to the target block is determined, including: obtaining the value range of the intermediate characteristic value, which can be understood as the second hash value obtained according to the target hash operation. In order to obtain the value range of the intermediate characteristic value, the characteristic value algorithm used in the second hash calculation can be determined. For example, the characteristic value algorithm used in the second hash calculation is SHA256, then the number of bits of the output second hash value is 256 bits, and the value range of the second hash value is [0, 2 256 ], then the value range of the intermediate characteristic value is [0, 2 256 ]. Further, according to the value range of the intermediate characteristic value and the characteristic value threshold, the effective value range of the intermediate characteristic value is determined, and the intermediate characteristic value in the effective value range is less than the characteristic value threshold. Assuming that the characteristic value threshold is A, and A<2 256, the effective value range of the intermediate feature value is [0, A], and it can be seen that when the intermediate feature value belongs to [0, A], the intermediate feature value is less than the feature value threshold. According to the value range and the effective value range of the intermediate feature value, the event occurrence probability is determined. For example, the effective value range of the intermediate feature value is [0, A], and the value range of the intermediate feature value is [0, 2 256 ], then the event occurrence probability = (A-0) / (2 256 -0). After determining the event occurrence probability, the probability that the intermediate feature value generated by executing the target hash operation once is less than the feature value threshold is obtained.

[0081] Further, according to the event occurrence probability, the occurrence probability of the pre-defined at least one operation result event is determined, and then according to the occurrence probability of each operation result event in the pre-defined at least one operation result event, the hash round expectation value corresponding to the target block is determined. The operation result event refers to the number of times of executing the target hash operation to obtain the intermediate feature value less than the feature value threshold. Specifically, assuming that the event occurrence probability is p, the occurrence probability of obtaining the intermediate feature value less than the feature value threshold by executing the target hash operation once is: 1×(1-p) (1-0) ×p, the occurrence probability of obtaining the intermediate feature value less than the feature value threshold by executing the target hash operation twice is: 2×(1-p) (2-1) ×p, and the occurrence probability of obtaining the intermediate feature value less than the feature value threshold by executing the target hash operation z (tending to positive infinity) times is: z×(1-p) (z-1) ×p. Then the hash round expectation value corresponding to the target block = 1×(1-p) (1-0) ×p+1×(1-p) (2-1) ×p+...+1×(1-p) (z-1) ×p = 1 / p.

[0082] In the embodiments of the present application, the hash round expectation value is 1 / p, and the asset amount consumed by executing 1 / p times of the target hash operation is set as the resource consumption data corresponding to the target block. In an embodiment, the resource consumption data corresponding to the target block can be determined according to the benchmark consumption asset amount corresponding to the target block and the hash round expectation value, specifically, the benchmark consumption asset amount corresponding to the target block and the hash round expectation value are multiplied to obtain the resource consumption data corresponding to the target block.

[0083] Then consider how to allocate rewards to the first node, which is the node corresponding to the target feature value less than the feature value threshold, i.e., the account node. Assuming that when the second hash value less than the feature value threshold is calculated for the target block in the blockchain network, the solved problem smart contract includes {Q n-k ,Q n-k+1 ,Q n-k+2 ,...,Q n-1Q n} and each user who submits a question gives a fee F n-k F n-k+1 F n-k+2 ..., F n-1 F n} to the corresponding question smart contract. Until the first node obtains a second hash value less than the eigenvalue threshold in the process of solving Q n , each node in the blockchain network (including the first node) has not found a second hash value less than the eigenvalue threshold. Therefore, in an embodiment, the resource consumption data corresponding to the target block that should be given to the first node for performing 1 / p times of target hash operations can be taken as the reward of the first node, regardless of the actual number of times of target hash operations performed by the first node. Specifically, the resource consumption data corresponding to the target block is taken as the reward asset amount of the first node, and the reward asset amount of the first node is transferred from the running asset amount of the first question smart contract to the first node. Since the first question smart contract may not have been successfully solved, after the reward asset amount of the first node is deducted from the running asset amount of the first question smart contract, the remaining asset amount can continue to be used as a solving fee for solving a question, and the running asset amount after deducting the solving fee is returned to the object that proposes the question corresponding to the first question smart contract.

[0084] It should be noted that the reward asset amount of the first node can be given to the first node as a kind of block reward, so the reward obtained by the first node includes the reward asset amount of the first node and the handling fee included in the target block.

[0085] S504, determining a contribution factor of a second node in the node set according to a target eigenvalue corresponding to the second node; the second node includes a node whose corresponding target eigenvalue is greater than or equal to the eigenvalue threshold and whose corresponding solving result is solving success.

[0086] Then consider how to allocate rewards to the second node, which successfully solves the question smart contract but is not a node that becomes a recording node. A node can be both the second node and the first node, i.e., successfully solving the question smart contract and also calculating a second hash value less than the eigenvalue threshold. Assuming that when the second hash value less than the eigenvalue threshold is calculated for the target block in the blockchain network, the question smart contracts that have been solved include {Q n-k Q n-k+1 Q n-k+2 ..., Q n-1 Q n} and {Q n-k Q n-k+1 Q n-k+2 ..., Q n-1The problem-solving successful problem smart contract (target problem smart contract). Then {Q n-k n-k+1 n-k+2 n-1 The expected value of the number of times of solving {Q n n-k n-k+1 n-k+2 n-1 (1-p) x represents the probability that the correct solution of Q n-1 is not obtained before x times, and (1-p) y represents the probability that the second hash value less than the characteristic value threshold is not found before y times.

[0087]

[0088] It can be seen from equation (4) that the expected value of the number of times of solving {Q n-k n-k+1 n-k+2 n-1 The reference reward for performing 1 / p times of solving operation can be set as the resource consumption data corresponding to the target block. In an embodiment, since the solving is successful for multiple problem smart contracts {Q n-k n-k+1 n-k+2 n-1 Therefore, the contribution of each second node in solving the corresponding problem smart contract successfully can be obtained, and the amount of reward assets of the second node is determined according to the contribution and the resource consumption data corresponding to the target block.

[0089] Specifically, at least one intermediate characteristic value generated by each of the multiple second nodes can be obtained, wherein the at least one intermediate characteristic value generated by each of the multiple second nodes refers to the second hash value generated by the each of the multiple second nodes in the process of solving the corresponding target problem smart contract. For example, if the second node successfully solves the problem smart contract P1, the at least one intermediate characteristic value generated by the second node refers to one or more second hash values generated in the process of solving the problem smart contract P1.

[0090] ​​​​​​​​​​​​​Further, the target characteristic value corresponding to each second node is determined from the at least one intermediate characteristic value generated by each second node, specifically, the smallest intermediate characteristic value is selected from the at least one intermediate characteristic value generated by each second node as the target characteristic value corresponding to each second node. Because the smaller the target characteristic value corresponding to the second node is, the more rounds of target hash operations the second node successfully solving the corresponding target problem smart contract has experienced, the more computing power it has consumed, and the greater its contribution is. Therefore, the total contribution value can be determined according to the target characteristic value corresponding to each second node, and the contribution factor of each second node is determined according to the total contribution value and the target characteristic value corresponding to each second node. Specifically, assuming that Q n-k n-k+1 n-k+2 n-1 solves the target problem smart contract, the target characteristic value solved by each second node is min_work n-i The contribution factor of each second node is ψ n-i which can be calculated according to the following formula (5).

[0091]

[0092] S505, determining the reward asset amount of the second node according to the contribution factor of the second node and the resource consumption data corresponding to the target block.

[0093] In an embodiment, the contribution factor of each second node and the resource consumption data corresponding to the target block can be multiplied to obtain the reward asset amount of each second node. Further, the reward asset amount of the second node is transferred to the second node from the running asset amount of the target problem smart contract. Because each second node successfully solves a target problem smart contract, the corresponding reward asset amount is transferred to each second node from the running asset amount of the target problem smart contract successfully solved by each second node.

[0094] It should be noted that the present application can fairly and reasonably deduct digital assets from problem smart contracts according to the contribution of each node, and return the remaining digital assets to the object that proposes the problem, so that the object that proposes the problem can give sufficient fees to the corresponding problem smart contract without worrying about giving too much, and the node that solves the problem does not have to worry about the proportion between contribution and income, balancing the interests of all parties, which is conducive to ensuring the security of the blockchain network.

[0095] ​​​In the embodiments of the present application, the resource consumption data corresponding to the target block can be taken as the reward asset amount of the first node, and the reward asset amount of the second node can be determined according to the contribution factor of the second node and the resource consumption data corresponding to the target block and given to the second node. The interests between the nodes solving the problem and the object proposing the problem can be balanced, the digital assets can be allocated to each node fairly and reasonably according to the contribution of each node, and the safety and normal operation of the blockchain network can be maintained.

[0096] The above describes the method of the embodiments of the present application in detail. In order to better implement the above method of the embodiments of the present application, the device of the embodiments of the present application is provided accordingly. Please refer to Figure 6 , Figure 6 is a structural schematic diagram of a data processing device based on a blockchain network provided by the embodiments of the present application. The data processing device 60 can include:

[0097] The acquisition unit 601 is configured to acquire a target feature value generated by at least one node included in the blockchain network for a target block and a solving result of a target problem smart contract.

[0098] The processing unit 602 is configured to determine a node set from the at least one node according to the target feature value corresponding to each node in the at least one node and the solving result; the node set includes a node whose corresponding target feature value is less than a feature value threshold and a node whose corresponding solving result is a solving success.

[0099] The processing unit 602 is further configured to determine the reward asset amount of each node in the node set according to the resource consumption data corresponding to the target block; the resource consumption data is determined according to one or both of the reference consumption asset amount and the hash round expectation value corresponding to the target block.

[0100] In an embodiment, the processing unit 602 is specifically configured to: determine the resource consumption data corresponding to the target block according to the reference consumption asset amount and the hash round expectation value corresponding to the target block; determine the reward asset amount of a first node according to the resource consumption data corresponding to the target block; the first node includes the node whose corresponding target feature value is less than the feature value threshold; determine a contribution factor of a second node according to the target feature value corresponding to the second node; the second node includes a node whose corresponding target feature value is greater than or equal to the feature value threshold and whose corresponding solving result is a solving success; and determine the reward asset amount of the second node according to the contribution factor of the second node and the resource consumption data corresponding to the target block.

[0101] In an embodiment, the obtaining unit 601 is specifically configured to: obtain at least one intermediate feature value generated by each second node in a plurality of second nodes;

[0102] The processing unit 602 is specifically configured to: determine a target feature value corresponding to each second node from the at least one intermediate feature value; determine a total contribution value according to the target feature value corresponding to each second node; and determine a contribution factor of each second node according to the total contribution value and the target feature value corresponding to each second node.

[0103] transfer a reward asset amount of the first node from a running asset amount of a first problem smart contract to the first node; the first problem smart contract is a problem smart contract that the at least one node is currently solving in a problem smart contract queue associated with the target block;

[0104] In an embodiment, the processing unit 602 is specifically configured to: transfer a reward asset amount of the second node from a running asset amount of the target problem smart contract to the second node; the target problem smart contract is a problem smart contract that the second node successfully solves.

[0105] In an embodiment, the processing unit 602 is specifically configured to: determine an average consumption asset amount of the second problem smart contract according to a total consumption asset amount and a number of solving times of the second problem smart contract; the second problem smart contract includes one or both of the first problem smart contract and the target problem smart contract.

[0106] The obtaining unit 601 is specifically configured to: obtain a standard consumption asset amount of a target hash operation; the target hash operation is used to generate an intermediate feature value for the target block;

[0107] The processing unit 602 is specifically configured to: determine a reference consumption asset amount corresponding to the target block according to the average consumption asset amount of the second problem smart contract and the standard consumption asset amount of the target hash operation.

[0108] In an embodiment, the processing unit 602 is specifically configured to: determine an event occurrence probability; the event occurrence probability is used to indicate a probability that the intermediate feature value generated by executing the target hash operation once is less than the feature value threshold; determine an occurrence probability of at least one predefined operation result event according to the event occurrence probability; and determine a hash round expectation value corresponding to the target block according to the occurrence probability of each operation result event in the at least one predefined operation result event.

[0109] In an embodiment, the processing unit 602 is specifically configured to: obtain a value range of the intermediate feature value;

[0110] The processing unit 602 is specifically used to: determine the effective range of the intermediate feature value based on the range of the intermediate feature value and the feature value threshold; ensure that all intermediate feature values ​​within the effective range are less than the feature value threshold; and determine the probability of the event occurring based on the range of the intermediate feature value and the effective range of the intermediate feature value.

[0111] It is understood that the functions of each functional unit of the data processing device described in the embodiments of this application can be specifically implemented according to the methods in the above method embodiments, and the specific implementation process can be referred to the relevant descriptions in the above method embodiments, which will not be repeated here.

[0112] In this embodiment, the target feature value generated by at least one node in the blockchain network for a target block and the solution result of the smart contract for the target problem can be obtained. Based on the target feature value and solution result of each node in the at least one node, a node set is determined from the at least one node. The node set includes nodes whose corresponding target feature values ​​are less than the feature value threshold and nodes whose corresponding solution results are successful. The reward asset amount of each node in the node set is determined based on the resource consumption data corresponding to the target block. The resource consumption data is determined based on one or both of the baseline asset consumption amount and the expected value of the hash round corresponding to the target block. The above scheme can establish a fair and reasonable incentive mechanism, accurately allocate blockchain digital assets, and help maintain the security of the blockchain network.

[0113] like Figure 7 As shown, Figure 7 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. The internal structure of the computer device 70 is as follows: Figure 7 As shown, it includes: one or more processors 701, a memory 702, and a communication interface 703. The processors 701, memory 702, and communication interface 703 can be connected via a bus 704 or other means. This embodiment of the application takes the connection via a bus 704 as an example.

[0114] The processor 701 (or CPU (Central Processing Unit)) is the computing core and control core of the computer device 70, which can parse various instructions in the computer device 70 and process various data of the computer device 70. For example, the CPU can be used to parse the on-off instruction sent by the user to the computer device 70 and control the computer device 70 to perform the on-off operation; for another example, the CPU can transmit various interactive data between the internal structures of the computer device 70, and the like. The communication interface 703 can optionally include a standard wired interface, a wireless interface (such as Wi-Fi, a mobile communication interface, etc.), and is controlled by the processor 701 to receive and send data. The memory 702 is a memory device in the computer device 70, used to store computer programs and data. It can be understood that the memory 702 herein can include the built-in memory of the computer device 70, and of course can also include the expansion memory supported by the computer device 70. The memory 702 provides a storage space that stores the operating system of the computer device 70, which can include but is not limited to: Windows system, Linux system, Android system, iOS system, etc., and the present application does not limit it. The processor 701 executes the following operations by running the computer program stored in the memory 702:

[0115] Obtaining a target feature value generated by at least one node included in the blockchain network for a target block and a solution result of a target problem smart contract;

[0116] Determining a node set from the at least one node according to the target feature value and the solution result corresponding to each node in the at least one node; the node set includes nodes corresponding to a target feature value less than a feature value threshold and nodes corresponding to a solution result of a solution success;

[0117] Determining the amount of reward assets of each node in the node set according to resource consumption data corresponding to the target block; the resource consumption data is determined according to one or both of the reference consumption asset amount and the hash round expectation value corresponding to the target block.

[0118] In an embodiment, the processor 701 is specifically configured to: determine resource consumption data corresponding to the target block according to a reference consumption asset amount and a hash round expected value corresponding to the target block; determine a reward asset amount of a first node according to the resource consumption data corresponding to the target block; the first node includes a node whose corresponding target feature value is less than a feature value threshold; determine a contribution factor of a second node according to a target feature value corresponding to the second node; the second node includes a node whose corresponding target feature value is greater than or equal to the feature value threshold and whose corresponding solution result is a solution success; and determine a reward asset amount of the second node according to the contribution factor of the second node and the resource consumption data corresponding to the target block.

[0119] In an embodiment, the processor 701 is specifically configured to: obtain at least one intermediate feature value generated by each second node in a plurality of second nodes; determine a target feature value corresponding to each second node from the at least one intermediate feature value; determine a total contribution value according to the target feature value corresponding to each second node; and determine a contribution factor of each second node according to the total contribution value and the target feature value corresponding to each second node.

[0120] In an embodiment, the processor 701 is specifically configured to: transfer the reward asset amount of the first node from a running asset amount of a first problem smart contract to the first node; the first problem smart contract is a problem smart contract in a problem smart contract queue associated with the target block and being solved by the at least one node; and transfer the reward asset amount of the second node from a running asset amount of a target problem smart contract to the second node; the target problem smart contract is a problem smart contract solved successfully by the second node.

[0121] In an embodiment, the processor 701 is specifically configured to: determine an average consumption asset amount of a second problem smart contract according to a total consumption asset amount and a solution number of the second problem smart contract; the second problem smart contract includes one or both of the first problem smart contract and the target problem smart contract; obtain a standard consumption asset amount of a target hash operation; the target hash operation is used to generate an intermediate feature value for the target block; and determine a reference consumption asset amount corresponding to the target block according to the average consumption asset amount of the second problem smart contract and the standard consumption asset amount of the target hash operation.

[0122] In an embodiment, the processor 701 is specifically configured to: determine an event occurrence probability, the event occurrence probability being used to indicate a probability that the intermediate feature value generated by performing the target hash operation once is less than the feature value threshold; determine, according to the event occurrence probability, an occurrence probability of a predefined at least one operation result event; and determine, according to the occurrence probability of each operation result event in the predefined at least one operation result event, a hash round expectation value corresponding to the target block.

[0123] In an embodiment, the processor 701 is specifically configured to: obtain a value range of the intermediate feature value; determine, according to the value range of the intermediate feature value and the feature value threshold, an effective value range of the intermediate feature value; determine that the intermediate feature value in the effective value range is less than the feature value threshold; and determine, according to the value range of the intermediate feature value and the effective value range of the intermediate feature value, an event occurrence probability.

[0124] In a specific implementation, the processor 701, the memory 702, and the communication interface 703 described in the embodiments of the present application can perform the implementation manner described in the data processing method based on a blockchain network provided by the embodiments of the present application, and can also perform the implementation manner described in the data processing apparatus based on a blockchain network provided by the embodiments of the present application, which will not be described here.

[0125] In the embodiments of the present application, the target feature value generated by at least one node included in the blockchain network for the target block and the solution result of the target problem smart contract can be obtained, and a node set is determined from the at least one node according to the target feature value corresponding to each node in the at least one node and the solution result, the node set including nodes whose corresponding target feature values are less than the feature value threshold and nodes whose corresponding solution results are solution successes, the amount of reward assets of each node in the node set is determined according to the resource consumption data corresponding to the target block, and the resource consumption data is determined according to one or both of the reference consumption asset amount and the hash round expectation value corresponding to the target block. The above scheme can establish a fair and reasonable incentive mechanism, accurately allocate blockchain digital assets, and be conducive to maintaining the security of the blockchain network.

[0126] The embodiments of the present application also provide a computer readable storage medium, which stores a computer program, and when the computer program is run on a computer device, the computer device executes the data processing method based on a blockchain network in any possible implementation manner described above. The specific implementation manner can refer to the foregoing description, which will not be described here.

[0127] The embodiment of the present application further provides a computer program product, which comprises a computer program or computer instructions, and the computer program or computer instructions realize the steps of the data processing method based on the blockchain network provided by the embodiment of the present application when executed by a processor. The specific implementation manner can refer to the foregoing description, and will not be described here.

[0128] The embodiment of the present application further provides a computer program, which comprises computer instructions stored in a computer readable storage medium, and a processor of a computer device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions, so that the computer device executes the data processing method based on the blockchain network provided by the embodiment of the present application. The specific implementation manner can refer to the foregoing description, and will not be described here.

[0129] It should be noted that, for each of the foregoing method embodiments, in order to simply describe, each is expressed as a combination of a series of actions, but those skilled in the art should know that the present application is not limited by the action order described, because according to the present application, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should know that the embodiments described in the specification all belong to preferred embodiments, and the actions and modules involved are not necessarily necessary for the present application.

[0130] Those of ordinary skill in the art can understand that all or part of the steps of the various methods of the above embodiments can be completed by a program instructing relevant hardware, and the program can be stored in a computer readable storage medium, and the storage medium can include a flash disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0131] The above only discloses some embodiments of the present application, and of course cannot limit the scope of the rights of the present application, so equivalent changes made according to the claims of the present application still fall within the scope of the present application.

Claims

1. A data processing method based on a blockchain network, characterized in that, The method comprises: obtaining a target feature value generated by at least one node included in the blockchain network for a target block and a solution result of a target problem smart contract; determining a node set from the at least one node according to the target feature value corresponding to each node in the at least one node and the solution result; the node set comprises a node whose corresponding target feature value is less than a feature value threshold and a node whose corresponding solution result is a successful solution; determining an amount of reward assets of each node in the node set according to resource consumption data corresponding to the target block; the resource consumption data is determined according to one or both of a reference consumption asset amount and a hash round expectation value corresponding to the target block.

2. The method of claim 1, wherein, The determination of the amount of reward assets of each node in the node set according to the resource consumption data corresponding to the target block comprises: determining the resource consumption data corresponding to the target block according to the reference consumption asset amount and the hash round expectation value corresponding to the target block; determining the amount of reward assets of a first node according to the resource consumption data corresponding to the target block; the first node comprises the node whose corresponding target feature value is less than the feature value threshold; determining a contribution factor of a second node according to the target feature value corresponding to the second node; the second node comprises a node whose corresponding target feature value is greater than or equal to the feature value threshold and whose corresponding solution result is a successful solution; determining the amount of reward assets of the second node according to the contribution factor of the second node and the resource consumption data corresponding to the target block.

3. The method of claim 2, wherein, The determination of the contribution factor of the second node according to the target feature value corresponding to the second node comprises: obtaining at least one intermediate feature value generated by each second node in a plurality of second nodes; determining the target feature value corresponding to each second node from the at least one intermediate feature value; determining a total contribution value according to the target feature value corresponding to each second node; determining the contribution factor of each second node according to the total contribution value and the target feature value corresponding to each second node.

4. The method according to claim 2 or 3, characterized in that, The method further comprises: transferring the amount of reward assets of the first node from a running asset amount of a first problem smart contract to the first node; the first problem smart contract is a problem smart contract being solved by the at least one node in a problem smart contract queue associated with the target block; transferring the amount of reward assets of the second node from a running asset amount of the target problem smart contract to the second node; the target problem smart contract is a problem smart contract solved successfully by the second node.

5. The method of claim 4, wherein, The method further comprises: determining an average consumption asset amount of a second problem smart contract according to a total consumption asset amount and a solution number of the second problem smart contract; the second problem smart contract comprises one or both of the first problem smart contract and the target problem smart contract; obtaining a standard consumption asset amount of a target hash operation; the target hash operation is used to generate an intermediate feature value for the target block; According to the average consumed asset amount of the second problem smart contract and the standard consumed asset amount of the target hash operation, a reference consumed asset amount corresponding to the target block is determined.

6. The method of claim 5, wherein, The method further includes: determining an event occurrence probability, the event occurrence probability indicating a probability that the intermediate characteristic value generated by performing the target hash operation once is less than the characteristic value threshold; determining, according to the event occurrence probability, an occurrence probability of at least one predefined operation result event; determining, according to the occurrence probability of each operation result event in the at least one predefined operation result event, a hash round expectation value corresponding to the target block.

7. The method of claim 6, wherein, The determination of the event occurrence probability includes: obtaining a value range of the intermediate characteristic value; determining, according to the value range of the intermediate characteristic value and the characteristic value threshold, an effective value range of the intermediate characteristic value, the intermediate characteristic value in the effective value range being less than the characteristic value threshold; determining, according to the value range of the intermediate characteristic value and the effective value range of the intermediate characteristic value, the event occurrence probability. 8.A data processing apparatus based on a blockchain network, characterized by comprising: The apparatus includes: an obtaining unit configured to obtain a target characteristic value generated by at least one node included in a blockchain network for a target block and a solution result for a target problem smart contract; a processing unit configured to determine, from the at least one node, a node set according to the target characteristic value and the solution result of each node in the at least one node, the node set including a node whose corresponding target characteristic value is less than a characteristic value threshold and a node whose corresponding solution result is a solution success; the processing unit is further configured to determine, according to resource consumption data corresponding to the target block, a reward asset amount of each node in the node set, the resource consumption data being determined according to one or both of a reference consumed asset amount and a hash round expectation value corresponding to the target block.

9. A computer device, comprising: The computer device includes a memory, a communication interface, and a processor, which are connected to each other; the memory stores a computer program, and the processor invokes the computer program stored in the memory to implement the blockchain network-based data processing method in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement the blockchain network-based data processing method in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Contract data processing method, related equipment and medium

    CN110599343A

  • Data access system and method based on blockchain and smart contract, and mobile base station

    CN111741000A