Method and apparatus for processing account of blockchain network, and storage medium
AssigneeBaidu Online Network Technology (Beijing) Co., Ltd.
InventorWei Xiao
Life of this patent
Estimating the term…
Abstract
Disclosed are a method and apparatus for processing an account of a blockchain network. The method includes: obtaining an account transaction request associated with a chain account, wherein, the chain account belongs to the blockchain; obtaining an account smart contract from the account transaction request, and writing the account smart contract into a block, wherein, the account smart contract is configured to perform operation on a chain element in the chain account when executed.
Claims18
A method for processing an account of a blockchain network, executed by a block generation node, comprising:
- obtaining an account transaction request associated with a chain account, wherein, the chain account is an account belonging to the blockchain and is configured to manage a medium used for a transaction in the blockchain, the account transaction request is initiated by a blockchain node and configured to request to establish the chain account, change the chain account or to perform element operation in the chain account;
- obtaining an account smart contract from the account transaction request, and writing the account smart contract into a block, wherein, the account smart contract is configured to perform operation on a chain element in the chain account when executed, the chain element is a media used for transferring in the chain account;
- wherein obtaining the account transaction request associated with the chain account comprises:
- obtaining a proposal transaction request for creating the chain account, changing the chain account, or operating the chain account;
- and
- in response to a set proportion of nodes in the blockchain being approval of the proposal transaction request, initiating a transaction request that identifies the chain account and the account smart contract for creating the chain account, changing the chain account, or operating the chain account;
- wherein the account smart contract is further configured to allocate a setting number of chain elements for a setting number of block generation nodes based on a hashrate contribution rule, in which the hashrate contribution rule is configured to measure a weight value of each node providing the hashrate.
An apparatus for processing an account of a blockchain network, comprising:
- one or more processors;
- a memory storing instructions executable by the one or more processors;
- wherein the one or more processors are configured to:
- obtain an account transaction request associated with a chain account, wherein, the chain account is an account belonging to the blockchain and is configured to manage a medium used for a transaction in the blockchain, the account transaction request is initiated by a blockchain node and configured to request to establish the chain account, change the chain account or to perform element operation in the chain account;
- obtain an account smart contract from the account transaction request, and write the account smart contract into a block, wherein, the account smart contract is configured to perform operation on a chain element in the chain account when executed, the chain element is a media used for transferring in the chain account;
- wherein the one or more processors are further configured to:
- obtain a proposal transaction request for creating the chain account, changing the chain account, or operating the chain account;
- and
- in response to a set proportion of nodes in the blockchain being approval of the proposal transaction request, initiate a transaction request that identifies the chain account and the account smart contract for creating the chain account, changing the chain account, or operating the chain account;
- wherein the account smart contract is further configured to allocate a setting number of chain elements for a setting number of block generation nodes based on a hashrate contribution rule, in which the hashrate contribution rule is configured to measure a weight value of each node providing the hashrate.
A non-transitory computer readable medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the processors is caused to implement a method for processing an account of a blockchain network, and the method comprises:
- obtaining an account transaction request associated with a chain account, wherein, the chain account is an account belonging to the blockchain and is configured to manage a medium used for a transaction in the blockchain, the account transaction request is initiated by a blockchain node and configured to request to establish the chain account, change the chain account or to perform element operation in the chain account;
- obtaining an account smart contract from the account transaction request, and writing the account smart contract into a block, wherein, the account smart contract is configured to perform operation on a chain element in the chain account when executed, the chain element is a media used for transferring in the chain account;
- wherein obtaining the account transaction request associated with the chain account comprises:
- obtaining a proposal transaction request for creating the chain account, changing the chain account, or operating the chain account;
- and
- in response to a vote result of other nodes of the blockchain being approval of the proposal transaction request, initiating a transaction request that identifies the chain account and the account smart contract for creating the chain account, changing the chain account, or operating the chain account;
- wherein the account smart contract is further configured to allocate a setting number of chain elements for a setting number of block generation nodes based on a hashrate contribution rule, in which the hashrate contribution rule is configured to measure a weight value of each node providing the hashrate.
Dependencies are inferred from the claim text.