WO2020042792A1 - 基于区块链的交易共识处理方法及装置、电子设备 - Google Patents

基于区块链的交易共识处理方法及装置、电子设备 Download PDF

Info

Publication number
WO2020042792A1
WO2020042792A1 PCT/CN2019/096269 CN2019096269W WO2020042792A1 WO 2020042792 A1 WO2020042792 A1 WO 2020042792A1 CN 2019096269 W CN2019096269 W CN 2019096269W WO 2020042792 A1 WO2020042792 A1 WO 2020042792A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
algorithm
node device
transaction data
transaction
Prior art date
Application number
PCT/CN2019/096269
Other languages
English (en)
French (fr)
Inventor
邓福喜
Original Assignee
阿里巴巴集团控股有限公司
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 阿里巴巴集团控股有限公司 filed Critical 阿里巴巴集团控股有限公司
Priority to EP19855726.6A priority Critical patent/EP3809356A4/en
Priority to SG11202010530PA priority patent/SG11202010530PA/en
Publication of WO2020042792A1 publication Critical patent/WO2020042792A1/zh
Priority to US17/076,526 priority patent/US11023309B2/en
Priority to US17/240,467 priority patent/US11614994B2/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/08Error detection or correction by redundancy in data representation, e.g. by using checking codes
    • G06F11/10Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's
    • 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
    • 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
    • H03ELECTRONIC CIRCUITRY
    • H03MCODING; DECODING; CODE CONVERSION IN GENERAL
    • H03M13/00Coding, decoding or code conversion, for error detection or error correction; Coding theory basic assumptions; Coding bounds; Error probability evaluation methods; Channel models; Simulation or testing of codes
    • H03M13/03Error detection or forward error correction by redundancy in data representation, i.e. code words containing more digits than the source words
    • H03M13/05Error detection or forward error correction by redundancy in data representation, i.e. code words containing more digits than the source words using block codes, i.e. a predetermined number of check bits joined to a predetermined number of information bits
    • H03M13/13Linear codes
    • H03M13/15Cyclic codes, i.e. cyclic shifts of codewords produce other codewords, e.g. codes defined by a generator polynomial, Bose-Chaudhuri-Hocquenghem [BCH] codes
    • H03M13/151Cyclic codes, i.e. cyclic shifts of codewords produce other codewords, e.g. codes defined by a generator polynomial, Bose-Chaudhuri-Hocquenghem [BCH] codes using error location or error correction polynomials
    • H03M13/154Error and erasure correction, e.g. by using the error and erasure locator or Forney polynomial
    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03MCODING; DECODING; CODE CONVERSION IN GENERAL
    • H03M7/00Conversion of a code where information is represented by a given sequence or number of digits to a code where the same, similar or subset of information is represented by a different sequence or number of digits
    • H03M7/30Compression; Expansion; Suppression of unnecessary data, e.g. redundancy reduction
    • H03M7/60General implementation details not specific to a particular type of compression
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
    • 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/06Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
    • H04L9/0618Block ciphers, i.e. encrypting groups of characters of a plain text message using fixed encryption transformation
    • H04L9/0637Modes of operation, e.g. cipher block chaining [CBC], electronic codebook [ECB] or Galois/counter mode [GCM]
    • 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/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0816Key establishment, i.e. cryptographic processes or cryptographic protocols whereby a shared secret becomes available to two or more parties, for subsequent use
    • H04L9/085Secret sharing or secret splitting, e.g. threshold schemes
    • 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/14Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using a plurality of keys or algorithms
    • 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
    • H04L9/3239Cryptographic 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 involving non-keyed hash functions, e.g. modification detection codes [MDCs], MD5, SHA or RIPEMD
    • 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
    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03MCODING; DECODING; CODE CONVERSION IN GENERAL
    • H03M7/00Conversion of a code where information is represented by a given sequence or number of digits to a code where the same, similar or subset of information is represented by a different sequence or number of digits
    • H03M7/30Compression; Expansion; Suppression of unnecessary data, e.g. redundancy reduction

