CN113347164B - Block chain-based distributed consensus system, method, device and storage medium - Google Patents

Block chain-based distributed consensus system, method, device and storage medium Download PDF

Info

Publication number
CN113347164B
CN113347164B CN202110562108.XA CN202110562108A CN113347164B CN 113347164 B CN113347164 B CN 113347164B CN 202110562108 A CN202110562108 A CN 202110562108A CN 113347164 B CN113347164 B CN 113347164B
Authority
CN
China
Prior art keywords
consensus
message
transaction
subject
transaction message
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.)
Active
Application number
CN202110562108.XA
Other languages
Chinese (zh)
Other versions
CN113347164A (en
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.)
Hunan University
Original Assignee
Hunan University
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 Hunan University filed Critical Hunan University
Priority to CN202110562108.XA priority Critical patent/CN113347164B/en
Publication of CN113347164A publication Critical patent/CN113347164A/en
Application granted granted Critical
Publication of CN113347164B publication Critical patent/CN113347164B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/083Network architectures or network communication protocols for network security for authentication of entities using passwords
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/55Push-based network services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/50Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using hash chains, e.g. blockchains or hash trees
    • 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

Abstract

The invention discloses a distributed consensus system based on a block chain, a method, equipment and a storage medium, wherein the system provides a consensus framework which can flexibly configure a consensus algorithm and efficiently process transactions, the consensus framework is used as an independent component in a block chain network to perform a consensus process, the condition of large energy consumption does not exist, the consensus process is performed in a cluster mode, multiple service nodes can be supported, single node failure in the consensus process is effectively avoided, and the whole consensus mechanism is ensured to have good fault tolerance. The consensus algorithm of each subject block is configured by the management cluster, so that the optimal consensus algorithm can be flexibly configured according to different service scenes, and the method is suitable for diversified service scenes. Each subject block is provided with a plurality of partitions to carry out consensus sequencing on the transaction messages, so that concurrent consensus processing can be carried out on the transaction messages, the method is particularly suitable for high-concurrency service scenes, and the defects of low throughput and low efficiency of the current block chain are overcome.

Description

