Method and device for carrying out transaction processing by applying proof-of-work consensus in block chain

By applying cooperative game models and multi-dimensional key decision-making calculation strategies in blockchain, the problems of decentralization of the proof-of-work consensus mechanism and high energy consumption in blockchain are solved, and high decentralization and low Transaction processing of energy consumption enhances network fairness and security.

CN119107177APending Publication Date: 2024-12-10CHINA CONSTRUCTION BANK +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411156808.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-22
Publication Date
2024-12-10

AI Technical Summary

Technical Problem

The proof-of-work consensus mechanism in the existing blockchain has problems such as low decentralization and high energy consumption, especially in the transaction processing process, which leads to problems such as wealthy people becoming richer, networks being vulnerable to attacks, and centralization potential.

Method used

Adopt a cooperative game model, determine the computing strategy through multi-dimensional key decisions, select cooperation or competitive strategy, create blocks through proof of work consensus, ensure the security, decentralization and traceability of transactions, and provide rewards for computing nodes , encourage more nodes to participate, thereby improving the degree of network decentralization and reducing energy consumption.

Benefits of technology

It has achieved high decentralization and low energy consumption of blockchain networks, improved network fairness and security, reduced equity centralization issues, and reduced environmental impact.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119107177A_ABST
    Figure CN119107177A_ABST
Patent Text Reader

Abstract

The invention discloses a method and a device for performing transaction processing by applying proof-of-work consensus in a block chain, which can be used in the technical field of block chains, and the method comprises the following steps: after a transaction broadcasted in a block chain network is received and it is confirmed that a transaction pool does not contain the transaction, adding the transaction into the transaction pool; a cooperative game model is called, a calculation strategy is determined, calculation is performed based on the calculation strategy, a block is established through a workload proving consensus, the block comprises transactions, the cooperative game model establishes the block after determining the calculation strategy based on a multi-dimensional key decision, and the calculation strategy is a cooperation strategy or a competition strategy; verifying the validity of the block; if the verification is passed, broadcasting the block to other computing nodes in the block chain network, so that the other computing nodes receive and verify the validity of the block; and consensus is carried out on the block on the block chain to complete transaction confirmation. The method is high in decentration degree and low in energy consumption, environmental influence is reduced, and computing resources are effectively used.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of blockchain technology, and in particular to a method and device for processing transactions using proof-of-work consensus in a blockchain. Background Art

[0002] This section is intended to provide a background or context to the embodiments of the invention recited in the claims. No admission is made that the description herein is prior art by inclusion in this section.

[0003] The blockchain consensus mechanism is the core component in the blockchain network, responsible for reaching consensus between network nodes and ensuring the security and decentralization of the blockchain. The PoW (Proof of Work) consensus mechanism is designed to solve the double-spending problem in distributed networks. In distributed networks, there is no verification and recording of transactions, so there is a possibility of fraud. The goal of the PoW consensus mechanism is to solve the double-spending problem by solving mathematical puzzles to ensure that only one valid transaction history is accepted.

[0004] There are already some specific solutions to the above problems, such as introducing a new consensus algorithm. PoS is an alternative consensus mechanism that determines the right to produce blocks based on the number of tokens held, rather than based on computing power like PoW. The PoS consensus mechanism can reduce energy consumption and improve decentralization to address the problem of computing concentration in PoW. Or adjust the consensus parameters of POW, such as difficulty adjustment and block size limit, to solve some performance problems. These adjustments are achieved through improvements to the consensus protocol.

[0005] In the existing technical solutions, the technical disadvantages of the PoS (Proof of Stake) consensus mechanism are as follows:

[0006] 1. The rich get richer problem: PoS distributes block generation rights and rewards to participants who hold more tokens, which may lead to the problem of the rich getting richer. Rich coin holders will be able to obtain more rewards, thereby strengthening their position in the network, reducing the decentralized nature and being unfair.

