CN114996027A - Algorithm for consensus of Baina sea chain block chains - Google Patents

Algorithm for consensus of Baina sea chain block chains Download PDF

Info

Publication number
CN114996027A
CN114996027A CN202210919515.6A CN202210919515A CN114996027A CN 114996027 A CN114996027 A CN 114996027A CN 202210919515 A CN202210919515 A CN 202210919515A CN 114996027 A CN114996027 A CN 114996027A
Authority
CN
China
Prior art keywords
node
consensus
temporary
leader
follower
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210919515.6A
Other languages
Chinese (zh)
Inventor
高智敏
刘显扬
陈钦宇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Benavi Technology Co ltd
Original Assignee
Shenzhen Benavi Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Benavi Technology Co ltd filed Critical Shenzhen Benavi Technology Co ltd
Priority to CN202210919515.6A priority Critical patent/CN114996027A/en
Publication of CN114996027A publication Critical patent/CN114996027A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/505Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the load
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Computing Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides a chain consensus algorithm for a hunanean sea chain block, which comprises a command module, a command decoder, a timer consensus command set and a cppa algorithm, wherein the command module is used for packaging a command set for consensus suggestions, different data is sent to consensus nodes according to different communication protocols, the cppa algorithm is arranged in the timer consensus command set to distribute and schedule a consensus command set of nodes follower, the consensus command set contains leader node state message bodies, the purpose is to solve the pressure of leader consensus, the pressure is distributed to the timer nodes for processing, and the leader and the timer consensus are mutually balanced. The performance of the consensus performance is improved, the writing efficiency can be improved when data is written, and the writing operation can be completed more quickly.

Description

Algorithm for consensus of Baina sea chain block chains
Technical Field
The invention relates to the field of block chain consensus algorithm, in particular to a Baina sea chain block chain consensus algorithm.
Background
The Baina sea chain is a marine transportation management block chain system, and a block chain is a chain formed by one block and another block. Each block holds certain information, which are linked in a chain according to the respective generated time sequence. This chain is maintained in all servers, and as long as one server can work in the entire system, the entire blockchain is secure. These servers, referred to as nodes in the blockchain system, provide storage space and computational support for the entire blockchain system. If the information in the block chain is to be modified, more than half of the nodes must be proved to agree and modify the information in all the nodes, and the nodes are usually held in different subjects, so that the information in the block chain is extremely difficult to tamper with.
However, in the existing block chain private chain consensus algorithm, a leader, a follower, and a candate are used to implement private chain consensus, the leader will process a read-write request from a client, and if a write request is received, data will be distributed to the folder, so that the data of the folder is kept synchronous with itself, and the candate selects a new leader from the block chain link points in the absence of the leader to ensure that the data is synchronous with each node. However, in huge nodes, a leader node is inevitably large in data synchronization amount, so that the leader pressure is increased, the leader synchronization speed is reduced, and the transaction speed of a private chain is influenced finally, so that improvement is made to the leader node, and a hunanean sea chain block chain consensus algorithm is provided.
Disclosure of Invention
The invention aims to: the method aims at solving the problems of the prior art.
In order to achieve the above purpose, the invention provides the following technical scheme: the invention relates to a Baina sea chain block chain consensus algorithm, which aims to improve the problems and specifically comprises the following steps: the system comprises a Grpc console, a command module, a folder consensus command set, a temporary consensus command set, a cnpa algorithm and a Leader node, wherein the Grpc console comprises a Grpc protocol module which is used for receiving command data supporting a Grpc protocol and is responsible for scheduling with a command line to upgrade a designated node into the temporary node, the command module is used for packaging a command set for consensus proposal and is handed to a command decoder to send different data to the consensus node according to different communication protocols, and the temporary consensus command set is provided with a Leader node state message body of the common-identity command set of an npca algorithm allocation scheduling node folder.
The preferred technical scheme of the invention also comprises a node configuration table, wherein the node configuration table is used for carrying out architecture connection with the node cache pool, the node configuration is used for storing the relevant information of each node, then the node information is written into the cache pool, and the information is given to the monitor for consensus.
As a preferred technical solution of the present invention, in the process of the listener in the cache pool, an algorithm developed by cnpa is added for dividing the cache pool nodes into two different node lists, i.e., temporary and follower, and the two different node lists are handed to the listener to execute different consensus algorithms.
As a preferred technical scheme of the invention, the follower node is upgraded into a temporary node, the follower node adds the self-flagged follower node in the proposal of consensus with the temporary node and gives the self-flagged follower node to the temporary node for management, the self is not managed, the temporary node is managed, and the temporary node needs to report the node state of the self-flagged follower node of the follower node in real time.
As a preferred technical solution of the present invention, the follower consensus command set is a command set detected only by a node.
As a preferred technical solution of the present invention, the temporary consensus command set includes a command set for node detection.
As a preferred technical solution of the present invention, the Leader node upgrades a certain follower node to a temporal node, and the Leader allocates a flag lower follower node to the temporal node according to a cnpa protocol.
As a preferred technical solution of the present invention, the nodes allocated with the number of the temporaries are not in consensus but are handed to the temporaries for consensus, and the temporaries need to report the node status of the follower node under the flag thereof in real time.
As a preferable technical scheme of the invention, the consensus pressure of the leader node divides the pressure into the temporary nodes for processing, so that the leader and the temporary consensus are balanced mutually.
As a preferable technical scheme of the invention, the consensus pressure part of the leader node is handed to the temporary for coming out, and the prior consensus separation performance of the nodes is improved.
Compared with the prior art, the invention has the beneficial effects that:
in the scheme of the invention: a Leader is used for upgrading a certain follower node into a template node, the Leader allocates the self flag follower node to the template node according to a cnpa protocol, and specifically how to allocate the number of the template nodes, however, the allocated nodes are not in consensus but are handed to the template node for consensus, and the template nodes need to report the node state of the self flag follower node to the Leader node in real time. The purpose is to solve the problem of the consensus pressure of the leader, and the pressure is divided into temporary nodes for processing. Leading the leader and the temporary consensus to be balanced, and the prior consensus of the nodes can be separately performed because part of the nodes are handed out to the temporary for proceeding. The performance of the consensus performance is improved, the writing efficiency can be improved when data is written, and the writing operation can be completed more quickly.
Drawings
FIG. 1 is a flow chart provided by the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be described clearly and completely with reference to the accompanying drawings. It is clear that the described embodiment is a specific implementation of the invention and is not limited to all embodiments.
Thus, the following detailed description of the embodiments of the invention is not intended to limit the scope of the invention as claimed, but is merely representative of some embodiments of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the embodiments and features and aspects of the embodiments of the present invention may be combined with each other without conflict, and it should be noted that like reference numerals and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
Example (b): referring to fig. 1, a hunan sea chain block chain consensus algorithm includes a Grpc console including a Grpc protocol module for receiving command data supporting a Grpc protocol and being responsible for scheduling with a command line to upgrade a designated node into a temporary node, a command module for encapsulating a command set for a consensus proposal and sending different data to a consensus node according to different communication protocols by a command decoder, the temporary consensus command set being provided with a cnpa algorithm allocation scheduling node folrower consensus command set including a Leader node status message body, and a node configuration table for performing architectural connection with a node cache pool, storing information related to each node, and writing the node information into the cache pool, the listeners are given consensus. Wherein, the Temporary node means: a node for a temporary Leader is specified by the Leader. The main task is to share the load generated when the Leader nodes are in consensus. The follower node for which the Temporary node is responsible is also assigned by the Leader node. The Temporary node returns the consensus authority to the Leader node when the load is low.
Wherein, the CNPA algorithm: a scheduling algorithm that supports temporary empowering. When a scheduler is overloaded, one or more temporary schedulers may be designated to relieve itself of the load. The temporary scheduler may become a work node again after the scheduling task is completed.
The fact that the consensus command set of the temporary consensus command set provided with the cnpa algorithm allocation scheduling node follower contains a leader node state message body means that: the Temporary consensus command set comprises related scheduling instructions in a cnpa algorithm, and the Follower consensus command set comprises acquisition commands of a Leader/Temporary node state message body, such as synchronization.
Referring to fig. 1, in the process of a listener in a cache pool, an algorithm developed by cnpa is added for dividing nodes of the cache pool into two different node lists, namely, temporary and follower, and the two different node lists are handed to the listener to execute different consensus algorithms, the follower node is upgraded into a temporary node, a Leader node adds a follower node under the flag of the Leader node in a proposal of consensus with the Leader node and gives the follower node to the temporary node for management, the Leader node does not manage the Leader node, the Leader node needs to report the node state of the follower node under the flag of the Leader node in real time, the Leader consensus command set is a command set detected only by the node, the temporary consensus command set comprises a command set of the node, the Leader node is upgraded into a temple node, and the Leader assigns a flag of the Leader to the follower node according to a cnpa protocol, the method comprises the steps that consensus is not carried out in nodes distributed by the number of temporaries, and the temporaries are handed to temporaries for consensus, the temporaries need to report the node states of the follower nodes under the flags of the leader nodes in real time, the consensus pressure of the leader nodes is given to the temporaries for processing, so that the leader nodes and the temporaries are mutually balanced, the consensus pressure part of the leader nodes is handed to the temporaries for coming out, and the performance of the prior consensus separation performance of the nodes is improved.
The node detection command set is a command line tool for nodes to actively discover other nodes in the peer-to-peer network. The Follower's node probe command set actively looks for leader or temporary nodes to which the synchronous consensus result is given. The Temporary node detection command set actively searches for the Leader node corresponding to the Temporary node detection command set and the Follower node managed by the Temporary node detection command set.
The working principle is as follows: in the using process of the invention, a Grpc protocol module in a Grpc console receives command data supporting a Grpc protocol, takes charge of scheduling with a command line and upgrading a designated node into a temporary node, the command module is used for encapsulating a command set for a consensus proposal and sending different data to a command decoder according to different communication protocols and sending the different data to the consensus node, the temporary consensus command set is provided with a cnpa algorithm to distribute a consensus command set of a scheduling node follower to contain a leader node state message body and also comprises a node configuration table, the node configuration table is used for being in architectural connection with a node cache pool, the node configuration stores relevant information of each node, then writes the node information into the cache pool and gives the listener for consensus, a cNpa developed algorithm is added in the cache pool for dividing the cache pool nodes into two different node lists of temporary and follower, the listener executes different consensus algorithms, a folder node is upgraded into a temporary node, the folder node adds a folder node under the flag of the folder node in a proposal of consensus with the temporary node and gives the folder node to the temporary node for management, the folder node is not managed, the temporary node needs to report the node state of the folder node under the flag of the folder node in real time, the folder consensus command set is a command set only detected by the node, the temporary consensus command set comprises the command set detected by the node, the folder node upgrades a certain folder node into a temporary node, the folder distributes the folder node under the flag of the folder node to the temporary node according to a cNpa protocol, the number of the allocated nodes of the temporary number does not carry out consensus to the folder node for consensus, the folder node needs to report the pressure of the folder node under the flag of the folder node in real time, and the folder node pressure of the folder node under the flag of the folder node is managed, pressure is distributed to the temporary nodes to be processed, so that the consensus of the leader and the temporary is mutually balanced, the consensus pressure part of the leader node is given to the temporary node for coming out, and the performance of the prior consensus separation is improved.
The above embodiments are only used for illustrating the invention and not for limiting the technical solutions described in the invention, and although the present invention has been described in detail in the present specification with reference to the above embodiments, the present invention is not limited to the above embodiments, and therefore, any modification or equivalent replacement of the present invention is made; but all technical solutions and modifications thereof without departing from the spirit and scope of the present invention are encompassed in the claims of the present invention.