Definitions

  • Blockchain technology also known as distributed ledger technology, is an emerging technology in which several computing devices participate in "accounting" and jointly maintain a complete distributed database. Because blockchain technology has the characteristics of decentralization, openness and transparency, each computing device can participate in database records, and data can be quickly synchronized between computing devices, making blockchain technology widely used in many fields. Apply
  • the node device in the blockchain includes at least one master node device and several slave node devices.
  • the master node device will propose based on an erasure coding algorithm.
  • the transaction data is divided into a specified number of data fragments, the method includes:
  • the method further includes:
  • the consensus algorithm carried on the blockchain is the pbft algorithm
  • the receiving data fragments of the transaction data sent unicast by the master node device includes:
  • Pre-Prepare message sent unicast by the master node device; wherein the Pre-Prepare message includes a data fragment of the transaction data;
  • the sending the received data fragment broadcast to each other node device in the blockchain includes:
  • the dividing the proposed transaction data into a specified number of data fragments based on the erasure coding algorithm includes:
  • the transaction data after compression processing is divided into a specified number of data fragments based on the erasure coding algorithm.
  • the dividing the proposed transaction data into a specified number of data fragments based on the erasure coding algorithm includes:
  • the transaction data after encryption processing is divided into a specified number of data fragments based on the erasure coding algorithm.
  • the data recovery of the received data fragments based on the erasure code reconstruction algorithm to obtain the original content of the transaction data includes:
  • the recovered transaction data is decrypted to obtain the original content of the transaction data.
  • Decrypting the recovered transaction data based on a decryption algorithm corresponding to the encryption algorithm and a decryption key corresponding to the encryption key includes:
  • the transaction data proposed by the master node is a transaction list constructed by the user node client to be consensus-transmitted in the current consensus cycle of the master node device; the specified quantity is in the blockchain The total number of node devices.
  • the blockchain is an alliance chain.
  • a receiving module that receives data fragments of the transaction data sent unicast by the master node device; wherein the data fragments sent by the master node device unicast to each node device are different;
  • the sending module sends the received data fragment broadcast to other node devices in the blockchain; and receives the data fragments of the transaction data broadcasted by the other node devices;
  • a determining module that determines whether the number of data fragments of the received transaction data reaches an erasure code recovery threshold
  • the recovery module if it is, performs data recovery on the received data fragments based on the erasure code reconstruction algorithm to obtain the original content of the transaction data to complete the consensus processing of the original content of the transaction data.
  • the device further includes:
  • the sending module further:
  • the consensus algorithm carried on the blockchain is the pbft algorithm
  • the receiving module :
  • Pre-Prepare message sent unicast by the master node device; wherein the Pre-Prepare message includes a data fragment of the transaction data;
  • the segmentation module :
  • the transaction data after compression processing is divided into a specified number of data fragments based on the erasure coding algorithm.
  • the recovery module :
  • the segmentation module :
  • the transaction data after encryption processing is divided into a specified number of data fragments based on the erasure coding algorithm.
  • the recovery module :
  • the encryption algorithm is a threshold encryption algorithm
  • the decryption algorithm is a threshold decryption algorithm corresponding to the threshold encryption algorithm
  • the decryption key is divided into a specified number of subkeys; wherein each subkey is composed of Each node device is held separately;
  • the transaction data proposed by the master node is a transaction list constructed by the user node client to be consensus-transmitted in the current consensus cycle of the master node device; the specified quantity is in the blockchain The total number of node devices.
  • the blockchain is an alliance chain.
  • the code algorithm divides the proposed transaction data into a specified number of data fragments. The data fragments sent by the master node device to each node device are different;
  • the master node device proposes transaction data to be consensus to each slave node device
  • the consensus transaction data is fragmented based on the erasure coding algorithm and then propagated:
  • the master node device proposes transaction data to each slave node device, it is no longer necessary to broadcast the complete transaction data to each slave node device, but to unicastly send data fragments to each slave node device. That is, it can significantly reduce the data transmission bandwidth consumed when the transaction data that requires consensus is diffused to the participating node devices, and the transaction data to be agreed can be propagated to the slave node devices in a short time to complete the consensus. This can improve the efficiency of consensus processing;
  • the master node device since the master node device unicasts to the slave node devices only the data fragments of the above transaction data, for the master node device, it is not possible to know the complete content of the complete transaction to which the data fragment belongs, so Effectively prevent the master node device from selectively unicasting certain specific transactions to other node devices participating in the consensus, and selective consensus on some specific transactions, so as to ensure the fairness of the consensus. Consensus to "do evil".
  • FIG. 1 is a flowchart of a blockchain-based transaction consensus processing method according to an exemplary embodiment.
  • FIG. 2 is an interaction schematic diagram of three phases of an optimized pbft algorithm provided by an exemplary embodiment.
  • FIG. 3 is a schematic structural diagram of an electronic device according to an exemplary embodiment.
  • a master node device can be elected from each node device in the blockchain (for example, a master node device is re-elected for each round of consensus, Other node devices serve as slave node devices).
  • the master node device initiates transaction consensus to the node and is responsible for creating the latest block for the blockchain based on the transaction data passed by the consensus.
  • the master node device When the master node device initiates a round of transaction consensus, it can first divide the proposed transaction data to be consensus into a specified number of data fragments based on the erasure coding algorithm, and then unicast the divided data fragments to each other. Node device; among them, the data fragment sent by the master node device to each node device unicast is different;
  • each slave node device when each slave node device receives the data fragments of the above-mentioned transaction data sent by the master node device unicast, it can continue to broadcast the received data fragments to other node devices in the blockchain; and, It can collect data fragments broadcasted by other node devices.
  • any node device including the master node device and the slave node device in the blockchain, it can be determined whether the number of data fragments of the collected transaction data has reached the erasure code
  • the erasure code recovery threshold defined when the algorithm splits the above transaction data; if it is, it indicates that the number of data fragments currently collected is sufficient to recover the original content of the above transaction data. At this time, it can be reconstructed based on the erasure code
  • the algorithm performs data recovery on the collected data fragments, obtains the original content of the transaction data, and then completes the consensus processing of the original content of the transaction data.
  • the master node device proposes transaction data to be consensus to each slave node device
  • the consensus transaction data is fragmented based on the erasure coding algorithm and then propagated:
  • the master node device proposes transaction data to each slave node device, it is no longer necessary to broadcast the complete transaction data to each slave node device, but to unicastly send data fragments to each slave node device. That is, it can significantly reduce the data transmission bandwidth consumed when the transaction data that requires consensus is diffused to the participating node devices, and the transaction data to be agreed can be propagated to the slave node devices in a short time to complete the consensus. This can improve the efficiency of consensus processing;
  • the master node device since the master node device unicasts to the slave node devices only the data fragments of the above transaction data, for the master node device, it is not possible to know the complete content of the complete transaction to which the data fragment belongs, so Effectively prevent the master node device from selectively unicasting certain specific transactions to other node devices participating in the consensus, and selective consensus on some specific transactions, so as to ensure the fairness of the consensus. Consensus to "do evil".
  • FIG. 1 is a block chain-based transaction consensus processing method provided by an embodiment of this specification, and is applied to any node device in the block chain; wherein, the node device in the block chain At least one master node device and several slave node devices are included.
  • the master node device divides the proposed transaction data into a specified number of data fragments based on an erasure coding algorithm, and performs the following steps:
  • Step 102 Receive data fragments of the transaction data sent unicast by the master node device; wherein the data fragments sent by the master node device unicast to each node device are different;
  • Step 104 Broadcast the received data fragment broadcast to other node devices in the blockchain; and receive the data fragment of the transaction data broadcast sent by the other node devices;
  • Step 106 Determine whether the number of data fragments of the received transaction data reaches an erasure code recovery threshold
  • Step 108 If yes, perform data recovery on the received data fragments based on the erasure code reconstruction algorithm to obtain the original content of the transaction data to complete the consensus processing of the original content of the transaction data.
  • the above-mentioned blockchain may specifically be an alliance chain consisting of a server of a third-party payment platform, a domestic bank server, an overseas bank server, and several user node devices as member devices.
  • the operator of the alliance chain can rely on the alliance chain to deploy online services such as cross-border transfers and asset transfers based on the alliance chain.
  • the transaction described in this specification refers to a piece of data created by a user through a blockchain client and that needs to be finally published to the blockchain's distributed database.
  • a narrow transaction refers to a value transfer issued by a user to the blockchain; for example, in a traditional Bitcoin blockchain network, a transaction can be a transfer initiated by a user in the blockchain.
  • the generalized transaction refers to a piece of business data with business intent issued by the user to the blockchain; for example, the operator can build an alliance chain based on actual business needs, and rely on the alliance chain to deploy other types that are not related to value transfer.
  • Online business (such as renting business, vehicle scheduling business, insurance claims business, credit services, medical services, etc.), and in this type of alliance chain, the transaction can be a business with a business intent issued by the user in the alliance chain Message or business request.
  • consensus algorithm carried by the above-mentioned blockchain is not specifically limited in this specification; in practical applications, a series of Byzantine Fault Tolerance algorithms can be specifically used as the consensus algorithm, and non-Byzantine fault tolerance can also be used. A series of algorithms are used as consensus algorithms.
  • the so-called Byzantine fault-tolerant algorithm refers to the distributed fault-tolerant algorithm of Byzantine nodes (i.e. evil nodes) in a distributed network composed of several node devices; for example, the pbft algorithm; if the Byzantine fault-tolerant algorithm is used in the block
  • Byzantine fault-tolerant algorithm is used in the block
  • non-Byzantine fault-tolerant algorithm refers to a distributed fault-tolerant algorithm that does not consider Byzantine nodes in a distributed network composed of several node devices; for example, the raft algorithm, etc .; if a non-Byzantine fault-tolerant algorithm is used in the area When performing consensus processing in a blockchain network, it will be considered that there are no malicious nodes in the blockchain, but only faulty nodes.
  • the transaction data proposed by the master node device described in this specification specifically refers to the pending consensus transactions collected by the master node device and submitted by the user client through the accessed node device; for example, in an implementation manner In the process, the user client can broadcast the user-initiated transaction in the blockchain through the connected node device.
  • the master node device may initiate consensus for a single transaction, or may initiate consensus for a transaction list constructed.
  • the user client may broadcast transactions submitted by the user in a blockchain network.
  • the master node device can collect each user client and broadcast the pending consensus transactions sent in the blockchain network during the consensus period of this round, and then create a transaction list based on the collected pending consensus transactions, and use this transaction list as The proposed transaction data is transmitted to other node devices.
  • the alliance chain uses the pbft algorithm as the consensus algorithm to perform consensus processing on the transaction list proposed by the master node device as an example.
  • an erasure coding algorithm can be introduced to pre-process the pbft algorithm.
  • the existing transaction data propagation and diffusion mechanism in the prepare and prepare phases are optimized and improved to reduce the data transmission bandwidth during the consensus interaction between the master node device and the slave node device, and improve the efficiency of consensus processing.
  • FIG. 2 is an interaction schematic diagram of three phases of an optimized pbft algorithm shown in the present specification.
  • a master node device can be elected from each node device in the alliance chain;
  • a master node device can be calculated for this round of formulas based on the following formula:
  • R represents the total number of node devices in the alliance chain.
  • Each node device can perform the above calculations separately and match the calculated number of the master node with the number of the device to determine whether the device is elected as the master node device.
  • a node device determines that the device is not elected as the master node device, it can broadcast the transactions submitted by the client to each node device in the alliance chain.
  • a node device determines that this device is elected as the master node device, it can collect the transactions broadcasted by each user client within the consensus period of this round, and create a transaction list based on the collected transactions. At this time, the created transaction list is the transaction data proposed by the master node device for consensus processing.
  • the master node device may perform fragmentation processing on the proposed transaction list based on the erasure coding algorithm, and divide the above transaction list into a specified number of data fragments.
  • the number of data fragments obtained by dividing the above transaction list may be the same as the total number of node devices in the alliance chain; for example, assuming there are N node devices in the alliance chain, the above transaction list may also be divided Become N data fragments.
  • the above transaction list is divided into N data fragments, and the N data fragments will include K data blocks and M check blocks.
  • M represents the number of data fragments that can tolerate the occurrence of the N data fragments.
  • K represents at least the number of data fragments (that is, the number of rows erasure code recovery threshold) required to recover the original transaction list. That is, the original content of the transaction list can be restored by using any K data fragments among the above N data fragments and by using an erasure code reconstruction algorithm (ie, an inverse algorithm of the erasure code algorithm).
  • the master node device When the master node device divides the above transaction list based on the erasure coding algorithm, it can send Pre-Prepare messages to each slave node device to send the segmented data fragments to other node devices. Among them, in this specification, The data fragments sent by the master node device to each slave node device need to be kept different.
  • the master node device can carry the complete transaction list in the Pre-Prepare message, and then broadcast the Pre-Prepare message to each node device in the alliance chain to send the complete transaction list. Propagating to the slave node devices in the alliance chain that need to participate in transaction consensus.
  • the pbft protocol consumes a large amount of the network bandwidth of the alliance chain during the propagation phase of the transaction data, and has a high bandwidth performance on the alliance chain network. Requirement; once the bandwidth performance of the alliance chain network is insufficient, it will not be able to spread the transaction list that requires consensus to other slave node devices participating in consensus in a short time.
  • the Pre-Prepare message sent by the master node device to each slave node device may no longer carry the complete transaction list, but only carry one data fragment of the above transaction list.
  • the way in which the master node device diffuses Pre-Prepare messages to other slave node devices can be changed from broadcasting the Pre-Prepare message to unicast sending the Pre-Prepare message to each slave node device; for example, you can Construct Pre-Prepare messages for each slave node device, and carry data fragments that are different from each other in the Pre-Prepare message, and then send the constructed Pre-Prepare messages to each slave node device one by one in order to ensure that each slave node The device can receive different data fragments.
  • the slave device receiving the above-mentioned Pre-Prepare message may first verify the received Pre-Prepare message according to the pbft algorithm to determine whether to accept the received Pre-Prepare message.
  • the verification of the received Pre-Prepare message is the process of verifying the content carried in the received Pre-Prepare message.
  • the specific verification process will not be described in detail in this specification. Recount
  • the Pre-Prepare message may carry transaction data to be agreed upon (data fragmentation in this specification), view number v, and a summary of transaction data to be agreed upon (data in this specification) Fragment summary), digital signatures, and more.
  • the elderly may specifically perform the following verification process when verifying the Pre-Prepare message:
  • the master node device may construct a Merkel tree based on all data fragments, and carry the hash value of each branch node of the Merkel tree in a Pre-Prepare message.
  • the node device verifies the data fragments carried in the received Pre-Prepare message, it can recalculate the hash value of the data fragments carried in the Pre-Prepare message, based on the hash value and the Pre-Prepare message.
  • the hash value of each branch node of the Merkel tree carried above is used to reconstruct the Merkel tree; then, the data fragments can be verified by comparing the hash corresponding to the root of the reconstructed Merkel tree. ; If the hash corresponding to the root of the reconstructed Merkel tree has not changed, the data fragment is considered to have passed the validity verification; otherwise, the Pre-Prepare message may be considered to be an invalid data fragment. This data fragment can be discarded.
  • the content carried in the above-mentioned Pre-Prepare message can also be extended based on actual needs; for example, in one example, the above-mentioned Pre-Prepare message can also carry a consensus height h.
  • the above-mentioned consensus height h is similar in function to the attempt to number v, and is usually a consecutive numbered integer, which indicates the number of rounds that the alliance chain has agreed on (not indicating the number of rounds of successful consensus). For example, during a round of consensus, if the master node device fails, it will usually trigger an attempt to switch and re-elect the master node device. In this case, the consensus height h can be immediately increased by one, and since the current round has not yet reached consensus Success, for the attempt to number V, it is not incremented by one, and the original attempt to number V is still retained.
  • the node device receiving the above-mentioned Pre-Prepare message performs the verification process listed above, if the verification succeeds, it indicates that the node device accepts the above-mentioned Pre-Prepare message, and at this time, the node device can obtain And save the data fragments carried in the Pre-Prepare message, and enter the Prepare phase of the pbft protocol, and broadcast and send a Prepare message to each other node device in the alliance chain to confirm the Pre-Prepare message; among them,
  • the content format carried in the above Prepare message may be consistent with the above Pre-Prepare message.
  • the Prepare message broadcasted by a node device to each other node device of the alliance chain usually only carries data such as the view number v and a summary of the transaction data to be agreed.
  • the Prepare message can be The format is further expanded, and each node device may also unicast the data fragments sent by the master node device through the Pre-Prepare message, which are also carried in the above-mentioned Prepare message.
  • each node device can broadcast the Prepare message carrying data fragments to each other node device in the alliance chain to send the received data fragments sent unicast by the master node device to further spread. To other nodes in the alliance chain.
  • each node device can also receive the Prepare message broadcasted by other slave node devices, and verify the received Prepare message to determine whether to accept the received Prepare message.
  • verifying the received Prepare message refer to the specific process of verifying the Pre-Prepare message, which will not be described in detail in this specification.
  • the node device accepts the Prepare message:
  • the node device can obtain and save the data fragments carried in the Prepare message
  • the node device can further determine whether the number of received Prepare messages broadcasted by other node devices reaches 2f + 1 (including the Prepare messages broadcast by itself).
  • the node device can enter the commit phase of the pbft protocol.
  • the node device can broadcast and send a commit message to each other node device in the alliance chain, and continue to complete the above. Consensus processing of the original content of the transaction list.
  • a node device in the alliance chain after a node device in the alliance chain broadcasts a commit message to each other node device in the alliance chain, it can also receive a commit message broadcasted by other node devices to verify the receipt of the commit message. Determine whether to accept the received commit message.
  • the content format carried in the above commit message may be consistent with the Pre-Prepare message and the Prepare message.
  • the summary of the transaction data to be agreed is the data summary of the above transaction list, and in the commit phase, because the node device has restored a complete transaction list, Therefore, the commit message can carry a summary of the recovered complete transaction list.
  • the node device can further determine whether the number of received commit messages broadcasted by other node devices reaches 2f + 1 (including its own broadcasted commits). Message included).
  • the node device can further determine whether the collected data fragments reach the erasure code recovery threshold supported by the erasure code algorithm; if so, the node device Based on the erasure code reconstruction algorithm, data recovery calculation can be performed on the collected data fragments to restore the original content of the transaction list.
  • the slave node device will not have enough data fragments to recover the data that requires consensus during the commit phase.
  • the original content of the above transaction list so in this specification, the specific value of the erasure code recovery threshold supported by the erasure code algorithm needs to be less than or equal to the above 2f + 1; for example, it may be exactly equal to 2f + 1.
  • the master node device when it divides the above transaction list based on the erasure code algorithm, it can refer to the fault tolerance number f of the error node supported by the pbft algorithm to control the number of data fragments obtained by the final division, so that it can On the premise of ensuring that during the commit phase, there are enough data fragments to restore the original content of the above transaction list that requires consensus, the above transaction list is divided into data fragments that are sufficiently small as much as possible.
  • the master node device may also preprocess the above transaction list based on a supported related algorithm.
  • the transaction list may also be compressed and preprocessed, and the transaction list is compressed based on a supported compression algorithm.
  • the compression algorithm used by the master node device is not particularly limited in this specification.
  • the master node device After the compression processing for the transaction list is completed, the master node device then divides the compressed transaction list based on the erasure coding algorithm, and divides the compressed transaction list into a specified number of data fragments. .
  • each node device propagates the diffused data fragments, which are data fragments obtained by segmentation based on the compressed transaction list, the node device is based on the erasure code reconstruction algorithm to After the collected data is fragmented for data recovery, only the transaction list after compression processing is obtained.
  • the node device may decompress the recovered compressed transaction list based on the decompression algorithm corresponding to the compression algorithm described above to decompress the transaction list.
  • the master node device compresses the master node device in advance before dividing the above transaction list, the size of the compressed data fragments can be effectively reduced, and the master node device can be reduced to the greatest extent. Data transmission bandwidth during consensus interaction with the slave device.
  • the transaction list before the master node device divides the transaction list, the transaction list may also be encrypted and preprocessed, and the transaction list is encrypted based on a preset encryption algorithm and an encryption key. deal with.
  • the encryption algorithm used by the master node device is not specifically limited in this specification; for example, in actual applications, it may be a symmetric encryption algorithm or an asymmetric encryption algorithm.
  • the master node device After the encryption processing for the transaction list is completed, the master node device then divides the encrypted transaction list based on the erasure coding algorithm, and divides the encrypted transaction list into a specified number of data fragments. .
  • the node device since each node device propagates the diffused data fragments, which are data fragments obtained by segmenting the encrypted transaction list, the node device is based on the erasure code reconstruction algorithm to After the collected data fragments are used for data recovery, only the transaction list after encryption processing is obtained.
  • the node device can decrypt the recovered compressed transaction list based on the decryption algorithm corresponding to the above encryption algorithm and the decryption key corresponding to the above encryption key. Processing to decrypt the original content of the above transaction list, and then continue to perform the consensus processing process in the commit phase, and the specific implementation details are not described again.
  • the foregoing encryption algorithm may specifically be a threshold encryption algorithm.
  • the foregoing decryption algorithm may specifically be a threshold decryption algorithm corresponding to the threshold encryption algorithm.
  • the decryption key can be specifically divided into a specified number of subkeys, and each subkey is held separately by each node device.
  • the number of sub-keys obtained by dividing the decryption key may be the same as the total number of node devices in the alliance chain; for example, assuming that there are N node devices in the alliance chain, the decryption key may be It is also divided into N sub-keys, which are held by N node devices in the alliance chain.
  • the node device can also collect the subkeys held by other node devices, and determine whether the number of collected subkeys reaches a preset decryption threshold threshold; for example, when the key threshold threshold is N Indicates that N node devices are required to jointly decrypt the encrypted data based on the held subkeys (that is, a part of the decryption key described above).
  • the specific manner in which the node device collects the subkeys held by other node devices is not specifically limited in this specification;
  • a node device can carry the subkey held by it in a commit message that interacts with other node devices; of course, in actual applications, each node device also You can define an interactive message used to propagate the subkey held separately, and use the interactive message to synchronize the subkey held by itself to other node devices.
  • the node device device can base the collected subkeys on The decryption key is reconstructed to recover the original decryption key. Then, based on the threshold decryption algorithm and the recovered original decryption key, decryption processing is performed on the recovered encrypted transaction list to decrypt it. The original content of the above transaction list.
  • segmentation of the decryption key and restoration of the decryption key based on the collected sub-keys can still be implemented using erasure coding technology, and the specific process will not be described again.
  • the master node device since the master node device performs encryption processing on the master node device before segmenting the above transaction list, it can effectively improve the data security of the master node device when sending data fragments to each node device. Even if some illegal node devices have collected enough data fragments to recover the above transaction list, they cannot view the original content of the transaction list, which can improve
  • the pbft algorithm is still used as an example of the consensus algorithm adopted by the alliance chain.
  • the master node device can use a defined diffusion protocol. Perform consensus interaction with slave node devices, and propagate and spread the transaction list that requires consensus to each slave node device in advance. That is, the node device can spread the transaction list that requires consensus to each participating node device in advance through the defined propagation diffusion protocol, and then start the three-phase consensus interaction specified by the pbft algorithm to complete the transaction list. Consensus processing.
  • the existing transaction data propagation and diffusion mechanism in the pre-prepare and prepare phases of the pbft algorithm no longer need to perform the optimization process described in the above embodiments; for example, in the pre-prepare message and the prepare message, the Then carry the complete transaction list, or data fragments of the transaction list, but directly carry the summary value of the above transaction list.
  • the propagation and diffusion logic shown in steps 102-106 above can be applied not only to the consensus interaction process of the pbft algorithm, but also to other similar consensus algorithms such as raft injection.
  • the specific implementation details are as follows: No detailed description is provided in this specification, and those skilled in the art may refer to the descriptions in the foregoing embodiments when implementing the technical solutions of this specification.
  • the master node device proposes transaction data to be consensus to each slave node device
  • the consensus transaction data can be fragmented based on the erasure coding algorithm and then spread:
  • the master node device proposes transaction data to each slave node device, it is no longer necessary to broadcast the complete transaction data to each slave node device, but to unicastly send data fragments to each slave node device. That is, it can significantly reduce the data transmission bandwidth consumed when the transaction data that requires consensus is diffused to the participating node devices, and the transaction data to be agreed can be propagated to the slave node devices in a short time to complete the consensus. This can improve the efficiency of consensus processing;
  • the master node device since the master node device unicasts to the slave node devices only the data fragments of the above transaction data, for the master node device, it is not possible to know the complete content of the complete transaction to which the data fragment belongs, so Effectively prevent the master node device from selectively unicasting certain specific transactions to other node devices participating in the consensus, and selective consensus on some specific transactions, so as to ensure the fairness of the consensus. Consensus to "do evil".
  • this specification also provides an embodiment of a blockchain-based transaction consensus processing device.
  • the embodiments of the blockchain-based transaction consensus processing device of this specification can be applied to electronic devices.
  • the device embodiments may be implemented by software, or by hardware or a combination of software and hardware. Taking software implementation as an example, as a logical device, it is formed by reading the corresponding computer program instructions in the non-volatile memory into the memory through the processor of the electronic device where it is located. In terms of hardware, as shown in FIG.
  • Fig. 4 is a block diagram of a blockchain-based transaction consensus processing device according to an exemplary embodiment of the present specification.
  • the blockchain-based transaction consensus processing device 40 may be applied to the electronic device shown in FIG. 3 and includes a receiving module 401, a sending module 402, a determining module 403, and a recovery module 404.
  • the receiving module 401 receives data fragments of the transaction data sent unicast by the master node device; wherein the node device in the blockchain includes at least one master node device and several slave node devices; the master node The device divides the proposed transaction data into a specified number of data fragments based on an erasure coding algorithm, and the master node device unicasts the data fragments sent to each node device differently;
  • the sending module 402 sends the received data fragment broadcast to other node devices in the blockchain; and receives the data fragments of the transaction data broadcasted by the other node devices;
  • the recovery module 404 if it is, performs data recovery on the received data fragments based on the erasure code reconstruction algorithm to obtain the original content of the transaction data to complete the consensus processing of the original content of the transaction data.
  • the device 40 further includes:
  • the segmentation module 405 determines whether the local node device is elected as the master node device; if so, splits the proposed transaction data into a specified number of data fragments based on the erasure coding algorithm;
  • the sending module 402 further:
  • the consensus algorithm carried by the blockchain is the pbft algorithm
  • the receiving module 401 The receiving module 401:
  • Pre-Prepare message sent unicast by the master node device; wherein the Pre-Prepare message includes a data fragment of the transaction data;
  • the sending module 402 the sending module 402:
  • the segmentation module 405 the segmentation module 405:
  • the transaction data after compression processing is divided into a specified number of data fragments based on the erasure coding algorithm.
  • the recovery module 404 The recovery module 404:
  • the segmentation module 405 the segmentation module 405:
  • the transaction data after encryption processing is divided into a specified number of data fragments based on the erasure coding algorithm.
  • the recovery module 404 The recovery module 404:
  • the encryption algorithm is a threshold encryption algorithm
  • the decryption algorithm is a threshold decryption algorithm corresponding to the threshold encryption algorithm
  • the decryption key is divided into a specified number of sub-keys; The keys are held separately by each node device;
  • the recovery module 404 further:
  • the transaction data proposed by the master node is a transaction list constructed by the user node client to be consensus-transmitted and broadcasted during the current consensus period of the master node device; the specified number is the block The total number of node devices in the chain.
  • the blockchain is an alliance chain.
  • the relevant part may refer to the description of the method embodiment.
  • the device embodiments described above are only schematic, and the modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, which may be located in One place, or can be distributed to multiple network modules. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution in this specification. Those of ordinary skill in the art can understand and implement without creative efforts.
  • the system, device, module, or module described in the foregoing embodiments may be specifically implemented by a computer chip or entity, or may be implemented by a product having a certain function.
  • a typical implementation device is a computer, and the specific form of the computer may be a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email sending and receiving device, and a game control Desk, tablet computer, wearable device, or a combination of any of these devices.
  • the electronic device includes a processor and a memory for storing machine-executable instructions; wherein the processor and the memory are usually connected to each other through an internal bus.
  • the device may further include an external interface to enable communication with other devices or components.
  • the processor by reading and executing the machine-executable instructions corresponding to the control logic of a blockchain-based transaction consensus process stored in the memory, the processor is caused to:
  • the code algorithm divides the proposed transaction data into a specified number of data fragments. The data fragments sent by the master node device to each node device are different;
  • the processor by reading and executing the machine-executable instructions corresponding to the control logic of a blockchain-based transaction consensus process stored in the memory, the processor is caused to:
  • the consensus algorithm carried by the blockchain is the pbft algorithm
  • the processor By reading and executing the machine-executable instructions corresponding to the control logic of the blockchain-based transaction consensus processing stored in the memory, the processor is caused to:
  • Pre-Prepare message sent unicast by the master node device; wherein the Pre-Prepare message includes a data fragment of the transaction data;
  • the processor by reading and executing the machine-executable instructions corresponding to the control logic of a blockchain-based transaction consensus process stored in the memory, the processor is caused to:
  • the processor by reading and executing the machine-executable instructions corresponding to the control logic of a blockchain-based transaction consensus process stored in the memory, the processor is caused to:
  • the transaction data after compression processing is divided into a specified number of data fragments based on the erasure coding algorithm.
  • the processor by reading and executing the machine-executable instructions corresponding to the control logic of the blockchain-based transaction consensus processing stored in the memory, the processor is caused to:
  • the processor by reading and executing the machine-executable instructions corresponding to the control logic of a blockchain-based transaction consensus process stored in the memory, the processor is caused to:
  • the transaction data after encryption processing is divided into a specified number of data fragments based on the erasure coding algorithm.
  • the processor by reading and executing the machine-executable instructions corresponding to the control logic of a blockchain-based transaction consensus process stored in the memory, the processor is caused to:
  • the encryption algorithm is a threshold encryption algorithm
  • the decryption algorithm is a threshold decryption algorithm corresponding to the threshold encryption algorithm
  • the decryption key is divided into a specified number of sub-keys; The keys are held separately by each node device;
  • the processor By reading and executing the machine-executable instructions corresponding to the control logic of the blockchain-based transaction consensus processing stored in the memory, the processor is caused to:

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Mathematical Physics (AREA)
  • Computing Systems (AREA)
  • Business, Economics & Management (AREA)
  • Data Mining & Analysis (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Algebra (AREA)
  • Quality & Reliability (AREA)
  • Pure & Applied Mathematics (AREA)
  • Probability & Statistics with Applications (AREA)
  • Marketing (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Computer Hardware Design (AREA)
  • Strategic Management (AREA)
  • Technology Law (AREA)
  • General Business, Economics & Management (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)
  • Computer And Data Communications (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

一种基于区块链的交易共识处理方法,所述区块链中的节点设备至少包括一主节点设备以及若干从节点设备;其中,所述主节点设备基于纠删码算法将提议的交易数据分割为指定数量的数据分片,包括:接收所述主节点设备单播发送的所述交易数据的数据分片;其中,所述主节点设备单播发送至各节点设备的数据分片不同;将接收到的数据分片广播发送至所述区块链中的其它各节点设备;以及,接收所述其它各节点设备广播发送的所述交易数据的数据分片;确定接收到的所述交易数据的数据分片的数量是否达到纠删码恢复阈值;如果是,基于纠删码重构算法对接收到的数据分片进行数据恢复得到所述交易数据的原始内容,以完成对所述交易数据的原始内容的共识处理。

Description

基于区块链的交易共识处理方法及装置、电子设备 技术领域
本说明书一个或多个实施例涉及区块链技术领域,尤其涉及一种基于区块链的交易共识处理方法及装置、电子设备。
背景技术
区块链技术,也被称之为分布式账本技术,是一种由若干台计算设备共同参与“记账”,共同维护一份完整的分布式数据库的新兴技术。由于区块链技术具有去中心化、公开透明、每台计算设备可以参与数据库记录、并且各计算设备之间可以快速的进行数据同步的特性,使得区块链技术已在众多的领域中广泛的进行应用
发明内容
本说明书提出一种基于区块链的交易共识处理方法,所述区块链中的节点设备至少包括一主节点设备以及若干从节点设备;其中,所述主节点设备基于纠删码算法将提议的交易数据分割为指定数量的数据分片,所述方法包括:
接收所述主节点设备单播发送的所述交易数据的数据分片;其中,所述主节点设备单播发送至各节点设备的数据分片不同;
将接收到的数据分片广播发送至所述区块链中的其它各节点设备;以及,接收所述其它各节点设备广播发送的所述交易数据的数据分片;
确定接收到的所述交易数据的数据分片的数量是否达到纠删码恢复阈值;
如果是,基于纠删码重构算法对接收到的数据分片进行数据恢复得到所述交易数据的原始内容,以完成对所述交易数据的原始内容的共识处理。
可选的,所述方法还包括:
确定本节点设备是否被选举为所述主节点设备;
如果是,基于所述纠删码算法将提议的交易数据分割为指定数量的数据分片;以及,
将所述指定数量的数据分片分别单播发送至其它各节点设备。
可选的,所述区块链搭载的共识算法为pbft算法;
所述接收所述主节点设备单播发送的所述交易数据的数据分片,包括:
接收所述主节点设备单播发送的Pre-Prepare消息;其中,所述Pre-Prepare消息中包括所述交易数据的数据分片;
获取并保存所述Pre-Prepare消息中的数据分片。
可选的,所述将接收到的数据分片广播发送至所述区块链中的其它各节点设备,包括:
向所述区块链中的其它各节点设备广播发送Prepare消息;其中,所述Prepare消息包括接收到的所述数据分片,以使所述其它各节点设备在接收到所述Prepare消息时,获取并保存所述Prepare消息中的数据分片。
可选的,所述基于所述纠删码算法将提议的交易数据分割为指定数量的数据分片,包括:
基于预设的压缩算法对提议的所述交易数据进行压缩处理;
基于所述纠删码算法将压缩处理后的所述交易数据分割为指定数量的数据分片。
所述基于纠删码重构算法对接收到的数据分片进行数据恢复得到所述交易数据的原始内容,包括:
基于纠删码重构算法对接收到的数据分片进行数据恢复得到压缩后的所述交易数据;
基于与所述压缩算法对应的解压缩算法,对恢复出的所述交易数据进行解压缩处理,以得到所述交易数据的原始内容。
可选的,所述基于所述纠删码算法将提议的交易数据分割为指定数量的数据分片,包括:
基于预设的加密算法以及加密密钥对提议的交易数据进行加密处理;
基于所述纠删码算法将加密处理后的所述交易数据分割为指定数量的数据分片。
所述基于纠删码重构算法对接收到的数据分片进行数据恢复得到所述交易数据的原始内容,包括:
基于基于纠删码重构算法对接收到的数据分片进行数据恢复得到加密后的所述交易数据;
基于与所述加密算法对应的解密算法,以及与所述加密密钥对应的解密密钥,对恢 复出的所述交易数据进行解密处理,以得到所述交易数据的原始内容。
可选的,所述加密算法为门限加密算法;所述解密算法为与门限加密算法对应的门限解密算法;所述解密密钥被分割为指定数量的子密钥;其中,各子密钥由各节点设备分别持有;
所述基于与所述加密算法对应的解密算法,以及与所述加密密钥对应的解密密钥,对恢复出的所述交易数据进行解密处理,包括:
收集所述其它各节点设备持有的子密钥;
确定收集到的子密钥的数量是否达到预设的解密门限阈值;
如果是,基于收集到的子密钥重构所述解密密钥,并基于与所述门限加密算法对应的门限解密算法,以及所述解密密钥,对恢复出的所述交易数据进行解密处理。
可选的,所述主节点提议的交易数据,为所述主节点设备当前共识周期内由各用户客户端广播发送的待共识交易构建的交易列表;所述指定数量为所述区块链中的节点设备的总数量。
可选的,所述区块链为联盟链。
本说明书还提出一种基于区块链的交易共识处理装置,所述区块链中的节点设备至少包括一主节点设备以及若干从节点设备;其中,所述主节点设备基于纠删码算法将提议的交易数据分割为指定数量的数据分片,所述装置包括:
接收模块,接收所述主节点设备单播发送的所述交易数据的数据分片;其中,所述主节点设备单播发送至各节点设备的数据分片不同;
发送模块,将接收到的数据分片广播发送至所述区块链中的其它各节点设备;以及,接收所述其它各节点设备广播发送的所述交易数据的数据分片;
确定模块,确定接收到的所述交易数据的数据分片的数量是否达到纠删码恢复阈值;
恢复模块,如果是,基于纠删码重构算法对接收到的数据分片进行数据恢复得到所述交易数据的原始内容,以完成对所述交易数据的原始内容的共识处理。
可选的,所述装置还包括:
分割模块,确定本节点设备是否被选举为所述主节点设备;如果是,基于所述纠删码算法将提议的交易数据分割为指定数量的数据分片;
所述发送模块进一步:
将所述指定数量的数据分片分别单播发送至其它各节点设备。
可选的,所述区块链搭载的共识算法为pbft算法;
所述接收模块:
接收所述主节点设备单播发送的Pre-Prepare消息;其中,所述Pre-Prepare消息中包括所述交易数据的数据分片;
获取并保存所述Pre-Prepare消息中的数据分片。
可选的,所述发送模块:
向所述区块链中的其它各节点设备广播发送Prepare消息;其中,所述Prepare消息包括接收到的所述数据分片,以使所述其它各节点设备在接收到所述Prepare消息时,获取并保存所述Prepare消息中的数据分片。
可选的,所述分割模块:
基于预设的压缩算法对提议的所述交易数据进行压缩处理;
基于所述纠删码算法将压缩处理后的所述交易数据分割为指定数量的数据分片。
所述恢复模块:
基于纠删码重构算法对接收到的数据分片进行数据恢复得到压缩后的所述交易数据;
基于与所述压缩算法对应的解压缩算法,对恢复出的所述交易数据进行解压缩处理,以得到所述交易数据的原始内容。
可选的,所述分割模块:
基于预设的加密算法以及加密密钥对提议的交易数据进行加密处理;
基于所述纠删码算法将加密处理后的所述交易数据分割为指定数量的数据分片。
所述恢复模块:
基于基于纠删码重构算法对接收到的数据分片进行数据恢复得到加密后的所述交易数据;
基于与所述加密算法对应的解密算法,以及与所述加密密钥对应的解密密钥,对恢复出的所述交易数据进行解密处理,以得到所述交易数据的原始内容。
可选的,所述加密算法为门限加密算法;所述解密算法为与门限加密算法对应的门限解密算法;所述解密密钥被分割为指定数量的子密钥;其中,各子密钥由各节点设备分别持有;
所述恢复模块进一步:
收集所述其它各节点设备持有的子密钥;
确定收集到的子密钥的数量是否达到预设的解密门限阈值;
如果是,基于收集到的子密钥重构所述解密密钥,并基于与所述门限加密算法对应的门限解密算法,以及所述解密密钥,对恢复出的所述交易数据进行解密处理。
可选的,所述主节点提议的交易数据,为所述主节点设备当前共识周期内由各用户客户端广播发送的待共识交易构建的交易列表;所述指定数量为所述区块链中的节点设备的总数量。
可选的,所述区块链为联盟链。
本说明书还提出一种电子设备,包括:
处理器;
用于存储机器可执行指令的存储器;
其中,通过读取并执行所述存储器存储的与基于区块链的交易共识处理的控制逻辑对应的机器可执行指令,所述处理器被促使:
接收所述主节点设备单播发送的所述交易数据的数据分片;其中,所述区块链中的节点设备至少包括一主节点设备以及若干从节点设备;所述主节点设备基于纠删码算法将提议的交易数据分割为指定数量的数据分片所述主节点设备单播发送至各节点设备的数据分片不同;
将接收到的数据分片广播发送至所述区块链中的其它各节点设备;以及,接收所述其它各节点设备广播发送的所述交易数据的数据分片;
确定接收到的所述交易数据的数据分片的数量是否达到纠删码恢复阈值;
如果是,基于纠删码重构算法对接收到的数据分片进行数据恢复得到所述交易数据的原始内容,以完成对所述交易数据的原始内容的共识处理。
通过以上技术方案,由于主节点设备在向各从节点设备提议待共识的交易数据时, 基于纠删码算法对待共识的交易数据进行分片之后再进行传播:
一方面,使得主节点设备在向各从节点设备提议交易数据时,可以不再需要将完整的交易数据向各从节点设备进行广播发送,而是采用向各从节点设备单播发送数据分片即可,因此可以显著的降低向参与共识的节点设备扩散传播需要共识的交易数据时所消耗的数据传输带宽,可以在短时间内将待共识的交易数据传播至各从节点设备来完成共识,从而可以提升共识处理效率;
另一方面,由于主节点设备向各从节点设备单播发送的仅仅是上述交易数据的数据分片,对于主节点设备而言,无法获知该数据分片所属的完整交易的完整内容,因此可以有效避免主节点设备向其它参与共识的节点设备有选择性的单播一些特定的交易,对一些特定的交易进行有选择性的共识,从而可以保障共识的公正性,反正主节点通过有选择性共识来进行“作恶”。
附图说明
图1是一示例性实施例提供的一种基于区块链的交易共识处理方法的流程图。
图2是一示例性实施例提供的一种优化后的pbft算法三个阶段的交互示意图。
图3是一示例性实施例提供的一种电子设备的结构示意图。
图4是一示例性实施例提供的一种基于区块链的交易共识处理装置的框图。
具体实施方式
本说明书中,旨在提出一种在区块链的共识处理过程中,引入纠删码算法对待共识的交易数据进行分片后进行传播扩散,来降低在向参与共识的节点设备传播需要共识的交易数据时所消耗的数据传输带宽,提升共识效率的技术方案。
在实现时,在区块链的每一轮共识开始之前,可以在区块链中的各节点设备中选举出一台主节点设备(比如,每一轮共识都重新选举出一主节点设备,其它节点设备作为从节点设备),由主节点设备向发起交易共识,并负责基于共识通过的交易数据为区块链创建最新的区块。
主节点设备在发起一轮交易共识时,首先可以基于纠删码算法将提议的待共识的交易数据,分割为指定数量的数据分片,然后将分割的数据分片分别单播发送至其它各节点设备;其中,主节点设备单播发送至各节点设备的数据分片不同;
其次,各从节点设备在收到主节点设备单播发送的上述交易数据的数据分片时,可以将接收到的数据分片继续广播发送至区块链中的其它各节点设备;以及,还可以收集由其它各节点设备广播发送的数据分片。
最后,对于区块链中的任意一台节点设备(包括主节点设备和从节点设备)而言,可以确定收集到的上述交易数据的数据分片的数量,是否达到了在采用上述纠删码算法对上述交易数据进行分割时定义的纠删码恢复阈值;如果是,表明当前收集到的数据分片的数量,已经足够恢复出上述交易数据的原始内容,此时可以基于纠删码重构算法对已经收集到的数据分片进行数据恢复,得到上述交易数据的原始内容,然后完成对上述交易数据的原始内容的共识处理。
通过以上技术方案,由于主节点设备在向各从节点设备提议待共识的交易数据时,基于纠删码算法对待共识的交易数据进行分片之后再进行传播:
一方面,使得主节点设备在向各从节点设备提议交易数据时,可以不再需要将完整的交易数据向各从节点设备进行广播发送,而是采用向各从节点设备单播发送数据分片即可,因此可以显著的降低向参与共识的节点设备扩散传播需要共识的交易数据时所消耗的数据传输带宽,可以在短时间内将待共识的交易数据传播至各从节点设备来完成共识,从而可以提升共识处理效率;
另一方面,由于主节点设备向各从节点设备单播发送的仅仅是上述交易数据的数据分片,对于主节点设备而言,无法获知该数据分片所属的完整交易的完整内容,因此可以有效避免主节点设备向其它参与共识的节点设备有选择性的单播一些特定的交易,对一些特定的交易进行有选择性的共识,从而可以保障共识的公正性,反正主节点通过有选择性共识来进行“作恶”。
下面通过具体实施例并结合具体的应用场景对本说明书进行描述。
请参考图1,图1是本说明书一实施例提供的一种基于区块链的交易共识处理方法,应用于区块链中的任一节点设备;其中,所述区块链中的节点设备至少包括一主节点设备以及若干从节点设备,所述主节点设备基于纠删码算法将提议的交易数据分割为指定数量的数据分片,执行以下步骤:
步骤102,接收所述主节点设备单播发送的所述交易数据的数据分片;其中,所述主节点设备单播发送至各节点设备的数据分片不同;
步骤104,将接收到的数据分片广播发送至所述区块链中的其它各节点设备;以及, 接收所述其它各节点设备广播发送的所述交易数据的数据分片;
步骤106,确定接收到的所述交易数据的数据分片的数量是否达到纠删码恢复阈值;
步骤108,如果是,基于纠删码重构算法对接收到的数据分片进行数据恢复得到所述交易数据的原始内容,以完成对所述交易数据的原始内容的共识处理。
在本说明书所描述的区块链,具体可以包括私有链、共有链以及联盟链等,在本说明书中不进行特别限定。
例如,在一个场景中,上述区块链具体可以是由第三方支付平台的服务器、境内银行服务器、境外银行服务器、以及若干用户节点设备作为成员设备组成的一个联盟链。该联盟链的运营方可以依托于该联盟链,来在线部署诸如基于联盟链的跨境转账、资产转移等在线业务。
在本说明书中所描述的交易,是指用户通过区块链的客户端创建,并需要最终发布至区块链的分布式数据库中的一笔数据。
其中,区块链中的交易,存在狭义的交易以及广义的交易之分。狭义的交易是指用户向区块链发布的一笔价值转移;例如,在传统的比特币区块链网络中,交易可以是用户在区块链中发起的一笔转账。而广义的交易是指用户向区块链发布的一笔具有业务意图的业务数据;例如,运营方可以基于实际的业务需求搭建一个联盟链,依托于联盟链部署一些与价值转移无关的其它类型的在线业务(比如,租房业务、车辆调度业务、保险理赔业务、信用服务、医疗服务等),而在这类联盟链中,交易可以是用户在联盟链中发布的一笔具有业务意图的业务消息或者业务请求。
需要说明的是,上述区块链搭载的共识算法,在本说明书中不进行特别限定;在实际应用中,具体可以采用拜占庭容错(Byzantine Fault Tolerance)系列算法作为共识算法,也可以采用非拜占庭容错系列算法作为共识算法。
其中,所谓拜占庭容错算法,是指在由若干个节点设备组成的分布式网络中,需要考虑拜占庭节点(即作恶节点)的分布式容错算法;例如,pbft算法;如果采用拜占庭容错算法在区块链网络中进行共识处理时,会认为区块链中同时存储作恶节点和故障节点。而相应的,所谓非拜占庭容错算法,是指在由若干个节点设备组成的分布式网络中,不考虑拜占庭节点的分布式容错算法;例如,raft算法等等;如果采用非拜占庭容错算法在区块链网络中进行共识处理时,会认为区块链中不存在作恶节点,而只存在故障节点。
在本说明书中所描述的由主节点设备提议的交易数据,具体是指由主节点设备收集到的,由用户客户端通过接入的节点设备提交的待共识交易;例如,在一种实现方式中,用户客户端可以通过接入的节点设备将用户发起的交易在区块链中进行广播发送。
其中,在实际应用中,主节点设备可以针对单笔交易发起共识,也可以针对构建的一个交易列表来发起共识。
例如,在一种实施方式中,用户客户端可以将用户提交的交易在区块链网络中进行广播。而主节点设备可以收集各个用户客户端,在本轮的共识时间段内,在区块链网络中广播发送的待共识交易,然后基于收集到的待共识交易创建交易列表,将该交易列表作为提议的交易数据向其它各节点设备传播。
以下以上述区块链为联盟链,以及该联盟链采用pbft算法作为共识算法,对主节点设备提议的交易列表进行共识处理为例进行说明。
在本说明书中,可以在pbft算法现有的预准备(pre-prepare)、准备(prepare)、和确认(commit)等三个阶段的基础之上,引入纠删码算法,对pbft算法的pre-prepare和prepare阶段现有的交易数据传播扩散机制进行优化改进,以降低主节点设备与从节点设备之间进行共识交互时的数据传输带宽,提升共识处理效率。
请参见图2,图2为本说明书示出的一种优化后的pbft算法三个阶段的交互示意图。
如图2所示,在联盟链的每一轮共识开始之前,首先可以在联盟链中的各节点设备中选举出一台主节点设备;
例如,基于Pbft算法,在联盟链的每一轮共识开始之前,可以基于以下的公式,为本轮公式计算出一个主节点设备:
P=v mod R
其中,表示计算出的本轮共识的主节点编号;v表示联盟链当前的视图编号;试图编号通常是一个连续编号的整数,表示联盟链已经成功完成共识的轮数;比如,在成功完成一轮共识,选举出的主节点设备向联盟链成功写入一个新的区块之后,可以将试图编号自动加1。R表示联盟链中的节点设备的总数量。
各个节点设备可以分别执行以上计算,并将计算出的主节点编号与本设备的编号进行匹配,来确定本设备是否被选举为主节点设备。
一方面,如果一节点设备确定本设备未被选举为主节点设备,则可以将收到的由客户端提交的交易向联盟链中的各个节点设备进行广播发送。
另一方面,如果一节点设备确定本设备被选举为主节点设备,则可以收集各个用户客户端在本轮的共识时间段内广播发送的交易,并基于收集到的交易,来创建交易列表。此时,创建的交易列表即为主节点设备提议的需要进行共识处理的交易数据。
进一步的,主节点设备可以基于纠删码算法,对提议的交易列表进行分片处理,将上述交易列表分割为指定数量的数据分片。
需要说明的是,对上述交易列表进行分割得到的数据分片的数量,可以与联盟链中的节点设备总数一致;例如,假设联盟链中有N台节点设备,那么可以将上述交易列表也分割成为N个数据分片。
其中,基于纠删码算法对上述交易列表进行分割的具体过程,在本说明书中不再进行详细描述,本领域技术人员在将本说明书记载的技术方案付诸实现时,可以参考相关技术中的记载;
例如,基于纠删码算法,假设将上述交易列表分割为N个数据分片,在这N个数据分片将会包含K个数据块,和M个校验块。M表示上述N个数据分片中可以容忍发生错误的数据分片的个数。K表示恢复出原始的交易列表至少所需的数据分片的个数(即行数纠删码恢复阈值)。即通过上述N个数据分片中的任意K个数据分片,通过纠删码重构算法(即纠删码算法的逆向算法)都可以恢复出上述交易列表的原始内容。
当主节点设备基于纠删码算法对上述交易列表完成分割,可以通过向各从节点设备发送Pre-Prepare消息,将分割得到的数据分片分别发送至其它各节点设备;其中,在本说明书中,主节点设备发送至各从节点设备的数据分片需要保持不同。
基于现有的pbft协议,主节点设备通过可以将完整的交易列表携带在Pre-Prepare消息中,然后将该Pre-Prepare消息在联盟链中的各个节点设备中进行广播发送,将完整的交易列表传播至联盟链中需要参与交易共识的从节点设备。
然而,基于pbft协议现有的交易数据传播机制,由于Pre-Prepare消息中需要携带完整的交易列表,广播发送Pre-Prepare消息就会产生大量的数据副本;比如,需要基于联盟链中节点设备的总数量N,将Pre-Prepare消息复制N份,然后进行广播发送;因此,pbft协议在交易数据的传播阶段,会大量占用联盟链的网络带宽,对联盟链网络的带宽性能上具有较高的要求;一旦联盟链网络的带宽性能不足,会导致无法在短时间 内将需要共识的交易列表扩散传播至其它参与共识的从节点设备。
基于此,在本说明书中,可以对pbft算法的pre-prepare和prepare阶段现有的交易数据传播机制进行优化改进:
一方面,主节点设备向各从节点设备发送Pre-Prepare消息中,可以不再携带完整的交易列表,而是仅携带上述交易列表的一个数据分片。
另一方面,主节点设备向其它各从节点设备扩散Pre-Prepare消息的方式,可以由广播发送Pre-Prepare消息的方式,修改为向各从节点设备单播发送Pre-Prepare消息;例如,可以针对各个从节点设备分别构建Pre-Prepare消息,在Pre-Prepare消息中携带彼此互不相同的数据分片,然后逐一将构建的Pre-Prepare消息依次发送至各从节点设备,以确保各从节点设备能够收到不同的数据分片。
请继续参见图2,收到上述Pre-Prepare消息的从节点设备,首先可以遵循pbft算法的规定,对收到的Pre-Prepare消息进行验证,以确定是否接受收到的Pre-Prepare消息。
其中,在本说明书中,对收到的Pre-Prepare消息进行验证,即为对收到的Pre-Prepare消息中携带的内容进行验证的过程,具体的验证过程,在本说明书中不再进行详述;
例如,遵循pbft算法的规定,在Pre-Prepare消息中,可以携带待共识的交易数据(本说明书中为数据分片)、视图编号v、待共识的交易数据的摘要(在本说明书中为数据分片的摘要)、数字签名等信息。相应的,在本说明书中老年个,在对Pre-Prepare消息进行验证时,具体可以执行以下的验证过程:
1)验证视图编号V与本地记录的试图编号是否一致;
2)对Pre-Prepare消息中的数字签名进行验证;
3)对Pre-Prepare消息中携带的数据分片进行有效性验证;
例如,在实现时,主节点设备可以基于所有数据分片构建一颗默克尔树,并在Pre-Prepare消息中携带默克尔树的各分支节点的hash值。而节点设备在对接收到的Pre-Prepare消息中携带的数据分片进行验证时,可以重新计算该Pre-Prepare消息中携带的数据分片的hash值,基于该hash值以及Pre-Prepare消息中携带的上述默克尔树的各分支节点的hash值,来重构默克尔树;然后,可以通过比较重构的默克尔树的树根对 应的hash,来对该数据分片进行验证;如果重构的默克尔树的树根对应的hash没有发生变化,则认为该数据分片通过有效性验证;反之,可以认为该Pre-Prepare消息中携带的为无效的数据分片,此时可以丢弃该数据分片。
当然,在实际应用中,上述Pre-Prepare消息中所携带的内容,也可以基于实际需求进行扩展;例如,在一个例子中,上述Pre-Prepare消息中还可以携带共识高度h。上述共识高度h与试图编号v在功能上类似,通常是一个连续编号的整数,表示联盟链已经共识过的轮数(并非指示成功共识的轮数)。比如,在一轮共识的过程中,如果主节点设备发生故障,通常会触发试图切换,重新选举主节点设备,在这种情况下,可以立即将共识高度h加一,而由于本轮尚未共识成功,对于试图编号V而言,则并不加一,仍然保留原来的试图编号V。
在这种情况下,在对Pre-Prepare消息进行验证时,在以上列举出的验证过程的基础上,还可以进一步执行以下示出的验证:
4)验证共识高度h与本地记录的共识高度h是否一致。
请继续参见图2,当收到上述Pre-Prepare消息的节点设备,在执行以上列举出的验证过程后,如果验证通过,表示该节点设备接受上述Pre-Prepare消息,此时该节点设备可以获取并保存该Pre-Prepare消息中携带的数据分片,并进入pbft协议的Prepare阶段,向联盟链中的其它各个节点设备广播发送一条用于对上述Pre-Prepare消息进行确认的Prepare消息;其中,上述Prepare消息中携带的内容格式,可以与上述Pre-Prepare消息保持一致。
基于现有的pbft协议,节点设备向联盟链的其它各个节点设备广播的Prepare消息中,通常仅携带诸如视图编号v、待共识的交易数据的摘要等数据,在本说明书中,可以对Prepare消息的格式进行进一步扩展,各节点设备也可以将主节点设备通过Pre-Prepare消息单播发送的数据分片,也携带在上述Prepare消息中。
一方面,各节点设备可以将携带数据分片的Prepare消息,在联盟链中的其它各个节点设备中进行广播发送,以将接收到的由主节点设备单播发送的数据分片,进一步扩散传播至联盟链中的其它各节点设备。
另一方面,各节点设备也可以接收由其它各从节点设备广播发送的Prepare消息,对收到Prepare消息进行验证,以确定是否接受收到的Prepare消息。其中,对收到Prepare消息进行验证的具体过程,可以参考对Pre-Prepare消息进行验证的具体过程,在本说明 书中不再进行赘述。
如果验证通过,表示该节点设备接受收到的Prepare消息:
一方面,该节点设备可以获取并保存该Prepare消息中携带的数据分片;
另一方面,该节点设备还可以进一步确定接收到的由其它各节点设备广播发送的Prepare消息的数量,是否达到2f+1个(包括自身广播的Prepare消息在内)。
其中,f表示pbft算法能够容错的错误节点的数量;f的具体取值,可以通过公式N=3f+1换算的得到;N表示联盟链中的节点设备的总数量。
如果收到的Prepare消息的数量达到2f+1个,此时该节点设备可以进入pbft协议的commit阶段,该节点设备可以向联盟链中的其它各个节点设备广播发送一条commit消息,继续完成对上述交易列表的原始内容的共识处理过程。
在本说明书中,联盟链中的节点设备在向联盟链中的其它各个节点设备广播发送commit消息之后,也可以接收由其它各节点设备广播发送的commit消息消息,对收到commit消息进行验证,以确定是否接受收到的commit消息。
其中,在本说明书中,上述commit消息中携带的内容格式,可以与Pre-Prepare消息和Prepare消息保持一致。但需要强调的是,在Pre-Prepare消息和Prepare消息中,携带的待共识的交易数据的摘要,为上述交易列表的数据摘要,而在commit阶段,由于节点设备已经恢复出完整的交易列表,因此在commit消息中可以携带恢复出的完整的交易列表的摘要。
其中,对收到commit消息进行验证的具体过程,可以参考对Pre-Prepare消息进行验证的具体过程,在本说明书中不再进行赘述。
如果验证通过,表示该节点设备接受收到的commit消息,该节点设备还可以进一步确定接收到的由其它各节点设备广播发送的commit消息的数量,是否达到2f+1个(包括自身广播的commit消息在内)。
如果收到的commit消息的数量达到2f+1个,此时该节点设备可以进一步确定收集到的数据分片,是否达到了纠删码算法支持的纠删码恢复阈值;如果是,该节点设备可以立即基于纠删码重构算法,对已经收集到的数据分片进行数据恢复计算,还原出上述交易列表的原始内容。
其中,基于纠删码重构算法,对已经收集到的数据分片进行数据恢复计算的具 体计算过程,在本说明书中不再进行详述,本领域技术人员在将本说明书的技术方案付诸实现时,可以参考相关技术中的记载。
其中,在示出的一种实施方式中,由于一旦上述纠删码恢复阈值的具体取值大于2f+1,会导致从节点设备在commit阶段,没有足够的数据分片来恢复出需要共识的上述交易列表的原始内容,因此在本说明书中,上述纠删码算法支持的纠删码恢复阈值的具体取值大小,需要小于或者等于上述2f+1;例如,可以恰好等于2f+1。
通过这种方式,使得主节点设备在基于纠删码算法对上述交易列表进行分割时,可以参考pbft算法支持的错误节点的容错数量f,来控制最终分割得到的数据分片的数量,从而可以在确保在commit阶段,有足够的数据分片恢复出需要共识的上述交易列表的原始内容的前提下,尽可能的将上述交易列表分割为足够小的数据分片。
在本说明书中,主节点设备在对上述交易列表进行分割之前,还可以基于支持的相关算法对上述交易列表进行预处理。
在示出的一种实施方式中,主节点设备对上述交易列表进行分割之前,还可以对上述交易列表进行压缩预处理,基于支持的压缩算法对上述交易列表进行压缩处理。
其中,上述主节点设备所采用的压缩算法,在本说明书中不进行特别限定。
当完成针对上述交易列表的压缩处理之后,此时主节点设备再基于上述纠删码算法对压缩处理后的上述交易列表进行分割,将压缩处理后的上述交易列表分割成为指定数量的数据分片。
相应的,在pbft协议的Prepare阶段,由于各节点设备传播扩散的数据分片,为基于压缩处理后的交易列表进行分割得到的数据分片,因此节点设备在基于纠删码重构算法,对收集到的数据分片进行数据恢复后,得到的也只是压缩处理后的交易列表。
在这种情况下,节点设备在完成以上数据恢复计算后,可以基于与上述压缩算法对应的解压缩算法,对恢复出的压缩后的交易列表进行解压缩处理,来解压缩出上述交易列表的原始内容,然后继续执行commit阶段的共识处理过程,具体的实施细节不再赘述。
通过这种方式,由于主节点设备在对上述交易列表进行分割之前,预先对主节点设备进行了压缩处理,因此可以有效减低压缩后的数据分片的大小,从而能够最大程度的降低主节点设备与从节点设备之间进行共识交互时的数据传输带宽。
在示出的另一种实施方式中,主节点设备对上述交易列表进行分割之前,还可以对上述交易列表进行加密预处理,基于预设的加密算法以及加密密钥对对上述交易列表进行加密处理。
其中,上述主节点设备所采用的加密算法,在本说明书中不进行特别限定;例如,在实际应用中,可以是对称加密算法,也可以是非对称加密算法。
当完成针对上述交易列表的加密处理之后,此时主节点设备再基于上述纠删码算法对加密处理后的上述交易列表进行分割,将加密处理后的上述交易列表分割成为指定数量的数据分片。
相应的,在pbft协议的Prepare阶段,由于各节点设备传播扩散的数据分片,为基于加密处理后的交易列表进行分割得到的数据分片,因此节点设备在基于纠删码重构算法,对收集到的数据分片进行数据恢复后,得到的也只是加密处理后的交易列表。
在这种情况下,节点设备在完成以上数据恢复计算后,可以基于与上述加密算法对应的解密算法,以及与上述加密密钥对应的解密密钥,对恢复出的压缩后的交易列表进行解密处理,来解密出上述交易列表的原始内容,然后继续执行commit阶段的共识处理过程,具体的实施细节不再赘述。
其中,在示出的一种实施方式中,上述加密算法具体可以是门限加密算法。而上述解密算法具体可以是与门限加密算法对应的门限解密算法。
在这种场景下,解密密钥具体可以被分割为指定数量的子密钥,并将各子密钥由各节点设备分别持有。
需要说明的是,对上述解密密钥进行分割得到的子密钥的数量,可以与联盟链中的节点设备总数一致;例如,假设联盟链中有N台节点设备,那么可以将上述解密密钥也分割成为N个子密钥,由联盟链中的N台节点设备分别持有。
在这种情况下,节点设备还可以收集其它各节点设备持有的子密钥,并确定收集到的子密钥的数量是否达到预设的解密门限阈值;比如,密钥门限阈值为N时,表明需要N个节点设备基于持有的子密钥(也即上述解密密钥的部分片段),来共同对加密后的数据进行解密。
其中,节点设备收集其它各节点设备持有的子密钥的具体方式,在本说明书中不进行特别限定;
例如,仍以联盟链采用的共识算法为pbft算法为例,节点设备可以在与其它节点设备交互的commit消息中,携带自身持有的子密钥;当然,在实际应用中,各节点设备也可以通过单独定义一个用于传播持有的子密钥的交互消息,利用该交互消息将自身持有的子密钥同步到其它节点设备。
如果节点设备设备收集到的子密钥的数量达到预设的解密门限阈值,表明该节点设备已经具有足够的分片来重构解密密钥,此时该节点设备可以基于收集到的子密钥对解密密钥进行重构处理,以恢复出原始的解密密钥,然后基于门限解密算法以及恢复出的原始的解密密钥,对恢复出的加密处理后的交易列表进行解密处理,来解密出上述交易列表的原始内容。
其中,基于收集到的子密钥对解密密钥进行重构的具体过程,在本说明书中不再进行详细描述,本领域技术人员在将本说明书的技术方案付诸实现时,可以参考相关技术中的记载;
例如,在对解密密钥进行分割、以及基于收集到的子密钥对解密密钥进行恢复,仍然可以采用纠删码技术来实现,具体过程不再赘述。
通过这种方式,由于主节点设备在对上述交易列表进行分割之前,预先对主节点设备进行了加密处理,因此可以有效的提升主节点设备在向各节点设备发送数据分片时的数据安全,使得一些非法的节点设备即便收集到足够的数据分片恢复出上述交易列表,也无法查看到交易列表的原始内容,从而可以提升
主节点设备与从节点设备之间进行共识交互时的数据安全。
需要补充说明的是,在以上实施例中,以利用pbft算法的pre-prepare和prepare阶段现有的交易数据传播扩散机制,将待共识的交易列表传播扩散至各个参与共识的节点设备为例进行了详细说明。
需要强调的是,在实际应用中,在需要将待共识的交易列表传播扩散至各个参与共识的节点设备时,除了利用联盟链搭载的共识算法中已有的传播扩散机制来完成交易列表传播扩散以外,也可以通过定义单独的传播扩散协议来完成相同的功能;
例如,仍然以联盟链采用的共识算法为pbft算法为例,主节点设备与从节点设备之间在启动pbft算法规定的三个阶段的共识交互之前,主节点设备可以通过定义的传播扩散协议,与从节点设备进行共识交互,提前将需要共识的交易列表传播扩散至各个从节点设备。也即,节点设备可以通过定义的传播扩散协议,提前将需要共识的交易列 表扩散传播到各个参与共识的节点设备之后,再启动pbft算法规定的三个阶段的共识交互,完成对该交易列表的共识处理。
在这种情况下,pbft算法的pre-prepare和prepare阶段现有的交易数据传播扩散机制则不再不需要执行以上实施例中描述的优化过程;比如,pre-prepare消息和prepare消息中,可以不再携带完整的交易列表,或者是交易列表的数据分片,而是直接携带上述交易列表的摘要值即可。
另外,以上实施例中,仅以联盟链采用pbft算法作为共识算法为例进行了说明,显然在实际应用中,本说明书中的技术方案也可以等同应用在联盟链采用的其它形式的共识算法之中。
也即,以上步骤102-106示出的传播扩散逻辑,除了可以应用在pbft算法的共识交互过程之中,也可以应用在注入raft等其它类似的共识算法之中,其具体的实施细节,在本说明书中不再进行详述,本领域技术人员在将本说明书的技术方案付诸实现时,可以参考以上实施例中的记载。
通过以上各实施例可见,由于主节点设备在向各从节点设备提议待共识的交易数据时,可以基于纠删码算法对待共识的交易数据进行分片之后再进行传播:
一方面,使得主节点设备在向各从节点设备提议交易数据时,可以不再需要将完整的交易数据向各从节点设备进行广播发送,而是采用向各从节点设备单播发送数据分片即可,因此可以显著的降低向参与共识的节点设备扩散传播需要共识的交易数据时所消耗的数据传输带宽,可以在短时间内将待共识的交易数据传播至各从节点设备来完成共识,从而可以提升共识处理效率;
另一方面,由于主节点设备向各从节点设备单播发送的仅仅是上述交易数据的数据分片,对于主节点设备而言,无法获知该数据分片所属的完整交易的完整内容,因此可以有效避免主节点设备向其它参与共识的节点设备有选择性的单播一些特定的交易,对一些特定的交易进行有选择性的共识,从而可以保障共识的公正性,反正主节点通过有选择性共识来进行“作恶”。
与上述方法实施例相对应,本说明书还提供了一种基于区块链的交易共识处理装置的实施例。本说明书的基于区块链的交易共识处理装置的实施例可以应用在电子设备上。装置实施例可以通过软件实现,也可以通过硬件或者软硬件结合的方式实现。以软件实现为例,作为一个逻辑意义上的装置,是通过其所在电子设备的处理器将非易失 性存储器中对应的计算机程序指令读取到内存中运行形成的。从硬件层面而言,如图3所示,为本说明书的基于区块链的交易共识处理装置所在电子设备的一种硬件结构图,除了图3所示的处理器、内存、网络接口、以及非易失性存储器之外,实施例中装置所在的电子设备通常根据该电子设备的实际功能,还可以包括其他硬件,对此不再赘述。
图4是本说明书一示例性实施例示出的一种基于区块链的交易共识处理装置的框图。
请参考图4,所述基于区块链的交易共识处理装置40可以应用在前述图3所示的电子设备中,包括有:接收模块401、发送模块402、确定模块403和恢复模块404。
接收模块401,接收所述主节点设备单播发送的所述交易数据的数据分片;其中,所述区块链中的节点设备至少包括一主节点设备以及若干从节点设备;所述主节点设备基于纠删码算法将提议的交易数据分割为指定数量的数据分片所述主节点设备单播发送至各节点设备的数据分片不同;
发送模块402,将接收到的数据分片广播发送至所述区块链中的其它各节点设备;以及,接收所述其它各节点设备广播发送的所述交易数据的数据分片;
确定模块403,确定接收到的所述交易数据的数据分片的数量是否达到纠删码恢复阈值;
恢复模块404,如果是,基于纠删码重构算法对接收到的数据分片进行数据恢复得到所述交易数据的原始内容,以完成对所述交易数据的原始内容的共识处理。
在本实施例中,所述装置40还包括:
分割模块405,确定本节点设备是否被选举为所述主节点设备;如果是,基于所述纠删码算法将提议的交易数据分割为指定数量的数据分片;
所述发送模块402进一步:
将所述指定数量的数据分片分别单播发送至其它各节点设备。
在本实施例中,所述区块链搭载的共识算法为pbft算法;
所述接收模块401:
接收所述主节点设备单播发送的Pre-Prepare消息;其中,所述Pre-Prepare消息中包括所述交易数据的数据分片;
获取并保存所述Pre-Prepare消息中的数据分片。
在本实施例中,所述发送模块402:
向所述区块链中的其它各节点设备广播发送Prepare消息;其中,所述Prepare消息包括接收到的所述数据分片,以使所述其它各节点设备在接收到所述Prepare消息时,获取并保存所述Prepare消息中的数据分片。
在本实施例中,所述分割模块405:
基于预设的压缩算法对提议的所述交易数据进行压缩处理;
基于所述纠删码算法将压缩处理后的所述交易数据分割为指定数量的数据分片。
所述恢复模块404:
基于纠删码重构算法对接收到的数据分片进行数据恢复得到压缩后的所述交易数据;
基于与所述压缩算法对应的解压缩算法,对恢复出的所述交易数据进行解压缩处理,以得到所述交易数据的原始内容。
在本实施例中,所述分割模块405:
基于预设的加密算法以及加密密钥对提议的交易数据进行加密处理;
基于所述纠删码算法将加密处理后的所述交易数据分割为指定数量的数据分片。
所述恢复模块404:
基于基于纠删码重构算法对接收到的数据分片进行数据恢复得到加密后的所述交易数据;
基于与所述加密算法对应的解密算法,以及与所述加密密钥对应的解密密钥,对恢复出的所述交易数据进行解密处理,以得到所述交易数据的原始内容。
在本实施例中,所述加密算法为门限加密算法;所述解密算法为与门限加密算法对应的门限解密算法;所述解密密钥被分割为指定数量的子密钥;其中,各子密钥由各节点设备分别持有;
所述恢复模块404进一步:
收集所述其它各节点设备持有的子密钥;
确定收集到的子密钥的数量是否达到预设的解密门限阈值;
如果是,基于收集到的子密钥重构所述解密密钥,并基于与所述门限加密算法对应的门限解密算法,以及所述解密密钥,对恢复出的所述交易数据进行解密处理。
在本实施例中,所述主节点提议的交易数据,为所述主节点设备当前共识周期内由各用户客户端广播发送的待共识交易构建的交易列表;所述指定数量为所述区块链中的节点设备的总数量。
在本实施例中,所述区块链为联盟链。
上述装置中各个模块的功能和作用的实现过程具体详见上述方法中对应步骤的实现过程,在此不再赘述。
对于装置实施例而言,由于其基本对应于方法实施例,所以相关之处参见方法实施例的部分说明即可。以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的模块可以是或者也可以不是物理上分开的,作为模块显示的部件可以是或者也可以不是物理模块,即可以位于一个地方,或者也可以分布到多个网络模块上。可以根据实际的需要选择其中的部分或者全部模块来实现本说明书方案的目的。本领域普通技术人员在不付出创造性劳动的情况下,即可以理解并实施。
上述实施例阐明的系统、装置、模块或模块,具体可以由计算机芯片或实体实现,或者由具有某种功能的产品来实现。一种典型的实现设备为计算机,计算机的具体形式可以是个人计算机、膝上型计算机、蜂窝电话、相机电话、智能电话、个人数字助理、媒体播放器、导航设备、电子邮件收发设备、游戏控制台、平板计算机、可穿戴设备或者这些设备中的任意几种设备的组合。
与上述方法实施例相对应,本说明书还提供了一种电子设备的实施例。该电子设备包括:处理器以及用于存储机器可执行指令的存储器;其中,处理器和存储器通常通过内部总线相互连接。在其他可能的实现方式中,所述设备还可能包括外部接口,以能够与其他设备或者部件进行通信。
在本实施例中,通过读取并执行所述存储器存储的与基于区块链的交易共识处理的控制逻辑对应的机器可执行指令,所述处理器被促使:
接收所述主节点设备单播发送的所述交易数据的数据分片;其中,所述区块链中的节点设备至少包括一主节点设备以及若干从节点设备;所述主节点设备基于纠删码算法将提议的交易数据分割为指定数量的数据分片所述主节点设备单播发送至各节点设备的数据分片不同;
将接收到的数据分片广播发送至所述区块链中的其它各节点设备;以及,接收所述其它各节点设备广播发送的所述交易数据的数据分片;
确定接收到的所述交易数据的数据分片的数量是否达到纠删码恢复阈值;
如果是,基于纠删码重构算法对接收到的数据分片进行数据恢复得到所述交易数据的原始内容,以完成对所述交易数据的原始内容的共识处理。
在本实施例中,通过读取并执行所述存储器存储的与基于区块链的交易共识处理的控制逻辑对应的机器可执行指令,所述处理器被促使:
确定本节点设备是否被选举为所述主节点设备;
如果是,基于所述纠删码算法将提议的交易数据分割为指定数量的数据分片;以及,
将所述指定数量的数据分片分别单播发送至其它各节点设备。
在本实施例中,所述区块链搭载的共识算法为pbft算法;
通过读取并执行所述存储器存储的与基于区块链的交易共识处理的控制逻辑对应的机器可执行指令,所述处理器被促使:
接收所述主节点设备单播发送的Pre-Prepare消息;其中,所述Pre-Prepare消息中包括所述交易数据的数据分片;
获取并保存所述Pre-Prepare消息中的数据分片。
在本实施例中,通过读取并执行所述存储器存储的与基于区块链的交易共识处理的控制逻辑对应的机器可执行指令,所述处理器被促使:
向所述区块链中的其它各节点设备广播发送Prepare消息;其中,所述Prepare消息包括接收到的所述数据分片,以使所述其它各节点设备在接收到所述Prepare消息时,获取并保存所述Prepare消息中的数据分片。
在本实施例中,通过读取并执行所述存储器存储的与基于区块链的交易共识处理的控制逻辑对应的机器可执行指令,所述处理器被促使:
基于预设的压缩算法对提议的所述交易数据进行压缩处理;
基于所述纠删码算法将压缩处理后的所述交易数据分割为指定数量的数据分片。
在本实施例中,通过读取并执行所述存储器存储的与基于区块链的交易共识处 理的控制逻辑对应的机器可执行指令,所述处理器被促使:
基于纠删码重构算法对接收到的数据分片进行数据恢复得到压缩后的所述交易数据;
基于与所述压缩算法对应的解压缩算法,对恢复出的所述交易数据进行解压缩处理,以得到所述交易数据的原始内容。
在本实施例中,通过读取并执行所述存储器存储的与基于区块链的交易共识处理的控制逻辑对应的机器可执行指令,所述处理器被促使:
基于预设的加密算法以及加密密钥对提议的交易数据进行加密处理;
基于所述纠删码算法将加密处理后的所述交易数据分割为指定数量的数据分片。
在本实施例中,通过读取并执行所述存储器存储的与基于区块链的交易共识处理的控制逻辑对应的机器可执行指令,所述处理器被促使:
基于基于纠删码重构算法对接收到的数据分片进行数据恢复得到加密后的所述交易数据;
基于与所述加密算法对应的解密算法,以及与所述加密密钥对应的解密密钥,对恢复出的所述交易数据进行解密处理,以得到所述交易数据的原始内容。
在本实施例中,所述加密算法为门限加密算法;所述解密算法为与门限加密算法对应的门限解密算法;所述解密密钥被分割为指定数量的子密钥;其中,各子密钥由各节点设备分别持有;
通过读取并执行所述存储器存储的与基于区块链的交易共识处理的控制逻辑对应的机器可执行指令,所述处理器被促使:
收集所述其它各节点设备持有的子密钥;
确定收集到的子密钥的数量是否达到预设的解密门限阈值;
如果是,基于收集到的子密钥重构所述解密密钥,并基于与所述门限加密算法对应的门限解密算法,以及所述解密密钥,对恢复出的所述交易数据进行解密处理。
本领域技术人员在考虑说明书及实践这里公开的发明后,将容易想到本说明书的其它实施方案。本说明书旨在涵盖本说明书的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本说明书的一般性原理并包括本说明书未公开的本技术 领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本说明书的真正范围和精神由下面的权利要求指出。
应当理解的是,本说明书并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本说明书的范围仅由所附的权利要求来限制。
以上所述仅为本说明书的较佳实施例而已,并不用以限制本说明书,凡在本说明书的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本说明书保护的范围之内。