[0007] 2. No actual work required: Participants in PoS do not need to put in actual work (such as computing power and electricity resources) to ensure the security of the network. This may make the network more vulnerable to attacks because attackers only need to control a large number of tokens without having to invest a lot of resources.

[0008] 3. Long-term arbitrage potential: Participants holding a large number of tokens may benefit from long-term arbitrage potential rather than actually participating in the security and governance of the network. This may lead to concentrated holding of tokens rather than widespread distribution.

[0009] In the existing technical solutions, the technical disadvantages of adjusting the consensus parameters of POW are as follows:

[0010] 1. Disagreements and disputes: Adjustments to consensus parameters usually require community consensus and may cause disagreements and disputes. Different stakeholders may have different views on the direction and speed of adjustments, which may lead to forks or community splits, i.e. low decentralization.

[0011] 2. Uncertainty: Adjusting consensus parameters may lead to uncertainty, especially during network upgrades. Computing nodes, users, and investors may be unsure how to adapt to new parameter settings, which may affect the stability of the network and the confidence of participants, i.e., the energy consumption of the blockchain network is high.

[0012] 3. Centralization potential: If consensus parameter adjustments are too concentrated in the hands of a few core developers or stakeholders, it may lead to the centralization of the network. Such centralization may reduce the trust of decentralized blockchains.

[0013] It can be seen that the current proof-of-work consensus has the problems of low decentralization and high energy consumption, especially for transaction processing. At present, a solution for applying proof-of-work consensus for transaction processing in a blockchain with high decentralization and low energy consumption is needed. Summary of the invention

[0014] The embodiment of the present invention provides a method for processing transactions by applying proof-of-work consensus in a blockchain, which is applied to computing nodes in a blockchain network, has a high degree of decentralization and low energy consumption, thereby helping to reduce environmental impact, use computing resources more energy-efficiently and efficiently, and can be more fair. The method includes:

[0015] After receiving the transaction broadcasted in the blockchain network and confirming that the transaction is not included in the transaction pool, add the transaction to the transaction pool;

[0016] Calling a cooperative game model, determining a computing strategy, and performing computing based on the computing strategy, and creating a block through a proof-of-work consensus, wherein the block includes transactions, wherein the cooperative game model creates a block after determining a computing strategy based on multi-dimensional key decisions, wherein the computing strategy is a cooperative strategy or a competitive strategy;

[0017] Verify the validity of the block;

[0018] If the verification is successful, the block will be broadcast to other computing nodes in the blockchain network so that other computing nodes can receive and verify the validity of the block;

[0019] Reach consensus on blocks on the blockchain and complete transaction confirmation.

[0020] The embodiment of the present invention also provides a device for processing transactions using proof-of-work consensus in a blockchain, which is applied to computing nodes in a blockchain network, has a high degree of decentralization and low energy consumption, thereby helping to reduce environmental impact, use computing resources more energy-efficiently and efficiently, and can be more fair. The device includes:

[0021] The transaction pool management module is used to add the transaction to the transaction pool after receiving the transaction broadcasted in the blockchain network and confirming that the transaction is not included in the transaction pool;

[0022] A computing module is used to call a cooperative game model, determine a computing strategy, perform computing based on the computing strategy, and create a block through a proof-of-work consensus, wherein the block includes transactions. The cooperative game model creates a block after determining a computing strategy based on multi-dimensional key decisions, wherein the computing strategy is a cooperative strategy or a competitive strategy.

[0023] The block verification module is used to verify the validity of the block; if the verification is successful, the block is broadcast to other computing nodes in the blockchain network so that other computing nodes can receive and verify the validity of the block;

[0024] The consensus module is used to reach consensus on blocks on the blockchain and complete transaction confirmation.

[0025] An embodiment of the present invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method for applying proof-of-work consensus to perform transaction processing in the above-mentioned blockchain is implemented.

