CN112910648B - Consensus method and device for privacy states of block chain - Google Patents

Consensus method and device for privacy states of block chain Download PDF

Info

Publication number
CN112910648B
CN112910648B CN201911219097.4A CN201911219097A CN112910648B CN 112910648 B CN112910648 B CN 112910648B CN 201911219097 A CN201911219097 A CN 201911219097A CN 112910648 B CN112910648 B CN 112910648B
Authority
CN
China
Prior art keywords
privacy
evidence
block
state
nodes
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
CN201911219097.4A
Other languages
Chinese (zh)
Other versions
CN112910648A (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.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and 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 Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN201911219097.4A priority Critical patent/CN112910648B/en
Publication of CN112910648A publication Critical patent/CN112910648A/en
Application granted granted Critical
Publication of CN112910648B publication Critical patent/CN112910648B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3247Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving digital signatures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/02Details
    • H04L12/16Arrangements for providing special services to substations
    • H04L12/18Arrangements for providing special services to substations for broadcast or conference, e.g. multicast
    • H04L12/1854Arrangements for providing special services to substations for broadcast or conference, e.g. multicast with non-centralised forwarding system, e.g. chaincast
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3236Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2209/00Additional information or applications relating to cryptographic mechanisms or cryptographic arrangements for secret or secure communication H04L9/00
    • H04L2209/46Secure multiparty computation, e.g. millionaire problem
    • H04L2209/463Electronic voting
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/50Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using hash chains, e.g. blockchains or hash trees

Abstract

The embodiment of the disclosure discloses a consensus method and device for block chain privacy states. One embodiment of the method comprises: acquiring a privacy state of a block with a target height obtained after a local node in a privacy organization of a block chain network executes privacy transaction; signing the privacy state, packaging into proof transaction and broadcasting to a block chain network; receiving and executing the evidence-proving transaction of other nodes in the privacy organization, obtaining evidence-proving information and counting, wherein the evidence-proving information comprises the privacy state and the height of a block where the privacy state is located; and when the number of the nodes of a certain privacy state effective in the block with the target height in the privacy organization reaches a preset threshold value, determining that the execution result of the privacy transaction in the block before the target height is correct. According to the embodiment, the privacy states obtained after the privacy transaction is executed can be identified, and the identification safety characteristic of the privacy states is realized. Thereby ensuring the safety of the cloud computing service.

Description

Consensus method and device for block chain privacy states
Technical Field
The embodiment of the disclosure relates to the technical field of computers, in particular to a consensus method and device for block chain privacy states.
Background
Traditional distributed computing environments can handle single point of failure, but generally cannot handle malicious behaviors, and the malicious behaviors of any one node can cause the whole distributed computing environment to be unavailable. The development of block chain (block chain) technology solves the problem and meets the requirement of secure interaction in an untrusted distributed computing environment.
Typically, data is published in a distributed computing environment built by blockchain techniques. For public links, data is published across the entire network; while for a federation chain, data is disclosed throughout the federation. This is because the maintenance of the blockchain network requires computation and verification of all data, thereby ensuring the security of the distributed computing environment. In some cases, data disclosure may be acceptable, such as in a public chain environment. However, in some cases, there is a need to protect data privacy.
There are two common ways to implement data privacy protection on blockchains. One implementation method is to encrypt data to be protected in privacy and then submit the encrypted data to a blockchain network, and only nodes with decryption keys can decrypt the data, so that the privacy protection is realized. The other realization method is that the data is divided into an encryption part and a disclosure part, the disclosure part is submitted to a blockchain network, the data is transmitted among privacy transaction participants under the encryption part chain, and non-participants can not know the data of the encryption part, so that privacy protection is realized.
The scenario in which a privacy transaction is performed on a blockchain typically has a scope attribute indicating that the privacy transaction is visible within the scope. In general, in the public state of the block chain, corresponding range information is recorded, and the range is called privacy organization, which is called organization for short. The organization comprises a plurality of member nodes, and private transactions executed by the organization members within the range of the organization are invisible outside the organization.
And the organization member node executes the privacy transaction to obtain the privacy state. All nodes in the blockchain network execute public transactions to obtain a public state. The public state is ensured to be consistent by a consensus mechanism of the block chain network, namely the data state obtained after the execution of the public transaction is consistent in the block chain network, and the node can judge the validity of the state; however, the privacy data is usually stored in a local privacy state database, and the data state obtained after the privacy type transaction is executed has no mechanism to ensure consistency in the blockchain network, and the node cannot judge the validity of the privacy state. If the consensus security guarantee of the privacy state is not provided, the node cannot judge whether the current privacy state is correct and valid, and cannot judge whether the execution result of the privacy transaction is correct or not.
Disclosure of Invention
The embodiment of the disclosure provides a consensus method and device for block chain privacy states.
In a first aspect, an embodiment of the present disclosure provides a method for consensus of block chain privacy states, including: obtaining the privacy state of a block with a target height obtained after a local node in a privacy organization of a block chain network executes privacy transaction; signing the privacy state, packaging into proof transaction and broadcasting to a block chain network; receiving and executing the evidence-raising transactions of other nodes in the privacy organization, obtaining evidence-raising information and counting the evidence-raising information, wherein the evidence-raising information comprises the privacy state and the height of a block where the privacy state is located; and when the number of the nodes of a certain privacy state effective in the block with the target height in the privacy organization reaches a preset threshold value, determining that the execution result of the privacy transaction in the block before the target height is correct.
In some embodiments, the method further comprises: and when the number of the nodes which are effectively testified to any privacy state of the block with the target height in the privacy organization can not reach the preset threshold value, determining that the execution result of the privacy transaction in the block before the target height is abnormal.
In some embodiments, performing statistics comprises: checking validity of the proof information; and if the proof information is valid, recording corresponding proof information on all the nodes.
In some embodiments, performing statistics comprises: and if the proof information is invalid, discarding the node initiating the invalid proof and recording the related information.
In some embodiments, the method further comprises: and punishing nodes initiating invalid proof.
In some embodiments, the method further comprises: the target height is selected at predetermined intervals.
In a second aspect, an embodiment of the present disclosure provides an apparatus for consensus on privacy status of a blockchain, including: the acquisition unit is configured to acquire the privacy state of a block with a target height obtained after a local node in a privacy organization of the blockchain network executes privacy transaction; the verification unit is configured to sign the privacy state and then pack the privacy state into verification transaction broadcast to the block chain network; the statistical unit is configured to receive and execute the evidence-proving transaction of other nodes in the privacy organization, obtain evidence-proving information and perform statistics, wherein the evidence-proving information comprises the privacy state and the height of a block where the privacy state is located; a determining unit configured to determine that an execution result of the privacy transaction in a block before the target height is correct when the number of nodes in which a certain privacy state of the block in the privacy organization that demonstrates the target height is valid reaches a predetermined threshold.
In some embodiments, the determining unit is further configured to: and when the number of the nodes which are effectively testified to any privacy state of the block with the target height in the privacy organization can not reach the preset threshold value, determining that the execution result of the privacy transaction in the block before the target height is abnormal.
In some embodiments, the statistics unit is further configured to: checking validity of the proof information; and if the evidence information is effective, recording corresponding evidence information on all the nodes.
In some embodiments, the statistics unit is further configured to: and if the proof information is invalid, discarding the node initiating the invalid proof and recording the related information.
In some embodiments, the statistics unit is further configured to: and punishing nodes initiating invalid proof.
In some embodiments, the apparatus further comprises a selection unit configured to: the target height is selected at predetermined intervals.
In a third aspect, an embodiment of the present disclosure provides an electronic device, including: one or more processors; a storage device having one or more programs stored thereon which, when executed by one or more processors, cause the one or more processors to implement a method as in any one of the first aspects.
In a fourth aspect, embodiments of the disclosure provide a computer readable medium having a computer program stored thereon, wherein the program when executed by a processor implements a method as in any one of the first aspect.
The embodiment of the disclosure provides a verification mechanism of a privacy organization member node for the privacy state, and the verification mechanism realizes the security guarantee of the consensus of the privacy state, so that the member node can judge the correctness of the execution result of the privacy transaction.
Drawings
Other features, objects and advantages of the disclosure will become more apparent upon reading of the following detailed description of non-limiting embodiments thereof, made with reference to the accompanying drawings in which:
FIGS. 1a, 1b are exemplary system architecture diagrams in which one embodiment of the present disclosure may be applied;
FIG. 2 is a flow diagram of one embodiment of a method of consensus of blockchain privacy states according to the present disclosure;
FIG. 3 is a schematic diagram of one application scenario of a consensus method of blockchain privacy states according to the present disclosure;
FIG. 4 is a flow diagram of yet another embodiment of a method of consensus of blockchain privacy states according to the present disclosure;
FIG. 5 is a block diagram illustrating one embodiment of a device for consensus on blockchain privacy status according to the present disclosure;
FIG. 6 is a schematic block diagram of a computer system suitable for use with an electronic device implementing embodiments of the present disclosure.
Detailed Description
The present disclosure is described in further detail below with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the relevant invention and not restrictive of the invention. It should be noted that, for convenience of description, only the portions related to the related invention are shown in the drawings.
It should be noted that, in the present disclosure, the embodiments and the features of the embodiments may be combined with each other without conflict. The present disclosure will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
Fig. 1a, 1b illustrate an exemplary system architecture 100 to which embodiments of the consensus method of blockchain privacy states or the consensus apparatus of blockchain privacy states of the present disclosure may be applied.
As shown in fig. 1a, the system architecture 100 may include a local terminal 101, a consensus node 102, a third party server 103, and a consensus terminal 104. The local terminal 101, the consensus node 102, the third party server 103 and the consensus terminal 104 communicate with each other via a network. The network may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
Fig. 1b is a schematic network structure diagram illustrating a method for consensus of block chain privacy states. One common node can be shared by one user and can also be shared by other users.
The user may interact with the consensus node 102, the third party server 103 and the consensus terminal 104 via the network and the local terminal 101 to receive or send messages or the like. The local terminal 101 and the consensus terminal may have various communication client applications installed thereon, such as a web browser application, a shopping application, a search application, an instant messaging tool, a mailbox client, social platform software, and the like.
The local terminal 101 and the consensus terminal 104 may be hardware or software. When the local terminal 101 and the consensus terminal 104 are hardware, they may be various electronic devices supporting the consensus request. Any terminal equipment connected to a node within the privacy organization may be used as the local terminal 101, i.e. the local terminal 101 and the consensus terminal 104 may be interchanged. A certain user can actively initiate a consensus request of the privacy state through a terminal, and a third-party server can control all nodes in the privacy organization to initiate the consensus request of the privacy state.
The consensus nodes A, B and C belong to the same privacy organization S. The privacy transaction within the privacy organisation S is visible. The consensus nodes a, B, C may each perform the same private transaction. The user can initiate a consensus request of the privacy state through the local terminal 101, and then the consensus user votes through the terminal 104 to determine whether the result of the privacy transaction is correct.
The block chain system is composed of a data layer, a network layer, a consensus layer, an excitation layer, a contract layer and an application layer. The consensus layer mainly encapsulates various kinds of consensus algorithms of network nodes (i.e., consensus nodes). The verification and confirmation of the transaction is completed in a short time through the voting of the consensus node. For a private transaction, if the number of effective testbacks reaches a certain threshold, for example, two thirds of nodes exceeding the number of organization members can achieve consensus, the whole network can be considered to achieve consensus.
It should be noted that the consensus node may be implemented as a distributed server cluster composed of multiple servers, or may be implemented as a single server.
The third party server 103 may provide node management functions such as adding/deleting nodes, distributing keys, etc.
It should be noted that the consensus method for the block chain privacy status provided by the embodiments of the present disclosure is generally performed by the consensus node 102, and any node in the privacy organization may initiate a consensus request. Accordingly, the consensus device for the privacy status of the blockchain is typically disposed in the consensus node 102.
It should be understood that the number of local terminals, consensus nodes, third party servers and consensus terminals in fig. 1 is merely illustrative. There may be any number of local terminals, consensus nodes, third party servers, and consensus terminals, as desired for an implementation.
With continued reference to fig. 2, a flow 200 of one embodiment of a method for consensus of blockchain privacy states in accordance with the present disclosure is shown. The consensus method of the block chain privacy state comprises the following steps:
step 201, obtaining the privacy state of the block with the target height obtained after the local node in the privacy organization of the block chain network executes the privacy transaction.
In this embodiment, an execution subject of the consensus method for the privacy status of the blockchain (for example, any consensus node in the privacy organization shown in fig. 1) may obtain the privacy status of the local node. The privacy state is typically stored in a privacy state database local to the node, isolated from the public state database. Nodes in a privacy organization (hereinafter referred to as an organization) execute privacy transactions in the organization, and after the execution of a block is finished, a state hash of a privacy state database can be obtained, and the state hash is referred to as "privacy state" in the invention. The demonstration can be initiated by aiming at the blocks with each height, or selecting the blocks with one height at certain intervals. The selected height is the target height. The discontinuous selection of the target height can reduce the verification times by interval verification, and if the interval verification fails, the error checking is still required to be started from the last correct point. In order to improve the efficiency, the checking can be carried out by adopting a dichotomy mode and the like.
Step 202, signing the privacy state, packaging into proof transaction and broadcasting to the block chain network.
In this embodiment, the proof object is a state hash of a privacy state database obtained after a block of a certain height is executed locally. The organization member node signs the state hash by using a held private key, packs the state hash, the signature of the state hash and necessary information into one transaction and broadcasts the transaction to the blockchain network.
And step 203, receiving and executing the evidence-proving transaction of other nodes in the privacy organization, obtaining evidence-proving information and carrying out statistics.
In this embodiment, the proof information includes the privacy status and the height of the block in which the privacy status is located. Each node issues a proof-of-trade and broadcasts the trade to the blockchain network. The transaction is finally agreed upon and then included in the block. Each node performs a series of transactions in the block to obtain the prover information. After the proof transaction is packed and executed by the blockchain network, the correctness of specific proof information is checked (for example, whether the information such as height, hash and the like is reasonable or not is checked), if the proof information is valid, the corresponding proof information is recorded on all nodes, if the proof information is invalid, the relevant information is recorded, and then the nodes initiating invalid proof can be punished. For example, if the height of the current newest block is 100 and the height broadcast by a node is 110, it indicates that the node is abnormal, and the result cannot be used as a reference. The node related information is also recorded for further investigation.
In step 204, when the number of nodes in a privacy state valid in a block of the target height in the privacy organization reaches a predetermined threshold, it is determined that the execution result of the privacy transaction in the block before the target height is correct.
In this embodiment, when the number of valid assertions for a tile of a particular height within an organization reaches a certain threshold (typically more than two-thirds of the number of organization members), it is determined that the privacy status of the tile of the height within the organization is commonly guaranteed and consistent among the organization members. The member nodes within the organization can determine the altitude and the correctness of the execution result of the privacy transaction in the previous block accordingly. And (4) not needing to wait until all nodes feed back the privacy states, and considering that the privacy states before the high-level block in the organization are agreed and safely guaranteed as long as the same value of the received privacy states reaches a certain threshold value.
If the effective proof number of any privacy state does not reach the threshold value for a certain height in the proof process, the execution result of the privacy transaction in the block of the height in the organization is different, and the specific reason needs to be checked. The target height can be adjusted to search the error block forward. For example, if it is checked that the privacy status does not reach the consensus by setting the target height to 100, the checking may be continued with the target height set to 90. If the block with height 90 is normal, then check between 91-99 if the block is abnormal.
In some optional implementations of the embodiment, when the number of nodes that effectively prove any privacy state of the block of the target altitude within the privacy organization cannot reach the predetermined threshold, it is determined that the execution result of the privacy transaction in the block before the target altitude is abnormal. For example, if three nodes obtain three privacy states, consensus cannot be achieved. Indicating that the nodes inside the privacy organization are abnormal.
The privacy state consensus method based on privacy state demonstration provided by the invention has certain hysteresis, and the reason is that the specific organization privacy state can be obtained only after all transactions in a high-level block are executed. The privacy status can only be demonstrated in subsequent blocks of altitude. In the optimal case, the privacy status of the block of the previous height can be immediately verified at the next height and immediately verified, so that the hysteresis is only one height.
With continued reference to fig. 3, fig. 3 is a schematic diagram of an application scenario of the consensus method of block chain privacy states according to the present embodiment. In the application scenario of fig. 3, the privacy organization S includes four consensus nodes a, B, C, D. A user at consensus node a may initiate a privacy consensus request. The privacy state of the block with the height of 100 on the node is obtained as follows: 123. after the consensus node A uses a private key to sign the privacy state, the consensus node A is packaged into a transaction and broadcasted to the block chain network. The consensus node B, the consensus node C and the consensus node D respectively broadcast the privacy state signatures of the consensus node B, the consensus node C and the consensus node D in the corresponding heights into the blockchain network. Wherein, the privacy state of the consensus node B: 123. consensus node C privacy state: 124. consensus node D privacy state: 123. and the consensus nodes A, B, C and D receive the signature information sent by other consensus nodes, and count after the signature information is verified to be valid. The four tickets are all valid, and the final statistical result is the privacy state: 123 received 3 tickets, accounting for 3/4 of the total, exceeding the specified threshold of 2/3, so the privacy status is agreed and the correct privacy status should be 123. The privacy state of the consensus node C is wrong and needs to be checked.
According to the method provided by the embodiment of the disclosure, the consensus safety guarantee of the privacy state is realized by organizing the evidence-providing mechanism of the member node on the privacy state, so that the member node can judge the correctness of the execution result of the privacy transaction.
With further reference to fig. 4, a flow 400 of yet another embodiment of a method of consensus on blockchain privacy states is illustrated. The process 400 of the method for consensus on privacy status of blockchain comprises the following steps:
step 401, obtaining the privacy state of the block with the target height obtained after the local node in the privacy organization of the block chain network executes the privacy transaction.
And step 402, signing the privacy state, packaging the privacy state into proof transaction and broadcasting the proof transaction to a block chain network.
And step 403, receiving and executing the evidence-proving transaction of other nodes in the privacy organization, obtaining evidence-proving information, and checking the validity of the evidence-proving information.
Steps 401-403 are substantially the same as steps 201-203. The validity of the proof information can be verified through height, hash information and the like. For example, a received altitude for another node is not present in the blockchain network, indicating an anomaly. If the length of the received hash information is beyond the expectation, other nodes are also abnormal.
And step 404, if the proof-lifting information is valid, recording corresponding proof-lifting information on all nodes.
In this embodiment, if valid, valid information is recorded for subsequent voting statistics.
Step 405, when the number of nodes in a privacy state of a block in the privacy organization in which the target altitude is certified reaches a predetermined threshold, it is determined that the execution result of the privacy transaction in the block before the target altitude is correct.
In this embodiment, consensus is deemed to be achieved if the number of valid tickets reaches a predetermined threshold (e.g., 2/3 or more of the number of nodes within the privacy organization). And determining that the execution result of the privacy transaction in the block before the target height is correct.
And step 406, if the proof information is invalid, discarding the node initiating the invalid proof and recording the related information.
In this embodiment, if the received proof information is invalid, it indicates that the node sending the proof information is abnormal. The result it sent is discarded and no statistics are performed. And recording the information of the node, the reported height in case of abnormality, the privacy state and other related information.
Step 407, punishment is performed on the node initiating the invalid proof.
In this embodiment, the node that initiates the invalid proof may be directly penalized, for example, to disqualify the vote. And voting can be carried out firstly, so that each node user votes whether the node initiating the invalid proof is valid, if more than half of the nodes consider that the node has no problem, the voting qualification of the node initiating the invalid proof can be reserved, and otherwise, the voting qualification of the node initiating the invalid proof is deprived.
As can be seen from fig. 4, compared with the embodiment corresponding to fig. 2, the flow 400 of the method for blocking chain privacy status in this embodiment represents a step of punishing a node initiating invalid proof. Therefore, the scheme described in the embodiment can reduce invalid votes and improve consensus efficiency.
With further reference to fig. 5, as an implementation of the methods shown in the above-mentioned figures, the present disclosure provides an embodiment of an apparatus for a block chain privacy state, where the embodiment of the apparatus corresponds to the embodiment of the method shown in fig. 2, and the apparatus may be applied to various electronic devices.
As shown in fig. 5, the apparatus 500 for blocking chain privacy status of the present embodiment includes: an acquisition unit 501, a proof unit 502, a statistical unit 503, and a determination unit 504. The obtaining unit 501 is configured to obtain a privacy state of a block with a target height obtained after a local node in a privacy organization of a block chain network performs a privacy transaction; the attestation unit 502 is configured to sign the privacy state and then pack the privacy state into attestation transaction broadcast to the blockchain network; the statistical unit 503 is configured to receive and execute the proof transaction of other nodes in the privacy organization, obtain proof information and perform statistics, where the proof information includes the privacy state and the height of the block where the privacy state is located; the determining unit 504 is configured to determine that the execution result of the privacy transaction in the block before the target height is correct when the number of nodes in which a certain privacy state of the block in which the target height is certified within the privacy organization is valid reaches a predetermined threshold.
In this embodiment, the specific processing of the obtaining unit 501, the proving unit 502, the counting unit 503 and the determining unit 504 of the consensus device of block chain privacy status 500 may refer to step 201, step 202, step 203 and step 204 in the corresponding embodiment of fig. 2.
In some optional implementations of the present embodiment, the determining unit 504 is further configured to: when the number of nodes in the privacy organization that effectively prove any privacy state of the block with the target height cannot reach a preset threshold value, determining that the execution result of the privacy transaction in the block before the target height is abnormal.
In some optional implementations of this embodiment, the statistics unit 503 is further configured to: checking validity of the proof information; and if the proof information is valid, recording corresponding proof information on all the nodes.
In some optional implementations of this embodiment, the statistics unit 503 is further configured to: and if the proof information is invalid, discarding the node initiating the invalid proof and recording the related information.
In some optional implementations of this embodiment, the statistics unit 503 is further configured to: and punishing nodes initiating invalid proof.
In some optional implementations of this embodiment, the apparatus 500 further comprises a selection unit (not shown in the drawings) configured to: the target height is selected at predetermined intervals.
Referring now to fig. 6, a schematic diagram of an electronic device (e.g., a consensus node in fig. 1) 600 suitable for use in implementing embodiments of the present disclosure is shown. The consensus node shown in fig. 6 is only an example and should not impose any limitations on the functionality or scope of use of embodiments of the present disclosure.
As shown in fig. 6, the electronic device 600 may include a processing means (e.g., central processing unit, graphics processor, etc.) 601 that may perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM) 602 or a program loaded from a storage means 608 into a Random Access Memory (RAM) 603. In the RAM603, various programs and data necessary for the operation of the electronic apparatus 600 are also stored. The processing device 601, the ROM 602, and the RAM603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
Generally, the following devices may be connected to the I/O interface 605: input devices 606 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 607 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 608 including, for example, magnetic tape, hard disk, etc.; and a communication device 609. The communication means 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. While fig. 6 illustrates an electronic device 600 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may be alternatively implemented or provided. Each block shown in fig. 6 may represent one device or may represent multiple devices as desired.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer-readable medium, the computer program comprising program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication means 609, or installed from the storage means 608, or installed from the ROM 602. The computer program, when executed by the processing device 601, performs the above-described functions defined in the methods of embodiments of the present disclosure. It should be noted that the computer readable medium described in the embodiments of the present disclosure may be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In embodiments of the disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In embodiments of the present disclosure, however, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device. The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: obtaining the privacy state of a block with a target height obtained after a local node in a privacy organization of a block chain network executes privacy transaction; signing the privacy state, packaging into proof transaction and broadcasting to a block chain network; receiving and executing the evidence-proving transaction of other nodes in the privacy organization, obtaining evidence-proving information and counting, wherein the evidence-proving information comprises the privacy state and the height of a block where the privacy state is located; and when the number of the nodes of a certain privacy state effective in the block with the target height in the privacy organization reaches a preset threshold value, determining that the execution result of the privacy transaction in the block before the target height is correct.
Computer program code for carrying out operations for embodiments of the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present disclosure may be implemented by software or hardware. The described units may also be provided in a processor, and may be described as: a processor includes an acquisition unit, a proof unit, a statistical unit, and a determination unit. The names of these units do not form a limitation on the unit itself under certain circumstances, and for example, the acquiring unit may also be described as a unit for acquiring the privacy state of the block of the target height obtained after the local node in the privacy organization of the blockchain network performs the privacy transaction.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the invention in the present disclosure is not limited to the specific combination of the above-mentioned features, but also encompasses other embodiments in which any combination of the above-mentioned features or their equivalents is possible without departing from the inventive concept. For example, the above features and (but not limited to) the features disclosed in this disclosure having similar functions are replaced with each other to form the technical solution.