Claims (19)

  1. 一种基于区块链的交易共识处理方法,所述区块链中的节点设备至少包括一主节点设备以及若干从节点设备;其中,所述主节点设备基于纠删码算法将提议的交易数据分割为指定数量的数据分片,所述方法包括:
    接收所述主节点设备单播发送的所述交易数据的数据分片;其中,所述主节点设备单播发送至各节点设备的数据分片不同;
    将接收到的数据分片广播发送至所述区块链中的其它各节点设备;以及,接收所述其它各节点设备广播发送的所述交易数据的数据分片;
    确定接收到的所述交易数据的数据分片的数量是否达到纠删码恢复阈值;
    如果是,基于纠删码重构算法对接收到的数据分片进行数据恢复得到所述交易数据的原始内容,以完成对所述交易数据的原始内容的共识处理。
  2. 根据权利要求1所述的方法,所述方法还包括:
    确定本节点设备是否被选举为所述主节点设备;
    如果是,基于所述纠删码算法将提议的交易数据分割为指定数量的数据分片;以及,
    将所述指定数量的数据分片分别单播发送至其它各节点设备。
  3. 根据权利要求1所述的方法,所述区块链搭载的共识算法为pbft算法;
    所述接收所述主节点设备单播发送的所述交易数据的数据分片,包括:
    接收所述主节点设备单播发送的Pre-Prepare消息;其中,所述Pre-Prepare消息中包括所述交易数据的数据分片;
    获取并保存所述Pre-Prepare消息中的数据分片。
  4. 根据权利要求3所述的方法,所述将接收到的数据分片广播发送至所述区块链中的其它各节点设备,包括:
    向所述区块链中的其它各节点设备广播发送Prepare消息;其中,所述Prepare消息包括接收到的所述数据分片,以使所述其它各节点设备在接收到所述Prepare消息时,获取并保存所述Prepare消息中的数据分片。
  5. 根据权利要求1或2所述的方法,所述基于所述纠删码算法将提议的交易数据分割为指定数量的数据分片,包括:
    基于预设的压缩算法对提议的所述交易数据进行压缩处理;
    基于所述纠删码算法将压缩处理后的所述交易数据分割为指定数量的数据分片;
    所述基于纠删码重构算法对接收到的数据分片进行数据恢复得到所述交易数据的原始内容,包括:
    基于纠删码重构算法对接收到的数据分片进行数据恢复得到压缩后的所述交易数据;
    基于与所述压缩算法对应的解压缩算法,对恢复出的所述交易数据进行解压缩处理,以得到所述交易数据的原始内容。
  6. 根据权利要求1或2所述的方法,基于所述纠删码算法将提议的交易数据分割为指定数量的数据分片,包括:
    基于预设的加密算法以及加密密钥对提议的交易数据进行加密处理;
    基于所述纠删码算法将加密处理后的所述交易数据分割为指定数量的数据分片;
    所述基于纠删码重构算法对接收到的数据分片进行数据恢复得到所述交易数据的原始内容,包括:
    基于纠删码重构算法对接收到的数据分片进行数据恢复得到加密后的所述交易数据;
    基于与所述加密算法对应的解密算法,以及与所述加密密钥对应的解密密钥,对恢复出的所述交易数据进行解密处理,以得到所述交易数据的原始内容。
  7. 根据权利要求6所述的方法,所述加密算法为门限加密算法;所述解密算法为与门限加密算法对应的门限解密算法;所述解密密钥被分割为指定数量的子密钥;其中,各子密钥由各节点设备分别持有;
    基于与所述加密算法对应的解密算法,以及与所述加密密钥对应的解密密钥,对恢复出的所述交易数据进行解密处理,包括:
    收集所述其它各节点设备持有的子密钥;
    确定收集到的子密钥的数量是否达到预设的解密门限阈值;
    如果是,基于收集到的子密钥重构所述解密密钥,并基于与所述门限加密算法对应的门限解密算法,以及所述解密密钥,对恢复出的所述交易数据进行解密处理。
  8. 根据权利要求1所述的方法,所述主节点提议的交易数据,为所述主节点设备当前共识周期内由各用户客户端广播发送的待共识交易构建的交易列表;所述指定数量为所述区块链中的节点设备的总数量。
  9. 根据权利要求1所述的方法,所述区块链为联盟链。
  10. 一种基于区块链的交易共识处理装置,所述区块链中的节点设备至少包括一主节点设备以及若干从节点设备;其中,所述主节点设备基于纠删码算法将提议的交易数据分割为指定数量的数据分片,所述装置包括:
    接收模块,接收所述主节点设备单播发送的所述交易数据的数据分片;其中,所述 主节点设备单播发送至各节点设备的数据分片不同;
    发送模块,将接收到的数据分片广播发送至所述区块链中的其它各节点设备;以及,接收所述其它各节点设备广播发送的所述交易数据的数据分片;
    确定模块,确定接收到的所述交易数据的数据分片的数量是否达到纠删码恢复阈值;
    恢复模块,如果是,基于纠删码重构算法对接收到的数据分片进行数据恢复得到所述交易数据的原始内容,以完成对所述交易数据的原始内容的共识处理。
  11. 根据权利要求10所述的装置,所述装置还包括:
    分割模块,确定本节点设备是否被选举为所述主节点设备;如果是,基于所述纠删码算法将提议的交易数据分割为指定数量的数据分片;
    所述发送模块进一步:
    将所述指定数量的数据分片分别单播发送至其它各节点设备。
  12. 根据权利要求10所述的装置,所述区块链搭载的共识算法为pbft算法;
    所述接收模块:
    接收所述主节点设备单播发送的Pre-Prepare消息;其中,所述Pre-Prepare消息中包括所述交易数据的数据分片;
    获取并保存所述Pre-Prepare消息中的数据分片。
  13. 根据权利要求12所述的装置,所述发送模块:
    向所述区块链中的其它各节点设备广播发送Prepare消息;其中,所述Prepare消息包括接收到的所述数据分片,以使所述其它各节点设备在接收到所述Prepare消息时,获取并保存所述Prepare消息中的数据分片。
  14. 根据权利要求11所述的装置,所述分割模块:
    基于预设的压缩算法对提议的所述交易数据进行压缩处理;
    基于所述纠删码算法将压缩处理后的所述交易数据分割为指定数量的数据分片;
    所述恢复模块:
    基于纠删码重构算法对接收到的数据分片进行数据恢复得到压缩后的所述交易数据;
    基于与所述压缩算法对应的解压缩算法,对恢复出的所述交易数据进行解压缩处理,以得到所述交易数据的原始内容。
  15. 根据权利要求11所述的装置,所述分割模块:
    基于预设的加密算法以及加密密钥对提议的交易数据进行加密处理;
    基于所述纠删码算法将加密处理后的所述交易数据分割为指定数量的数据分片;
    所述恢复模块:
    基于纠删码重构算法对接收到的数据分片进行数据恢复得到加密后的所述交易数据;
    基于与所述加密算法对应的解密算法,以及与所述加密密钥对应的解密密钥,对恢复出的所述交易数据进行解密处理,以得到所述交易数据的原始内容。
  16. 根据权利要求15所述的装置,所述加密算法为门限加密算法;所述解密算法为与门限加密算法对应的门限解密算法;所述解密密钥被分割为指定数量的子密钥;其中,各子密钥由各节点设备分别持有;
    所述恢复模块进一步:
    收集所述其它各节点设备持有的子密钥;
    确定收集到的子密钥的数量是否达到预设的解密门限阈值;
    如果是,基于收集到的子密钥重构所述解密密钥,并基于与所述门限加密算法对应的门限解密算法,以及所述解密密钥,对恢复出的所述交易数据进行解密处理。
  17. 根据权利要求10所述的装置,所述主节点提议的交易数据,为所述主节点设备当前共识周期内由各用户客户端广播发送的待共识交易构建的交易列表;所述指定数量为所述区块链中的节点设备的总数量。
  18. 根据权利要求10所述的装置,所述区块链为联盟链。
  19. 一种电子设备,包括:
    处理器;
    用于存储机器可执行指令的存储器;
    其中,通过读取并执行所述存储器存储的与基于区块链的交易共识处理的控制逻辑对应的机器可执行指令,所述处理器被促使:
    接收所述主节点设备单播发送的所述交易数据的数据分片;其中,所述区块链中的节点设备至少包括一主节点设备以及若干从节点设备;所述主节点设备基于纠删码算法将提议的交易数据分割为指定数量的数据分片所述主节点设备单播发送至各节点设备的数据分片不同;
    将接收到的数据分片广播发送至所述区块链中的其它各节点设备;以及,接收所述其它各节点设备广播发送的所述交易数据的数据分片;
    确定接收到的所述交易数据的数据分片的数量是否达到纠删码恢复阈值;
    如果是,基于纠删码重构算法对接收到的数据分片进行数据恢复得到所述交易数据的原始内容,以完成对所述交易数据的原始内容的共识处理。