[0026] An embodiment of the present invention also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the method of applying proof-of-work consensus to perform transaction processing in the above-mentioned blockchain.

[0027] An embodiment of the present invention also provides a computer program product, which includes a computer program. When the computer program is executed by a processor, it implements the method of applying proof-of-work consensus to perform transaction processing in the above-mentioned blockchain.

[0028] In an embodiment of the present invention, after receiving a transaction broadcasted in a blockchain network and confirming that the transaction is not included in the transaction pool, the transaction is added to the transaction pool; calling a cooperative game model, determining a computing strategy, and performing calculations based on the computing strategy, and creating a block through a proof-of-work consensus, the block including the transaction, the cooperative game model determines the computing strategy based on multi-dimensional key decisions and then creates a block, the computing strategy being a cooperative strategy or a competitive strategy; verifying the validity of the block; if the verification passes, broadcasting the block to other computing nodes in the blockchain network so that other computing nodes receive and verify the validity of the block; reaching a consensus on the block on the blockchain to complete the transaction confirmation. In the above transaction process, a cooperative game model is applied. The cooperative game model creates blocks after determining the computing strategy based on multi-dimensional key decisions. The computing strategy is a cooperative strategy or a competitive strategy, so that new transactions are continuously created, broadcast, verified and packaged into blocks, as well as the creation and consensus of blocks. This process ensures the security, decentralization and traceability of transactions, and provides rewards for computing nodes in the network. The cooperative game model can encourage more computing nodes to participate in the blockchain network and compete effectively, thereby improving the decentralization of the network, reducing the problem of equity concentration, helping to reduce environmental impact, and possibly reducing blockchain energy consumption. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0030] Figure 1 A flowchart of a method for processing transactions using proof-of-work consensus in a blockchain according to an embodiment of the present invention;

[0031] Figure 2 is an execution flow chart of a cooperative game model in an embodiment of the present invention;

[0032] Figure 3 A schematic diagram of splitting and executing multiple computing subtasks in an embodiment of the present invention;

[0033] Figure 4 A schematic diagram of a device for processing transactions using proof-of-work consensus in a blockchain according to an embodiment of the present invention;

[0034] Figure 5 Schematic diagram of a computer device in an embodiment of the present invention. DETAILED DESCRIPTION

[0035] To make the purpose, technical solution and advantages of the embodiments of the present invention more clear, the embodiments of the present invention are further described in detail below in conjunction with the accompanying drawings. Here, the exemplary embodiments of the present invention and their descriptions are used to explain the present invention, but are not intended to limit the present invention.

[0036] The acquisition, storage, use, and processing of data in the technical solution of this application comply with the relevant provisions of national laws and regulations.

[0037] It should be noted that in the embodiments of the present application, certain software, components, models and other existing solutions in the industry may be mentioned, and they should be regarded as exemplary. Their purpose is only to illustrate the feasibility of implementing the technical solution of the present application, but it does not mean that the applicant has or will necessarily use the solution.

[0038] Figure 1 The flowchart of the method for processing transactions by applying proof-of-work consensus in a blockchain according to an embodiment of the present invention is applied to computing nodes in a blockchain network, including:

[0039] Step 101, after receiving the transaction broadcasted in the blockchain network and confirming that the transaction is not included in the transaction pool, add the transaction to the transaction pool;

[0040] Step 102, calling the cooperative game model, determining the calculation strategy, and performing calculations based on the calculation strategy, and creating blocks through proof-of-work consensus, wherein the blocks include transactions, and the cooperative game model creates blocks after determining the calculation strategy based on multi-dimensional key decisions, and the calculation strategy is a cooperative strategy or a competitive strategy;

[0041] Step 103, verify the validity of the block;

[0042] Step 104: If the verification is successful, the block is broadcast to other computing nodes in the blockchain network so that other computing nodes receive and verify the validity of the block;

