CN115760388B - Block chain-based consensus method, device, equipment and storage medium - Google Patents

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

Info

Publication number
CN115760388B
CN115760388B CN202211386645.4A CN202211386645A CN115760388B CN 115760388 B CN115760388 B CN 115760388B CN 202211386645 A CN202211386645 A CN 202211386645A CN 115760388 B CN115760388 B CN 115760388B
Authority
CN
China
Prior art keywords
transaction
request
node
auditing
broadcast
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
CN202211386645.4A
Other languages
Chinese (zh)
Other versions
CN115760388A (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.)
Shenzhen Tengmeng Technology Co ltd
Original Assignee
Shenzhen Tengmeng Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Tengmeng Technology Co ltd filed Critical Shenzhen Tengmeng Technology Co ltd
Priority to CN202211386645.4A priority Critical patent/CN115760388B/en
Publication of CN115760388A publication Critical patent/CN115760388A/en
Application granted granted Critical
Publication of CN115760388B publication Critical patent/CN115760388B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention relates to the field of blockchains and discloses a blockchain-based consensus method, device, equipment and storage medium. The method comprises the following steps: when a transaction request is detected, sending the transaction request to a transaction auditing node; when the auditing information fed back by the transaction auditing node aiming at the transaction information is detected, determining a request type corresponding to the transaction request according to the auditing information; according to the request type, determining a broadcast transaction in the transaction request, and a master node and a slave node corresponding to the broadcast transaction; transmitting the broadcast transaction to the master node so as to enable the master node to broadcast the broadcast transaction, and collecting broadcast information fed back by the master node and the slave node according to the broadcast transaction; and determining whether the transaction request reaches consensus according to the broadcast information. The present invention can increase the capability of coping with various situations.

Description