PCT/CN2019/096269 2018-08-31 2019-07-17 基于区块链的交易共识处理方法及装置、电子设备 WO2020042792A1 (zh)

Priority Applications (4)

Application Number Priority Date Filing Date Title
EP19855726.6A EP3809356A4 (en) 2018-08-31 2019-07-17 PROCESS AND APPARATUS FOR PROCESSING CONSENSUS TRANSACTION BASED ON A CHAIN OF BLOCKS AND ELECTRONIC DEVICE
SG11202010530PA SG11202010530PA (en) 2018-08-31 2019-07-17 Method, apparatus and electronic device for blockchain-based transaction consensus processing
US17/076,526 US11023309B2 (en) 2018-08-31 2020-10-21 Method, apparatus and electronic device for blockchain-based transaction consensus processing
US17/240,467 US11614994B2 (en) 2018-08-31 2021-04-26 Method, apparatus and electronic device for blockchain-based transaction consensus processing

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201811015599.0A CN109345386B (zh) 2018-08-31 2018-08-31 基于区块链的交易共识处理方法及装置、电子设备
CN201811015599.0 2018-08-31

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US17/076,526 Continuation US11023309B2 (en) 2018-08-31 2020-10-21 Method, apparatus and electronic device for blockchain-based transaction consensus processing