[0043] Step 105: consensus is reached on the block chain to complete the transaction confirmation.

[0044] In the embodiment of the present invention, a cooperative game model is applied. The cooperative game model creates blocks after determining the computing strategy based on multi-dimensional key decisions. The computing strategy is a cooperative strategy or a competitive strategy, so that new transactions are constantly created, broadcast, verified and packaged into blocks, as well as the creation and consensus of blocks. This process ensures the security, decentralization and traceability of transactions, and provides rewards for computing nodes in the network. The cooperative game model can encourage more computing nodes to participate in the blockchain network and compete effectively, thereby improving the degree of decentralization of the network, reducing the problem of equity concentration, helping to reduce environmental impact, and possibly reducing blockchain energy consumption. Each step is described in detail below.

[0045] In the embodiments of the present invention, a computing node refers to a node or individual that participates in computing activities in a blockchain network. The main task of a computing node is to create new blocks by solving complex mathematical problems and add transaction records to the blockchain. In return, a computing node usually receives a certain amount of cryptocurrency as a reward, a process called computing. A computing node can be an individual, a multi-person pool (an organization where multiple computing nodes collaborate to compute), or other entities.

[0046] In step 101, after receiving a transaction broadcasted in the blockchain network and confirming that the transaction is not included in the transaction pool, the transaction is added to the transaction pool;

[0047] Transactions are created by users, and these transactions can include transfers, smart contract execution requests, or other operations related to blockchain applications. Each transaction contains the sender, receiver, transaction amount, and other relevant data. Users broadcast the generated transactions to nodes in the blockchain network. Broadcasting can be achieved through peer-to-peer communication, broadcast messages, or other communication protocols.

[0048] There are multiple computing nodes in the blockchain network. The node that receives the transaction adds the transaction to the transaction pool to form a pending transaction pool. In the transaction pool, the transaction waits to be verified and packaged into the block. If the computing node finds that the current transaction already exists in the transaction pool, it will not be added again.

[0049] In step 102, the cooperative game model is called to determine a computing strategy, and a calculation is performed based on the computing strategy, and a block is created through a proof-of-work consensus, wherein the block includes a transaction, and the cooperative game model creates a block after determining a computing strategy based on multi-dimensional key decisions, wherein the computing strategy is a cooperative strategy or a competitive strategy;

[0050] Cooperative game is a concept in game theory that describes the situation where multiple participants cooperate to distribute rewards or benefits. In a cooperative game, participants can combine resources and strategies to achieve the goal of maximizing overall benefits. The reward of each participant depends on their cooperation strategy and contribution to other participants. In the embodiment of the present invention, the cooperative game model refers to the situation where computing nodes can choose to merge calculations to jointly create new blocks. This cooperative strategy can provide higher rewards, but requires cooperation from multiple computing nodes.

[0051] Computing nodes must choose between cooperation and competition, and receive rewards based on the chosen computing strategy. Cooperation may provide higher rewards, but requires multiple computing nodes to cooperate to solve a block. Computing nodes can compute individually, but competition may provide lower rewards. The embodiments of the present invention are intended to balance the trade-off between cooperation and competition, and encourage computing nodes to cooperate in the network to improve overall efficiency.

[0052] Cooperation strategy: Computing nodes can choose to merge calculations to jointly create new blocks. Cooperation may bring higher rewards, but requires multiple computing nodes to participate together.

[0053] Competitive strategy: Computing nodes can choose to compute independently without cooperating with other computing nodes. Competitive strategies may provide lower rewards, but computing nodes can obtain independent rewards.

[0054] In the embodiment of the present invention, a reward distribution mechanism is designed to distribute rewards according to the gaming strategies of computing nodes. Possible reward distribution mechanisms include the following elements:

[0055] Rewards from cooperation: When multiple computing nodes cooperate to calculate new blocks, they will share a larger reward.

[0056] Rewards from competition: Computing nodes that compute individually can receive smaller rewards.