Claims (10)

1. The hunan sea chain block chain consensus algorithm is characterized by comprising a Grpc console, a command module, a follower consensus command set, a temporary consensus command set, a cnpa algorithm and a Leader node, wherein the Grpc console comprises a Grpc protocol module, the Grpc protocol module is used for receiving command data supporting a Grpc protocol and is responsible for scheduling with a command line, a designated node is upgraded into a temporary node, the command module is used for packaging a command set for consensus proposals, a command decoder sends different data to the command consensus node according to different communication protocols, the temporary consensus command set is provided with a Leader node state message body in a common command set of a cnpa algorithm allocation scheduling node llfollower, and the Leader consensus command set is provided with a Leader node allocation scheduling node follower in a common command set of a cnpa algorithm allocation scheduling node, and comprises a Leader node state message body: the Temporary consensus command set comprises related scheduling instructions in a cnpa algorithm, and the Follower consensus command set comprises an acquisition command of a Leader/Temporary node status message body.
2. The hundredth sea chain block chain consensus algorithm according to claim 1, further comprising a node configuration table, wherein the node configuration table is used for being in architectural connection with a node cache pool, and the node configuration table stores information related to each node, writes the node information into the cache pool, and gives consensus to a listener.
3. The hundredth sea chain block chain consensus algorithm according to claim 2, wherein an algorithm developed by cnpa is added in the process of the listener in the cache pool, and is used for dividing the cache pool nodes into two different node lists, namely temporary and follower, and the two different node lists are given to the listener to execute different consensus algorithms.
4. The Algorithm for consensus of Loran of Bainahain block chains according to claim 1, characterized in that a follower node is upgraded to a temporary node, and the follower node adds the follower node under its flag in the proposal for consensus with the temporary node and gives the follower node to the temporary node for management, so that it is not managed, but manages the temporary node, and the temporary node needs to report the node status of the follower node under its flag in real time.
5. The hundredth chain block chain consensus algorithm according to claim 1, wherein the follower consensus command set is a command set for node-only probing.
6. The hundredth chain block chain consensus algorithm according to claim 1, wherein the temporary consensus command set comprises a command set of node probes.
7. The hundredth chain block chain consensus algorithm according to claim 1, wherein a Leader node upgrades a follower node to a temporary node, and the Leader allocates its under-flag follower node to the temporary node according to a cnpa protocol.
8. The hundredth chain block chain consensus algorithm according to claim 1, wherein the follower nodes assigned to the temporary node branch tubes are not handed over to the original Leader node for management, and the temporary node needs to report the Leader node's own flag of the follower node in real time.
9. The hundredth chain block chain consensus algorithm according to claim 1, wherein the consensus pressure of the leader node is divided into temporary nodes to be processed, so that the leader and the temporary consensus are balanced.
10. The hundredth chain block chain consensus algorithm according to claim 1, wherein consensus pressure part nodes of leader nodes are handed out to temporary, and before nodes, consensus separation consensus performance is improved.
CN202210919515.6A 2022-08-02 2022-08-02 Algorithm for consensus of Baina sea chain block chains Pending CN114996027A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210919515.6A CN114996027A (en) 2022-08-02 2022-08-02 Algorithm for consensus of Baina sea chain block chains

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210919515.6A CN114996027A (en) 2022-08-02 2022-08-02 Algorithm for consensus of Baina sea chain block chains

