The application is a divisional application with the patent application number of 201910778431.3 and the name of 'handling fee distribution method, device and storage medium based on block chain', and the application date of the original application is 2019, 8 and 22.
Detailed Description
The present invention will be described in detail below with reference to the accompanying drawings and examples. Non-conflicting ones of the following embodiments may be combined with each other.
As shown in fig. 1, the first embodiment of the block chain-based commission fee allocation method of the present invention includes:
s1: the node successfully competes to the accounting right.
Blockchain technology is a new decentralized infrastructure and distributed computing paradigm that utilizes an encrypted chained blockstructure to verify and store data, a distributed node consensus algorithm to generate and update data, and automated script code to program and manipulate data. The core advantage of the blockchain technology is decentralization, and point-to-point transaction, coordination and cooperation based on decentralization credit can be realized in a distributed system with nodes not needing to trust with each other by means of data encryption, timestamps, distributed consensus and the like, so that a solution is provided for solving the problems of high cost, low efficiency, unsafe data storage and the like commonly existing in a centralization mechanism.
The blockchain is distributively stored in a blockchain network, and the blockchain network is a multi-node network system formed by utilizing the blockchain technology. The execution main body node of the embodiment belongs to the block chain network and is a miner who successfully competes to the accounting right.
S2: the node executes the target transaction and credits at least a portion of a first commission for the target transaction to the at least one first account.
After the competition is successful, the node executes the target transaction, specifically, at least one of the following actions may be performed according to the content of the target transaction: updating the account balance of the participating parties of the target transaction, writing in new intelligent contracts, executing intelligent contracts that satisfy triggering conditions, and the like. The target transaction refers to a transaction broadcast on the blockchain network in a specified time period, the number of the target transactions is not limited, and the target transactions do not necessarily include all transactions in the specified time period. The node is an accounting node for the target transaction. The designated time period refers to a time period corresponding to the accounting right of the competition. The transaction may be a simple transfer of money or may be a message containing an intelligent contract code. The participating bodies of the transaction can belong to the blockchain network or not, and the number of the participating bodies of the transaction is not limited.
The first-hand payment for the target transaction is a payment for the participating parties to the target transaction, and the number of participating parties who pay the first-hand payment may be one or more. The first account is different from the account of the node, or the first account is an account other than the account of the node.
The first account may include a public account and/or a non-public account. Here, the public account and the non-public account are referred to the whole blockchain network. The non-public account may be an account of a specific node/organization/user, such as at least one of an account of a maintenance subject, an account of a participating subject supporting an industry, and the like. The first account may be selected according to a particular allocation policy, e.g., an account that maintains a principal may be selected to maintain operation of the blockchain network, an account that supports a participating principal of an industry may be selected to support a particular industry, etc.
Public accounts are faced with the entire blockchain network, acting like a national library, and credentials entered into a public account can be reassigned to a particular member of the blockchain, but not directly spent. The redistribution of the public account can be realized by an intelligent contract, and the specific content can refer to the description of the subsequent embodiment.
The intelligent contract is a core constituent element (contract layer) of the block chain, is a computer program which is driven by events, has a state and runs on a reproducible shared block chain data book, and can realize the functions of actively or passively processing data, receiving, storing and sending values, controlling and managing intelligent assets on various chains and the like. In particular, an intelligent contract is a set of scenario-correspondence type programming rules and logic, which is decentralized, trusted, shared program code deployed on a blockchain. The smart contracts also have the general characteristics of blockchain data, such as distributed recording, storage and verification, non-falsification and forgery. After the parties signing the contract agree on the contract content, the contract is deployed on the block chain in the form of an intelligent contract, and the contract can be automatically executed on behalf of the signing parties without any central authority.
As shown in fig. 2, in an embodiment of the present invention, the process of "depositing at least part of the first hand renewal of the target transaction in at least one first account" in S2 includes:
s21: the node credits the account of the node with a second commission for the target transaction and credits the at least one first account with a third commission for the target transaction.
The second and third commission fees of the target transaction constitute the first commission of the target transaction. The second commission is the portion of the first commission that is directly withheld by the node, and the third commission is the portion that is redistributed. The first account may include a public account and/or a non-public account.
If the first account includes a common account, the common account may or may not include the node to redistribute the third commission fee.
In another embodiment of the present invention, as shown in FIG. 3, the step of "depositing at least part of the first hand renewal of the target transaction in at least one first account" at S2 comprises:
s26: the node credits the at least one first account with a first commission for the target transaction.
The first account comprises a public account. Additionally, the first account may further include a non-public account.
S27: the account of the node obtains a second renewal fee for the target transaction from the common account.
Generally, to ensure the benefits and enthusiasm of miners, at least a portion of the first commission is allocated to the miners. The second charge is a part of the first charge, and the second charge and the third charge together form the first charge. Of course, in some embodiments, the first commission may not be allocated to miners, and S27 may be omitted.
The node in this embodiment may not receive the income of the commission fee immediately, i.e. S27 and S26 may not occur in the same billing period. And the issuing of the second commission fee is determined by an intelligent contract (short for a public contract) corresponding to the public account. When the public contract meets the trigger condition, the current accounting node (not necessarily the execution subject of the embodiment) executes the public contract, and pays the recorded second commission to be paid to the corresponding node.
For example, the billing period of the blockchain network is 10 minutes, and the second commission in the public contract is paid once every 4 billing periods. In the nth accounting period, the node or the miner A successfully competes for the accounting right to become the accounting node of the nth accounting period, but the nth period does not meet the condition of paying the second commission charge, and the miner a does not obtain the second commission charge. In the (n + 2) th period, the node or the miner b successfully competes for the accounting right to become an accounting node of the (n + 2) th accounting period, and the (n + 2) th period meets the condition of paying the second commission charge, the node b executes the common contract, and transfers the second commission charge which is obtained by the node a in the recorded nth accounting period from the common account to the account of the node a.
The allocation of the first commission charge can be divided into the following cases according to the objective of the first commission charge deposit:
A. the node intercepts the second commission charge, and stores all the third commission charge into the public account, and the third commission charge is redistributed by the public account;
B. the node intercepts the second commission charge, and stores a part of the third commission charge into the non-public account, and stores the other part of the third commission charge into the public account, and the third commission charge is redistributed by the public account;
C. the node intercepts the second commission charge and stores all the third commission charge into the non-public account;
D. all the first-hand renewal fees are stored in the public account by the node and are redistributed by the public account;
E. the node stores a part of the first-hand renewal fee in the non-public account, and stores the other part of the first-hand renewal fee in the public account, and the first-hand renewal fee is redistributed by the public account;
F. the node deposits all first-hand charges into the non-public account (this is the most extreme and is generally not considered).
In the case of a and B, the object of the common account to reallocate the third commission fee may or may not include the node.
Note that, in the above description, if there is more than one target for storing a certain fee, the fee is stored in a plurality of targets in a divided manner. For example, if a first commission of an amount c is deposited into the node account and the common account, the amount d is deposited into the node account, and the amount e is deposited into the common account, then c ═ d + e is provided. The redistribution of the public account is realized by an intelligent contract, and the distribution/transfer of the handling fee in other situations can be realized by common codes or intelligent contracts.
Through the implementation of the embodiment, at least part of the first commission charge of the target transaction is stored in at least one first account, the first commission charge of the target transaction is the commission charge paid by a participating body of the target transaction, the first account is different from the account of the node, but not directly stored in the account of the node, and a commission charge redistribution mechanism is introduced, so that the income regulation of a plurality of participating parties of the block chain can be realized, and the healthy development of the block chain is promoted.
As shown in fig. 4, the second embodiment of the block chain-based fee allocation method according to the present invention is a further extension of the first embodiment of the block chain-based fee allocation method according to the present invention, wherein the same portions as those in the first embodiment of the block chain-based fee allocation method according to the present invention are not repeated, and the embodiment includes:
s10: the node successfully competes to the accounting right.
S20: the node executes the target transaction and credits at least a portion of a first commission for the target transaction to at least one first account, the first account including a common account.
S30: the node executes the intelligent contract to preset the third commission for the at least one transaction in the public account and/or to pay the second commission for the at least one transaction to the accounting node for the transaction.
In the embodiment, the public contract meets the trigger condition, and the node executes the public contract to redistribute the commission charge in the public account. The second and third commission of each transaction constitute a first commission for the transaction, the first commission for the transaction being a commission paid by the participating parties to the transaction.
The pre-set process may include destroying and/or crediting an account of a node other than the accounting node of the transaction (i.e. a non-public account other than the accounting node of the transaction). The accounts of the other nodes may be determined according to rules of a preset process, for example, the accounts of the other nodes include an account of a maintenance subject and/or an account of a participation subject supporting the industry.
The smart contract may include at least one of a payment proportion, a rule of preset processing, a payment rule of a second commission, and the like. The payment proportion is the ratio of the second commission charge to the corresponding first commission charge, and the value range can be (0, 1). The rule of the preset process may include at least one of a trigger condition for starting the preset process, a specific content of the preset process, an object of the preset process, and the like. The payment rule of the second fee may include a trigger condition for paying the second fee, a payment manner (e.g., one-time payment, installment, etc.) of the second fee, and the like.
The content of the intelligent contract can be determined according to the state, development target and the like of the blockchain item, and the intelligent contract can be updated when needed. For example, when the blockchain network has been developed for a certain time and the credentials for maintaining the blockchain network have been consumed or are close to being consumed, the pre-set process may include depositing at least part of the third commission on the account of the maintenance subject. Alternatively, when there is a need to develop a given industry in the blockchain network, the pre-setting process may include crediting at least a portion of the third commission to the need associated with the given industry.
As shown in fig. 5, the first embodiment of the block chain-based commission distribution apparatus of the present invention comprises:processor 110 andcommunication circuit 120,communication circuit 120 is connected toprocessor 110.
Thecommunication circuit 120 is an interface for transmitting and receiving data, and communicates with other communication devices based on the procedure fee allocation apparatus of the block chain.
Theprocessor 110 controls the operation of the block chain-based commission distribution device, and theprocessor 110 can also be referred to as a Central Processing Unit (CPU). Theprocessor 110 may be an integrated circuit chip having signal processing capabilities. Theprocessor 110 may also be a general purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
Theprocessor 110 is configured to execute instructions to implement the method provided by any one of the first and third embodiments of the block chain based commission allocation method of the present invention and non-conflicting combinations.
As shown in fig. 6, the first embodiment of the storage medium of the present invention includes amemory 210, and thememory 210 stores instructions that, when executed, implement the method provided by any one of the first to third embodiments of the block chain-based procedure fee allocation method of the present invention and any non-conflicting combination.
TheMemory 210 may include a Read-Only Memory (ROM), a Random Access Memory (RAM), a Flash Memory (Flash Memory), a hard disk, an optical disk, and the like.
In the embodiments provided in the present invention, it should be understood that the disclosed method and apparatus can be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, a division of a module or a unit is merely a logical division, and an actual implementation may have another division, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
Units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be substantially or partially implemented in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, a network device, or the like) or a processor (processor) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above description is only an embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.