[0057] See also Figure 2 : is an execution flow chart of a cooperative game model in an embodiment of the present invention. In one embodiment, the execution flow of the cooperative game model includes:

[0058] Step 201, initializing the blockchain;

[0059] Step 202, determining a computing strategy based on multi-dimensional key decisions;

[0060] Step 203, performing calculations based on the calculation strategy and creating blocks through proof-of-work consensus;

[0061] Step 204, adding the block to the blockchain;

[0062] Step 205, update the reward of the computing node.

[0063] If the computing strategy is a competitive strategy, the computing nodes work independently to compete for the right to create new blocks.

[0064] If the computing strategy is a cooperative strategy, they will join a cooperative computing group, where multiple computing nodes can collaborate to jointly find the block header hash value of a block, thereby sharing the block reward. Computing nodes are rewarded based on their contributions and computing strategies. Rewards for cooperative computing are usually distributed based on the contributions of computing nodes and the cooperative agreement, while rewards for competitive computing will be based on the success or failure of their independent calculations. A reward mechanism is designed to encourage more computing nodes to participate, thereby increasing the degree of decentralization of the network. This can include lowering the threshold for joining, improving the reward distribution mechanism, etc. In addition, an embodiment of the present invention also designs a penalty mechanism: there may be corresponding penalties for computing nodes that do not comply with the protocol.

[0065] The following is a detailed description of the execution process of the cooperative game model:

[0066] (1) Initialize the blockchain;

[0067] (2) Define computing nodes;

[0068] (3) Initially, a competition strategy is selected for the computing nodes;

[0069] (4) Assign a reward value of 0 to the computing node;

[0070] (5) Calculate the strategy according to the calculation formula of the strategy score;

[0071] (6) If the cooperative strategy is chosen, the calculation is performed, the block is found and added to the blockchain, and the reward is updated; if the competitive strategy is chosen, the independent calculation is performed, the block is created and added to the blockchain, and the reward is updated;

[0072] (7) Broadcast block.

[0073] Figure 3 A schematic diagram of splitting and executing multiple computing subtasks in an embodiment of the present invention.

[0074] In one embodiment, the method further comprises:

[0075] When the computation strategy is cooperative, the steps to perform computation and create a block through proof-of-work consensus include:

[0076] Obtain computing subtasks, wherein all computing nodes using a competition strategy process a computing task, and the computing task is decomposed into different subtasks and then assigned to different computing nodes;

[0077] Complete computing subtasks by collaborating with other computing nodes;

[0078] When a hash value that meets the conditions is found, the hash value that meets the conditions is submitted to the proof-of-work consensus protocol, so that the proof-of-work consensus protocol combines all the hash values ​​that meet the conditions to form the block header hash value of the block;

[0079] Create a block based on the block header hash value and transactions.

[0080] In the above embodiment, when multiple computing nodes collaborate, they share task progress and results, and they can periodically report their progress and attempt results in order to work together.

[0081] Computing nodes create new blocks by solving complex mathematical problems (proof-of-work consensus protocol). In the case of collaborative computing, multiple computing nodes jointly create blocks. Blocks contain the transaction data to be processed and other related information, such as timestamps and the hash value of the previous block.

[0082] In one embodiment, the multi-dimensional key decisions include expected rewards, computational difficulty, transaction verification, and network topology;

[0083] Based on multi-dimensional key decisions, calculate the strategic scores of cooperation strategy and competition strategy respectively;

[0084] The computing strategy with the higher strategy score is determined as the computing strategy of the computing node.

[0085] In one embodiment, the calculation formula of the strategy score is as follows:

[0086] Z=α×j+β×n-γ×v+δ×w;

[0087] w=w1×d+w2×s+w3×t;