Publications (1)

Publication Number Publication Date
WO2020042792A1 true WO2020042792A1 (zh) 2020-03-05

Family

ID=65292007

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/096269 WO2020042792A1 (zh) 2018-08-31 2019-07-17 基于区块链的交易共识处理方法及装置、电子设备

Country Status (6)

Country Link
US (2) US11023309B2 (zh)
EP (1) EP3809356A4 (zh)
CN (1) CN109345386B (zh)
SG (1) SG11202010530PA (zh)
TW (1) TWI698767B (zh)
WO (1) WO2020042792A1 (zh)

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111415162A (zh) * 2020-04-29 2020-07-14 陈议尊 基于区块链公链的交易方法和系统
CN111711526A (zh) * 2020-06-16 2020-09-25 深圳前海微众银行股份有限公司 一种区块链节点的共识方法及系统
CN112232956A (zh) * 2020-10-16 2021-01-15 中国银联股份有限公司 一种基于区块链的智慧停车的数据处理方法及装置
CN112835743A (zh) * 2021-01-25 2021-05-25 中央财经大学 分布式账本数据存储优化方法、装置、电子设备及介质
CN113657898A (zh) * 2020-06-05 2021-11-16 支付宝(杭州)信息技术有限公司 联盟链中的共识方法和系统
CN113761071A (zh) * 2021-10-09 2021-12-07 支付宝(杭州)信息技术有限公司 一种共识方法、区块链系统和共识节点
CN113886115A (zh) * 2021-09-09 2022-01-04 上海智能网联汽车技术中心有限公司 一种基于车路协同的区块链拜占庭容错方法及系统
EP3934165A1 (en) * 2020-07-03 2022-01-05 Alipay (Hangzhou) Information Technology Co., Ltd. Consensus method of consortium blockchain, and consortium blockchain system
CN114258015A (zh) * 2021-12-23 2022-03-29 成都三零瑞通移动通信有限公司 一种基于全网共识的集群终端防失控方法及系统
CN114285555A (zh) * 2021-12-15 2022-04-05 支付宝(杭州)信息技术有限公司 基于区块链的组播方法及装置
CN114374704A (zh) * 2021-12-29 2022-04-19 张海滨 可靠广播方法、装置、系统及介质
CN114567427A (zh) * 2022-01-05 2022-05-31 北京理工大学 一种区块链隐蔽数据分段传输方法
WO2023045972A1 (zh) * 2021-09-27 2023-03-30 深圳前海微众银行股份有限公司 一种区块链系统的共识方法及装置