Block chain-based distributed consensus system, method, device and storage medium
Technical Field
The present invention relates to the field of blockchain technologies, and in particular, to a distributed consensus system and method based on blockchains, a device, and a computer-readable storage medium.
Background
The block chain technology is a distributed account book technology, is jointly maintained by multiple parties, comprehensively uses the technologies of a distributed account book, a chain data structure, point-to-point transmission, a consensus mechanism, a cryptology principle and the like, has the important characteristics of decentralization, openness and transparency, no data falsification, traceability, privacy protection, high autonomy and the like, and is widely applied to multiple fields. In the blockchain network, transactions initiated by different participants must be sequentially written into an account book according to a generation sequence, and how to reach consistency of all nodes on the same transaction proposal in a distributed scene is an important problem that must be considered and solved by the blockchain technology. To achieve this goal, the transaction sequence must be correctly established, and a processing method for dealing with the tampered transaction or the maliciously submitted transaction must be included, and the consensus algorithm is a solution for ensuring the consistency of the distributed system, and the consensus algorithm is a process used in computer science for realizing the consistency of a single data value among distributed processes or systems, aiming at solving the reliability problem of a plurality of unreliable nodes in the distributed network.
The consensus algorithm is the basis for keeping block data consistent and accurate by nodes in the blockchain. In a block chain public chain, a workload certification consensus (POW) mechanism determines a billing weight based on computing power, determines the probability of obtaining the billing weight according to the percentage of the computing power in the total computing power, and a node needs to continuously consume computing power to perform hash calculation so as to find an expected random number. The credit evidence consensus mechanism (POS) determines the accounting right according to the number of held coins and the holding time, and determines the probability of obtaining the accounting right based on the percentage of the number of held coins and the holding time to the total amount of the system. The entrustment interest certification consensus mechanism (DPOS) is a consensus algorithm based on voting, similar to the agent democrasts, and is based on POS. In the block chain alliance chain, the consensus mechanism of Hyperledger Fabric is taken as a representative, and includes the consensus algorithms of Raft, kafka and the like. The consensus mechanism of HyperLegendr Fabric must satisfy both security and activity attributes to ensure consistency between nodes. Where security means that each node guarantees the same input sequence and produces the same output result at each node, the same state change will occur at each node when the node receives the same series of transactions, and the algorithm must be identical to the result of execution of a single node system.
However, the following problems are common to the common recognition mechanism in the current blockchain technology:
1) The resource consumption is serious, and especially the consumption of the PoW consensus algorithm on the power resource is very large;
2) The transaction confirmation time is too long, so that the use scene is severely limited;
3) The transaction processing frequency is low, and the blocking delay of a large number of transactions is easily caused. These problems are also important bottlenecks for restricting the development of block chain technology, and new consensus mechanisms (such as DAG, poA, etc.) are continuously proposed, but the problems that the consensus mechanism faces low efficiency and cannot cope with high concurrency situations in particular are still not fundamentally solved.
Disclosure of Invention
The invention provides a distributed consensus system based on a block chain, a distributed consensus method based on the block chain, equipment and a computer-readable storage medium, which are used for solving the technical problems in the prior art.
According to an aspect of the present invention, there is provided a block chain-based distributed consensus system, including:
the consensus cluster is configured with a plurality of subject blocks and a plurality of data storage servers, a plurality of partitions are configured under each subject block, each subject block is correspondingly configured with one data storage server, the plurality of partitions under the subject blocks are used for performing consensus sequencing on the transaction messages according to a preconfigured consensus algorithm, and the data storage servers are used for storing a transaction message list subjected to consensus sequencing in the plurality of partitions under each subject block;
the message production node is responsible for acquiring the transaction message and sending the acquired transaction message to the consensus cluster in a push mode;
the message consumption node is responsible for acquiring a transaction message list subjected to consensus sequencing from the data storage server to a local server in a pull mode, packaging the transaction message list into blocks, broadcasting the blocks to the full-service providing nodes of the block chain network, verifying other nodes of the block chain network after receiving the blocks, and if the verification is passed, updating local accounts of each node;
and the management cluster is used for registering the message production nodes and the message consumption nodes and configuring a consensus algorithm of each theme zone.
Further, the management cluster is further configured to configure a message classification policy of the consensus cluster and store the message classification policy in the data storage servers, after the message production node pushes the acquired transaction message to the plurality of data storage servers, each data storage server identifies the transaction message according to a pre-configured message classification policy, the data storage server which successfully identifies pushes the transaction message to a corresponding subject block, and the transaction message is divided into the partition with the minimum transaction number in the subject block.
Furthermore, each transaction message is attached with a subject type identifier prefix, each subject type identifier prefix corresponds to one subject block, the data storage server judges whether the transaction message belongs to the corresponding subject block or not by identifying the subject type identifier prefix, and if so, the transaction message is pushed to the corresponding subject block.
Further, the number of subject areas in the consensus cluster and the number of partitions under each subject area are both configured by the management cluster.
Further, the management cluster designates a part of proxy nodes in the blockchain network as the message production nodes and the message consumption nodes.
In addition, the invention also provides a distributed consensus method based on the block chain, which adopts the distributed consensus system and comprises the following contents:
step S1: registering a message production node and a message consumption node, and configuring a consensus algorithm of each subject area block in a consensus cluster;
step S2: the client submits a transaction proposal, and after the transaction proposal is verified by an endorsement service providing node in the block chain network, a transaction message is sent to a message production node;
and step S3: after receiving the transaction message, the message production node pushes the acquired transaction message to the consensus cluster in a push mode;
and step S4: the partitions in the consensus cluster perform consensus sequencing on the transaction messages according to a configured consensus algorithm, and store a list of the transaction messages subjected to the consensus sequencing into a data storage server;
step S5: the message consumption node acquires a transaction message list subjected to consensus sequencing from the data storage server to the local server in a pull mode;
step S6: and the message consumption node packs the acquired transaction message list after the consensus sequencing into blocks and broadcasts the blocks to the full-service providing nodes of the block chain network, other nodes of the block chain network verify the blocks after receiving the blocks, and if the verification is passed, each node updates the local account book of the node.
Further, the step S1 further includes the following steps: configuring a message classification strategy of the consensus cluster;
the message classification strategy specifically comprises the following steps: each transaction message is attached with a subject type identification code prefix, each subject type identification code prefix corresponds to a subject block, the message production node pushes the acquired transaction message to a plurality of data storage servers, each data storage server judges whether the transaction message belongs to the corresponding subject block or not by identifying the subject type identification code prefix, if so, the transaction message is pushed to the corresponding subject block, and the transaction message is divided into the partition with the minimum transaction number in the subject block.
Further, the message consumption node truncates the obtained consensus-ordered transaction message lists according to a maximum quantity rule or a time range rule, and packs at least two transaction message lists formed after truncation into blocks respectively.
In addition, the present invention also provides an apparatus comprising a processor and a memory, wherein the memory stores a computer program, and the processor is used for executing the steps of the method by calling the computer program stored in the memory.
The present invention also provides a computer-readable storage medium for storing a computer program for distributed consensus on a block chain basis, which, when executed on a computer, performs the steps of the method as described above.
The invention has the following effects:
the block chain-based distributed consensus system provides a consensus framework which can flexibly configure a consensus algorithm and efficiently process transactions, the consensus framework is used as an independent component in a block chain network to perform a consensus process, the condition of large energy consumption does not exist, the consensus process is performed in a cluster mode, multiple service nodes can be supported, single node faults in the consensus process are effectively avoided, and the whole consensus mechanism is ensured to have good fault tolerance. Moreover, the consensus algorithm of each topic block is configured by the management cluster, so that the optimal consensus algorithm can be flexibly configured according to different service scenes, and the method is suitable for diversified service scenes. In addition, each subject block is provided with a plurality of partitions to carry out consensus sequencing on the transaction messages, so that the transaction messages can be subjected to concurrent consensus processing, the method is particularly suitable for high-concurrency service scenes, and the defects of low throughput and low efficiency of the current block chain are overcome.
In addition, the block chain-based distributed consensus method, the block chain-based distributed consensus device and the computer-readable storage medium have the advantages.
In addition to the objects, features and advantages described above, other objects, features and advantages of the present invention are also provided. The present invention will be described in further detail below with reference to the drawings.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this application, are included to provide a further understanding of the invention, and are incorporated in and constitute a part of this specification. In the drawings:
fig. 1 is a schematic diagram of an architecture of a distributed consensus system based on block chains according to a preferred embodiment of the present invention.
Fig. 2 is a schematic flowchart of a distributed consensus method based on block chains according to another embodiment of the present invention.
Detailed Description
The embodiments of the invention will be described in detail below with reference to the accompanying drawings, but the invention can be embodied in many different forms, which are defined and covered by the following description.
As shown in fig. 1, a preferred embodiment of the present invention provides a block chain-based distributed consensus system, including:
the consensus cluster is configured with a plurality of subject blocks and a plurality of data storage servers, a plurality of partitions are configured under each subject block, each subject block is correspondingly configured with one data storage server, the plurality of partitions under the subject blocks are used for performing consensus sequencing on the transaction messages according to a preconfigured consensus algorithm, and the data storage servers are used for storing a transaction message list subjected to consensus sequencing in the plurality of partitions under each subject block;
the message production node is responsible for acquiring the transaction message and sending the acquired transaction message to the consensus cluster in a push mode;
the message consumption node is responsible for acquiring a transaction message list subjected to consensus sequencing from the data storage server to a local server in a pull mode, packaging the transaction message list into blocks, broadcasting the blocks to the full-service providing nodes of the block chain network, verifying other nodes of the block chain network after receiving the blocks, and if the verification is passed, updating local accounts of each node;
and the management cluster is used for registering the message production node and the message consumption node and configuring a consensus algorithm of each theme zone.
It can be understood that in the blockchain network of the present invention, a Full Service Provider (FSP) node is a most basic element of the blockchain network, and not only can participate in maintaining and copy saving a blockchain ledger, but also can configure an intelligent contract for implementing business logic. The FSP nodes are classified into four types, which are Accounting Service Provider (ASP) nodes, verification service provider (CSP) nodes, endorsement Service Provider (ESP) nodes, and Communication Anchor Service Provider (CASP) nodes. The ASP node periodically exchanges information with other nodes, checks whether the data stored in the local account book have missing or expired data, and then updates the local account book data to serve as the latest data; the CSP node is connected to the consensus service and complexly forwards the received block to other nodes; the ESP point is used for simulating the transaction submitted by the client and carrying out endorsement signature according to an endorsement strategy in the intelligent contract, and the common identification service can be obtained only by the transaction with the endorsement signature; the CASP node is used for discovering each other by other nodes in the block chain network and exchanging data.
It will be appreciated that the consensus cluster is made up of a set of servers, which may be divided into topic blocks, partitions and data storage servers by functional division. The common recognition cluster is configured with a plurality of theme blocks and a plurality of data storage servers, a plurality of partitions are configured under each theme block, and each theme block is correspondingly configured with one data storage server for storing message data of the partitions under each theme block. The consensus algorithm of each subject block is configured by the management cluster, so that the optimal consensus algorithm can be flexibly configured according to different service scenes, the consensus efficiency is ensured, and the transverse expansibility of the consensus method is improved. The multiple partitions carry out consensus sequencing on the transaction messages according to a preconfigured consensus algorithm, so that the transaction messages can be subjected to concurrent consensus processing, the method is particularly suitable for high-concurrency service scenes, and the defects of low throughput and low efficiency of the current blockchain are overcome. Moreover, the consensus process is completed by the cluster, multiple service nodes are supported, single node faults in the consensus process are effectively avoided, even if a subject block or a partition fails, other parts in the cluster can still work normally, and the whole consensus mechanism is guaranteed to have good fault tolerance. In addition, the number of the theme blocks in the consensus cluster and the number of the partitions in each theme block are configured by the management cluster, so that flexible adjustment can be conveniently performed according to actual service scenes. The management cluster is also composed of a group of servers and is responsible for registering the message production nodes and the message consumption nodes, configuring the consensus algorithm of each subject area block and configuring a composition framework of the consensus cluster, and load balancing can be performed when system resources are stressed, so that the requirement of a high-concurrency service scene is better met. The management cluster designates some agent nodes from the existing blockchain network as the message production nodes and the message consumption nodes, the message production nodes and the message consumption nodes are mainly responsible for obtaining and sending messages, and the packing blocks, and the message production nodes and the message consumption nodes are used as the common service provider nodes of the blockchain network.
It can be understood that the block chain-based distributed consensus system of this embodiment provides a consensus framework capable of flexibly configuring a consensus algorithm and efficiently processing transactions, and the consensus framework is used as an independent component in a block chain network to perform a consensus process, so that a large amount of energy consumption does not exist, and a cluster manner is adopted to perform the consensus process, so that multiple service nodes can be supported, a single node failure in the consensus process is effectively avoided, and the entire consensus mechanism is ensured to have good fault tolerance. Moreover, the consensus algorithm of each topic block is configured by the management cluster, so that the optimal consensus algorithm can be flexibly configured according to different service scenes, and the method is suitable for diversified service scenes. In addition, each subject block is provided with a plurality of partitions to carry out consensus sequencing on the transaction messages, so that the transaction messages can be subjected to concurrent consensus processing, the method is particularly suitable for high-concurrency service scenes, and the defects of low throughput and low efficiency of the current block chain are overcome.
It can be understood that, as an optimization, the management cluster is further configured to configure a message classification policy of the consensus cluster, and store the message classification policy in a plurality of data storage servers, the message production node obtains the transaction message and pushes the transaction message to the plurality of data storage servers first, each data storage server identifies the transaction message according to the preconfigured message classification policy, the successfully identified data storage server pushes the transaction message to the corresponding subject block, and divides the transaction message into the partition with the smallest transaction number in the subject block, so as to improve the consensus processing efficiency.
The message classification strategy specifically comprises the following steps: each transaction message is attached with a subject type identification code prefix, each subject type identification code prefix corresponds to one subject block, the data storage server judges whether the transaction message belongs to the corresponding subject block or not by identifying the subject type identification code prefix, and if yes, the transaction message is pushed to the corresponding subject block. It can be understood that the correspondence between the subject type identifier prefix and the subject block is configured by the management cluster. By carrying a subject type identification code prefix in the transaction message, the consensus cluster can conveniently perform consensus processing on different types of transaction messages in a targeted manner, on one hand, the consensus efficiency is improved, on the other hand, parallel processing among different consensus algorithms can be accurately performed, and the consensus requirement of complex service scenes can be better met.
It can be understood that the block chain based distributed consensus system of the present invention has at least the following advantages over the existing block chain consensus mechanism:
decoupling the current blockchain technical architecture, and independently forming a blockchain consensus mechanism into one component, so that the optimization of the blockchain consensus mechanism is actually the optimization of the consensus component, and the blockchain technical architecture has better expansibility on the design of the blockchain architecture;
currently, the optimization of the block chain consensus mechanism is mainly to provide a corresponding consensus algorithm for specific services, such as a PoW algorithm and an ethereal DoS algorithm, and the method has the advantages of high development success, long period and low portability. The invention does not optimize the consensus algorithm aiming at a specific service scene, but designs a new consensus framework which can be compatible with various existing consensus algorithms, realizes the pluggable consensus algorithm in the framework and supports the condition that a set of system is suitable for different scenes;
meanwhile, due to the introduction of the partition function, in the consensus framework, even under the same consensus algorithm, the consensus processing can be performed on the transaction data in parallel, so that the operation efficiency of the algorithm is greatly improved, and the beneficial effect on solving the problem that the current block chain technology is difficult to adapt to high-concurrency scenes is generated;
the invention utilizes the characteristics of the computer cluster, adopts the cluster mode to form the consensus cluster and the management cluster of the consensus mechanism, can obviously improve the consensus efficiency of the block chain network, has better fault tolerance and ensures the safety of the consensus process.
In addition, as shown in fig. 2, another embodiment of the present invention further provides a block chain-based distributed consensus method, preferably using the distributed consensus system as described above, including the following:
step S1: registering a message production node and a message consumption node, and configuring a consensus algorithm of each subject area block in a consensus cluster;
step S2: the client submits a transaction proposal, and after the transaction proposal is verified by an endorsement service providing node in the block chain network, a transaction message is sent to a message production node;
and step S3: after receiving the transaction message, the message production node pushes the acquired transaction message to the consensus cluster in a push mode;
and step S4: the partitions in the consensus cluster perform consensus sequencing on the transaction messages according to a configured consensus algorithm, and store a list of the transaction messages subjected to the consensus sequencing into a data storage server;
step S5: the message consumption node acquires a transaction message list subjected to consensus sequencing from a data storage server to a local server in a pull mode;
step S6: and the message consumption node packs the acquired transaction message list after the consensus sequencing into blocks and broadcasts the blocks to the full-service providing nodes of the block chain network, other nodes of the block chain network verify the blocks after receiving the blocks, and if the verification is passed, each node updates the local account book of the node.
It can be understood that the block chain-based distributed consensus method of this embodiment performs consensus processing in a cluster manner, can support multiple service nodes, effectively avoids a single node failure in the consensus process, and ensures that the entire consensus mechanism has good fault tolerance. Moreover, the consensus algorithm of each topic block is configured by the management cluster, so that the optimal consensus algorithm can be flexibly configured according to different service scenes, and the method is suitable for diversified service scenes. In addition, each subject block is provided with a plurality of partitions to carry out consensus sequencing on the transaction messages, so that the transaction messages can be subjected to concurrent consensus processing, the method is particularly suitable for high-concurrency service scenes, and the defects of low throughput and low efficiency of the current block chain are overcome. Moreover, the method is realized based on a consensus framework which can flexibly configure consensus algorithm and efficiently process transactions, the consensus framework is used as an independent component in a block chain network to perform consensus process, the condition of large energy consumption does not exist,
it is understood that, as a preferable mode, the step S1 further includes the following steps:
and configuring a message classification strategy of the consensus cluster.
The message classification strategy specifically comprises the following steps: each transaction message is attached with a subject type identification code prefix, each subject type identification code prefix corresponds to one subject block, the message production node pushes the acquired transaction message to a plurality of data storage servers, each data storage server judges whether the transaction message belongs to the corresponding subject block or not by identifying the subject type identification code prefix, if so, the transaction message is pushed to the corresponding subject block, and the transaction message is divided into the partitions with the minimum transaction number in the subject blocks.
It is understood that in the step S2, the client may initiate multiple transactions simultaneously, so as to submit the transactions to different message production nodes respectively.
It can be understood that, in the step S6, the message consuming node truncates the obtained consensus-sorted transaction message lists according to a maximum quantity rule or a time range rule, and packs at least two transaction message lists formed after truncation into blocks respectively.
In addition, another embodiment of the present invention also provides an apparatus, which includes a processor and a memory, wherein the memory stores a computer program, and the processor is used for executing the steps of the method described above by calling the computer program stored in the memory.
In addition, another embodiment of the present invention further provides a computer-readable storage medium for storing a computer program for distributed consensus based on blockchains, where the computer program performs the steps of the method as described above when the computer program runs on a computer.
The general form of computer readable media includes: floppy disk (floppy disk), flexible disk (flexible disk), hard disk, magnetic tape, any of its magnetic media, CD-ROM, any of the other optical media, punch cards (punch cards), paper tape (paper tape), any of the other physical media with patterns of holes, random Access Memory (RAM), programmable Read Only Memory (PROM), erasable Programmable Read Only Memory (EPROM), FLASH erasable programmable read only memory (FLASH-EPROM), any of the other memory chips or cartridges, or any of the other media from which a computer can read. The instructions may further be transmitted or received by a transmission medium. The term transmission medium may include any tangible or intangible medium that is operable to store, encode, or carry instructions for execution by the machine, and includes digital or analog communications signals or intangible medium that facilitates communication of the instructions. Transmission media include coaxial cables, copper wire and fiber optics, including the wires that comprise a bus for transmitting a computer data signal.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (8)