[0088] Among them, Z is the strategy score, j is the expected reward of the computing strategy, n is the computational difficulty of the computing strategy, v is the transaction verification of the computing strategy, w is the network topology of the computing strategy, w1, w2 and w3 are weight coefficients, d is the number of other computing nodes directly connected to the computing node, s is the number of times the computing node is located on the shortest path of the network topology, and t is the weighted sum of the centrality of the neighboring nodes connected to the computing node.

[0089] Expected reward: is an evaluation that indicates the expected reward for cooperative computing and competitive computing. If cooperative computing can provide higher rewards, computing nodes may be more inclined to choose a cooperative strategy. The expected reward can be estimated based on factors such as the current block reward, transaction fees, and computing difficulty. The expected reward can be preset in advance and stored;

[0090] Computational difficulty: Indicates the difficulty value of the current calculation. A higher difficulty may reduce the chance of success of independent calculations.

[0091] Transaction verification: Indicates the number of pending transactions in the transaction pool, which may affect the reward. If there are a large number of high-fee transactions waiting to be verified in the transaction pool, cooperative computing may provide higher rewards because multiple computing nodes jointly processing these transactions can increase profits.

[0092] Network topology: Considers the physical location and connectivity between computing nodes, as well as the impact of network topology on cooperative computing. If multiple computing nodes are located in relatively close geographic locations, cooperative computing may be easier to achieve. In addition, the network topology may also affect the latency of information transmission, thereby affecting the decision-making of computing nodes.

[0093] In step 103, verify the validity of the block;

[0094] After creating a new block, the computing node verifies the validity of the block to ensure that the transaction is valid and does not violate the consensus rules. If the block is valid, it will be broadcast to other computing nodes in the blockchain network.

[0095] In step 104, if the verification is successful, the block is broadcast to other computing nodes in the blockchain network so that other computing nodes receive and verify the validity of the block;

[0096] In step 105, consensus is reached on the block on the blockchain to complete the transaction confirmation.

[0097] In one embodiment, consensus is reached on a block on a blockchain, including:

[0098] Collaborate with other computing nodes to reach consensus on blocks on the blockchain and add the consensus blocks to the end of the blockchain.

[0099] The transaction is included in the new block and the transaction is confirmed. Once a transaction is confirmed on the blockchain, it is considered irreversible and final.

[0100] This transaction process is carried out in a blockchain network that applies the PoW consensus protocol based on the cooperative game model. New transactions are constantly created, broadcast, verified, and packaged into blocks, as well as the creation of blocks and consensus. This process ensures the security, decentralization, and traceability of transactions, and provides rewards for participants in the network.

[0101] In the present invention, computing nodes can choose cooperative computing, which means that multiple computing nodes can work together to solve a block, thereby improving the overall efficiency of computing. In terms of resources, resource waste can be greatly reduced. When computing nodes choose a competitive strategy, they may fail and waste computing power. However, under the cooperative strategy, even if a new block is not mined, computing resources can be used to solve the cooperative block.

[0102] An embodiment of the present invention further proposes a device for processing transactions by applying proof-of-work consensus in a blockchain, the principle of which is similar to the method for processing transactions by applying proof-of-work consensus in a blockchain, and will not be repeated here.

[0103] Figure 4 A schematic diagram of an apparatus for processing transactions using proof-of-work consensus in a blockchain according to an embodiment of the present invention, comprising:

[0104] The transaction pool management module 401 is used to add the transaction to the transaction pool after receiving the transaction broadcasted in the blockchain network and confirming that the transaction is not included in the transaction pool;

[0105] The calculation module 402 is used to call the cooperative game model, determine the calculation strategy, perform calculations based on the calculation strategy, and create blocks through proof-of-work consensus. The blocks include transactions. The cooperative game model creates blocks after determining the calculation strategy based on multi-dimensional key decisions. The calculation strategy is a cooperative strategy or a competitive strategy.

[0106] The block verification module 403 is used to verify the validity of the block; if the verification is successful, the block is broadcast to other computing nodes in the blockchain network so that other computing nodes receive and verify the validity of the block;

