Patent ID: 11954120
Assignee: nan
Field: Computer technology (Electrical engineering)
Classification: CPC G | IPC G

Claim 12:
13. A blockchain method, comprising:
S1. receiving information of a transaction or information of a first block, said information of said first block comprises of packed information of transactions;
S2. verifying whether said transaction or each of the transactions in said first block is legal; and
S3. under the circumstance that said first block is legal, appending said first block after a tail of data of a local blockchain; under the circumstance that said transaction is legal, keeping said transaction, periodically packing received legal transactions into a second block, appending said second block after the tail of data of said local blockchain and broadcasting information of said second block to other nodes in a blockchain network;
wherein said transaction or each of the transactions in said first block comprises of tokens, and each of said tokens comprises of a value and a right set said right set is a set of rights; each of said rights is a reference to a node in a right forest;
said value is a number;
said right forest comprises of a collection of right trees; each of said right trees is a tree data structure; each node of each of said right trees comprises of a description of scope of rights; a node of each of said right trees may have a pair of child nodes, called child node pair, wherein scopes of rights of said child nodes supplement each other within a scope of said node;
wherein the step verifying that a transaction is legal comprising a step for verifying that said transaction is integral, the method for verifying that said transaction is integral further comprising:
21) splitting each token in a group of input tokens of said transaction or a group of output tokens of said transaction into one or more simple tokens, such that each of said simple tokens is a token with a right set containing only one right in a right set of said token and a value identical to a value of said token; adding said simple tokens to a simple group of input tokens or a simple group of output tokens respectively; and
22) until said simple group of input tokens and said simple group of output tokens are identical or there are no more simple tokens that can be merged, merging simple tokens in said simple group of input tokens or in said simple group of output tokens according to any of steps 221, 222, and 223; when said simple group of input tokens and said simple group of output tokens are identical, said transaction is integral:
221) when there exist two simple tokens in said simple group of input tokens or in said simple group of output tokens having identical values and complementary rights under one parent right, merging said two simple tokens into a simple token comprising said value and a right set containing said parent right only in said simple group of input tokens or said simple group of output tokens respectively;
222) when there exist two simple tokens in said simple group of input tokens or in said simple group of output tokens having different values and complementary rights under one parent right, replacing said two simple tokens with two new simple tokens respectively, one of said two new simple tokens comprising a value of lesser of values of said two simple tokens and a right set containing only said parent right; one of said new simple token having a value of difference of values of said two simple tokens and a right set identical to a right set of a simple token having greater value of said two tokens; and
223) when there exist two simple tokens in said simple group of input tokens or in said simple group of output tokens having the same right set, merging said two simple tokens into a simple token respectively with value being a sum of values of said two simple tokens and a right set identical to said right set.