1. A block chain based distributed consensus system, comprising:
the consensus cluster is configured with a plurality of subject blocks and a plurality of data storage servers, a plurality of partitions are configured under each subject block, each subject block is correspondingly configured with one data storage server, the partitions under the subject blocks are used for performing consensus sequencing on the transaction messages according to a preconfigured consensus algorithm, and the data storage servers are used for storing a transaction message list subjected to consensus sequencing in the partitions under each subject block;
the message production node is responsible for acquiring the transaction message and sending the acquired transaction message to the consensus cluster in a push mode;
the message consumption node is responsible for acquiring a transaction message list subjected to consensus sequencing from the data storage server to a local server in a pull mode, packaging the transaction message list into blocks, broadcasting the blocks to the full-service providing nodes of the block chain network, verifying the blocks after other nodes of the block chain network receive the blocks, and if the verification is passed, updating local accounts of each node;
the management cluster is used for registering the message production nodes and the message consumption nodes and configuring a consensus algorithm of each theme zone;
the management cluster is also used for configuring a message classification strategy of the consensus cluster and storing the strategy in a plurality of data storage servers, after the message production node pushes the acquired transaction message to the plurality of data storage servers, each data storage server identifies the transaction message according to a pre-configured message classification strategy, the successfully-identified data storage server pushes the transaction message to a corresponding subject block, and the transaction message is divided into the partition with the minimum transaction number in the subject block;
each transaction message is attached with a subject type identification code prefix, each subject type identification code prefix corresponds to a subject block, the data storage server judges whether the transaction message belongs to the corresponding subject block or not by identifying the subject type identification code prefix, and if yes, the transaction message is pushed to the corresponding subject block.
2. The blockchain-based distributed consensus system as claimed in claim 1 wherein a number of subject blocks in the consensus cluster and a number of partitions under each subject block are configured by the management cluster.
3. The blockchain-based distributed consensus system as claimed in claim 1, wherein the management cluster designates a portion of proxy nodes in a blockchain network as the message producing nodes and message consuming nodes.
4. A block chain-based distributed consensus method, which adopts the distributed consensus system as claimed in any one of claims 1 to 3, and is characterized by comprising the following steps:
step S1: registering a message production node and a message consumption node, and configuring a consensus algorithm of each subject area block in a consensus cluster;
step S2: the client submits a transaction proposal, and after the transaction proposal is verified by an endorsement service providing node in the block chain network, a transaction message is sent to a message production node;
and step S3: after receiving the transaction message, the message production node pushes the acquired transaction message to the consensus cluster in a push mode;
and step S4: the partitions in the consensus cluster perform consensus sequencing on the transaction messages according to a configured consensus algorithm, and store the transaction message list subjected to the consensus sequencing into a data storage server;
step S5: the message consumption node acquires a transaction message list subjected to consensus sequencing from the data storage server to the local server in a pull mode;
step S6: and the message consumption node packs the acquired transaction message list after the consensus sequencing into blocks and broadcasts the blocks to the full-service providing nodes of the block chain network, other nodes of the block chain network verify the blocks after receiving the blocks, and if the verification is passed, each node updates the local account book of the node.
5. The block chain based distributed consensus method of claim 4,
the step S1 further includes the following steps: configuring a message classification strategy of the consensus cluster;
the message classification strategy specifically comprises: each transaction message is attached with a subject type identification code prefix, each subject type identification code prefix corresponds to a subject block, the message production node pushes the acquired transaction message to a plurality of data storage servers, each data storage server judges whether the transaction message belongs to the corresponding subject block or not by identifying the subject type identification code prefix, if so, the transaction message is pushed to the corresponding subject block, and the transaction message is divided into the partition with the minimum transaction number in the subject block.
6. The block chain based distributed consensus method of claim 5,
and the message consumption node truncates the acquired transaction message lists after consensus sequencing according to a maximum quantity rule or a time range rule, and packs at least two transaction message lists formed after truncation into blocks respectively.
7. An electronic device, characterized in that it comprises a processor and a memory, in which a computer program is stored, and in that the processor is adapted to carry out the steps of the method according to any one of claims 4 to 6 by calling the computer program stored in the memory.
8. A computer-readable storage medium for storing a computer program for block chain based distributed consensus, wherein the computer program when running on a computer performs the steps of the method according to any one of claims 4 to 6.
CN202110562108.XA 2021-05-24 2021-05-24 Block chain-based distributed consensus system, method, device and storage medium Active CN113347164B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110562108.XA CN113347164B (en) 2021-05-24 2021-05-24 Block chain-based distributed consensus system, method, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110562108.XA CN113347164B (en) 2021-05-24 2021-05-24 Block chain-based distributed consensus system, method, device and storage medium