Families Citing this family (57)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109379397B (zh) 2018-08-31 2019-12-06 阿里巴巴集团控股有限公司 基于区块链的交易共识处理方法及装置、电子设备
CN109345386B (zh) * 2018-08-31 2020-04-14 阿里巴巴集团控股有限公司 基于区块链的交易共识处理方法及装置、电子设备
US11750700B2 (en) * 2018-10-24 2023-09-05 Samsung Electronics Co., Ltd. Method, device, computer-readable medium, and system for managing transactions
CN109918925A (zh) * 2019-02-19 2019-06-21 上海泉坤信息科技有限公司 数据存储方法、数据节点及存储介质
CN109687979A (zh) * 2019-03-06 2019-04-26 郑州师范学院 一种环签名方法、装置、设备及介质
CN110086607B (zh) * 2019-03-13 2021-08-17 深圳壹账通智能科技有限公司 快速切换部署密钥的方法、装置、计算机设备和存储介质
SG11201908387SA (en) * 2019-03-18 2019-10-30 Alibaba Group Holding Ltd Consensus system downtime recovery
JP6731123B1 (ja) 2019-03-18 2020-07-29 アリババ・グループ・ホールディング・リミテッドAlibaba Group Holding Limited 合意システムのダウンタイムの回復
US10938750B2 (en) 2019-03-18 2021-03-02 Advanced New Technologies Co., Ltd. Consensus system downtime recovery
CN110046894B (zh) * 2019-04-19 2021-11-09 电子科技大学 一种基于纠删码的分组可重构区块链建立方法
CN110225103B (zh) * 2019-05-23 2021-08-24 创新先进技术有限公司 一种业务推荐方法、装置及设备
CN112612856B (zh) * 2019-07-09 2024-03-29 创新先进技术有限公司 基于区块链的数据处理方法和装置
CN110619020B (zh) * 2019-09-02 2022-04-01 杭州趣链科技有限公司 一种基于机器学习的区块链分片方法
CN110545286B (zh) * 2019-09-18 2022-04-26 腾讯科技(深圳)有限公司 加入联盟链、退出联盟链的方法、装置、设备及存储介质
CN110933022A (zh) * 2019-10-11 2020-03-27 深圳壹账通智能科技有限公司 区块处理方法、装置、计算机设备及存储介质
CN110879687B (zh) * 2019-10-18 2021-03-16 蚂蚁区块链科技(上海)有限公司 一种基于磁盘存储的数据读取方法、装置及设备
US11368285B2 (en) * 2019-12-05 2022-06-21 International Business Machines Corporation Efficient threshold storage of data object
US11038683B1 (en) * 2020-01-24 2021-06-15 Via Science, Inc. Secure data processing
CN111385152B (zh) * 2020-03-12 2021-08-06 上海曼恒数字技术股份有限公司 一种基于vr设备的硬件管理和内容分发系统
CN111447057B (zh) * 2020-03-25 2023-04-28 南方电网科学研究院有限责任公司 一种基于门限秘密共享技术的安全存储方法及设备
CN113298649A (zh) * 2020-07-01 2021-08-24 阿里巴巴集团控股有限公司 交易数据的处理方法和装置、数据处理方法和装置
CN111526218B (zh) * 2020-07-03 2020-09-22 支付宝(杭州)信息技术有限公司 联盟链中的共识方法和系统
CN112100144A (zh) * 2020-08-20 2020-12-18 东软集团股份有限公司 区块链文件共享方法、装置、存储介质及电子设备
CN111813795B (zh) 2020-08-28 2020-12-04 支付宝(杭州)信息技术有限公司 在区块链网络中确认交易的方法及装置
CN112650812A (zh) * 2020-12-22 2021-04-13 深圳壹账通智能科技有限公司 一种数据分片存储方法、装置、计算机设备和存储介质
CN112632628B (zh) * 2021-01-30 2023-11-24 山西晋合思创信息科技有限公司 一种基于区块链技术的司法案件数据管理方法
CN112907369B (zh) * 2021-02-08 2022-04-12 网易(杭州)网络有限公司 基于区块链的数据共识方法及装置、电子设备、存储介质
CN112860805A (zh) * 2021-04-01 2021-05-28 中国工商银行股份有限公司 一种区块链数据交互方法及系统
CN112988470B (zh) * 2021-04-27 2021-09-07 支付宝(杭州)信息技术有限公司 联盟链中的共识方法、共识节点和系统
CN112991066A (zh) * 2021-04-27 2021-06-18 支付宝(杭州)信息技术有限公司 联盟链中的共识方法、装置和电子设备
US12020246B2 (en) 2021-06-01 2024-06-25 Bank Of America Corporation Intelligent distributed ledger consent optimizing apparatus for asset transfer
US11625698B2 (en) 2021-06-01 2023-04-11 Bank Of America Corporation Intelligent distributed ledger consent optimizing apparatus for asset transfer
CN113242044B (zh) * 2021-06-02 2022-10-14 湖北央中巨石信息技术有限公司 一种减少内存占用的区块链数据存储压缩方法
CN114679466B (zh) * 2021-06-04 2023-02-10 腾讯云计算(北京)有限责任公司 区块链网络的共识处理方法、装置、计算机设备和介质
CN113573255A (zh) * 2021-07-26 2021-10-29 上海点融信息科技有限责任公司 基于区块链进行共识的方法、装置及存储介质
CN113507482B (zh) * 2021-07-27 2023-10-10 御风科技(海南)有限公司 数据安全传输方法、安全交易方法、系统、介质和设备
US12015602B2 (en) 2021-08-16 2024-06-18 Bank Of America Corporation Information security system and method for secure data transmission among user profiles using a blockchain network
CN113468517A (zh) * 2021-09-02 2021-10-01 北京交研智慧科技有限公司 一种基于区块链的数据共享方法、系统及存储介质
CN113746637B (zh) * 2021-09-03 2024-02-27 华东师范大学 适用于联盟链且具有高可扩展性的segbft共识算法
CN113873030A (zh) * 2021-09-24 2021-12-31 支付宝(杭州)信息技术有限公司 一种区块链的共识方法、共识节点及电子设备
CN113761069A (zh) * 2021-09-24 2021-12-07 支付宝(杭州)信息技术有限公司 一种区块链的共识方法、系统、节点及电子设备
CN113852691B (zh) * 2021-09-24 2024-10-18 支付宝(杭州)信息技术有限公司 一种区块链的共识方法、共识节点及电子设备
CN114584312B (zh) * 2021-10-09 2024-03-29 支付宝(杭州)信息技术有限公司 一种共识方法、区块链系统和共识节点
CN113630259B (zh) * 2021-10-09 2021-12-14 支付宝(杭州)信息技术有限公司 一种共识方法、区块链系统和共识节点
CN114124350A (zh) * 2021-11-11 2022-03-01 弥达斯科技(深圳)有限公司 一种网络异构环境下提升性能的共识算法
CN114065246B (zh) * 2021-11-16 2022-08-19 上海柯林布瑞信息技术有限公司 医疗区块链数据上链方法和装置
KR20230090027A (ko) * 2021-12-14 2023-06-21 한국전자통신연구원 블록체인 네트워크에서의 합의 노드 정보 동기화 장치 및 방법
CN114218612B (zh) * 2021-12-14 2023-10-20 河北省科学院应用数学研究所 一种适用于联盟链高频交易场景的共识方法
CN114301918B (zh) * 2021-12-29 2023-09-22 吉林大学 一种基于作恶节点淘汰树的高效区块链共识方法
CN114357079A (zh) * 2021-12-30 2022-04-15 马上消费金融股份有限公司 一种基于区块链的数据处理方法、节点设备、系统及平台
CN114723444A (zh) * 2022-01-21 2022-07-08 佛山赛思禅科技有限公司 一种用于并行投票共识的数据分片方法
CN114710512B (zh) * 2022-03-30 2023-09-29 蚂蚁区块链科技(上海)有限公司 共识结果的分发方法、节点和区块链系统
CN115296843B (zh) * 2022-06-29 2024-04-16 蚂蚁区块链科技(上海)有限公司 区块链系统中的交易执行方法、第一节点和第二节点
CN115174573B (zh) * 2022-06-30 2024-02-02 蚂蚁区块链科技(上海)有限公司 区块链系统中的数据广播方法、节点和区块链系统
CN115174574A (zh) * 2022-06-30 2022-10-11 蚂蚁区块链科技(上海)有限公司 区块链系统中的数据广播方法、节点和区块链系统
US12099489B2 (en) * 2022-09-20 2024-09-24 Bank Of America Corporation Intelligently storing data in a fault tolerant system using robotic process automation and blockchain
CN115964445B (zh) * 2023-02-23 2024-03-05 合肥申威睿思信息科技有限公司 一种分布式数据库的多副本实现方法和装置

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105847279A (zh) * 2016-05-03 2016-08-10 深圳市永兴元科技有限公司 分布式数据处理方法及数据中心
CN106529951A (zh) * 2016-12-30 2017-03-22 杭州云象网络技术有限公司 一种联盟链网络下采用异步方式的节点共识验证方法
CN106603198A (zh) * 2016-12-02 2017-04-26 深圳大学 具有网络编码的区块链分布式存储方法及系统
US20180139278A1 (en) * 2016-11-14 2018-05-17 International Business Machines Corporation Decentralized immutable storage blockchain configuration
CN109345386A (zh) * 2018-08-31 2019-02-15 阿里巴巴集团控股有限公司 基于区块链的交易共识处理方法及装置、电子设备

Family Cites Families (30)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8510621B2 (en) * 2009-12-29 2013-08-13 Industrial Technology Research Institute Method and apparatus for providing resource unit based data block partition
US10447696B2 (en) 2014-05-16 2019-10-15 Nec Corporation Method for proving retrievability of information
EP4242957A3 (en) * 2014-12-15 2023-11-22 Royal Bank Of Canada Verification of data processes in a network of computing resources
US20160321751A1 (en) 2015-04-28 2016-11-03 Domus Tower, Inc. Real-time settlement of securities trades over append-only ledgers
US20180191503A1 (en) 2015-07-14 2018-07-05 Fmr Llc Asynchronous Crypto Asset Transfer and Social Aggregating, Fractionally Efficient Transfer Guidance, Conditional Triggered Transaction, Datastructures, Apparatuses, Methods and Systems
US10339523B2 (en) 2015-07-14 2019-07-02 Fmr Llc Point-to-point transaction guidance apparatuses, methods and systems
EP3345360B1 (en) 2015-09-04 2021-03-03 Nec Corporation Method for storing an object on a plurality of storage nodes
US20170140375A1 (en) 2015-11-15 2017-05-18 Michael Kunstel System and Method for Permissioned Distributed Block Chain
CN105741095A (zh) * 2016-01-29 2016-07-06 彭军红 一种区块链动态压缩存取方法
US10204341B2 (en) * 2016-05-24 2019-02-12 Mastercard International Incorporated Method and system for an efficient consensus mechanism for permissioned blockchains using bloom filters and audit guarantees
GB201613174D0 (en) * 2016-07-29 2016-09-14 Eitc Holdings Ltd Computer-implemented system and method
US10402796B2 (en) 2016-08-29 2019-09-03 Bank Of America Corporation Application life-cycle transition record recreation system
CN106656974B (zh) * 2016-10-17 2019-07-16 江苏通付盾科技有限公司 区块链的分组共识方法及系统
US10445302B2 (en) 2017-01-03 2019-10-15 International Business Machines Corporation Limiting blockchain size to optimize performance
US10291413B2 (en) * 2017-02-17 2019-05-14 Accenture Global Solutions Limited Hardware blockchain corrective consensus operating procedure enforcement
US10817873B2 (en) 2017-03-22 2020-10-27 Factom, Inc. Auditing of electronic documents
GB201709367D0 (en) * 2017-06-13 2017-07-26 Nchain Holdings Ltd Computer-implemented system and method
US11321718B1 (en) 2017-07-17 2022-05-03 Agasthya P. Narendranathan Systems and methods for blockchain based identity assurance and risk management
US10761877B2 (en) 2017-07-21 2020-09-01 Intel Corporation Apparatuses, methods, and systems for blockchain transaction acceleration
US11146380B2 (en) 2017-08-03 2021-10-12 Parity Technologies Ltd. Methods and systems for a heterogeneous multi-chain framework
US10831935B2 (en) 2017-08-31 2020-11-10 Pure Storage, Inc. Encryption management with host-side data reduction
CN107728941B (zh) 2017-09-28 2019-09-24 中国银行股份有限公司 一种区块链数据压缩方法及系统
US10936238B2 (en) * 2017-11-28 2021-03-02 Pure Storage, Inc. Hybrid data tiering
US10833861B2 (en) 2017-11-28 2020-11-10 International Business Machines Corporation Protection of confidentiality, privacy and ownership assurance in a blockchain based decentralized identity management system
CN107948334B (zh) 2018-01-09 2019-06-07 无锡华云数据技术服务有限公司 基于分布式存储系统的数据处理方法
US10824744B2 (en) 2018-02-08 2020-11-03 Cisco Technology, Inc. Secure client-server communication
CN108199842B (zh) 2018-02-13 2021-03-02 克洛斯比尔有限公司 延迟公布信息的方法和系统
CN112767158A (zh) 2018-02-27 2021-05-07 创新先进技术有限公司 基于区块链的交易执行方法及装置、电子设备
EP3811560B1 (en) 2018-06-21 2024-05-15 Haibin Zhang Systems and methods for permissioned blockchain infrastructure with fine-grained access control and confidentiality-preserving publish/subscribe messaging
CN109379397B (zh) 2018-08-31 2019-12-06 阿里巴巴集团控股有限公司 基于区块链的交易共识处理方法及装置、电子设备

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105847279A (zh) * 2016-05-03 2016-08-10 深圳市永兴元科技有限公司 分布式数据处理方法及数据中心
US20180139278A1 (en) * 2016-11-14 2018-05-17 International Business Machines Corporation Decentralized immutable storage blockchain configuration
CN106603198A (zh) * 2016-12-02 2017-04-26 深圳大学 具有网络编码的区块链分布式存储方法及系统
CN106529951A (zh) * 2016-12-30 2017-03-22 杭州云象网络技术有限公司 一种联盟链网络下采用异步方式的节点共识验证方法
CN109345386A (zh) * 2018-08-31 2019-02-15 阿里巴巴集团控股有限公司 基于区块链的交易共识处理方法及装置、电子设备

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP3809356A4 *

