{'fraction_non_alphanumeric': 0.014896373056994818, 'fraction_numerical': 0.0, 'mean_word_length': 5.688311688311688, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Hybrid consensus algorithm based on hierarchy authority

Consensus algorithm is the key to achieve consistent data state in blockchain system. The existing consensus algorithm of consortium blockchain is mainly designed on the basis of equal status of participating nodes. For the hierarchical structure more commonly seen in social life, business management and military command, the current algorithms cannot provide good solutions. In this paper, we propose a hybrid consensus algorithm based on hierarchical authority, which is suitable for node groups with hierarchical relations. By analyzing the advantages and disadvantages of PBFT algorithm and Raft algorithm, the method combines the two algorithms to suit characteristics of hierarchical systems. Firstly, an authority value is initialized for each node according to the hierarchical relationship, and then the nodes are stratified according to the authority value. Raft algorithm is adopted at the lower level, and PBFT algorithm is adopted at the higher level. Through the stratification mechanism, the communication volume is reduced and the consensus efficiency is effectively improved. Secondly, the authoritative value assignment strategy is introduced in the PBFT to effectively limit the malicious attack behavior, and the monitor node is introduced in the Raft algorithm to improve the Byzantine fault tolerance. The experimental results show that, our proposed method has high consensus efficiency while maintaining Byzantine fault-tolerant ability in hierarchical systems.