Publications (1)

Publication Number Publication Date
CN114996027A true CN114996027A (en) 2022-09-02

Family

ID=83022142

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210919515.6A Pending CN114996027A (en) 2022-08-02 2022-08-02 Algorithm for consensus of Baina sea chain block chains

Country Status (1)

Country Link
CN (1) CN114996027A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130024559A1 (en) * 2011-07-21 2013-01-24 Adhikary Susanta Automatic Zone-Based Management of a Data Center
CN113852691A (en) * 2021-09-24 2021-12-28 支付宝(杭州)信息技术有限公司 Block chain consensus method, consensus node and electronic equipment
CN113873030A (en) * 2021-09-24 2021-12-31 支付宝(杭州)信息技术有限公司 Block chain consensus method, consensus node and electronic equipment
US20220171763A1 (en) * 2020-12-02 2022-06-02 International Business Machines Corporation Blockchain selective world state database

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130024559A1 (en) * 2011-07-21 2013-01-24 Adhikary Susanta Automatic Zone-Based Management of a Data Center
US20220171763A1 (en) * 2020-12-02 2022-06-02 International Business Machines Corporation Blockchain selective world state database
CN113852691A (en) * 2021-09-24 2021-12-28 支付宝(杭州)信息技术有限公司 Block chain consensus method, consensus node and electronic equipment
CN113873030A (en) * 2021-09-24 2021-12-31 支付宝(杭州)信息技术有限公司 Block chain consensus method, consensus node and electronic equipment

Similar Documents

Publication Publication Date Title
US11487698B2 (en) Parameter server and method for sharing distributed deep learning parameter using the same
CN110134636B (en) Model training method, server, and computer-readable storage medium
CN107066570A (en) Data managing method and device
CN105760519A (en) Cluster file system and file lock allocation method thereof
CN111475480A (en) Log processing method and system
CN106656525A (en) Data broadcasting system, data broadcasting method and device
US20110131288A1 (en) Load-Balancing In Replication Engine of Directory Server
CN113407637A (en) Data synchronization method and device, electronic equipment and storage medium
CN110213359B (en) Internet of vehicles networking data pushing system and method based on D2D
CN109271367A (en) Distributed file system multinode snapshot rollback method and system
CN105607968A (en) Incremental backup method and equipment
US20110078383A1 (en) Cache Management for Increasing Performance of High-Availability Multi-Core Systems
CN108845822B (en) Memory management method and system for realizing uninterrupted service upgrade of software
CN117785490A (en) Training architecture, method, system and server of graph neural network model
CN111831221B (en) Distributed storage method and system based on cloud storage
CN107168642B (en) Data storage method and system
CN104346298B (en) Data processing method, device and smart card based on smart card
CN114996027A (en) Algorithm for consensus of Baina sea chain block chains
CN110532114B (en) Timed task management system and distribution method based on message queue
CN112653746A (en) Distributed storage method and system for concurrently creating object storage equipment
CN111400021B (en) Deep learning method, device and system
CN105511808A (en) Data operation method, system and related device
JP2012053795A (en) Information processing system
CN111107135B (en) Container mirror image parallel distribution method, scheduler and storage medium
CN109710183A (en) A kind of method of data synchronization and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20220902

RJ01 Rejection of invention patent application after publication