Cited By (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111415162A (zh) * 2020-04-29 2020-07-14 陈议尊 基于区块链公链的交易方法和系统
CN113657898A (zh) * 2020-06-05 2021-11-16 支付宝(杭州)信息技术有限公司 联盟链中的共识方法和系统
CN111711526A (zh) * 2020-06-16 2020-09-25 深圳前海微众银行股份有限公司 一种区块链节点的共识方法及系统
CN111711526B (zh) * 2020-06-16 2024-03-26 深圳前海微众银行股份有限公司 一种区块链节点的共识方法及系统
US11368317B2 (en) 2020-07-03 2022-06-21 Alipay (Hangzhou) Information Technology Co., Ltd. Consensus method of consortium blockchain, and consortium blockchain system
EP3934165A1 (en) * 2020-07-03 2022-01-05 Alipay (Hangzhou) Information Technology Co., Ltd. Consensus method of consortium blockchain, and consortium blockchain system
CN112232956B (zh) * 2020-10-16 2024-05-14 中国银联股份有限公司 一种基于区块链的智慧停车的数据处理方法及装置
CN112232956A (zh) * 2020-10-16 2021-01-15 中国银联股份有限公司 一种基于区块链的智慧停车的数据处理方法及装置
CN112835743A (zh) * 2021-01-25 2021-05-25 中央财经大学 分布式账本数据存储优化方法、装置、电子设备及介质
CN112835743B (zh) * 2021-01-25 2023-12-19 中央财经大学 分布式账本数据存储优化方法、装置、电子设备及介质
CN113886115A (zh) * 2021-09-09 2022-01-04 上海智能网联汽车技术中心有限公司 一种基于车路协同的区块链拜占庭容错方法及系统
CN113886115B (zh) * 2021-09-09 2024-02-20 上海智能网联汽车技术中心有限公司 一种基于车路协同的区块链拜占庭容错方法及系统
WO2023045972A1 (zh) * 2021-09-27 2023-03-30 深圳前海微众银行股份有限公司 一种区块链系统的共识方法及装置
CN113761071A (zh) * 2021-10-09 2021-12-07 支付宝(杭州)信息技术有限公司 一种共识方法、区块链系统和共识节点
CN114285555A (zh) * 2021-12-15 2022-04-05 支付宝(杭州)信息技术有限公司 基于区块链的组播方法及装置
CN114258015A (zh) * 2021-12-23 2022-03-29 成都三零瑞通移动通信有限公司 一种基于全网共识的集群终端防失控方法及系统
CN114258015B (zh) * 2021-12-23 2023-10-24 成都三零瑞通移动通信有限公司 一种基于全网共识的集群终端防失控方法及系统
CN114374704A (zh) * 2021-12-29 2022-04-19 张海滨 可靠广播方法、装置、系统及介质
CN114374704B (zh) * 2021-12-29 2023-07-07 张海滨 可靠广播方法、装置、系统及介质
CN114567427B (zh) * 2022-01-05 2023-10-20 北京理工大学 一种区块链隐蔽数据分段传输方法
CN114567427A (zh) * 2022-01-05 2022-05-31 北京理工大学 一种区块链隐蔽数据分段传输方法

Also Published As

Publication number Publication date
EP3809356A1 (en) 2021-04-21
TWI698767B (zh) 2020-07-11
CN109345386B (zh) 2020-04-14
US11023309B2 (en) 2021-06-01
CN109345386A (zh) 2019-02-15
SG11202010530PA (en) 2020-11-27
EP3809356A4 (en) 2021-08-18
US20210248030A1 (en) 2021-08-12
US20210034455A1 (en) 2021-02-04
US11614994B2 (en) 2023-03-28
TW202011246A (zh) 2020-03-16

Similar Documents

Publication Publication Date Title
WO2020042792A1 (zh) 基于区块链的交易共识处理方法及装置、电子设备
TWI711287B (zh) 基於區塊鏈的交易共識處理方法及裝置、電子設備
CN110351133B (zh) 用于区块链系统中的主节点切换处理的方法及装置
CN110169015B (zh) 在分布式系统中的网络节点之间达成共识
CN110178340B (zh) 在分布式系统中进行网络节点的恢复处理
US11128522B2 (en) Changing a master node in a blockchain system
WO2020168937A1 (zh) 区块链多方见证方法、装置、设备及计算机可读存储介质
CN108648084B (zh) 一种区块链网络的数据处理方法、装置、设备及存储介质
EP3394756B1 (en) Method and system for byzantine fault - tolerance replicating of data
CN111543026A (zh) 分布式网络中进行主节点变更的系统
CN113055188B (zh) 一种数据处理方法、装置、设备及存储介质
CN111242617A (zh) 用于执行交易正确性验证的方法及装置
EP3934161A1 (en) Consensus method and data verification method, apparatus, and system of consortium blockchain
CN111339116A (zh) 一种基于区块链的用于开放银行数据共享的方式
WO2024092935A1 (zh) 一种区块链上实现分布式密钥生成的方法、系统和节点
CN115412568A (zh) 分布式数据传输方法、装置及系统
CN112887281B (zh) 支持高效审计和多备份密文去重的存储方法、系统及应用
Armknecht et al. Sharing proofs of retrievability across tenants
CN115567203A (zh) 一种恢复秘密信息的方法、装置、设备及存储介质
CN115941164A (zh) 一种区块链上实现分布式密钥生成的方法、系统和节点
Xie et al. A raft algorithm with byzantine fault-tolerant performance
Zhang et al. TBFT: efficient byzantine fault tolerance using trusted execution environment
Pang et al. Asynchronous verifiable information dispersal protocol of achieving optimal communication
CN117834164A (zh) 基于分布式存储系统的区块链安全存储系统
CN114499865A (zh) 支持数据动态和公开完整性审计去中心化存储方法及系统

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19855726

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE