Patent ID: 11868327
Assignee: JIHENG ZHANG
Field: Digital communication (Electrical engineering)
Classification: CPC G  H | IPC G

Claim 5:
6. A method for building a distributed ledger of a blockchain, comprising:
acquiring information of a new milestone block and blocks directly or indirectly associated therewith; and
updating a local distributed ledger according to the acquired information of the new milestone block and blocks directly or indirectly associated therewith to obtain an updated local distributed ledger being built based on a structured DAG, the structured DAG being used to characterize connection relationship between the blocks carrying a transaction information in the updated local distributed ledger, the connection relationship between the blocks including at least a connection relationship between milestone blocks, connection relationship between the blocks created by each of the node devices and connection relationship between the milestone blocks and non-milestone blocks, the milestone blocks being used to confirm information of the new milestone block and corresponding information of blocks directly or indirectly associated therewith,
wherein the updating of the local distributed ledger according to the acquired information of the new milestone block and blocks directly or indirectly associated therewith comprises:
starting from the new milestone block, traversing information of the blocks directly or indirectly associated with the milestone blocks;
determining whether the transaction information corresponding to the block conflicts with the updated local distributed ledger;
if not, adding the transaction information to the updated local distributed ledger;
otherwise, ignoring the transaction information;

wherein the starting from the new milestone block, traversing information of blocks directly or indirectly associated with the milestone blocks comprises:
starting from the new milestone block, using depth-first algorithm or breadth-first algorithm to traverse information of blocks directly or indirectly associated with the milestone blocks; and
determining whether a pointer of the block correctly points to a block of a peer chain which is the most recent block of the peer chain;
if yes, increasing value awarded to the corresponding node device;
if not, the value awarded to the corresponding node device remaining unchanged.