Claims (10)

1. A method of consensus on privacy status of a blockchain, comprising:
acquiring the privacy state of a block with a target height obtained after a local node in a privacy organization of a block chain network executes privacy transaction, wherein the target height is selected continuously so as to perform interval verification, and if the interval verification fails, the error is checked from the last correct point;
signing the privacy state, packaging the privacy state into proof transaction broadcast to a block chain network;
receiving and executing the evidence-raising transactions of other nodes in the privacy organization, obtaining and counting evidence-raising information, checking the validity of the evidence-raising information, recording corresponding evidence-raising information on all nodes if the evidence-raising information is valid, recording related information if the evidence-raising information is invalid, and subsequently punishing the nodes initiating invalid evidence-raising, wherein the evidence-raising information comprises the privacy state and the height of a block where the privacy state is located;
when the number of nodes in a certain privacy state of the block with the target height for evidence in the privacy organization reaches a preset threshold value, the execution result of the privacy transaction in the block before the target height is determined to be correct, and if the number of effective evidence in any privacy state does not reach the threshold value for a certain height in the evidence taking process, the target height is adjusted, and the error block is checked forwards.
2. The method of claim 1, wherein the method further comprises:
and when the number of the nodes which are used for effectively proving any privacy state of the blocks with the target height in the privacy organization cannot reach a preset threshold value, determining that the execution result of the privacy transaction in the blocks before the target height is abnormal.
3. The method of claim 1, wherein the performing statistics comprises:
and if the proof information is invalid, discarding the node initiating the invalid proof and recording the related information.
4. The method according to one of claims 1-3, wherein the method further comprises:
the target height is selected at predetermined intervals.
5. An apparatus for consensus on privacy status of a blockchain, comprising:
the system comprises an acquisition unit, a verification unit and a verification unit, wherein the acquisition unit is configured to acquire the privacy state of a block with a target height obtained after a local node in a privacy organization of a block chain network executes privacy transaction, the target height is selected continuously so as to perform interval verification, and if the interval verification fails, the check is started from the last correct point;
the verification unit is configured to sign the privacy state and then pack the privacy state into verification transaction broadcast to the block chain network;
the statistical unit is configured to receive and execute the evidence-raising transactions of other nodes in the privacy organization, obtain and count evidence-raising information, check validity of the evidence-raising information, record corresponding evidence-raising information on all the nodes if the evidence-raising information is valid, record related information if the evidence-raising information is invalid, and subsequently punish the nodes initiating invalid evidence-raising, wherein the evidence-raising information comprises the privacy state and the height of a block where the privacy state is located;
and the determining unit is configured to determine that the execution result of the privacy transaction in the block before the target height is correct when the number of nodes in a certain privacy state of the block in which the target height is proved to be valid in the privacy organization reaches a preset threshold value, and adjust the target height and forward check the error block if the number of valid proofs in any privacy state does not reach the threshold value for a certain height in the proving process.
6. The apparatus of claim 5, wherein the determination unit is further configured to:
and when the number of the nodes which are used for effectively proving any privacy state of the blocks with the target height in the privacy organization cannot reach a preset threshold value, determining that the execution result of the privacy transaction in the blocks before the target height is abnormal.
7. The apparatus of claim 5, wherein the statistics unit is further configured to:
and if the proof information is invalid, discarding the node initiating the invalid proof and recording the related information.
8. The apparatus according to one of claims 5-7, wherein the apparatus further comprises a selection unit configured to:
the target height is selected at predetermined intervals.
9. An electronic device, comprising:
one or more processors;
a storage device having one or more programs stored thereon,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-4.
10. A computer-readable medium, on which a computer program is stored, wherein the program, when executed by a processor, implements the method of any one of claims 1-4.
CN201911219097.4A 2019-12-03 2019-12-03 Consensus method and device for privacy states of block chain Active CN112910648B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911219097.4A CN112910648B (en) 2019-12-03 2019-12-03 Consensus method and device for privacy states of block chain

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911219097.4A CN112910648B (en) 2019-12-03 2019-12-03 Consensus method and device for privacy states of block chain