Block chain-based consensus method, device, equipment and storage medium
Technical Field
The present invention relates to the field of blockchains, and in particular, to a blockchain-based consensus method, device, apparatus, and storage medium.
Background
PBFT (Practical Byzantine Fault Tolerance) is a consensus algorithm that does not require additional large permissions, guaranteeing authority peering from node to node, and is widely used in public blockchains or alliance blockchains. In the PBFT algorithm, when the whole network is jeer, 1/3 node verification block is passed, the block can be added into the block chain.
Since all the large node authorities in the blockchain of the PBFT algorithm are completely peer-to-peer, there is a lack of efficient schemes to perform or intervene in some situations where hierarchical management is required, or where there is a suspicious node transaction.
Disclosure of Invention
The invention mainly aims to solve the technical problem that a block chain based on a PBFT algorithm cannot process and intervene in special cases.
The first aspect of the invention provides a block chain based consensus method, comprising the following steps:
when a transaction request is detected, sending the transaction request to a transaction auditing node;
when the auditing information fed back by the transaction auditing node aiming at the transaction information is detected, determining a request type corresponding to the transaction request according to the auditing information;
according to the request type, determining a broadcast transaction in the transaction request, and a master node and a slave node corresponding to the broadcast transaction;
transmitting the broadcast transaction to the master node so as to enable the master node to broadcast the broadcast transaction, and collecting broadcast information fed back by the master node and the slave node according to the broadcast transaction;
and determining whether the transaction request reaches consensus according to the broadcast information.
Optionally, in a first implementation manner of the first aspect of the present invention, before sending the transaction request to the transaction auditing node when the transaction request is detected, the method includes:
acquiring the weight values corresponding to all the registration nodes;
and determining a node type corresponding to the registration node according to the weight value, wherein the node type comprises a transaction auditing node.
Optionally, in a second implementation manner of the first aspect of the present invention, when the transaction request is detected, sending the transaction request to the transaction auditing node includes:
when the transaction request is detected, traversing the transaction request through each transaction auditing node according to the corresponding authority value of the transaction auditing node.
Optionally, in a third implementation manner of the first aspect of the present invention, the determining, according to the audit information, a request type corresponding to the transaction request includes:
when all the audit information is normal transaction, determining that the request type corresponding to the transaction request is a normal request;
stopping traversing when the audit information is abnormal transaction, taking the transaction request as a suspicious request, and broadcasting the suspicious request to all transaction audit nodes;
when detecting the auditing results sent by all the transaction auditing nodes aiming at the suspicious request, determining the request type corresponding to the suspicious request according to the auditing results.
Optionally, in a fourth implementation manner of the first aspect of the present invention, when detecting an audit result sent by all the transaction audit nodes for the transaction request, determining, according to the audit result, a request type corresponding to the transaction request includes:
taking the transaction auditing node with the auditing result being normal transaction as an approval node, and calculating the sum of the corresponding weight values of the approval node to obtain an approval value;
taking the transaction auditing node with the auditing result being abnormal transaction as an objecting node, and calculating the sum of the weight values corresponding to the objecting node to obtain an objecting value;
and determining the request type corresponding to the transaction request according to the approval value and the disapproval value.
Optionally, in a fifth implementation manner of the first aspect of the present invention, the request type includes a normal request and a blacklist request; when detecting the auditing results sent by all the transaction auditing nodes for the suspicious request, determining the request type corresponding to the suspicious request according to the auditing results, and further comprising:
when the request type corresponding to the transaction request is a blacklist request, taking a starting point node corresponding to the transaction request as a blacklist node, and modifying an authority value corresponding to the starting point node.
Optionally, in a sixth implementation manner of the first aspect of the present invention, the determining, according to the request type, a broadcast transaction in the transaction request, a master node and a slave node corresponding to the broadcast transaction includes:
when the request type is a normal request, determining the transaction request as a broadcast transaction;
when detecting the permission modification instruction of the transaction auditing node for the broadcast transaction, modifying the reading permission of the broadcast transaction according to the permission modification instruction.
A second aspect of the present invention provides a blockchain-based consensus device comprising:
the sending module is used for sending the transaction request to a transaction auditing node when the transaction request is detected;
the first determining module is used for determining a request type corresponding to the transaction request according to the auditing information when the auditing information fed back by the transaction auditing node aiming at the transaction information is detected;
the second determining module is used for determining a broadcast transaction in the transaction request, a master node and a slave node corresponding to the broadcast transaction according to the request type;
the collecting module is used for sending the broadcast transaction to the master node so as to enable the master node to broadcast the broadcast transaction, and collecting broadcast information fed back by the master node and the slave node according to the broadcast transaction;
and the third determining module is used for determining whether the transaction request reaches consensus according to the broadcast information.
A third aspect of the present invention provides a blockchain-based consensus device comprising: a memory and at least one processor, the memory having instructions stored therein, the memory and the at least one processor being interconnected by a line; the at least one processor invokes the instructions in the memory to cause the blockchain-based consensus device to perform the blockchain-based consensus method as described above.
A fourth aspect of the invention provides a computer readable storage medium having instructions stored therein which, when run on a computer, cause the computer to perform the blockchain-based consensus method as described above.
The invention provides a block chain-based consensus method and related equipment, when a node lifts a transaction request, a transaction auditing node with transaction auditing authority is controlled to audit the transaction request, and a request type corresponding to the transaction request information is obtained. If the request type indicates that the transaction request is normal and broadcast, the transaction request is broadcast through the master node, and then broadcast information of the slave nodes is collected, so that whether the transaction request has consensus among the nodes is determined. Compared with the prior consensus algorithm, the method and the system have the advantages that the type judgment of the transaction request is added before the consensus, so that whether the transaction request can enter the blockchain or not and the consensus after entering the blockchain are limited, and the capability of processing and controlling special cases is increased.
Drawings
FIG. 1 is a diagram of one embodiment of a blockchain-based consensus method in accordance with an embodiment of the present invention;
FIG. 2 is a schematic diagram of an embodiment of a block chain based consensus device in accordance with an embodiment of the present invention;
FIG. 3 is a schematic diagram of an embodiment of a blockchain-based consensus device in accordance with an embodiment of the present invention.
Detailed Description
The embodiment of the invention provides a block chain-based consensus method, a device, equipment and a storage medium.
The terms "first," "second," "third," "fourth" and the like in the description and in the claims and in the above drawings, if any, are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments described herein may be implemented in other sequences than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed or inherent to such process, method, article, or apparatus.
For ease of understanding, a specific flow of an embodiment of the present invention is described below with reference to fig. 1, where an embodiment of a blockchain-based consensus method in an embodiment of the present invention includes:
the consensus method is applied to a blockchain environment, and the blockchain comprises a plurality of nodes, wherein each node can be used as a broadcasting starting point to broadcast information outwards. A system for information statistics of individual nodes, such as a digital certificate system or an account management system, is first created, in which information of all nodes is recorded.
And S10, when the transaction request is detected, sending the transaction request to a transaction auditing node.
Specifically, when a certain node broadcasts a transaction request outwards, the application program can detect the transaction request and send the transaction request to the nodes with transaction auditing rights in all the nodes. The registration node that initiated the transaction request is named the origin node.
The nodes of the transaction auditing rights can be preset by a user or the rights can be opened for some nodes in advance. Taking an account management system as an example, when node information is registered, a corresponding authority value is recorded. At this time, each node may be assigned in advance. And then determining the node type corresponding to each registered node according to the weight value. For example, the authority values are divided, so as to determine the authority range corresponding to each node. The dividing authority value can be realized according to preset proportion, quantity, authority threshold value and the like. And (3) presetting a node with the authority value within the range of 30-60 as a transaction auditing node, and determining the type of the node according to the authority value of each registration node.
The higher the authority value possessed by the registration node, the higher the authority corresponding to the registration node. For example, if the authority value of a certain registration node is 32 and the authority range corresponding to the transaction auditing node is 30-60, the registration node is the transaction auditing node. For another example, if a registered node has a authority value of 25 and a range of authority values of 20 to 30 for block packing nodes that pack blocks, the registered node is a block packing node. For example, if the authority value of a certain registration node is 12 and the range of authority values corresponding to the transaction initiating node is 10-20, the registration node is the transaction initiating node.
In addition, the read authority of the transaction request can also set a authority value, and the node with the authority value of 32 can read the transaction request with all the read authority values smaller than or equal to 32.
And S20, when the auditing information fed back by the transaction auditing node aiming at the transaction information is detected, determining the request type corresponding to the transaction request according to the auditing information.
Specifically, after receiving the transaction request, the transaction auditing node audits the transaction request according to the locally stored information, obtains auditing information, and broadcasts the auditing information. When the auditing information fed back by the transaction auditing node aiming at the transaction information is detected, the auditing information comprises the authenticity judgment of the transaction auditing node on the transaction request, so that the authenticity of the transaction request, namely the request type, can be determined according to the auditing information.
The present embodiment provides the following schemes for determining the request type:
in the first determination mode, a transaction request is sent to all transaction auditing nodes, and when the detected auditing information is normal transaction, the request type corresponding to the transaction request is determined to be normal request; and when the detected audit information has abnormal transaction, determining that the request type corresponding to the transaction request is a suspicious request.
In the second determination mode, even if the transaction auditing node is the same, the authority value of the transaction auditing node is high or low, so that the transaction request traverses each transaction auditing node according to the high or low authority value, and the auditing capability of the transaction auditing node with higher authority value is generally higher, so that the exception in the transaction request can be quickly found out, and the auditing efficiency is improved. Meanwhile, when all the audit information is normal, the request type is a normal request; when there is an abnormal transaction, a malicious request is identified.
In the third determination mode, when all the audit information is normal transaction, determining that the request type is normal request. And traversing each transaction auditing node according to the height of the authority value. When traversing to a certain transaction auditing node, if the auditing information corresponding to the transaction auditing node is abnormal transaction, stopping traversing, and broadcasting all the transaction auditing nodes by taking the transaction request as a suspicious request. And when detecting the auditing results sent by all transaction auditing nodes aiming at the suspicious request, synthesizing the auditing results of all the transaction auditing nodes to judge the request type.
In this case, part of the transaction auditing nodes doubt the transaction request, and the former two direct doubt mode is not adopted any more, but the auditing results of all the transaction auditing nodes are integrated. For example, a ticket overrule may be employed, e.g., the highest-authority transaction auditing node has a ticket overrule authority, whose second audit is the final adopted result. For example, the number of transaction auditing nodes identified as normal requests is compared with the number of transaction auditing nodes identified as abnormal requests, and the former is identified as normal requests when the former is greater than or equal to the latter, or is identified as normal requests when the former is 2/3 of the total number. And for example, taking all auditing nodes with normal auditing results as approval nodes, and calculating the sum of the corresponding authority values of the approval nodes to obtain the approval values. And taking all audit nodes with audit results of abnormal transactions as objection nodes, and calculating the sum of the weight values corresponding to the objection nodes to obtain an objection value. And then comparing the approval value with the disapproval value, the duty ratio and the like, and determining the request type corresponding to the transaction request. For example, if the approval value is set to be larger than the disapproval value, the request type is determined to be a normal request; setting the approval value to be greater than twice the disapproval value, the request type is considered a normal request and vice versa.
In addition, different transaction request pools can be preset and used for storing transaction requests with different request types, for example, the set transaction request pools comprise a normal transaction pool, a suspicious transaction pool and a blacklist transaction pool, and after the request type of one transaction request is determined, the transaction request pool can be placed in the corresponding transaction request pool so as to realize asynchronous processing and improve the processing efficiency.
S30, according to the request type, determining a broadcast transaction in the transaction request, and a master node and a slave node corresponding to the broadcast transaction.
Specifically, the request types corresponding to the transaction request may include a normal request and a blacklist request, where the normal request may be broadcasted to each registration node for the transaction request stored therein, and the blacklist request may not be allowed to be broadcasted to the transaction request of each registration node. When a certain transaction request is determined to be a normal request, the transaction request is determined to be a broadcast transaction, one of the registration nodes is randomly selected as a master node, and the other registration nodes are selected as slave nodes. When a certain transaction request is determined to be a blacklist request, the transaction request is not broadcast, and thus there is no determination of the master node and the slave node.
Further, when a certain registration node frequently initiates a blacklist request, it is indicated that the registration node has a large exception, and if the registration node still retains its authority, the stability of the entire blockchain will be affected. Therefore, in this embodiment, when the request type corresponding to the transaction request initiated by the origin node is a blacklist request, the origin node is used as the blacklist node, and the authority value corresponding to the origin node is modified. When the starting node is a blacklist node, the transaction request initiated by the starting node is directly used as a suspicious transaction request and is broadcast to all transaction auditing nodes for auditing. And simultaneously, reducing the corresponding weight value of the registration node according to the quantity, frequency and other factors of the blacklist requests initiated by the registration node.
Further, the transaction request may set a read right, and when the read right is greater than a certain registration node, the registration node cannot read the transaction request, and cannot verify naturally. In this case, the registration node is not suitable as the master node or the slave node, so before the master node and the slave node are determined, the registration node is screened according to the read authority corresponding to the transaction request to obtain the broadcast node, and the master node and the slave node corresponding to the master node are randomly selected from the broadcast node.
In the process that the transaction request is audited by the transaction auditing node, the transaction auditing node can modify the reading authority of the transaction request, so when detecting the authority modification instruction of the transaction auditing node for authority modification of the reading authority of the broadcast transaction, the transaction auditing node modifies the reading authority of the broadcast transaction according to the authority modification instruction. In addition, the registered node can be screened to obtain the broadcast node. In addition, when the authority value of the transaction auditing node which sends out the authority modification instruction is larger than that of the transaction auditing node which sends out the authority modification instruction, the authority modification instruction is the right before.
And S40, the broadcast transaction is sent to the master node so that the master node broadcasts the broadcast transaction, and the broadcast information fed back by the slave node and the master node according to the broadcast transaction is collected.
Specifically, the broadcast transaction is sent to the master node, which initiates the first, sends out the view-new message, and synchronizes the data of all the slave nodes to indicate that it is to broadcast the new message. The master node firstly verifies the transaction request, and after the verification is passed, the master node broadcasts the broadcast transaction and sends out a pre-preparation message. The slave node receives the broadcast transaction and then performs secondary broadcast, and transmits the received broadcast transaction to other slave nodes or master nodes so as to verify whether the received broadcast transaction is consistent, whether tampering exists or not, and the like. When the verification is correct, the message is stored locally and a preparation message is broadcast, and the preparation stage is entered. While collecting the preparation information and counting the number of the preparation information.
S50, determining whether the transaction request reaches consensus or not according to the broadcast information.
Specifically, the amount of provisioning information indicates the number of slave nodes and master nodes that verify correctly, and may be used to determine whether a consensus is reached for the transaction request.
A first quantity threshold of the preparation information is preset, for example, the first quantity threshold is 2/3 of the sum of the master node and the slave nodes, and when the quantity of the preparation information is greater than the first quantity threshold, the preparation information indicates that most of the slave nodes and the master nodes are ready to complete, and the transaction request achieves consensus. When the master node and the slave node save the broadcast information to the local, the master node and the slave node send commit information, the quantity of commit information can be collected and counted, the quantity exceeds a preset second quantity threshold value, which indicates that most broadcast nodes are already saved, and the message that the broadcast transaction is consensus and saved can be fed back to the starting node which initiates the transaction request.
In the embodiment of the invention, the authority setting of the registration node increases the manageability of special situations in the consensus process, the transaction auditing node can intercept and cancel suspicious transactions in a suspicious manner, and set the authority of a read transaction request, and meanwhile, the common node can also broadcast and verify, but cannot read the data in the transaction request, so that the security is ensured. Meanwhile, different transaction pools are arranged for different request types and used for intercepting or issuing transactions, so that the transaction processing efficiency is improved.
The block chain-based consensus method in the embodiment of the present invention is described above, and the block chain-based consensus device in the embodiment of the present invention is described below, referring to fig. 2, one embodiment of the block chain-based consensus device in the embodiment of the present invention includes:
a sending module 110, configured to send a transaction request to a transaction auditing node when the transaction request is detected;
the first determining module 120 is configured to determine, when detecting audit information fed back by the transaction audit node for the transaction information, a request type corresponding to the transaction request according to the audit information;
a second determining module 130, configured to determine, according to the request type, a broadcast transaction in the transaction request, a master node and a slave node corresponding to the broadcast transaction;
a collecting module 140, configured to send the broadcast transaction to the master node, so that the master node broadcasts the broadcast transaction, and collect broadcast information fed back by the master node and the slave node according to the broadcast transaction;
a third determining module 150, configured to determine whether the transaction request reaches a consensus according to the broadcast information.
Wherein the apparatus further comprises a registration module for:
acquiring the weight values corresponding to all the registration nodes;
and determining a node type corresponding to the registration node according to the weight value, wherein the node type comprises a transaction auditing node.
Wherein, the sending module 110 is configured to:
when the transaction request is detected, traversing the transaction request through each transaction auditing node according to the corresponding authority value of the transaction auditing node.
Wherein the first determining module 120 includes:
the first determining unit is used for determining that the request type corresponding to the transaction request is a normal request when all the audit information is normal transaction;
the broadcasting unit is used for stopping traversing when the audit information is abnormal transaction, taking the transaction request as a suspicious request and broadcasting the suspicious request to all transaction audit nodes;
and the second determining unit is used for determining the request type corresponding to the suspicious request according to the auditing result when detecting the auditing result sent by all the transaction auditing nodes aiming at the suspicious request.
Wherein the second determining unit is specifically configured to:
taking the transaction auditing node with the auditing result being normal transaction as an approval node, and calculating the sum of the corresponding weight values of the approval node to obtain an approval value;
taking the transaction auditing node with the auditing result being abnormal transaction as an objecting node, and calculating the sum of the weight values corresponding to the objecting node to obtain an objecting value;
and determining the request type corresponding to the transaction request according to the approval value and the disapproval value.
Wherein the request types include normal requests and blacklist requests; the first determining module 120 further includes a modifying unit, where the modifying unit is specifically configured to:
when the request type corresponding to the transaction request is a blacklist request, taking a starting point node corresponding to the transaction request as a blacklist node, and modifying an authority value corresponding to the starting point node.
Wherein, the second determining module 130 is specifically configured to:
when the request type is a normal request, determining the transaction request as a broadcast transaction;
when detecting the permission modification instruction of the transaction auditing node for the broadcast transaction, modifying the reading permission of the broadcast transaction according to the permission modification instruction.
Fig. 3 is a schematic diagram of a block chain-based consensus device 200 according to an embodiment of the present invention, where the block chain-based consensus device 200 may vary widely depending on configuration or performance, and may include one or more processors (central processing units, CPU) 210 (e.g., one or more processors) and a memory 220, one or more storage media 230 (e.g., one or more mass storage devices) storing applications 233 or data 232. Wherein the memory 220 and the storage medium 230 may be transitory or persistent storage. The program stored on the storage medium 230 may include one or more modules (not shown), each of which may include a series of instruction operations on the blockchain-based consensus device 200. Still further, the processor 210 may be configured to communicate with the storage medium 230 to execute a series of instruction operations in the storage medium 230 on the blockchain-based consensus device 200.
The blockchain-based consensus device 200 may also include one or more power supplies 240, one or more wired or wireless network interfaces 250, one or more input/output interfaces 260, and/or one or more operating systems 231, such as Windows Server, mac OS X, unix, linux, freeBSD, and the like. Those skilled in the art will appreciate that the blockchain-based consensus device structure shown in fig. 3 does not constitute a limitation to a blockchain-based consensus device and may include more or fewer components than shown, or may combine certain components, or a different arrangement of components.
The present invention also provides a computer readable storage medium, which may be a non-volatile computer readable storage medium, and which may also be a volatile computer readable storage medium, the computer readable storage medium having stored therein instructions which, when executed on a computer, cause the computer to perform the steps of the blockchain-based consensus method.
It will be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working process of the system or apparatus and unit described above may refer to the corresponding process in the foregoing method embodiment, which is not repeated herein.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied essentially or in part or all of the technical solution or in part in the form of a software product stored in a storage medium, including instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a read-only memory (ROM), a random access memory (random access memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The above embodiments are only for illustrating the technical solution of the present invention, and not for limiting the same; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (7)

1. A blockchain-based consensus method, the blockchain-based consensus method comprising:
when a transaction request is detected, sending the transaction request to a transaction auditing node;
when detecting the auditing information fed back by the transaction auditing node for the transaction request, determining a request type corresponding to the transaction request according to the auditing information;
according to the request type, determining a broadcast transaction in the transaction request, and a master node and a slave node corresponding to the broadcast transaction;
transmitting the broadcast transaction to the master node so as to enable the master node to broadcast the broadcast transaction, and collecting broadcast information fed back by the master node and the slave node according to the broadcast transaction;
determining whether the transaction request reaches consensus according to the broadcast information;
wherein when the transaction request is detected, before the transaction request is sent to the transaction auditing node, the method comprises the following steps:
acquiring the weight values corresponding to all the registration nodes;
determining a node type corresponding to the registration node according to the weight value, wherein the node type comprises a transaction auditing node;
wherein when the transaction request is detected, sending the transaction request to a transaction auditing node comprises:
when the transaction request is detected, traversing the transaction request through each transaction auditing node according to the corresponding authority value of the transaction auditing node;
wherein, according to the audit information, determining the request type corresponding to the transaction request includes:
when all the audit information is normal transaction, determining that the request type corresponding to the transaction request is a normal request;
stopping traversing when the audit information is abnormal transaction, taking the transaction request as a suspicious request, and broadcasting the suspicious request to all transaction audit nodes;
when detecting the auditing results sent by all the transaction auditing nodes aiming at the suspicious request, determining the request type corresponding to the suspicious request according to the auditing results.
2. The blockchain-based consensus method according to claim 1, wherein when all the transaction auditing nodes detect auditing results sent for the transaction request, determining a request type corresponding to the transaction request according to the auditing results comprises:
taking the transaction auditing node with the auditing result being normal transaction as an approval node, and calculating the sum of the corresponding weight values of the approval node to obtain an approval value;
taking the transaction auditing node with the auditing result being abnormal transaction as an objecting node, and calculating the sum of the weight values corresponding to the objecting node to obtain an objecting value;
and determining the request type corresponding to the transaction request according to the approval value and the disapproval value.
3. The blockchain-based consensus method as in claim 1, wherein the request types include normal requests and blacklist requests; when detecting the auditing results sent by all the transaction auditing nodes for the suspicious request, determining the request type corresponding to the suspicious request according to the auditing results, and further comprising:
when the request type corresponding to the transaction request is a blacklist request, taking a starting point node corresponding to the transaction request as a blacklist node, and modifying an authority value corresponding to the starting point node.
4. The blockchain-based consensus method according to claim 1, wherein the determining a broadcast transaction in the transaction request, a master node and a slave node corresponding to the broadcast transaction according to the request type comprises:
when the request type is a normal request, determining the transaction request as a broadcast transaction;
when detecting the permission modification instruction of the transaction auditing node for the broadcast transaction, modifying the reading permission of the broadcast transaction according to the permission modification instruction.
5. A blockchain-based consensus device, the blockchain-based consensus device comprising:
the sending module is used for sending the transaction request to a transaction auditing node when the transaction request is detected;
the first determining module is used for determining a request type corresponding to the transaction request according to the auditing information when the auditing information fed back by the transaction auditing node aiming at the transaction request is detected;
the second determining module is used for determining a broadcast transaction in the transaction request, a master node and a slave node corresponding to the broadcast transaction according to the request type;
the collecting module is used for sending the broadcast transaction to the master node so as to enable the master node to broadcast the broadcast transaction, and collecting broadcast information fed back by the master node and the slave node according to the broadcast transaction;
a third determining module, configured to determine whether the transaction request reaches consensus according to the broadcast information;
wherein the apparatus further comprises a registration module for:
acquiring the weight values corresponding to all the registration nodes;
determining a node type corresponding to the registration node according to the weight value, wherein the node type comprises a transaction auditing node;
wherein, the sending module is used for:
when the transaction request is detected, traversing the transaction request through each transaction auditing node according to the corresponding authority value of the transaction auditing node;
wherein the first determining module includes:
the first determining unit is used for determining that the request type corresponding to the transaction request is a normal request when all the audit information is normal transaction;
the broadcasting unit is used for stopping traversing when the audit information is abnormal transaction, taking the transaction request as a suspicious request and broadcasting the suspicious request to all transaction audit nodes;
and the second determining unit is used for determining the request type corresponding to the suspicious request according to the auditing result when detecting the auditing result sent by all the transaction auditing nodes aiming at the suspicious request.
6. A blockchain-based consensus device, the blockchain-based consensus device comprising: a memory and at least one processor, the memory having instructions stored therein, the memory and the at least one processor being interconnected by a line;
the at least one processor invoking the instructions in the memory to cause the blockchain-based consensus device to perform the blockchain-based consensus method as in any of claims 1-4.
7. A computer readable storage medium having stored thereon a computer program, which when executed by a processor implements the blockchain-based consensus method according to any of the claims 1-4.
CN202211386645.4A 2022-11-07 2022-11-07 Block chain-based consensus method, device, equipment and storage medium Active CN115760388B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211386645.4A CN115760388B (en) 2022-11-07 2022-11-07 Block chain-based consensus method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211386645.4A CN115760388B (en) 2022-11-07 2022-11-07 Block chain-based consensus method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN115760388A CN115760388A (en) 2023-03-07
CN115760388B true CN115760388B (en) 2023-11-21

Family

ID=85357211

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211386645.4A Active CN115760388B (en) 2022-11-07 2022-11-07 Block chain-based consensus method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115760388B (en)

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108154367A (en) * 2017-12-26 2018-06-12 质数链网科技成都有限公司 A kind of block chain business method of calibration and device
CN109961287A (en) * 2019-02-12 2019-07-02 众安信息技术服务有限公司 A kind of monitoring and managing method and supervisory systems of block chain
CN109995536A (en) * 2019-03-15 2019-07-09 广州杰赛科技股份有限公司 A kind of block chain common recognition method, apparatus and readable storage medium storing program for executing
CN110602206A (en) * 2019-09-12 2019-12-20 腾讯科技(深圳)有限公司 Data sharing method and device based on block chain and storage medium
CN110910138A (en) * 2019-12-04 2020-03-24 中科扶云(杭州)科技有限公司 Block chain data supervision method and device
CN111259078A (en) * 2020-01-15 2020-06-09 广州运通链达金服科技有限公司 Block chain consensus method, block chain consensus device, computer equipment and storage medium
CN112101942A (en) * 2020-09-18 2020-12-18 腾讯科技(深圳)有限公司 Transaction request processing method, system, device and equipment based on block chain
CN112329028A (en) * 2020-09-29 2021-02-05 华南师范大学 Abnormal data identification method, system, device and medium based on block chain
CN112883114A (en) * 2021-02-24 2021-06-01 中国工商银行股份有限公司 Transaction processing method and device applied to block chain
CN113377974A (en) * 2021-05-21 2021-09-10 浙江泰科数联信息技术有限公司 Resource auditing method and system based on block chain
WO2022134233A1 (en) * 2020-12-24 2022-06-30 杭州趣链科技有限公司 Consensus method and apparatus for blockchain, server and storage medium

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108154367A (en) * 2017-12-26 2018-06-12 质数链网科技成都有限公司 A kind of block chain business method of calibration and device
CN109961287A (en) * 2019-02-12 2019-07-02 众安信息技术服务有限公司 A kind of monitoring and managing method and supervisory systems of block chain
CN109995536A (en) * 2019-03-15 2019-07-09 广州杰赛科技股份有限公司 A kind of block chain common recognition method, apparatus and readable storage medium storing program for executing
CN110602206A (en) * 2019-09-12 2019-12-20 腾讯科技(深圳)有限公司 Data sharing method and device based on block chain and storage medium
CN110910138A (en) * 2019-12-04 2020-03-24 中科扶云(杭州)科技有限公司 Block chain data supervision method and device
CN111259078A (en) * 2020-01-15 2020-06-09 广州运通链达金服科技有限公司 Block chain consensus method, block chain consensus device, computer equipment and storage medium
CN112101942A (en) * 2020-09-18 2020-12-18 腾讯科技(深圳)有限公司 Transaction request processing method, system, device and equipment based on block chain
CN112329028A (en) * 2020-09-29 2021-02-05 华南师范大学 Abnormal data identification method, system, device and medium based on block chain
WO2022134233A1 (en) * 2020-12-24 2022-06-30 杭州趣链科技有限公司 Consensus method and apparatus for blockchain, server and storage medium
CN112883114A (en) * 2021-02-24 2021-06-01 中国工商银行股份有限公司 Transaction processing method and device applied to block chain
CN113377974A (en) * 2021-05-21 2021-09-10 浙江泰科数联信息技术有限公司 Resource auditing method and system based on block chain

Also Published As

Publication number Publication date
CN115760388A (en) 2023-03-07

Similar Documents

Publication Publication Date Title
US20220272105A1 (en) Blockchain-based data detection method, apparatus, and computer-readable storage medium
EP3005648B1 (en) Terminal identification method, and method, system and apparatus of registering machine identification code
US20100064366A1 (en) Request processing in a distributed environment
CN108710681B (en) File acquisition method, device, equipment and storage medium
CN110135194B (en) Block chain-based industrial internet digital object management method
CN109525611B (en) Method and device for detecting abnormal outgoing behavior of intranet user
CN111464631B (en) Service consensus method and device in alliance block chain
US20090319405A1 (en) Auditing system and auditing method
WO2022134471A1 (en) Blockchain node management method and apparatus, computer device, and storage medium
CN111899019A (en) Method and system for cross validation and sharing of blacklist and multiple parties
CN114139203A (en) Block chain-based heterogeneous identity alliance risk assessment system and method and terminal
CN109474691A (en) A kind of method and device of internet of things equipment identification
CN110162274B (en) Data processing method, device and equipment based on block chain
CN113377869B (en) Block chain sharing information balanced storage method
CN115760388B (en) Block chain-based consensus method, device, equipment and storage medium
CN112037062B (en) Transaction consensus method, device, electronic equipment and readable storage medium
CN111222989B (en) Transaction method of multi-channel blockchain, electronic equipment and storage medium
CN110659903B (en) Block chain-based data transaction method
CN109428906B (en) Request processing method, device, system and terminal
CN112862984A (en) Intelligent parking fee distribution method and block chain platform
CN112258184B (en) Method, apparatus, electronic device and readable storage medium for freezing blockchain network
CN114866562A (en) Block chain consensus method and system for electric power energy system
CN114721749A (en) Voting method and device based on block chain, storage medium and electronic equipment
CA2986731A1 (en) A blockchain based smart home security solution
CN110708165B (en) Multi-CA automatic scheduling method based on request response

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