CN109218408B - Method, medium, computer device and blockchain system for implementing consensus mechanism of blockchain system - Google Patents

Method, medium, computer device and blockchain system for implementing consensus mechanism of blockchain system Download PDF

Info

Publication number
CN109218408B
CN109218408B CN201810932257.9A CN201810932257A CN109218408B CN 109218408 B CN109218408 B CN 109218408B CN 201810932257 A CN201810932257 A CN 201810932257A CN 109218408 B CN109218408 B CN 109218408B
Authority
CN
China
Prior art keywords
node
question
blockchain system
block
information
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
CN201810932257.9A
Other languages
Chinese (zh)
Other versions
CN109218408A (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.)
Ke'an (Xiamen) Technology Co.,Ltd.
Original Assignee
Tailian Xiamen 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 Tailian Xiamen Technology Co ltd filed Critical Tailian Xiamen Technology Co ltd
Priority to CN201810932257.9A priority Critical patent/CN109218408B/en
Publication of CN109218408A publication Critical patent/CN109218408A/en
Application granted granted Critical
Publication of CN109218408B publication Critical patent/CN109218408B/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
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09BEDUCATIONAL OR DEMONSTRATION APPLIANCES; APPLIANCES FOR TEACHING, OR COMMUNICATING WITH, THE BLIND, DEAF OR MUTE; MODELS; PLANETARIA; GLOBES; MAPS; DIAGRAMS
    • G09B7/00Electrically-operated teaching apparatus or devices working with questions and answers
    • G09B7/02Electrically-operated teaching apparatus or devices working with questions and answers of the type wherein the student is expected to construct an answer to the question which is presented or wherein the machine gives an answer to the question presented by a student
    • 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
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Theoretical Computer Science (AREA)
  • Computing Systems (AREA)
  • Business, Economics & Management (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Hardware Design (AREA)
  • Physics & Mathematics (AREA)
  • Educational Administration (AREA)
  • Educational Technology (AREA)
  • General Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Machine Translation (AREA)

Abstract

The invention discloses a block chain system consensus mechanism realization method, a medium, computer equipment and a block chain system, wherein the method comprises the following steps: when the current block is produced, if the block chain system is in a dpss question bank collection mode, receiving question information and storing the question information into a question bank queue; the method comprises the steps that M items of information are obtained, and the M items of information are numbered; generating a random sequence, intercepting C random numbers from the random sequence, and taking the C random numbers as indexes to obtain a C-channel topic from M topic information; publishing questions, receiving answers to obtain the answer accuracy and answer time of each node participating in answering, and generating a node priority sequence with block production permission; therefore, the node priority order of the block production permission is determined by combining the dps common recognition mechanism and the pow common recognition mechanism, a large amount of meaningless calculation for the block production permission of the nodes in the block chain system is avoided, and a large amount of resource waste caused by block production permission distribution is prevented.

Description

Method, medium, computer device and blockchain system for implementing consensus mechanism of blockchain system
Technical Field
The present invention relates to the field of blockchain technologies, and in particular, to a block chain system consensus mechanism implementation method, medium, computer device, and blockchain system.
Background
Blockchains are a solution for maintaining a reliable database in a decentralized distrust manner, and are widely used due to the characteristics of decentralized and distrust and difficulty in data manipulation.
In the existing blockchain system, there are various ways of generating node accounting rights, for example, a POW workload certification mechanism, a DPOS share authorization certification mechanism, and the like, and in the process of using the POW workload certification mechanism, a large amount of meaningless calculations are required for nodes in the blockchain system to strive for the node accounting rights, so that although the application range of the POW workload certification mechanism is wide, a large amount of resources are easily wasted.
Disclosure of Invention
The present invention is directed to solving, at least to some extent, one of the technical problems in the art described above. Therefore, an object of the present invention is to provide a method for implementing a consensus mechanism in a blockchain system, which can determine a node priority of a blockchain production right by combining a dpss consensus mechanism and a pow consensus mechanism, thereby avoiding performing a large amount of meaningless calculations for contending for the blockchain production right by nodes in the blockchain system, and preventing a large amount of resource waste caused by the allocation of the blockchain production right.
A second object of the invention is to propose a computer-readable storage medium.
A third object of the invention is to propose a computer device.
A fourth objective of the present invention is to provide a block chain system.
To achieve the above object, an embodiment of a first aspect of the present invention provides a method for implementing a consensus mechanism of a blockchain system, including the following steps: when a node with production authority in a block chain system produces a current block, if the block chain system is in a dpss question bank collection mode, receiving question information sent by each node in the block chain system, and storing the received question information into a question bank queue; obtaining M items of information by inquiring the item bank queue, and numbering the M items of information, wherein M is an integer greater than 1; generating a random sequence according to the number of 1 to M, intercepting C random numbers from the random sequence, and acquiring C titles from the M title information by taking the C random numbers as indexes, wherein C is a positive integer less than or equal to M; publishing the C-channel question so that any one node in the block chain system participates in answering and deleting the C-channel question from the question bank queue; receiving answers sent by the nodes participating in answering to obtain the answering accuracy and answering time of each node participating in answering, and obtaining the node priority sequence with block production permission according to the answering accuracy and answering time.
According to the method for realizing the consensus mechanism of the block chain system, firstly, when a node with production authority in the block chain system produces a current block, if the block chain system is in a dpss question bank collection mode, receiving question information sent by each node in the block chain system, and storing the received question information into a question bank queue; then, obtaining M items of information by querying the item bank queue, and numbering the M items of information, wherein M is an integer greater than 1; then, generating a random sequence according to the number from 1 to M, intercepting C random numbers from the random sequence, and obtaining C titles from M title information by taking the C random numbers as indexes, wherein C is a positive integer less than or equal to M; then, publishing the C-channel questions so that any one node in the block chain system participates in answering, and deleting the C-channel questions from the question bank queue; then, receiving answers sent by the nodes participating in answering to obtain the answering accuracy and answering time of each node participating in answering, and obtaining the node priority sequence with block production permission according to the answering accuracy and answering time; therefore, the node priority order of the block production permission is determined by combining the dps common recognition mechanism and the pow common recognition mechanism, a large amount of meaningless calculation for the block production permission of the nodes in the block chain system is avoided, and a large amount of resource waste caused by block production permission distribution is prevented.
In addition, the method for implementing the consensus mechanism of the blockchain system according to the above embodiment of the present invention may further have the following additional technical features:
optionally, when the block chain system is not in a dpss question bank collecting mode, detecting whether the number of questions in the question bank queue meets a preset condition, and controlling the block chain system to start the dpss question bank collecting mode when the number of questions in the question bank queue does not meet the preset condition.
Optionally, when the blockchain system is in a dpss topic library gathering mode, the number of topics sent by each node in the blockchain system is limited.
Optionally, the topic information includes a judgment topic and an answer.
Optionally, before each tile is produced, if the node with the highest priority is disconnected and continues for a preset time, the node with the next highest priority acquires the tile production authority, and so on.
Optionally, when the current block does not have the corresponding node priority order having the block production authority, the node having the block production authority is obtained according to the node priority order having the block production authority corresponding to the previous block.
Optionally, when there are nodes with the same answer accuracy, the priority of the node with the earlier answer time is high.
In order to achieve the above object, a second aspect of the present invention provides a computer-readable storage medium, on which a consensus mechanism implementation program of a blockchain system is stored, where the consensus mechanism implementation program of the blockchain system implements the above method for implementing the consensus mechanism of the blockchain system when executed by a processor.
In order to achieve the above object, a third embodiment of the present invention provides a computer device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor executes the computer program to implement the method for implementing the consensus mechanism of the block chain system.
In order to achieve the above object, a fourth aspect of the present invention provides a blockchain system, which includes a plurality of nodes, each node includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the implementing method of the consensus mechanism of the blockchain system is implemented.
Drawings
Fig. 1 is a flowchart illustrating a method for implementing a consensus mechanism of a blockchain system according to an embodiment of the present invention.
Detailed Description
Reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the drawings are illustrative and intended to be illustrative of the invention and are not to be construed as limiting the invention.
In the existing blockchain system, in the process of using the POW workload proving mechanism, a large amount of meaningless calculation needs to be performed on nodes in the blockchain system to strive for node accounting rights, so that although the POW workload proving mechanism has a wide application range, a large amount of resource waste is easily caused; the embodiment of the invention provides a method for realizing a consensus mechanism of a block chain system, which comprises the following steps that firstly, when a node with production authority in the block chain system produces a current block, if the block chain system is in a dps (dpos) question bank collection mode, question information sent by each node in the block chain system is received, and the received question information is stored in a question bank queue; then, obtaining M items of information by querying the item bank queue, and numbering the M items of information, wherein M is an integer greater than 1; then, generating a random sequence according to the number from 1 to M, intercepting C random numbers from the random sequence, and obtaining C titles from M title information by taking the C random numbers as indexes, wherein C is a positive integer less than or equal to M; then, publishing the C-channel questions so that any one node in the block chain system participates in answering, and deleting the C-channel questions from the question bank queue; then, receiving answers sent by the nodes participating in answering to obtain the answering accuracy and answering time of each node participating in answering, and obtaining the node priority sequence with block production permission according to the answering accuracy and answering time; therefore, the node priority order of the block production permission is determined by combining the dps common recognition mechanism and the pow common recognition mechanism, a large amount of meaningless calculation for the block production permission of the nodes in the block chain system is avoided, and a large amount of resource waste caused by block production permission distribution is prevented.
In order to better understand the above technical solutions, exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the invention are shown in the drawings, it should be understood that the invention can be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art.
In order to better understand the technical solution, the technical solution will be described in detail with reference to the drawings and the specific embodiments.
Fig. 1 is a flowchart illustrating a method for implementing a consensus mechanism of a blockchain system according to an embodiment of the present invention, where as shown in fig. 1, the method for implementing the consensus mechanism of the blockchain system includes the following steps:
s101, when a node with production authority in a block chain system produces a current block, if the block chain system is in a dpss question bank collection mode, receiving question information sent by each node in the block chain system, and storing the received question information into a question bank queue.
That is, when a node having a production right in the blockchain system performs block production, it is determined whether the blockchain system is in a dpss question bank collection mode, and if so, the topic information sent by each node in the blockchain system is received, and the received topic information is stored in the question bank queue.
There are various ways to determine whether the block chain system is in the dpss question bank gathering mode.
As an example, the question bank collection identifier is configured for the question bank of the blockchain system, and is set to 1 when the question bank of the blockchain system is in the dpss question bank collection mode, and is set to 0 when the question bank of the blockchain system is not in the dpss question bank collection mode, so that the node in the blockchain system having the production right judges the current state of the question bank of the blockchain system by looking up the question bank collection identifier.
As an example, when the blockchain system is in a dpss topic library gathering mode, the number of topics sent by each node in the blockchain system is limited.
That is, if the current question bank of the blockchain system is in the dpss question bank collection mode, the number of questions sent by each node in the blockchain system is limited, so that the storage load of the blockchain system question bank can be further reduced under the condition that the number of questions in the blockchain system question bank is sufficient.
As an example, when the blockchain system is not in the dpss question bank gathering mode, it is detected whether the number of questions in the question bank queue meets a preset condition, and when the number of questions in the question bank queue does not meet the preset condition, the blockchain system is controlled to start the dpss question bank gathering mode.
That is, when the block chain system is not in the dpss question bank collecting mode, the number of questions in the question bank queue is further detected, whether the number of questions in the question bank queue meets a preset condition is determined, and when the determination result is negative, the block chain system is controlled to start the dpss question bank collecting mode.
The method includes the following steps that a plurality of question quantity conditions are preset, for example, when the number of questions required for answering every time is N, whether the number of questions in a current question bank queue is smaller than 2N is judged, if the number of questions in the current question bank queue is smaller than 2N, it is judged that the number of questions in the question bank queue does not meet the preset conditions, and a dpss question bank collection mode is started; or setting a preset number of questions condition according to the total number N of the questions allowed to be stored in the question bank, judging whether the number of the questions in the current question bank queue is smaller than N/2, if the number of the questions in the current question bank queue is smaller than N/2, judging that the number of the questions in the question bank queue does not meet the preset condition, and starting a dpss question bank collection mode.
It should be noted that the topic information includes, but is not limited to, judgment topics and answers.
As an example, specifically, taking the setting of an actual topic as an example, first, the format of the specified topic information is: judging the question + answer (1 in the answer indicates correct, and 0 indicates wrong); all nodes in the blockchain may then send topic information, e.g., set the topic to: since the 9 th century, the answer was set to: 0.
it should be noted that the format of the title information can also be set as follows: and judging the question + answer + dpos question bank sending identifier, and adding the dpos question bank sending identifier into the question to be sent so as to facilitate the block chain system to judge the information category by sending the identifier through the dpos question bank.
S102, M items of subject information are obtained by inquiring the subject database queue, and the M items of subject information are numbered, wherein M is an integer larger than 1.
That is, the question bank of the block chain system is queried to obtain M pieces of question information, and the M pieces of question information are numbered, so that each piece of question information has a unique number corresponding to the question information; wherein M is an integer greater than 1.
As an example, a block chain system question bank queue is queried, a preset number M of question information are randomly obtained, and the M question information are numbered, so that each question information has a unique number corresponding to the question information.
As another example, the search is performed on the search result to obtain a total number M of topics in the search result queue, and the number of the M topics is numbered.
S103, generating a random sequence according to the number from 1 to M, intercepting C random numbers from the random sequence, and obtaining C titles from M title information by taking the C random numbers as indexes, wherein C is a positive integer less than or equal to M.
That is, according to the number M of titles in the tile chain system title library, randomly generating a sequence of 1 to M, intercepting C random numbers from the generated random sequence, and obtaining C titles from M title information with the C random numbers as an index, where C is a positive integer less than or equal to M.
As an example, when M is 5 and C is 3, first, a random sequence of 1 to 5 is generated (for example, the random sequence may be 3.1.2.4.5), then, 3 random numbers are truncated according to the generated random sequence, it should be noted that truncation of the random numbers may be performed according to a preset condition (for example, the first C random numbers in the truncated random sequence are preset, or the last C random numbers in the truncated random sequence are preset), if the preset condition is to truncate each first C random number in the random sequence, the truncated random number is (3.1.2), and then, 3 titles are obtained from 5 title information according to the truncated random number (3.1.2) as an index.
S104, publishing the C-channel questions so that any node in the block chain system participates in answering, and deleting the C-channel questions from the question bank queue.
That is to say, the intercepted C-channel questions are published in the block chain system, so that all nodes in the block chain can acquire the questions and participate in answering the questions, and the C-channel questions are deleted from the question bank queue, so as to prevent multiple uses of the same question and ensure the fairness of block production permission generation.
As an example, according to the intercepted random number, acquiring a C-channel question from M question information, removing answer information from the acquired C-channel question, and adding the C-channel question from which the answer information is removed to a block chain system public variable area, so that all nodes in the block chain acquire the C-channel question from which the answer information is taken out, and perform answering; then, according to the random number, deleting the C-channel title in the block chain system queue, and writing the C-channel title into the block.
And S105, receiving answers sent by the nodes participating in answering to obtain the answering accuracy and answering time of each node participating in answering, and obtaining the node priority sequence with the block production permission according to the answering accuracy and answering time.
That is, after the intercepted C-channel question is published in the blockchain system, the answer sent by the node participating in answering is received, the answer accuracy and the answer time corresponding to the answer sent by the node participating in answering are calculated according to the answer sent by the node participating in answering, and the node priority order having the block production authority is obtained according to the answer accuracy and the answer time.
The method for obtaining the node priority order with the block production authority according to the answer accuracy and the answer time includes various ways, for example, calculating an answer accuracy score according to a preset answer accuracy corresponding weighted value, calculating an answer time score according to a preset answer time weighted value, further calculating a total score corresponding to the current answer of the node participating in the answer according to the answer accuracy score and the answer time score, and generating the node priority order with the block production authority according to the total score.
As an example, first, the priority order of the nodes having the block production authority is determined according to the answer accuracy of the answers submitted by the nodes participating in the answer, and when there are nodes having the same answer accuracy, the priority order of the node having the earlier answer time is determined to be higher.
It should be noted that after the node priority order of the owned block production right is obtained according to the answer accuracy and the answer time, there are various ways to assign the block production right according to the node priority order of the owned block production right.
As an example, when the current block does not have the corresponding priority of the node having the block production authority, the node having the block production authority is obtained according to the priority of the node having the block production authority corresponding to the previous block.
That is, when the current block has no corresponding node priority sequence of ownership of block production authority, the node of ownership of block production authority is obtained according to the node priority sequence of ownership of block production authority corresponding to the previous block, so as to prevent block production from being unable to continue when the node priority sequence of block production authority is not generated; for example, after the created block is created by the created node, when the priority of the node having the block production right corresponding to the second block is not generated, the node having the block production right is obtained according to the priority of the node having the block production right corresponding to the created block.
As another example, first, the priority order of the nodes having the block production authority is preset by the configuration file to generate a production authority priority order table, and the priority order of the nodes having the block production authority is obtained according to the answer accuracy and the answer time, and the obtained priority order of the nodes having the block production authority is added to the production authority priority order table to determine the priority order of the nodes corresponding to the subsequent block production.
As another example, when a block chain is established, a production node corresponding to an established block is preset as an initial node, when the block has no corresponding node priority order with block production authority, the initial node produces the block, and when the number of nodes in the block chain reaches a preset number, a dps question bank collecting mode is started, and question information sent by each node in the block chain system is received; storing the question information into a question bank queue, and acquiring the question according to a preset rule; then, publishing the acquired questions in a block chain system so as to answer all nodes in the block chain; receiving answers sent by all nodes in the block chain, and determining the priority sequence of the nodes with the block production permission according to the answer accuracy and answer time corresponding to each node; and generating a production authority priority sequence table according to the priority sequence of the node with the block production authority so as to determine the priority sequence of the block production node corresponding to the block production according to the production authority priority sequence table.
It should be noted that, before each block is produced, if the node with the highest priority is disconnected and continues for a preset time, the node with the next highest priority acquires the block production authority, and so on.
That is, according to the priority of the nodes having the block production authority, if the node with the highest priority is disconnected due to a network reason or a fault reason and the state lasts for a preset time, determining that the node with the second highest priority acquires the block production authority, and so on to ensure the normal production of the block.
In summary, according to the method for implementing the consensus mechanism of the block chain system in the embodiment of the present invention, first, when a node having a production right in the block chain system produces a current block, if the block chain system is in a dps question bank collecting mode, the topic information sent by each node in the block chain system is received, and the received topic information is stored in the question bank queue; then, obtaining M items of information by querying the item bank queue, and numbering the M items of information, wherein M is an integer greater than 1; then, generating a random sequence according to the number from 1 to M, intercepting C random numbers from the random sequence, and obtaining C titles from M title information by taking the C random numbers as indexes, wherein C is a positive integer less than or equal to M; then, publishing the C-channel questions so that any one node in the block chain system participates in answering, and deleting the C-channel questions from the question bank queue; then, receiving answers sent by the nodes participating in answering to obtain the answering accuracy and answering time of each node participating in answering, and obtaining the node priority sequence with block production permission according to the answering accuracy and answering time; therefore, the node priority order of the block production permission is determined by combining the dps common recognition mechanism and the pow common recognition mechanism, a large amount of meaningless calculation for the block production permission of the nodes in the block chain system is avoided, and a large amount of resource waste caused by block production permission distribution is prevented.
In order to implement the foregoing embodiments, a second aspect of the present invention provides a computer-readable storage medium, on which a consensus mechanism implementation program of a blockchain system is stored, where the consensus mechanism implementation program of the blockchain system implements the consensus mechanism implementation method of the blockchain system when being executed by a processor.
In order to implement the foregoing embodiments, an embodiment of three aspects of the present invention provides a computer device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the implementing method of the consensus mechanism of the block chain system is implemented.
In order to implement the foregoing embodiment, a fourth aspect of the present invention provides a blockchain system, which includes a plurality of nodes, each node includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the implementing method of the consensus mechanism of the blockchain system is implemented.
It should be noted that the above description of the method for implementing the consensus mechanism of the blockchain system in fig. 1 is also applicable to the computer-readable storage medium, the computer device and the blockchain system, and therefore, the detailed description thereof is omitted here.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It should be noted that in the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.
In the description of the present invention, it is to be understood that the terms "first", "second" and the like are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implying any number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of the present invention, "a plurality" means two or more unless specifically defined otherwise.
In the present invention, unless otherwise expressly stated or limited, the terms "mounted," "connected," "secured," and the like are to be construed broadly and can, for example, be fixedly connected, detachably connected, or integrally formed; can be mechanically or electrically connected; either directly or indirectly through intervening media, either internally or in any other relationship. The specific meanings of the above terms in the present invention can be understood by those skilled in the art according to specific situations.
In the present invention, unless otherwise expressly stated or limited, the first feature "on" or "under" the second feature may be directly contacting the first and second features or indirectly contacting the first and second features through an intermediate. Also, a first feature "on," "over," and "above" a second feature may be directly or diagonally above the second feature, or may simply indicate that the first feature is at a higher level than the second feature. A first feature being "under," "below," and "beneath" a second feature may be directly under or obliquely under the first feature, or may simply mean that the first feature is at a lesser elevation than the second feature.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above should not be understood to necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention, and that variations, modifications, substitutions and alterations can be made to the above embodiments by those of ordinary skill in the art within the scope of the present invention.

Claims (10)

1. A method for implementing a consensus mechanism of a block chain system is characterized by comprising the following steps:
when a node with production authority in a block chain system produces a current block, if the block chain system is in a dpss question bank collection mode, receiving question information sent by each node in the block chain system, and storing the received question information into a question bank queue;
obtaining M items of information by inquiring the item bank queue, and numbering the M items of information, wherein M is an integer greater than 1;
generating a random sequence according to the number of 1 to M, intercepting C random numbers from the random sequence, and acquiring C titles from the M title information by taking the C random numbers as indexes, wherein C is a positive integer less than or equal to M;
publishing the C-channel question so that any one node in the block chain system participates in answering and deleting the C-channel question from the question bank queue;
receiving answers sent by the nodes participating in answering to obtain the answering accuracy and answering time of each node participating in answering, and obtaining the node priority sequence with block production permission according to the answering accuracy and answering time.
2. The method of claim 1, wherein when the blockchain system is not in a dpss question bank gathering mode, detecting whether the number of questions in the question bank queue meets a predetermined condition, and controlling the blockchain system to start the dpss question bank gathering mode when the number of questions in the question bank queue does not meet the predetermined condition.
3. The method of claim 1, wherein the number of topics sent by each node in the blockchain system is limited when the blockchain system is in a dpss topic pool collection mode.
4. The method for implementing a consensus mechanism in a blockchain system as claimed in any one of claims 1-3, wherein said topic information comprises a judgment topic and an answer.
5. The method of claim 1, wherein before each tile is produced, if a highest priority node is dropped and lasts for a predetermined time, a next highest priority node acquires tile production authority, and so on.
6. The method of claim 1, wherein when the current chunk has no corresponding priority of nodes having chunk production permissions, the method further comprises obtaining the nodes having chunk production permissions according to the priority of the nodes having chunk production permissions corresponding to a previous chunk.
7. The method of claim 1, wherein when there are nodes with the same answer accuracy, the priority of the node with the earlier answer time is higher.
8. A computer-readable storage medium, having stored thereon a consensus mechanism implementation program of a blockchain system, the consensus mechanism implementation program of the blockchain system implementing a method of implementing a consensus mechanism of a blockchain system as claimed in any one of claims 1 to 7 when executed by a processor.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method for implementing the consensus mechanism for a blockchain system as claimed in any one of claims 1 to 7 when executing the computer program.
10. A blockchain system comprising a plurality of nodes, each node comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor, when executing the computer program, implements a method for implementing a consensus mechanism for a blockchain system as claimed in any one of claims 1 to 7.
CN201810932257.9A 2018-08-16 2018-08-16 Method, medium, computer device and blockchain system for implementing consensus mechanism of blockchain system Active CN109218408B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810932257.9A CN109218408B (en) 2018-08-16 2018-08-16 Method, medium, computer device and blockchain system for implementing consensus mechanism of blockchain system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810932257.9A CN109218408B (en) 2018-08-16 2018-08-16 Method, medium, computer device and blockchain system for implementing consensus mechanism of blockchain system

Publications (2)

Publication Number Publication Date
CN109218408A CN109218408A (en) 2019-01-15
CN109218408B true CN109218408B (en) 2020-12-15

Family

ID=64988889

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810932257.9A Active CN109218408B (en) 2018-08-16 2018-08-16 Method, medium, computer device and blockchain system for implementing consensus mechanism of blockchain system

Country Status (1)

Country Link
CN (1) CN109218408B (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109918044B (en) * 2019-02-26 2021-03-30 太原理工大学 Block chain technology-based drawing/sorting method
CN109948799B (en) * 2019-04-03 2023-12-08 陕西医链区块链集团有限公司 Dynamic random forest consensus mechanism of block chain
CN110096523B (en) * 2019-05-16 2021-07-02 广州方硅信息技术有限公司 Method and equipment for generating unordered question queue
CN110688410B (en) * 2019-09-23 2021-03-19 创新先进技术有限公司 Suggestion processing method and device based on block chain and electronic equipment
CN111259298B (en) * 2020-01-16 2023-06-27 深圳市华海同创科技有限公司 Topic generation method based on block chain, node server and storage medium
CN111464542B (en) * 2020-04-01 2022-07-12 中国联合网络通信集团有限公司 Accounting method and device for block chain network
CN111510484B (en) * 2020-04-10 2023-07-04 金蝶软件(中国)有限公司 Block chain processing method, system, device, computer equipment and storage medium
CN111681145B (en) * 2020-06-12 2023-04-28 常州工业职业技术学院 Open and rapid question bank construction and use method

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104239050A (en) * 2014-09-10 2014-12-24 中国科学技术大学 Method and system for ranking users in online program evaluation system
CN104268084A (en) * 2014-10-23 2015-01-07 中国科学技术大学 User ranking method and system for online program evaluation system
CN106603698A (en) * 2016-12-28 2017-04-26 北京果仁宝科技有限公司 Block chain consensus method based on DPOS and nodes
CN107273760A (en) * 2017-06-09 2017-10-20 济南浪潮高新科技投资发展有限公司 One kind is based on many CA application authentication methods of block chain
CN107424066A (en) * 2017-07-19 2017-12-01 武汉凤链科技有限公司 A kind of method and its system of mechanism of being built a consensus based on the magnitude of value
CN107943853A (en) * 2017-11-06 2018-04-20 浙江三米教育科技有限公司 Knowledge node selects test method and its institute's computation machine equipment and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11488147B2 (en) * 2015-07-14 2022-11-01 Fmr Llc Computationally efficient transfer processing and auditing apparatuses, methods and systems

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104239050A (en) * 2014-09-10 2014-12-24 中国科学技术大学 Method and system for ranking users in online program evaluation system
CN104268084A (en) * 2014-10-23 2015-01-07 中国科学技术大学 User ranking method and system for online program evaluation system
CN106603698A (en) * 2016-12-28 2017-04-26 北京果仁宝科技有限公司 Block chain consensus method based on DPOS and nodes
CN107273760A (en) * 2017-06-09 2017-10-20 济南浪潮高新科技投资发展有限公司 One kind is based on many CA application authentication methods of block chain
CN107424066A (en) * 2017-07-19 2017-12-01 武汉凤链科技有限公司 A kind of method and its system of mechanism of being built a consensus based on the magnitude of value
CN107943853A (en) * 2017-11-06 2018-04-20 浙江三米教育科技有限公司 Knowledge node selects test method and its institute's computation machine equipment and storage medium

Also Published As

Publication number Publication date
CN109218408A (en) 2019-01-15

Similar Documents

Publication Publication Date Title
CN109218408B (en) Method, medium, computer device and blockchain system for implementing consensus mechanism of blockchain system
Hegeman et al. Toward optimal bounds in the congested clique: Graph connectivity and MST
CN107404541B (en) Method and system for selecting neighbor node in peer-to-peer network transmission
WO2022134471A1 (en) Blockchain node management method and apparatus, computer device, and storage medium
US20160267501A1 (en) Calculation method and apparatus for user retention ratio
CN105138371B (en) Method for upgrading software and device
CN108924252B (en) Method, medium, and blockchain system for reducing storage load of nodes in blockchain system
CN106034112B (en) Access control, strategy acquisition, attribute acquisition methods and relevant apparatus
CN107360082B (en) Publishing/subscribing method and device
CN111935207A (en) Block chain system consensus method based on improved C4.5 algorithm
CN110245792A (en) A kind of network public opinion prediction method, device, terminal and storage medium
CA3030250A1 (en) File storage method and apparatus for blockchain network
CN114356558A (en) Capacity reduction processing method and device based on cluster
CN112615905A (en) Method, device and equipment for scheduling block chain fragments and storage medium
CN110493323B (en) Block chain-based fairness file distribution method, system and storage medium
CN109254913A (en) Collaborative share method, apparatus, electronic equipment and computer storage medium
CN109309708B (en) Method, medium, apparatus and system for increasing block production speed in block chain system
TW201251376A (en) Method and device for distribution of nodes, and computer program products thereof
CN108173899B (en) Information processing method and device of block chain
CN108429642A (en) A kind of Topology identification method, system, equipment and computer storage media
CN109327349B (en) Method, medium, device and system for limiting block chain account during creation
CN108664322A (en) Data processing method and system
CN116980281A (en) Node selection method, node selection device, first node, storage medium and program product
CN109409899A (en) A kind of transaction verification method, apparatus and system
CN110517009B (en) Real-time public layer construction method and device and server

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
CP03 Change of name, title or address

Address after: 361000 B1F-065, Zone A, Huaxun Building, Software Park, Xiamen Torch Hi-tech Zone, Huli District, Xiamen City, Fujian Province

Patentee after: Ke'an (Xiamen) Technology Co.,Ltd.

Address before: B1f-065, zone a, Huaxun building, software park, torch hi tech Zone, Xiamen City, Fujian Province, 361000

Patentee before: TAILIAN (XIAMEN) TECHNOLOGY Co.,Ltd.

CP03 Change of name, title or address