Publications (2)

Publication Number Publication Date
CN112910648A CN112910648A (en) 2021-06-04
CN112910648B true CN112910648B (en) 2023-04-07

Family

ID=76103892

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911219097.4A Active CN112910648B (en) 2019-12-03 2019-12-03 Consensus method and device for privacy states of block chain

Country Status (1)

Country Link
CN (1) CN112910648B (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108182635A (en) * 2017-12-18 2018-06-19 深圳前海微众银行股份有限公司 Block chain common recognition method, system and computer readable storage medium
WO2018119930A1 (en) * 2016-12-29 2018-07-05 深圳前海达闼云端智能科技有限公司 Transaction verification processing method, apparatus and node device
CN109377229A (en) * 2018-11-23 2019-02-22 全链通有限公司 A kind of transaction common recognition method, node and block catenary system
CN109584072A (en) * 2018-11-28 2019-04-05 杭州复杂美科技有限公司 A kind of transaction sending method, equipment and the storage medium of parallel chain common recognition
CN109831425A (en) * 2019-01-25 2019-05-31 中国联合网络通信集团有限公司 Block chain common recognition method, apparatus, equipment and computer readable storage medium
CN109859047A (en) * 2019-01-31 2019-06-07 北京瑞卓喜投科技发展有限公司 A kind of block chain update method and block chain more new system
CN109933592A (en) * 2019-03-22 2019-06-25 杭州复杂美科技有限公司 Date storage method, data rewind method, equipment and storage medium
CN110147684A (en) * 2019-05-24 2019-08-20 众安信息技术服务有限公司 For realizing the method and apparatus of block chain data-privacy protection
CN110245956A (en) * 2019-05-15 2019-09-17 众安信息技术服务有限公司 A kind of block chain transaction confirmation method and system based on asynchronous multichain
CN110380847A (en) * 2019-07-01 2019-10-25 阿里巴巴集团控股有限公司 A kind of block chain common recognition method and apparatus

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018119930A1 (en) * 2016-12-29 2018-07-05 深圳前海达闼云端智能科技有限公司 Transaction verification processing method, apparatus and node device
CN108182635A (en) * 2017-12-18 2018-06-19 深圳前海微众银行股份有限公司 Block chain common recognition method, system and computer readable storage medium
CN109377229A (en) * 2018-11-23 2019-02-22 全链通有限公司 A kind of transaction common recognition method, node and block catenary system
CN109584072A (en) * 2018-11-28 2019-04-05 杭州复杂美科技有限公司 A kind of transaction sending method, equipment and the storage medium of parallel chain common recognition
CN109831425A (en) * 2019-01-25 2019-05-31 中国联合网络通信集团有限公司 Block chain common recognition method, apparatus, equipment and computer readable storage medium
CN109859047A (en) * 2019-01-31 2019-06-07 北京瑞卓喜投科技发展有限公司 A kind of block chain update method and block chain more new system
CN109933592A (en) * 2019-03-22 2019-06-25 杭州复杂美科技有限公司 Date storage method, data rewind method, equipment and storage medium
CN110245956A (en) * 2019-05-15 2019-09-17 众安信息技术服务有限公司 A kind of block chain transaction confirmation method and system based on asynchronous multichain
CN110147684A (en) * 2019-05-24 2019-08-20 众安信息技术服务有限公司 For realizing the method and apparatus of block chain data-privacy protection
CN110380847A (en) * 2019-07-01 2019-10-25 阿里巴巴集团控股有限公司 A kind of block chain common recognition method and apparatus

Also Published As

Publication number Publication date
CN112910648A (en) 2021-06-04

Similar Documents

Publication Publication Date Title
US11444782B2 (en) Dynamically managing exchanges of data using a distributed ledger and homomorphic commitments
CN108768665B (en) Block chain generation method and device, computer equipment and storage medium
US11244054B2 (en) Method and apparatus for trusted computing
KR20200096790A (en) System and method for authenticating off-chain data based on proof verification
US11212112B2 (en) System, data management method, and program
EP3384629B1 (en) System and method for tamper-resistant device usage metering
CN111027099B (en) Identity verification method, device, system and computer readable storage medium
CN110555029A (en) ticket management method and device based on block chain and storage medium
US20230037932A1 (en) Data processing method and apparatus based on blockchain network, and computer device
CN110932859B (en) User information processing method, device and equipment and readable storage medium
US20220094560A1 (en) Integrating Device Identity Into A Permissioning Framework Of A Blockchain
CN111465951A (en) Intelligent logistics management using blockchains
CN110908786A (en) Intelligent contract calling method, device and medium
CN111416709B (en) Voting method, device, equipment and storage medium based on block chain system
Borges et al. An efficient privacy-preserving pay-by-phone system for regulated parking areas
US11943210B2 (en) System and method for distributed, keyless electronic transactions with authentication
CN114358764A (en) Privacy calculation method based on intelligent contracts in block chain and related equipment
CN112291321B (en) Service processing method, device and system
KR101120059B1 (en) Billing verifying apparatus, billing apparatus and method for cloud computing environment
CN109818965B (en) Personal identity verification device and method
CN112910648B (en) Consensus method and device for privacy states of block chain
CN111447216B (en) Method and apparatus for changing consensus node
CN114329610A (en) Block chain privacy identity protection method, device, storage medium and system
CN114969211B (en) Civil aviation data processing system based on block chain
CN116561820B (en) Trusted data processing method and related 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