[0107] The consensus module 404 is used to reach consensus on blocks on the blockchain and complete transaction confirmation.

[0108] In one embodiment, the execution process of the cooperative game model includes:

[0109] Initialize the blockchain;

[0110] Determine computing strategies based on multi-dimensional key decisions;

[0111] Perform calculations based on the calculation strategy and create blocks through proof-of-work consensus;

[0112] Add blocks to the blockchain;

[0113] Update the rewards for computing nodes.

[0114] In one embodiment, when the computing strategy is a cooperative strategy, the steps of computing and creating a block through proof-of-work consensus include:

[0115] Obtain computing subtasks, wherein all computing nodes using a competition strategy process a computing task, and the computing task is decomposed into different subtasks and then assigned to different computing nodes;

[0116] Complete computing subtasks by collaborating with other computing nodes;

[0117] When a hash value that meets the conditions is found, the hash value that meets the conditions is submitted to the proof-of-work consensus protocol, so that the proof-of-work consensus protocol combines all the hash values ​​that meet the conditions to form the block header hash value of the block;

[0118] Create a block based on the block header hash value and transactions.

[0119] In one embodiment, the multi-dimensional key decisions include expected rewards, computational difficulty, transaction verification, and network topology;

[0120] The calculation module 402 is specifically used for:

[0121] Based on multi-dimensional key decisions, calculate the strategic scores of cooperation strategy and competition strategy respectively;

[0122] The computing strategy with the higher strategy score is determined as the computing strategy of the computing node.

[0123] In one embodiment, the calculation formula of the strategy score is as follows:

[0124] Z=α×j+β×n-γ×v+δ×w;

[0125] w=w1×d+w2×s+w3×t;

[0126] Among them, Z is the strategy score, j is the expected reward of the computing strategy, n is the computational difficulty of the computing strategy, v is the transaction verification of the computing strategy, w is the network topology of the computing strategy, w1, w2 and w3 are weight coefficients, d is the number of other computing nodes directly connected to the computing node, s is the number of times the computing node is located on the shortest path of the network topology, and t is the weighted sum of the centrality of the neighboring nodes connected to the computing node.

[0127] In one embodiment, the consensus module 404 is specifically used to:

[0128] Collaborate with other computing nodes to reach consensus on blocks on the blockchain and add the consensus blocks to the end of the blockchain.

[0129] In summary, the method and device proposed in the embodiments of the present invention have the following beneficial effects:

[0130] A cooperative game model is applied, which creates blocks after determining the computing strategy based on multi-dimensional key decisions. The computing strategy is a cooperative strategy or a competitive strategy, so that new transactions are continuously created, broadcast, verified and packaged into blocks, as well as the creation and consensus of blocks. This process ensures the security, decentralization and traceability of transactions, and provides rewards for computing nodes in the network. The cooperative game model can encourage more computing nodes to participate in the blockchain network and compete effectively, thereby improving the decentralization of the network, reducing the problem of equity concentration, helping to reduce environmental impact, and possibly reducing blockchain energy consumption.

[0131] An embodiment of the present invention further provides a computer device, Figure 5 This is a schematic diagram of a computer device in an embodiment of the present invention. The computer device 500 includes a memory 510, a processor 520, and a computer program 530 stored in the memory 510 and executable on the processor 520. When the processor 520 executes the computer program 530, the method for applying the proof-of-work consensus to perform transaction processing in the above-mentioned blockchain is implemented.

[0132] An embodiment of the present invention also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the method of applying proof-of-work consensus to perform transaction processing in the above-mentioned blockchain.

[0133] An embodiment of the present invention also provides a computer program product, which includes a computer program. When the computer program is executed by a processor, it implements the method of applying proof-of-work consensus to perform transaction processing in the above-mentioned blockchain.

[0134] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0135] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0136] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0137] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0138] The specific embodiments described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. A method for processing transactions using proof-of-work consensus in a blockchain, characterized in that: Computing nodes used in blockchain networks include: After receiving the transaction broadcasted in the blockchain network and confirming that the transaction is not included in the transaction pool, add the transaction to the transaction pool; Calling a cooperative game model, determining a computing strategy, and performing computing based on the computing strategy, and creating a block through a proof-of-work consensus, wherein the block includes transactions, wherein the cooperative game model creates a block after determining a computing strategy based on multi-dimensional key decisions, wherein the computing strategy is a cooperative strategy or a competitive strategy; Verify the validity of the block; If the verification is successful, the block will be broadcast to other computing nodes in the blockchain network so that other computing nodes can receive and verify the validity of the block; Reach consensus on blocks on the blockchain and complete transaction confirmation.

2. The method according to claim 1, characterized in that The execution process of the cooperative game model includes: Initialize the blockchain; Determine computing strategies based on multi-dimensional key decisions; Perform calculations based on the calculation strategy and create blocks through proof-of-work consensus; Add blocks to the blockchain; Update the rewards for computing nodes.

3. The method according to claim 2, characterized in that Also includes: When the computation strategy is cooperative, the steps to perform computation and create a block through proof-of-work consensus include: Obtain computing subtasks, wherein all computing nodes using a competition strategy process a computing task, and the computing task is decomposed into different subtasks and then assigned to different computing nodes; Complete computing subtasks by collaborating with other computing nodes; When a hash value that meets the conditions is found, the hash value that meets the conditions is submitted to the proof-of-work consensus protocol, so that the proof-of-work consensus protocol combines all the hash values ​​that meet the conditions to form the block header hash value of the block; Create a block based on the block header hash value and transactions.

4. The method according to claim 1, characterized in that Multi-dimensional key decisions include expected rewards, computational difficulty, transaction verification, and network topology; Determine computing strategies based on multi-dimensional key decisions, including: Based on multi-dimensional key decisions, calculate the strategic scores of cooperation strategy and competition strategy respectively; The computing strategy with the higher strategy score is determined as the computing strategy of the computing node.

5. The method according to claim 4, characterized in that The calculation formula of strategy score is as follows: Z=α×j+β×n-γ×v+δ×w; w=w1×d+w2×s+w3×t; Among them, Z is the strategy score, j is the expected reward of the computing strategy, n is the computational difficulty of the computing strategy, v is the transaction verification of the computing strategy, w is the network topology of the computing strategy, w1, w2 and w3 are weight coefficients, d is the number of other computing nodes directly connected to the computing node, s is the number of times the computing node is located on the shortest path of the network topology, and t is the weighted sum of the centrality of the neighboring nodes connected to the computing node.

6. The method according to claim 1, characterized in that Consensus on blocks on the blockchain includes: Collaborate with other computing nodes to reach consensus on blocks on the blockchain and add the consensus blocks to the end of the blockchain.

7. A device for processing transactions using proof-of-work consensus in a blockchain, characterized in that: Computing nodes used in blockchain networks include: The transaction pool management module is used to add the transaction to the transaction pool after receiving the transaction broadcasted in the blockchain network and confirming that the transaction is not included in the transaction pool; A computing module is used to call a cooperative game model, determine a computing strategy, perform computing based on the computing strategy, and create a block through a proof-of-work consensus, wherein the block includes transactions. The cooperative game model creates a block after determining a computing strategy based on multi-dimensional key decisions, wherein the computing strategy is a cooperative strategy or a competitive strategy. The block verification module is used to verify the validity of the block; if the verification is successful, the block is broadcast to other computing nodes in the blockchain network so that other computing nodes can receive and verify the validity of the block; The consensus module is used to reach consensus on blocks on the blockchain and complete transaction confirmation.

8. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 6 is implemented.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.

10. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.