Publications (2)

Publication Number Publication Date
CN113347164A CN113347164A (en) 2021-09-03
CN113347164B true CN113347164B (en) 2022-11-04

Family

ID=77470884

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110562108.XA Active CN113347164B (en) 2021-05-24 2021-05-24 Block chain-based distributed consensus system, method, device and storage medium

Country Status (1)

Country Link
CN (1) CN113347164B (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113821564B (en) * 2021-09-09 2023-08-18 湖南大学 Heterogeneous parallel blockchain and method for coordinating on-chain data and under-chain contracts thereof
CN114118693B (en) * 2021-10-21 2024-01-23 国网浙江省电力有限公司金华供电公司 Intelligent power outage management and control method and device based on block chain consensus algorithm
CN113689247B (en) * 2021-10-27 2022-02-15 冰联(广州)网络科技有限公司 Block chain electronic ticket marking method and system based on information flow parallel connection
CN114553690A (en) * 2022-02-08 2022-05-27 南京第三极区块链科技有限公司 Block chain-based distributed configuration management system and use method thereof
CN114448900B (en) * 2022-04-02 2022-08-02 南京邮电大学 SDN controller interaction method and system based on extended raft algorithm
CN115051924B (en) * 2022-06-08 2023-11-21 上海佰贝网络工程技术有限公司 Communication mode coordination method, device, equipment, system and medium in Gossip algorithm based on data broadcasting
CN117633102A (en) * 2022-08-19 2024-03-01 顺丰科技有限公司 Block chain data integration method, device, computer equipment and storage medium
CN116938951B (en) * 2023-09-18 2024-02-13 哈尔滨工业大学(深圳)(哈尔滨工业大学深圳科技创新研究院) Block chain consensus method and system, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107276765A (en) * 2017-07-04 2017-10-20 中国联合网络通信集团有限公司 The processing method and processing device known together in block chain
CN108769150A (en) * 2018-05-14 2018-11-06 百度在线网络技术(北京)有限公司 Data processing method, device, clustered node and the storage medium of block chain network
WO2020005328A2 (en) * 2018-02-09 2020-01-02 Orbs Ltd. Decentralized application platform for private key management
CN111861477A (en) * 2020-08-06 2020-10-30 深圳壹账通智能科技有限公司 Block chain-based post-transaction data processing method and device and computer equipment

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109067810A (en) * 2018-10-22 2018-12-21 中链科技有限公司 A kind of distributed message guard method and protective device based on block chain
CN109474597A (en) * 2018-11-19 2019-03-15 中链科技有限公司 A kind of distributed message based on block chain sends and receives method and device
US11777712B2 (en) * 2019-03-22 2023-10-03 International Business Machines Corporation Information management in a database
US11323243B2 (en) * 2019-04-05 2022-05-03 International Business Machines Corporation Zero-knowledge proof for blockchain endorsement
CN110113381B (en) * 2019-04-09 2023-04-07 深圳前海微众银行股份有限公司 Method and device for subscribing theme in block chain
CN111738853A (en) * 2020-06-19 2020-10-02 清华大学 Transaction optimization method and device based on block chain distributed system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107276765A (en) * 2017-07-04 2017-10-20 中国联合网络通信集团有限公司 The processing method and processing device known together in block chain
WO2020005328A2 (en) * 2018-02-09 2020-01-02 Orbs Ltd. Decentralized application platform for private key management
CN108769150A (en) * 2018-05-14 2018-11-06 百度在线网络技术(北京)有限公司 Data processing method, device, clustered node and the storage medium of block chain network
CN111861477A (en) * 2020-08-06 2020-10-30 深圳壹账通智能科技有限公司 Block chain-based post-transaction data processing method and device and computer equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
A Survey of Distributed Consensus Protocols for Blockchain Networks;Yang Xiao et al.;《COMST》;20200128;全文 *

Also Published As

Publication number Publication date
CN113347164A (en) 2021-09-03

Similar Documents

Publication Publication Date Title
CN113347164B (en) Block chain-based distributed consensus system, method, device and storage medium
US20180308091A1 (en) Fairness preserving byzantine agreements
CN111612455A (en) Power consumption information protection-oriented Byzantine fault-tolerant alliance chain consensus method, system and storage medium
CN110784346A (en) Reputation value-based PBFT consensus system and method
US20190259024A1 (en) Security electronic file processing system and method based on block chain structure
CN111314067B (en) Block storage method and device, computer equipment and storage medium
CN110741573B (en) Method and system for selectively propagating transactions using network coding in a blockchain network
CN112073269B (en) Block chain network testing method, device, server and storage medium
CN111698315B (en) Data processing method and device for block and computer equipment
CN112532396A (en) Optimized Byzantine fault-tolerant method based on aggregated signature and storage medium
CN110581887B (en) Data processing method, device, block chain node and storage medium
Wang et al. Beh-Raft-Chain: a behavior-based fast blockchain protocol for complex networks
CN110705893B (en) Service node management method, device, equipment and storage medium
CN113657900A (en) Cross-chain transaction verification method and system and cross-chain transaction system
CN114218612A (en) Consensus method suitable for high-frequency trading scene of alliance chain
CN113645278B (en) Cross-chain message transmission method, device and storage medium of block chain
CN114745140A (en) Urban planning field block chain consensus verification method and system based on aggregation encryption
Zhang et al. EB-BFT: An elastic batched BFT consensus protocol in blockchain
CN114610504A (en) Message processing method and device, electronic equipment and storage medium
CN112446786A (en) Abnormal transaction processing method and device, electronic equipment and readable storage medium
CN112995167A (en) Kafka mechanism-based power utilization information acquisition method, block chain network and user side
CN117370460A (en) Block chain storage optimization method and device based on double-chain storage
CN102761520B (en) Method and system for processing authentication information
CN111951112A (en) Intelligent contract execution method based on block chain, terminal equipment and storage medium
WO2023040453A1 (en) Transaction information processing method and apparatus

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
GR01 Patent grant
GR01 Patent grant