CN114928650B - Block chain data consensus method, device, equipment and readable storage medium - Google Patents

Block chain data consensus method, device, equipment and readable storage medium Download PDF

Info

Publication number
CN114928650B
CN114928650B CN202210448288.3A CN202210448288A CN114928650B CN 114928650 B CN114928650 B CN 114928650B CN 202210448288 A CN202210448288 A CN 202210448288A CN 114928650 B CN114928650 B CN 114928650B
Authority
CN
China
Prior art keywords
consensus
data
node
nodes
available
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
CN202210448288.3A
Other languages
Chinese (zh)
Other versions
CN114928650A (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.)
Chengdu Quality Starker Technology Co Ltd
Original Assignee
Chengdu Quality Starker 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 Chengdu Quality Starker Technology Co Ltd filed Critical Chengdu Quality Starker Technology Co Ltd
Priority to CN202210448288.3A priority Critical patent/CN114928650B/en
Publication of CN114928650A publication Critical patent/CN114928650A/en
Application granted granted Critical
Publication of CN114928650B publication Critical patent/CN114928650B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Databases & Information Systems (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Bioethics (AREA)
  • Software Systems (AREA)
  • Computer Hardware Design (AREA)
  • General Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Data Mining & Analysis (AREA)
  • Storage Device Security (AREA)

Abstract

The invention relates to the technical field of blockchains, in particular to a blockchain data consensus method, a device and equipment and a readable storage medium, wherein the method comprises the following steps: responding to the check data sent by the master node, and pulling first consensus data on a plurality of initiating nodes; verifying the authenticity of a plurality of first consensus data according to the verification data, and generating a usable certificate; sending the available proof to the master node; in the invention, the master node does not distribute the consensus data in the whole course, only distributes the hash value corresponding to the consensus data, and the consensus node pulls the corresponding consensus data to the consensus service initiating node and verifies the authenticity of the consensus data, thereby greatly reducing the workload of the master and further increasing the consensus speed of the whole blockchain network in the data consensus stage.

Description

Block chain data consensus method, device, equipment and readable storage medium
Technical Field
The present invention relates to the field of blockchain technologies, and in particular, to a blockchain data consensus method, device and apparatus, and a readable storage medium.
Background
The block chain technology is built on a transmission network (also called a block chain network), distributed node equipment (hereinafter called nodes for short) in the transmission network generates block data by a preset consensus strategy by running a block chain program, and verifies and stores the block data by utilizing a chain data structure, so that a data tamper-proof mechanism is finally realized, and a safe and reliable technical new idea is provided for service development.
In the existing blockchain, a master node needs to receive original transaction data (consensus data) of other nodes and distribute the original data to each consensus node, and in an application scene, the distribution speed is lower when the master node consensus the original transaction data due to the extremely large quantity of the original transaction data, and the overall blockchain is lower in running speed in a consensus data link.
Disclosure of Invention
The invention aims to provide a blockchain data consensus method, a device, equipment and a readable storage medium, so as to solve the problem that when master nodes consensus original transaction data, the distribution speed is low, and the running speed of an integral blockchain in a consensus data link is low due to the fact that the quantity of the original transaction data is extremely large.
In order to achieve the above purpose, the embodiment of the present application provides the following technical solutions:
in one aspect, an embodiment of the present application provides a blockchain data consensus method, where the blockchain includes a consensus node and a light node, and the method is applicable to any one of the consensus nodes in the blockchain, and the method includes: responding to check data sent by a master node, pulling first consensus data on a plurality of initiating nodes, wherein the check data is a hash value set of the first consensus data, and the initiating nodes are the consensus nodes and/or the light nodes initiating data consensus service; verifying the authenticity of a plurality of first consensus data according to verification data, recording the verified first consensus data as second consensus data, and generating an available certificate corresponding to the second consensus data; transmitting the available certificates to the master node so that the master node counts the available certificates transmitted by a plurality of consensus nodes and generates available certificates according to the counting result; and responding to the available evidence sent by the master node, and executing the third consensus data corresponding to the available evidence to obtain an execution result, wherein the third consensus data is the first consensus data corresponding to the available certificate.
Optionally, the pulling the first consensus data on the plurality of initiating nodes in response to the check data sent by the master node includes:
acquiring the check data, wherein the check data comprises a plurality of check pairs, and each check pair comprises a consensus data initiating address and a consensus hash value;
requesting corresponding first consensus data from the consensus node and/or the light node corresponding to each consensus data initiating address;
and receiving the first consensus data fed back by the consensus node and/or the light node corresponding to each consensus data initiating address in a preset time period.
Optionally, after the requesting the corresponding first consensus data from the consensus node and/or the light node corresponding to each consensus data initiation address, the method further includes:
if the consensus node and/or the light node does not feed back the corresponding first consensus data in a preset time period, marking the check pair corresponding to the first consensus data which is not fed back as a second check pair;
and detecting whether the available certificates corresponding to the second checking pair exist in a plurality of available certificates sent by the master node, if so, pulling the first consensus data corresponding to the second checking pair to a second light node, and executing the first consensus data corresponding to the second checking pair.
Optionally, after the requesting the corresponding first consensus data from the consensus node and/or the light node corresponding to each consensus data initiation address, the method further includes:
if the consensus node and/or the light node does not feed back the corresponding first consensus data in a preset time period, marking the check pair corresponding to the first consensus data which is not fed back as a second check pair;
and detecting whether the available certificates corresponding to the second checking pair exist in a plurality of available certificates sent by the master node, and if not, reducing the task priority of pulling the first consensus data corresponding to the second checking pair.
Optionally, said verifying the authenticity of a plurality of said first consensus data from the verification data comprises:
retrieving the check data, wherein the check data comprises a plurality of check pairs, and each check pair comprises a consensus data initiating address and a consensus hash value;
and executing verification operation on each verification pair in sequence to obtain a plurality of second consensus data, wherein the verification operation is to find corresponding first consensus data in the pulled plurality of first consensus data according to the consensus data initiating address, record the first consensus data as data to be verified, calculate the hash value of the data to be verified, compare whether the hash value of the data to be verified is identical to the consensus hash value, and mark the data to be verified as the second consensus data if the hash value is identical to the consensus hash value.
Optionally, after the executing the third consensus data corresponding to the available proof, the executing result further includes:
and responding to the data synchronization request sent by the light node, and sending the block data containing the execution result to the light node so as to enable the light node to update the local block chain public ledger data.
In a second aspect, the present embodiment discloses a blockchain data consensus device, which is applicable to any one of the consensus nodes in a blockchain, and the method includes:
the first calculation module is used for responding to check data sent by a master node, pulling first consensus data on a plurality of initiating nodes, wherein the check data is a hash value set of the first consensus data, and the initiating nodes are the consensus nodes and/or the light nodes initiating data consensus service;
the second calculation module is used for verifying the authenticity of a plurality of first consensus data according to the verification data, recording the verified first consensus data as second consensus data, and generating an available certificate corresponding to the second consensus data;
the first sending module is used for sending the available certificates to the master node so that the master node can count the available certificates sent by a plurality of consensus nodes and generate available certificates according to the counting result;
and the third calculation module is used for responding to the available evidence sent by the master node and executing the third consensus data corresponding to the available evidence, wherein the third consensus data is the first consensus data corresponding to the available certificate.
In a third aspect, embodiments of the present application provide a blockchain data consensus device including a memory and a processor.
The memory is used for storing a computer program; the processor is configured to implement the above-described blockchain data consensus method when executing the computer program.
In a fourth aspect, embodiments of the present application provide a readable storage medium having a computer program stored thereon, which when executed by a processor, implements the steps of the blockchain data consensus method described above.
The beneficial effects of the invention are as follows:
in the invention, the master node does not distribute the consensus data in the whole course, only distributes the hash value corresponding to the consensus data, and the consensus node pulls the corresponding consensus data to the consensus service initiating node and verifies the authenticity of the corresponding consensus data, thereby greatly reducing the workload of the master and further increasing the consensus speed of the whole blockchain network in the data consensus stage;
secondly, the invention further improves the speed of data consensus in the blockchain network by introducing light nodes into the blockchain so as to reduce the number of the consensus nodes.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be apparent from the description, or may be learned by practice of the embodiments of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims thereof as well as the appended drawings.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the embodiments will be briefly described below, it being understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and other related drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic flow chart of a block chain data consensus method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a block chain data consensus device according to an embodiment of the present invention;
FIG. 3 is a schematic block chain data consensus device architecture according to an embodiment of the present invention;
FIG. 4 is a schematic diagram a illustrating a block chain data consensus process according to an embodiment of the present invention;
FIG. 5 is a schematic diagram b illustrating a block chain data consensus process according to an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. The components of the embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the invention, as presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
It should be noted that: like reference numerals or letters denote like items in the following figures, and thus once an item is defined in one figure, no further definition or explanation thereof is necessary in the following figures. Meanwhile, in the description of the present invention, the terms "first", "second", and the like are used only to distinguish the description, and are not to be construed as indicating or implying relative importance.
Example 1
As shown in fig. 1, 4 and 5, the present embodiment provides a blockchain data consensus method, where the blockchain includes a consensus node and a light node, and the method is applicable to any one of the consensus nodes in the blockchain, and the method includes step S1, step S2, step S3 and step S4.
In fig. 4 and fig. 5, P1, P2 and P3 are consensus nodes, P4 and P5 are light nodes, in this embodiment, the consensus nodes are used for participating in a consensus service including service voting, executing transaction data and the like, the light nodes are used for initiating a transaction (such as consensus data), and synchronizing the execution result of the transaction on the consensus nodes, on one hand, the embodiment reduces the number of the consensus nodes by introducing the light nodes, and improves the speed of data consensus in a blockchain network, and the specific steps are as follows:
step S1, in response to check data sent by a master node, pulling first consensus data on a plurality of initiating nodes, wherein the check data is a hash value set of the first consensus data, the initiating nodes are the consensus nodes initiating data consensus service and/or the light nodes, and it should be noted that the master node can be selected from common consensus nodes, so that the master node needs to request the first consensus data from the initiating nodes, and on the requirement, two implementation modes can be provided, wherein the first mode is: after generating the check data, the master node actively pulls the first consensus data to the corresponding initiating node, and the second mode is as follows: when a plurality of initiating nodes send to a master node, the first consensus data is also sent to the master node;
as shown in fig. 5, the consensus nodes and the light nodes in the blockchain network both send transaction data and corresponding hash values to the Master node, and the Master node packages and integrates the transaction data and the corresponding hash values into verification data, it should be noted that the verification data distributed to each consensus node by the Master node is a hash value set corresponding to a plurality of consensus data, and the consensus data is not distributed, so that the distribution efficiency is greatly improved.
In step S1, the specific operation steps of pulling the first consensus data on the plurality of initiating nodes in response to the check data sent by the master node may be:
s11, acquiring the check data, wherein the check data comprises a plurality of check pairs, and each check pair comprises a consensus data initiating address and a consensus hash value;
s12, requesting corresponding first consensus data from the consensus node and/or the light node corresponding to each consensus data initiating address;
in step S12, after the consensus node sends a data request to other initiating nodes, there are various emergency situations, for example, the corresponding responding node does not respond to the data request, and the processing manners of the situations are two:
the first is:
s121, if the consensus node and/or the light node does not feed back the corresponding first consensus data in a preset time period, marking the check pair corresponding to the first consensus data which is not fed back as a second check pair;
step S122, detecting whether the available certificates corresponding to the second checking pair exist in a plurality of available certificates sent by the master node, if so, pulling the first consensus data corresponding to the second checking pair to a second light node, and executing the first consensus data corresponding to the second checking pair.
The processing logic of steps S121 to S122 is: the common identification node receiving the data periodically pulls a plurality of available certificates sent by the master node, detects whether available certificates corresponding to unreported common identification data exist in the plurality of available certificates, and if so, indicates that the unreported common identification data can be confirmed to be executed, and can pull the common identification data to other nodes in the blockchain network.
The second mode is as follows:
s121, if the consensus node and/or the light node does not feed back the corresponding first consensus data in a preset time period, marking the check pair corresponding to the first consensus data which is not fed back as a second check pair;
s123, detecting whether available certificates corresponding to the second checking pair exist in a plurality of available certificates sent by the master node, if not, reducing task priority of pulling the first consensus data corresponding to the second checking pair, wherein the function of reducing task priority can be to prolong interval duration of pulling the consensus data corresponding to the second checking pair twice.
Step S13, receiving the first consensus data fed back by the consensus node and/or the light node corresponding to each consensus data initiating address in a preset time period, wherein the initiating address is also provided with a sending time identifier, and the identifier is used for distinguishing a plurality of consensus data sent by the same initiating node at different times.
S2, verifying the authenticity of a plurality of first consensus data according to the verification data, recording the verified first consensus data as second consensus data, and generating an available certificate corresponding to the second consensus data;
after the consensus node receives the distributed verification data, the corresponding consensus data are sequentially pulled to the corresponding consensus data initiating node, whether the hash value of each pulled consensus data is identical to the hash value in the verification data or not is checked, if so, the pulled data are judged to be effective data, available evidence is issued to the effective data, and the available evidence is sent to the master node, wherein the available evidence is an evidence identifier for characterizing the authenticity of the approved data to the mater node.
In step S2, the specific operation steps of verifying the authenticity of the plurality of first consensus data according to the verification data may be:
s21, retrieving the check data, wherein the check data comprises a plurality of check pairs, and each check pair comprises a consensus data initiating address and a consensus hash value;
s22, sequentially executing verification operation on each verification pair to obtain a plurality of second consensus data, wherein the verification operation is to find corresponding first consensus data in the pulled plurality of first consensus data according to the consensus data initiating address, record the first consensus data as data to be verified, calculate a hash value of the data to be verified, compare whether the hash value of the data to be verified is identical to the consensus hash value, and mark the data to be verified as the second consensus data if the hash value is identical to the consensus hash value.
S3, sending the available certificates to the master node so that the master node can count the available certificates sent by a plurality of consensus nodes, and generating available certificates according to the counting result;
it should be noted in step S3 that the master node receives and files and counts the available certificates sent by a plurality of consensus data, and when the number of collected available certificates corresponding to a certain consensus data meets the execution policy, the master node issues an available certificate to the consensus data and distributes the issued available certificate to each consensus node, where the available certificate is used to prompt the consensus node to execute the corresponding consensus data and obtain a corresponding execution result.
S4, responding to the available certificate sent by the master node, and executing the third consensus data corresponding to the available certificate to obtain an execution result, wherein the third consensus data is the first consensus data corresponding to the available certificate;
and S5, responding to the data synchronization request sent by the light node, and sending the block data containing the execution result to the light node so that the light node updates the local block chain public ledger data.
In this embodiment, the master node does not distribute the consensus number in the whole process and only distributes the hash value corresponding to the consensus data, so that the consensus node pulls the corresponding consensus data to the consensus service initiating node and verifies the authenticity of the corresponding consensus data, thereby greatly reducing the workload of the master and further increasing the consensus speed of the whole blockchain network in the data consensus stage.
The transaction packing link-blockchain as in fig. 4 comprises a consensus node (P1-P3 in fig. 4) and a light node (P4-P5 in fig. 4), and a plurality of initiating nodes (P1-P5 in fig. 4) calculate hash values of data to be consensus and send the hash values to a master node; the master node receives a plurality of hash values, assigns a transmission address identifier to each hash value, integrates the plurality of assigned transmission address identifiers into check data, and the transmission address identifiers are used for representing the address of a sender of the hash values;
the master node distributes the check data to each consensus node (P1-P3 in FIG. 4) as a hash segment of a consensus node packet in FIG. 4, the consensus node being the first consensus node in a blockchain network for verifying availability of the consensus data;
the hash check/availability proving stage as shown in fig. 4, the consensus node receives the check data sent by the master node, and requests the corresponding initiation node for the consensus data corresponding to the hash value according to the sending address identifier given by each hash value in the check data; the consensus node respectively checks whether each consensus data fed back by the initiating node is matched with the corresponding hash value, marks the successfully matched consensus data as available data, generates an available evidence corresponding to the available data, and sends the available evidence to the master node, wherein the available evidence is an identification for representing the authenticity of the second consensus node for recognizing the consensus data;
the master node receives the available certificates sent by a plurality of consensus nodes (P1-P3 in FIG. 5), counts a plurality of the available certificates, issues available certificates to the consensus data meeting an execution policy according to the counted results, and distributes the available certificates to each consensus node (P1-P3 in FIG. 5) so that each consensus node executes the consensus data corresponding to the available certificates to obtain corresponding execution results;
in the synchronization stage of the synchronization node and the light node data in fig. 5, the light node (P4-P5 in fig. 5) regularly pulls the latest block containing the execution result on the common node, so as to achieve the purpose of updating the local block chain public account book.
Example 2
As shown in fig. 2, the present embodiment provides a blockchain data consensus device, which is applicable to any one of the consensus nodes in a blockchain, and the method includes:
the first calculation module 71 is configured to pull first consensus data on a plurality of initiating nodes in response to check data sent by a master node, where the check data is a hash value set of the plurality of first consensus data, and the initiating nodes are the consensus nodes and/or the light nodes that initiate data consensus services.
A second calculation module 72, configured to verify the authenticity of a plurality of the first consensus data according to the verification data, record the verified first consensus data as second consensus data, and generate an available proof corresponding to the second consensus data;
a first sending module 73, configured to send the available certificate to the master node, so that the master node counts available certificates sent by a plurality of consensus nodes, and generate available certificates according to the statistics result;
a third calculation module 74, configured to respond to the available certificate sent by the master node, and execute the third consensus data corresponding to the available certificate, where the third consensus data is the first consensus data corresponding to the available certificate.
It should be noted that, regarding the apparatus in the above embodiments, the specific manner in which the respective modules perform the operations has been described in detail in the embodiments regarding the method, and will not be described in detail herein.
Example 3
Corresponding to the above method embodiments, the present disclosure further provides a blockchain data consensus device, and a blockchain data consensus device described below and a blockchain data consensus method described above may be referred to correspondingly.
Fig. 3 is a block diagram illustrating a blockchain data consensus device 800 in accordance with an exemplary embodiment. As shown in fig. 3, the electronic device 800 may include: a processor 801, a memory 802. The electronic device 800 may also include one or more of a multimedia component 803, an input/output (I/O) interface 804, and a communication component 805.
The processor 801 is configured to control overall operation of the electronic device 800 to perform all or part of the steps of the blockchain data consensus method described above. The memory 402 is used to store various types of data to support operation on the electronic device 800, which may include, for example, instructions for any application or method operating on the electronic device 800, as well as application-related data, such as contact data, messages sent and received, pictures, audio, video, and so forth. The Memory 802 may be implemented by any type or combination of volatile or non-volatile Memory devices, such as static random access Memory (Static Random Access Memory, SRAM for short), electrically erasable programmable Read-Only Memory (Electrically Erasable Programmable Read-Only Memory, EEPROM for short), erasable programmable Read-Only Memory (Erasable Programmable Read-Only Memory, EPROM for short), programmable Read-Only Memory (Programmable Read-Only Memory, PROM for short), read-Only Memory (ROM for short), magnetic Memory, flash Memory, magnetic disk, or optical disk. The multimedia component 803 may include a screen and an audio component. Wherein the screen may be, for example, a touch screen, the audio component being for outputting and/or inputting audio signals. For example, the audio component may include a microphone for receiving external audio signals. The received audio signals may be further stored in the memory 802 or transmitted through the communication component 805. The audio assembly further comprises at least one speaker for outputting audio signals. The I/O interface 804 provides an interface between the processor 801 and other interface modules, which may be a keyboard, mouse, buttons, etc. These buttons may be virtual buttons or physical buttons. The communication component 805 is used for wired or wireless communication between the electronic device 800 and other devices. Wireless communication, such as Wi-Fi, bluetooth, near field communication (Near FieldCommunication, NFC for short), 2G, 3G or 4G, or a combination of one or more thereof, the respective communication component 805 may thus comprise: wi-Fi module, bluetooth module, NFC module.
In an exemplary embodiment, the electronic device 800 can be implemented by one or more application specific integrated circuits (Application Specific Integrated Circuit, ASIC), digital signal processor (DigitalSignal Processor, DSP), digital signal processing device (Digital Signal Processing Device, DSPD), programmable logic device (Programmable Logic Device, PLD), field programmable gate array (Field Programmable Gate Array, FPGA), controller, microcontroller, microprocessor, or other electronic components for performing the blockchain data consensus method described above.
In another exemplary embodiment, a computer readable storage medium is also provided that includes program instructions that, when executed by a processor, implement the steps of the blockchain data consensus method described above. For example, the computer readable storage medium may be the memory 802 described above including program instructions executable by the processor 801 of the electronic device 800 to perform the blockchain data consensus method described above.
Example 4
Corresponding to the above method embodiments, the present disclosure further provides a readable storage medium, and a readable storage medium described below and a blockchain data consensus method described above may be referred to correspondingly with each other.
A readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of the blockchain data consensus method of the method embodiment described above.
The readable storage medium may be a usb 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, and the like.
The above description is only of the preferred embodiments of the present invention and is not intended to limit the present invention, but various modifications and variations can be made to the present invention by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (8)

1. A method of blockchain data consensus, wherein the blockchain includes consensus nodes and light nodes, the method being applicable to any one of the consensus nodes in the blockchain, the method comprising:
responding to check data sent by a master node, pulling first consensus data on a plurality of initiating nodes, wherein the check data is a hash value set of the first consensus data, and the initiating nodes are the consensus nodes and/or the light nodes initiating data consensus service;
verifying the authenticity of a plurality of first consensus data according to verification data, and generating corresponding available certificates based on the verified first consensus data;
transmitting the available certificates to the master node so that the master node counts the available certificates transmitted by a plurality of consensus nodes and generates available certificates according to the counting result;
responding to the available evidence sent by the master node, and executing the first consensus data corresponding to the available evidence to obtain an execution result;
the verification data comprises a plurality of verification pairs, each verification pair comprises a consensus data initiating address and a consensus hash value, and the pulling of first consensus data on a plurality of initiating nodes comprises the following steps:
and requesting and receiving corresponding first consensus data from the consensus node and/or the light node corresponding to each consensus data initiating address.
2. The blockchain data consensus method according to claim 1, wherein after the requesting the corresponding first consensus data from the consensus node and/or the light node corresponding to each consensus data initiation address, further comprising:
if the consensus node and/or the light node does not feed back the corresponding first consensus data in a preset time period;
detecting whether the available certificates which are not fed back exist in a plurality of available certificates sent by the master node, if so, pulling the first consensus data corresponding to the available certificates to a second light node, and executing the first consensus data.
3. The blockchain data consensus method according to claim 1, wherein after the requesting the corresponding first consensus data from the consensus node and/or the light node corresponding to each consensus data initiation address, further comprising:
if the consensus node and/or the light node does not feed back the corresponding first consensus data in a preset time period;
detecting whether the unrefed available certificates exist in a plurality of available certificates sent by the master node, and if the unrefed available certificates do not exist, reducing the task priority of pulling the first consensus data corresponding to the unrefed available certificates.
4. The blockchain data consensus method of claim 1, wherein verifying the authenticity of a plurality of the first consensus data based on the verification data comprises:
finding corresponding first consensus data in the pulled multiple first consensus data according to the consensus data initiating address, recording the first consensus data as data to be verified, calculating a hash value of the data to be verified, comparing whether the hash value of the data to be verified is identical to the consensus hash value, and if so, generating the available evidence.
5. The blockchain data consensus method according to claim 1, wherein the executing the first consensus data corresponding to the available proof, after obtaining an execution result, further comprises:
and responding to the data synchronization request sent by the light node, and sending the block data containing the execution result to the light node so as to enable the light node to update the local block chain public ledger data.
6. A blockchain data consensus device, wherein the blockchain includes a consensus node and a light node, adapted for any one of the consensus nodes in the blockchain, the device comprising:
the first calculation module is used for responding to check data sent by a master node, pulling first consensus data on a plurality of initiating nodes, wherein the check data is a hash value set of the first consensus data, and the initiating nodes are the consensus nodes and/or the light nodes initiating data consensus service;
the second calculation module is used for verifying the authenticity of a plurality of first consensus data according to the verification data and generating corresponding available certificates based on the verified first consensus data;
the first sending module is used for sending the available certificates to the master node so that the master node can count the available certificates sent by a plurality of consensus nodes and generate available certificates according to the counting result;
the third calculation module is used for responding to the available evidence sent by the master node and executing the first consensus data corresponding to the available evidence to obtain an execution result;
the verification data comprises a plurality of verification pairs, each verification pair comprises a consensus data initiating address and a consensus hash value, and the pulling of first consensus data on a plurality of initiating nodes comprises the following steps:
and requesting and receiving corresponding first consensus data from the consensus node and/or the light node corresponding to each consensus data initiating address.
7. A blockchain data consensus device, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the blockchain data consensus method according to any of claims 1 to 5 when executing the computer program.
8. A readable storage medium, characterized by: computer program stored on a readable storage medium, which when executed by a processor, implements the steps of the blockchain data consensus method according to one of the claims 1 to 5.
CN202210448288.3A 2022-04-26 2022-04-26 Block chain data consensus method, device, equipment and readable storage medium Active CN114928650B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210448288.3A CN114928650B (en) 2022-04-26 2022-04-26 Block chain data consensus method, device, equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210448288.3A CN114928650B (en) 2022-04-26 2022-04-26 Block chain data consensus method, device, equipment and readable storage medium

Publications (2)

Publication Number Publication Date
CN114928650A CN114928650A (en) 2022-08-19
CN114928650B true CN114928650B (en) 2023-06-30

Family

ID=82805828

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210448288.3A Active CN114928650B (en) 2022-04-26 2022-04-26 Block chain data consensus method, device, equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN114928650B (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108848056A (en) * 2018-05-03 2018-11-20 南京理工大学 Block chain common recognition method based on verifying
CN110647582A (en) * 2019-09-17 2020-01-03 腾讯科技(深圳)有限公司 Method and device for block chain network consensus checking, storage medium and computer equipment
CN111343179A (en) * 2020-02-25 2020-06-26 中国工商银行股份有限公司 Real-time consensus method and device for authenticity of data on link
KR20200144755A (en) * 2019-06-19 2020-12-30 에스케이텔레콤 주식회사 Apparatus and method for consensus based on blockchain
CN112398692A (en) * 2020-11-16 2021-02-23 网易(杭州)网络有限公司 Consensus process processing method and device and electronic equipment
CN113032489A (en) * 2021-03-29 2021-06-25 湖北央中巨石信息技术有限公司 Asynchronous consensus method, system, device and medium based on block chain
CN113127569A (en) * 2021-05-11 2021-07-16 中国工商银行股份有限公司 Consensus method and device for block chain system, electronic equipment and storage medium
CN113541968A (en) * 2021-09-16 2021-10-22 中国信息通信研究院 Consensus method, device and block chain system
CN113987574A (en) * 2021-10-27 2022-01-28 成都质数斯达克科技有限公司 Block chain private transaction method, device, equipment and readable storage medium
KR20220013846A (en) * 2020-07-27 2022-02-04 한국전자통신연구원 Method and apparatus for agreement of block in blockchain network

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108848056A (en) * 2018-05-03 2018-11-20 南京理工大学 Block chain common recognition method based on verifying
KR20200144755A (en) * 2019-06-19 2020-12-30 에스케이텔레콤 주식회사 Apparatus and method for consensus based on blockchain
CN110647582A (en) * 2019-09-17 2020-01-03 腾讯科技(深圳)有限公司 Method and device for block chain network consensus checking, storage medium and computer equipment
CN111343179A (en) * 2020-02-25 2020-06-26 中国工商银行股份有限公司 Real-time consensus method and device for authenticity of data on link
KR20220013846A (en) * 2020-07-27 2022-02-04 한국전자통신연구원 Method and apparatus for agreement of block in blockchain network
CN112398692A (en) * 2020-11-16 2021-02-23 网易(杭州)网络有限公司 Consensus process processing method and device and electronic equipment
CN113032489A (en) * 2021-03-29 2021-06-25 湖北央中巨石信息技术有限公司 Asynchronous consensus method, system, device and medium based on block chain
CN113127569A (en) * 2021-05-11 2021-07-16 中国工商银行股份有限公司 Consensus method and device for block chain system, electronic equipment and storage medium
CN113541968A (en) * 2021-09-16 2021-10-22 中国信息通信研究院 Consensus method, device and block chain system
CN113987574A (en) * 2021-10-27 2022-01-28 成都质数斯达克科技有限公司 Block chain private transaction method, device, equipment and readable storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
WANG ZIYANG, WANG JUAN, LIU YANING, WANG WEI.IMPROVEMENT OF PBFT CONSENSUS MECHANISM BASED ON CREDIBILITY.《IEEE》.2021,93-96. *

Also Published As

Publication number Publication date
CN114928650A (en) 2022-08-19

Similar Documents

Publication Publication Date Title
CN107888562B (en) Data verification and transceiving method, node and system for parallel link access to interconnection chain
CN109936457B (en) Block chain multi-party witness method, device, equipment and computer readable storage medium
CN110597925B (en) Cross-chain data processing method and device based on block chain
CN108200210B (en) Block chain-based chain management method, block chain-based chain management device and computer-readable medium
WO2021233049A1 (en) Blockchain–based data processing method, apparatus, device, and readable storage medium
KR20210003234A (en) Maintaining blocks of a blockchain in a segmented blockchain network
US11899689B2 (en) Blockchain-based data synchronization method, apparatus, and computer-readable storage medium
CN110597918B (en) Account management method, account management device and computer readable storage medium
EP4216077A1 (en) Blockchain network-based method and apparatus for data processing, and computer device
CN114092252B (en) Block chain transaction execution method, device, equipment and readable storage medium
CN113723962B (en) Block chain authority management method and block chain system
CN113067707B (en) Data processing method, device and equipment based on block chain and readable storage medium
CN110705893B (en) Service node management method, device, equipment and storage medium
CN112184436B (en) Data synchronization method, electronic device and readable storage medium
US20080172649A1 (en) Strategies for Synchronizing a Product
EP4030314A1 (en) Blockchain-based data processing method, apparatus and device, and readable storage medium
CN111555860A (en) Block link point consensus method and device, electronic equipment and storage medium
CN116991948A (en) Block data synchronization system and method, electronic device and storage medium
CN114928650B (en) Block chain data consensus method, device, equipment and readable storage medium
CN111343212B (en) Message processing method, device, equipment and storage medium
US20230259930A1 (en) Cross-chain transaction processing method and apparatus, electronic device, and storage medium
CN113497762A (en) Data message transmission method and device
CN114500651A (en) Block chain data transmission method, device and equipment and readable storage medium
CN111953540A (en) Message generation method and device, electronic equipment and storage medium
CN117473557B (en) Trusted setting method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant