WO2020168937A1 - Block chain multi-party witness method, apparatus and device, and computer-readable storage medium - Google Patents

Block chain multi-party witness method, apparatus and device, and computer-readable storage medium Download PDF

Info

Publication number
WO2020168937A1
WO2020168937A1 PCT/CN2020/074687 CN2020074687W WO2020168937A1 WO 2020168937 A1 WO2020168937 A1 WO 2020168937A1 CN 2020074687 W CN2020074687 W CN 2020074687W WO 2020168937 A1 WO2020168937 A1 WO 2020168937A1
Authority
WO
WIPO (PCT)
Prior art keywords
witness
party
signature
node
hash value
Prior art date
Application number
PCT/CN2020/074687
Other languages
French (fr)
Chinese (zh)
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 深圳前海微众银行股份有限公司
Publication of WO2020168937A1 publication Critical patent/WO2020168937A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/40Network security protocols
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • 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

Definitions

  • This application relates to the field of blockchain (Blockchain) technology, and in particular to methods, devices, equipment, and computer-readable storage media for blockchain multi-party witness.
  • a blockchain-based multi-party witness scheme is generally: a business organization generates a Hash (hash) value of the data that needs to be witnessed, signs the hash value of the data and then uploads it to the chain, and then notifies other institutions to After other institutions confirm the hash value, they need to add their respective institution’s signature based on the hash value on the chain. The relevant institution has uploaded the signature and the multi-party witness process is now complete.
  • Hash hash
  • the disadvantages of the above multi-party witness scheme are: 1) Performance limitations. All kinds of institutions need to perform the chain operation on the signature of the data Hash value. A complete witness process will include multiple chain operations, which affects the efficiency of the witness and restricts the large-scale application of multi-party witness. 2) Storage restrictions. Each chain operation of signature is a transaction that executes a smart contract, and the transaction and its data need to be recorded in the blockchain. The need for signatures from multiple parties in a single witness process will increase the transaction volume/data volume.
  • the main purpose of this application is to propose a blockchain multi-party witness method, device, equipment, and computer-readable storage medium, aiming to improve the execution performance of multi-party witness based on the blockchain and reduce data storage pressure, thereby facilitating multi-party witness Large-scale application.
  • this application provides a blockchain multi-party witness method, which includes the following steps:
  • this application also provides a block chain multi-party witness device, which includes:
  • the request generation module is used to obtain the data to be witnessed, calculate the hash value of the data to be witnessed and use the pre-stored private key of the witness initiator to sign the hash value according to the private key of the witness initiator. Generating a witness request message after the hash value signed by the key and preset multi-party witness completion condition information;
  • a request sending module configured to send the witness request message to a preset witness participant node, and receive a witness response message returned by each witness participant node;
  • the obtaining module is used to obtain the signature information of each witness participant node using its own private key to sign the hash value from the witness response message to form a signature list;
  • the consensus initiation module is used to initiate an on-chain consensus based on the signature list
  • the judging module is used to judge that the data to be witnessed has completed multi-party witness when the consensus on the chain is reached.
  • this application also provides a blockchain multi-party witness device
  • the blockchain multi-party witness device includes: a memory, a processor, and stored in the memory and capable of running on the processor
  • a multi-party witness program that implements the steps of the blockchain multi-party witness method described above when the multi-party witness program is executed by the processor.
  • the present application also provides a computer-readable storage medium on which a multi-party witness program is stored.
  • a multi-party witness program is stored on which a multi-party witness program is stored.
  • the block as described above is realized. The steps of the chain multi-party witness method.
  • the mechanism for witnessing initiator nodes to collect signatures is changed from the existing "on-chain signature transaction collection" to "on-chain communication collection", that is, when collecting the signatures of each witness participant node .
  • the witness initiator node and the witness participant node do not need to sign the hash value of the data to be witnessed before sending the transaction on the chain. Instead, the witness initiator node collects the signature list that meets the witness completion condition and then initiates the signature list based on the signature list.
  • On-chain consensus that is, the signature list is uploaded to the chain at one time. When the on-chain consensus is reached, it is determined that the data to be witnessed has completed multi-party witness. In this way, the performance of multi-party witness is improved and the data storage pressure is reduced, thereby facilitating Large-scale application of multiple witnesses.
  • FIG. 1 is a schematic diagram of a device structure of a hardware operating environment involved in a solution of an embodiment of the present application
  • FIG. 2 is a schematic flowchart of a first embodiment of a multi-party witness method for applying a blockchain
  • FIG. 3 is a schematic diagram of the system architecture of multi-party witness in an embodiment of the application.
  • FIG. 1 is a schematic diagram of the device structure of the hardware operating environment involved in the solution of the embodiment of the present application.
  • the terminal in the embodiment of the present application may be a PC or a server device.
  • the terminal may include a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, and a communication bus 1002.
  • the communication bus 1002 is used to implement connection and communication between these components.
  • the user interface 1003 may include a display screen (Display) and an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface.
  • the network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface).
  • the memory 1005 may be a high-speed RAM memory, or a non-volatile memory (non-volatile memory), such as a magnetic disk memory.
  • the memory 1005 may also be a storage device independent of the foregoing processor 1001.
  • FIG. 1 does not constitute a limitation on the device, and may include more or fewer components than those shown in the figure, or a combination of certain components, or different component arrangements.
  • the memory 1005 as a computer storage medium may include an operating system, a network communication module, a user interface module, and a multi-party witness program.
  • the network interface 1004 is mainly used to connect to witness participant nodes and perform data communication with the witness participant nodes;
  • the user interface 1003 is mainly used to connect to the client (user side) and perform data communication with the client ;
  • the processor 1001 can be used to call the multi-party witness program stored in the memory 1005, and perform operations in each embodiment of the following blockchain multi-party witness method.
  • Fig. 2 is a schematic flowchart of a first embodiment of a blockchain multi-party witness method according to the application, and the method includes:
  • Step S10 Obtain the data to be witnessed, calculate the hash value of the data to be witnessed, and sign the hash value using the pre-stored private key of the witness initiator. Generating a witness request message from the hash value and preset multi-party witness completion condition information;
  • the blockchain multi-party witness method of this embodiment is applied to the witness initiator node, where the witness initiator can be a witness initiator in the alliance chain.
  • the witness initiator can be a witness initiator in the alliance chain.
  • an organization refers to a logically participating network area
  • each organization will provide its own node to participate in the physical networking, which means that multiple nodes in the blockchain networking may belong to the same organization.
  • the initial deployment involves the node deployment, networking, and deployment of smart contracts of the blockchain.
  • the details are as follows:
  • Each organization deploys one or more blockchain nodes, and the local configuration information of the node includes a unique identification ID and the organization information to which it belongs.
  • the initial state of the node's local configuration only contains the node's own information (unique identification ID and organization information), and the information of other newly-connected nodes will be dynamically written later.
  • the node reads the local configuration at startup, obtains the node information and loads it into its own cache, and directly obtains it from the cache when it needs to obtain the node structure related information later.
  • a new node joins the existing blockchain network, it notifies other nodes of the entire network of its own information, and realizes that the information of all nodes in the network is consistent throughout the network (local configuration and cache are consistent) through a consensus mechanism.
  • the smart contract is used to subsequently determine the validity of the signature list and whether it meets the multi-party witness completion conditions, and records them.
  • the witness completion conditions are defined by the witness initiator and the witness participating institutions through negotiation.
  • the smart contract also provides a query interface for the witnessed data and its completion conditions.
  • multi-party witness based on the data to be witnessed can be executed.
  • the application scenarios of multi-party witness in the blockchain include evidence deposit, voting, etc.
  • FIG. 3 is a schematic diagram of the system architecture of multi-party witness in an embodiment of the application.
  • the figure shows the relationship between institutions, nodes, and message flows.
  • Institutions and nodes can be connected directly or through agents.
  • Institution ACD nodes 1, 2, 4, 5
  • Institution ACD nodes 1, 2, 4, 5
  • the message flow process in FIG. 3 will be described in conjunction with specific implementations.
  • the witness initiator node obtains the data to be witnessed, calculates the hash value of the data to be witnessed, and signs the calculated hash value with its own private key.
  • the algorithm for calculating the hash value includes But it is not limited to hash algorithms such as MD4, MD5, SHA1; then, the witness initiator node generates a witness request message according to the hash value signed by its own private key and the preset multi-party witness completion condition information.
  • the step of generating a witness request message based on the hash value signed by the witness initiator private key and preset multi-party witness completion condition information may include : Generate unique identification information of the witness request message; package the unique identification information, the hash value signed by the private key of the witness initiator, and preset multi-party witness completion condition information into a witness request message.
  • the unique identification information of the witness request message is Seq
  • the hash value signed by the private key of the witness initiator A is Hash(A)
  • the preset multi-party witness completion condition information is Condition
  • These three are packaged into
  • the witness request message can be expressed as: ⁇ Seq, Hash(A), Condition, Request>, where Request represents the request field.
  • the completion conditions of multi-party witness can be described formally.
  • the completion condition of multi-party witness stipulates that the completion of multi-party witness requires the signature of two institutions, including the signature of institution A and the institution When signing by any institution in the CD
  • the completion condition of the multi-party witness can be expressed as: [A(CD)].
  • the description form of the completion condition of multi-party witness is not limited to the examples given, and it can be flexibly set during specific implementation.
  • Step S20 Send the data to be witnessed and the witness request message to a preset witness participant node, and receive a witness response message returned by each witness participant node;
  • the witness initiator node sends the data to be witnessed and the witness request message to the preset witness participant nodes (nodes 4, 5).
  • sending the data to be witnessed to the preset witness participant nodes can be sent through a private network independent of the blockchain, so that even if the amount of data to be witnessed is large, it will not affect the blockchain
  • sending the data to be witnessed to the preset witness participant node can be sent in the form of on-chain communication; while sending the witness request message to the preset witness participant node is generally in the form of on-chain communication Send, that is, the witness request message will be sent to the preset witness participant node through the communication broadcast on the chain.
  • the witness participant node After receiving the witness request message, the witness participant node performs the following judgment operations:
  • the witness participant node uses the pre-saved witness initiator public key to decrypt the hash value signature.
  • the hash value signature can be decrypted by the witness initiator public key, it is determined that the hash value signature is true and valid;
  • the unique identification information Seq of the witness request message is used to identify whether it is an unprocessed witness request message;
  • the hash value in the witness request message is consistent with the hash value of the data to be witnessed stored by itself. Specifically, when the data to be witnessed sent by the witness participant is received, the hash value of the data to be witnessed is calculated, and when the witness request message is subsequently received, it is determined whether the hash value in the witness request message is consistent with its own storage requirements. The hash value of the witness data is consistent.
  • the witness participant node discards the witness request message; if the above conditions are all judged to be yes, the witness participant node uses its own private key to sign the hash value of the data to be witnessed. For example, when institution A sends a witness request message ⁇ Seq, Hash(A), Condition, Request> to institution C, the node of institution C uses its private key to sign the hash value of the data to be witnessed, and the signed hash The value is Hash(C).
  • the organization C node further packs the unique identification information Seq of the witness request message, the hash value Hash(C) signed by its own private key, and the preset multi-party witness completion condition information Condition into a witness
  • the response message is returned to node A, and the witness response message can be expressed as: ⁇ Seq, Hash(C), Condition, Response>, where Response represents the response field.
  • the witness initiator node receives the witness response message returned by each witness participant node.
  • Step S30 Obtain the signature information of each witness participant node using its own private key to sign the hash value from the witness response message to form a signature list;
  • the witness initiator node obtains the signature information of each witness participant node using its own private key to sign the hash value from the received witness response message to form a signature list, where the signature information includes each witness participant node Organization ID, node ID, and hash value signed by the witness participant's private key.
  • Step S40 initiate an on-chain consensus based on the signature list
  • this step S40 may further include: generating an on-chain transaction based on the hash value signed by the witness initiator private key, the signature list, and the multi-party witness completion condition information; and executing the The on-chain operation of the on-chain transaction, so that all nodes in the blockchain can reach a consensus on the on-chain transaction.
  • the witness initiator node when the witness initiator node initiates an on-chain consensus, it generates an on-chain transaction based on the hash value signed by its own private key, the signature list, and the completion condition information of the multi-party witness, and then executes the on-chain transaction.
  • the on-chain operation is to call the smart contract to send an on-chain transaction so that all nodes in the blockchain can reach a consensus on the on-chain transaction.
  • the witness initiator is institution A
  • the transaction data can be expressed as: ⁇ Hash(A), Sign List, Condition>, where Sign List is the signature list (as shown in Figure 3, the signature list contains the signatures of institution A, Sign A and Sign D of Institution D).
  • the nodes participating in the consensus are all nodes of all institutions in the blockchain, that is, as shown in Figure 3, it includes both witness initiator nodes 1, 2, and witness participant nodes 4, 5, and also Node 3 other than the witness initiator node and the witness participant node. All nodes of all institutions in the blockchain verify the validity and authenticity of the signatures in the signature list, and verify whether the signature list meets the multi-party witness completion conditions specified by the smart contract. The verification result will affect the consensus result and then affect the transaction. The chain succeeded.
  • the completion conditions of multi-party witness can be flexibly set, including but not limited to:
  • the completion conditions of the above-mentioned multi-party witness can be used singly or mixed.
  • the above completion conditions can be described formally and recorded on the chain.
  • ABCD there is an institution ABCD
  • the completion condition of multi-party witness is described as [A(CD)], which means that the completion of this multi-party witness requires the signatures of two institutions, including the signature of institution A , And the signature of any institution in institution CD (B institution does not need to participate in this witness).
  • Step S50 When the consensus on the chain is reached, it is determined that the data to be witnessed has completed multi-party witness.
  • the blockchain consensus algorithm can use the existing PBFT (Practical Byzantine Fault Tolerance, Byzantine Fault Tolerance) algorithm or RAFT algorithm (a distributed consensus algorithm), and the consensus reaching conditions are determined by the specific consensus algorithm used. This embodiment will not repeat this description.
  • the transaction data ⁇ Hash(A), Sign List, Condition> is confirmed when it is uploaded to the chain.
  • the data on the entire network is consistent, and all blockchain nodes can be checked and verified.
  • the witness initiating/participating agency ACD can set a transaction callback, and be notified when the transaction data is successfully connected to the chain (the witness process is completed).
  • the organization with inspection function (C in Figure 3 is the inspection organization) based on the hash value of the data to be witnessed (the unique identifier of the data to be witnessed) that is unified by each organization, from the block
  • the transaction data is extracted on the chain, and the validity, authenticity of the data and whether it meets the completion conditions of the multi-party witness is determined, thereby realizing the inspection of the multi-party witness data.
  • the mechanism for witnessing initiator nodes to collect signatures is changed from the existing "on-chain signature transaction collection" to "on-chain communication collection", that is, the signature of each witness participant node is collected At the time, the witness initiator node and the witness participant node do not need to sign the hash value of the data to be witnessed before sending the transaction on the chain. Instead, the witness initiator node collects the signature list that meets the witness completion condition and then initiates the list based on the signature On-chain consensus, that is, the signature list is put on the chain at a time. When the on-chain consensus is reached, it is determined that the data to be witnessed has completed multi-party witness. In this way, the performance of multi-party witness is improved and the data storage pressure is reduced. Large-scale application to facilitate multi-party witness.
  • step S40 it may further include: verifying the validity of the signature information in the signature list; when the validity verification is passed, determining whether the signature information satisfies the multi-party witness completion The multi-party witness completion condition specified in the condition information; if the signature information meets the multi-party witness completion condition specified in the multi-party witness completion condition information, the execution step is to initiate an on-chain consensus based on the signature list.
  • the witness initiator node may first verify the validity of the signature information in the signature list, and the step of verifying the validity of the signature information in the signature list may include : Use the pre-saved witness participant public key to decrypt the signature information in the signature list; when the signature information in the signature list can be decrypted by the witness participant public key, determine the signature information in the signature list It is vaild.
  • the witness initiator institution A pre-stores the public key of the witness participant institution C, and the public key can be used to decrypt the signature information of the institution C. If the signature information of the decryption institution C can be decrypted by the public key, the signature list is determined The signature information of organization C in is valid.
  • the witness initiator node When the validity verification is passed, the witness initiator node further determines whether the signature information in the signature list meets the multi-party witness completion conditions specified in the multi-party witness completion condition information according to the smart contract. For the multi-party witness completion conditions, refer to the description of the first embodiment above. ; If it is satisfied, the steps of initiating an on-chain consensus based on the signature list can be executed.
  • the witness initiator node initiates an on-chain consensus based on the signature list only after collecting the signature information that meets the completion conditions of the multi-party witness. In this way, the accuracy and authenticity of the on-chain transaction data are guaranteed and further improved The efficiency of multi-party witness.
  • the above step S20 may include: reading a list of topic nodes pre-stored locally, where the topic node list is used to record witness initiator nodes and witness participant nodes that have paid attention to the same topic in advance, where Topic represents The hash value of the data to be witnessed; randomly select a preset number of target nodes from the Topic node list, send the data to be witnessed and the witness request message to the target node, and receive all The witness response message returned by the target node.
  • the process of collecting signatures on the chain can be optimized.
  • the optimization is mainly by introducing It is realized based on the mechanism of Topic's attention, grouping, multicasting, message forwarding, and witness response message return.
  • the witness initiator node locally pre-stores a topic node list, which is used to record witness initiator nodes and witness participant nodes that have paid attention to the same topic in advance, where Topic represents the hash of the data to be witnessed
  • the witness initiator node can read the Topic node list and randomly select a preset number of target nodes from it, and then send the data to be witnessed and the witness request message to the selected target node, and Receive the witness response message returned by the target node.
  • a certain number of target nodes are selected from the local Topic node list (including nodes 1, 2, 4, and 5) to send the witness request message.
  • the selected target node does not include its own node.
  • the target node judges whether it pays attention to the topic. If so, it records the previous source node of the witness request message locally, forwards the message, and forwards the route
  • the rule is: select a certain number of nodes from the local record of the node list that pays attention to the topic to send the witness request message, and the selected node cannot be the previous source node and the own node of the witness request message.
  • the node that receives the witness request message returns the corresponding witness response message
  • the routing rule for the node to send the witness response message is: according to the Seq field of the witness response message, find the previous source node of the message from the local record as the response message The next forwarding node until it is sent to the source node of the original witness request message.
  • node 1 sends a witness request message to node 4, node 4 constructs a witness response message and sends it to 1, and records the source of the witness request message, node 1, and forwards the message to node 5, which is the witness response constructed after node 5 receives the message
  • the message will be routed to node 4 and then routed to node 1.
  • node 5 and node 1 can also realize the corresponding witness request and witness response through message forwarding from other nodes This process further improves the network performance and ensures that the witness initiator node can successfully collect the signatures of the witness participant nodes.
  • step S20 it may further include: creating a Topic node list; when receiving a Topic message sent by another node, decrypting the Topic message using the witness initiator private key, where the Topic message is initiated using the witness A message in which the public key of the party encrypts the hash value of the data to be witnessed; when the Topic message can be decrypted by the private key of the witness initiator, the sending node of the Topic message is added to the Topic Node list.
  • the witness initiator node can first create a Topic node list, and subsequently when receiving Topic messages sent by other nodes, use its own private key to decrypt the received Topic messages, where the Topic message is the public using the witness initiator.
  • the key encrypts the hash value of the data to be witnessed; if the Topic message can be decrypted by its own private key, the witness initiator node adds the sending node of the Topic message to the Topic node list, indicating itself Knowing that the sending node of the Topic message pays attention to the Topic in the Topic message.
  • organizations A, C, and D each calculate a hash value (namely Topic) for the data to be witnessed, and use the public key of the other organization to encrypt the data and send it to the other organization to show that its own node pays attention to the Topic.
  • the nodes of common concern for a topic will participate in the multi-party witness process based on the topic.
  • the content sent by node A from node 1 to node 4 under the organization is: Topic signed with the public key of organization C to which node 4 belongs, which means that node 4 knows that node 1 pays attention to the topic.
  • the counterparty organization here includes organization B.
  • All nodes 1, 2, 3, 4, and 5 of organizations A, B, C, and D after receiving the Topic message, use the private key of their own organization to decrypt the hash value, and add the sending node of the Topic message to the local Topic Node list.
  • the surviving and interconnected blockchain nodes 1, 2, 4, and 5 deployed by institutions A, C, and D all have a consistent list of Topic nodes (that is, nodes 1, 2, 4, and 5 each record the node locally 1, 2, 4, 5 follow the same topic).
  • the multi-party witness device for the blockchain of this application includes:
  • the request generation module is used to obtain the data to be witnessed, calculate the hash value of the data to be witnessed and use the pre-stored private key of the witness initiator to sign the hash value according to the private key of the witness initiator. Generating a witness request message after the hash value signed by the key and preset multi-party witness completion condition information;
  • a request sending module configured to send the witness request message to a preset witness participant node, and receive a witness response message returned by each witness participant node;
  • the obtaining module is used to obtain the signature information of each witness participant node using its own private key to sign the hash value from the witness response message to form a signature list;
  • the consensus initiation module is used to initiate an on-chain consensus based on the signature list
  • the judging module is used to judge that the data to be witnessed has completed multi-party witness when the consensus on the chain is reached.
  • request generation module is also used for:
  • the unique identification information, the hash value signed by the private key of the witness initiator, and preset multi-party witness completion condition information are packaged into a witness request message.
  • the blockchain multi-party witness device further includes:
  • the verification module is used to verify the validity of the signature information in the signature list
  • a judging module used for judging whether the signature information meets the multi-party witness completion condition specified in the multi-party witness completion condition information when the validity verification is passed;
  • the consensus initiation module is also configured to initiate an on-chain consensus based on the signature list when the signature information meets the multi-party witness completion condition specified in the multi-party witness completion condition information.
  • verification module is also used for:
  • the signature information in the signature list can be decrypted by the public key of the witness participant, it is determined that the signature information in the signature list is valid.
  • consensus initiation module is also used for:
  • the on-chain operation of the on-chain transaction is performed so that all nodes in the blockchain can reach a consensus on the on-chain transaction.
  • request sending module is also used for:
  • Topic represents the hash value of the data to be witnessed
  • a preset number of target nodes are randomly selected from the Topic node list, the data to be witnessed and the witness request message are sent to the target node, and the witness response message returned by the target node is received.
  • the blockchain multi-party witness device further includes:
  • the decryption module is used to decrypt the Topic message using the private key of the witness initiator when a Topic message sent by another node is received, where the Topic message is a hash of the data to be witnessed using the public key of the witness initiator The value of the encrypted message;
  • the adding module is configured to add the sending node of the Topic message to the Topic node list when the Topic message can be decrypted by the private key of the witness initiator.
  • the application also provides a computer-readable storage medium.
  • a multi-party witness program is stored on the computer-readable storage medium of the present application, and the multi-party witness program is executed by a processor to realize the steps of the blockchain multi-party witness method as described above.
  • the method implemented when the multi-party witness program running on the processor is executed can refer to the various embodiments of the blockchain multi-party witness method of the present application, which will not be repeated here.

Abstract

Disclosed is a block chain multi-party witness method, comprising: obtaining data to be witnessed, calculating the hash value of the data to be witnessed, signing the hash value by using a witness initiator private key, and generating a witness request message according to the hash value signed by the witness initiator private key and preset multi-party witness completion condition information; transmitting the data to be witnessed and the witness request message to a preset witness participant node, and receiving a witness response message returned by each witness participant node; obtaining, from the witness response message, signature information that each witness participant node signs the hash value by using its own private key so as to form a signature list; initiating an on-chain consensus based on the signature list; and when the on-chain consensus is achieved, determining that the multi-party witness of the data to be witnessed is completed. Also disclosed are a block chain multi-party witness apparatus and device, and a storage medium. The present application can improve the execution performance of multi-party witness based on a block chain and reduce data storage pressure.

Description

区块链多方见证方法、装置、设备及计算机可读存储介质Block chain multi-party witness method, device, equipment and computer readable storage medium
本申请要求于2019年2月20日提交中国专利局、申请号为201910135223.1、发明名称为“区块链多方见证方法、装置、设备及计算机可读存储介质”的中国专利申请的优先权,其全部内容通过引用结合在申请中。This application claims the priority of a Chinese patent application filed with the Chinese Patent Office on February 20, 2019, the application number is 201910135223.1, and the invention title is "blockchain multi-party witness method, device, equipment and computer-readable storage medium". The entire content is incorporated in the application by reference.
技术领域Technical field
本申请涉及区块链(Block chain)技术领域,尤其涉及区块链多方见证方法、装置、设备及计算机可读存储介质。This application relates to the field of blockchain (Blockchain) technology, and in particular to methods, devices, equipment, and computer-readable storage media for blockchain multi-party witness.
背景技术Background technique
近年来,随着金融科技(Fintech),尤其是互联网金融的不断发展,区块链(Block chain)技术被逐渐引入银行等金融机构的业务交易中。区块链的核心价值在于由多方见证和不可篡改带来的数据真实性,其中,多方见证是指具有特定资格的机构以其机构名义,对数据的完整性和真实性予以证明,并对所作证明负责的一种活动。区块链中的多方见证的应用场景包括存证、投票等。In recent years, with the continuous development of Fintech, especially Internet finance, Blockchain technology has been gradually introduced into the business transactions of financial institutions such as banks. The core value of the blockchain lies in the authenticity of data brought by multi-party witness and non-tampering. Among them, multi-party witness means that an organization with specific qualifications proves the integrity and authenticity of the data in the name of its organization, and does An activity that proves responsibility. The application scenarios of multi-party witness in the blockchain include deposit certificates, voting, etc.
现有技术中,基于区块链的多方见证方案一般为:业务机构生成需进行见证的数据的Hash(哈希)值,将数据的Hash值签名后进行上链,然后通知其他机构对链上的Hash值进行确认,其他机构确认后需上链追加各自机构基于该Hash值的签名,相关机构上传签名完毕,至此多方见证过程完成。In the prior art, a blockchain-based multi-party witness scheme is generally: a business organization generates a Hash (hash) value of the data that needs to be witnessed, signs the hash value of the data and then uploads it to the chain, and then notifies other institutions to After other institutions confirm the hash value, they need to add their respective institution’s signature based on the hash value on the chain. The relevant institution has uploaded the signature and the multi-party witness process is now complete.
上述多方见证方案的缺陷在于:1)性能限制。各类机构对数据Hash值的签名均需进行上链操作,一次完整的见证过程将包括多次上链操作,影响了见证的效率,进而限制了多方见证的大规模应用。2)存储限制。签名的每次上链操作均为执行智能合约的交易,交易及其数据需记录在区块链中,单次见证过程需多方机构签名的需求将增加交易量/数据量。The disadvantages of the above multi-party witness scheme are: 1) Performance limitations. All kinds of institutions need to perform the chain operation on the signature of the data Hash value. A complete witness process will include multiple chain operations, which affects the efficiency of the witness and restricts the large-scale application of multi-party witness. 2) Storage restrictions. Each chain operation of signature is a transaction that executes a smart contract, and the transaction and its data need to be recorded in the blockchain. The need for signatures from multiple parties in a single witness process will increase the transaction volume/data volume.
发明概述Summary of the invention
技术问题technical problem
问题的解决方案The solution to the problem
技术解决方案Technical solutions
本申请的主要目的在于提出一种区块链多方见证方法、装置、设备及计算机可读存储介质,旨在提升基于区块链进行多方见证的执行性能并降低数据存储压力,从而便于多方见证的大规模应用。The main purpose of this application is to propose a blockchain multi-party witness method, device, equipment, and computer-readable storage medium, aiming to improve the execution performance of multi-party witness based on the blockchain and reduce data storage pressure, thereby facilitating multi-party witness Large-scale application.
为实现上述目的,本申请提供一种区块链多方见证方法,所述区块链多方见证方法包括如下步骤:In order to achieve the above purpose, this application provides a blockchain multi-party witness method, which includes the following steps:
获取待见证的数据,计算所述待见证的数据的哈希值并使用预先保存的见证发起方私钥对所述哈希值进行签名,根据经所述见证发起方私钥签名后的所述哈希值和预设的多方见证完成条件信息生成见证请求消息;Obtain the data to be witnessed, calculate the hash value of the data to be witnessed and use the pre-saved witness initiator private key to sign the hash value, according to the signature of the witness initiator private key Hash value and preset multi-party witness completion condition information generates a witness request message;
将所述待见证的数据和所述见证请求消息发送至预设的见证参与方节点,并接收各见证参与方节点返回的见证响应消息;Sending the data to be witnessed and the witness request message to a preset witness participant node, and receive a witness response message returned by each witness participant node;
从所述见证响应消息中获取各见证参与方节点使用自身私钥对所述哈希值进行签名的签名信息,形成签名列表;Obtain the signature information of each witness participant node using its own private key to sign the hash value from the witness response message to form a signature list;
发起基于所述签名列表的链上共识;Initiate an on-chain consensus based on the signature list;
当所述链上共识达成时,判定所述待见证的数据完成了多方见证。When the consensus on the chain is reached, it is determined that the data to be witnessed has completed multi-party witness.
此外,为实现上述目的,本申请还提供一种区块链多方见证装置,所述区块链多方见证装置包括:In addition, in order to achieve the above objective, this application also provides a block chain multi-party witness device, which includes:
请求生成模块,用于获取待见证的数据,计算所述待见证的数据的哈希值并使用预先保存的见证发起方私钥对所述哈希值进行签名,根据经所述见证发起方私钥签名后的所述哈希值和预设的多方见证完成条件信息生成见证请求消息;The request generation module is used to obtain the data to be witnessed, calculate the hash value of the data to be witnessed and use the pre-stored private key of the witness initiator to sign the hash value according to the private key of the witness initiator. Generating a witness request message after the hash value signed by the key and preset multi-party witness completion condition information;
请求发送模块,用于将所述见证请求消息发送至预设的见证参与方节点,并接收各见证参与方节点返回的见证响应消息;A request sending module, configured to send the witness request message to a preset witness participant node, and receive a witness response message returned by each witness participant node;
获取模块,用于从所述见证响应消息中获取各见证参与方节点使用自身私钥对所述哈希值进行签名的签名信息,形成签名列表;The obtaining module is used to obtain the signature information of each witness participant node using its own private key to sign the hash value from the witness response message to form a signature list;
共识发起模块,用于发起基于所述签名列表的链上共识;The consensus initiation module is used to initiate an on-chain consensus based on the signature list;
判定模块,用于当所述链上共识达成时,判定所述待见证的数据完成了多方见证。The judging module is used to judge that the data to be witnessed has completed multi-party witness when the consensus on the chain is reached.
此外,为实现上述目的,本申请还提供一种区块链多方见证设备,所述区块链多方见证设备包括:存储器、处理器及存储在所述存储器上并可在所述处理器上运行的多方见证程序,所述多方见证程序被所述处理器执行时实现如上所述的区块链多方见证方法的步骤。In addition, in order to achieve the above object, this application also provides a blockchain multi-party witness device, the blockchain multi-party witness device includes: a memory, a processor, and stored in the memory and capable of running on the processor A multi-party witness program that implements the steps of the blockchain multi-party witness method described above when the multi-party witness program is executed by the processor.
此外,为实现上述目的,本申请还提供一种计算机可读存储介质,所述计算机可读存储介质上存储有多方见证程序,所述多方见证程序被处理器执行时实现如上所述的区块链多方见证方法的步骤。In addition, in order to achieve the above objective, the present application also provides a computer-readable storage medium on which a multi-party witness program is stored. When the multi-party witness program is executed by a processor, the block as described above is realized. The steps of the chain multi-party witness method.
本申请提出的区块链多方见证方法,见证发起方节点收集签名的机制由现有的“上链签名交易收集”转为“链上通信收集”,即在收集各见证参与方节点的签名时,见证发起方节点和见证参与方节点均无需对待见证的数据的哈希值签名后再发送上链交易,而是见证发起方节点收集满足见证完成条件的签名列表后再发起基于该签名列表的链上共识,即将签名列表一次性上链,当链上共识达成时,判定待见证的数据完成了多方见证,通过这种方式,提升了多方见证的执行性能并降低了数据存储压力,从而便于多方见证的大规模应用。In the blockchain multi-party witness method proposed in this application, the mechanism for witnessing initiator nodes to collect signatures is changed from the existing "on-chain signature transaction collection" to "on-chain communication collection", that is, when collecting the signatures of each witness participant node , The witness initiator node and the witness participant node do not need to sign the hash value of the data to be witnessed before sending the transaction on the chain. Instead, the witness initiator node collects the signature list that meets the witness completion condition and then initiates the signature list based on the signature list. On-chain consensus, that is, the signature list is uploaded to the chain at one time. When the on-chain consensus is reached, it is determined that the data to be witnessed has completed multi-party witness. In this way, the performance of multi-party witness is improved and the data storage pressure is reduced, thereby facilitating Large-scale application of multiple witnesses.
发明的有益效果The beneficial effects of the invention
对附图的简要说明Brief description of the drawings
附图说明Description of the drawings
图1是本申请实施例方案涉及的硬件运行环境的设备结构示意图;FIG. 1 is a schematic diagram of a device structure of a hardware operating environment involved in a solution of an embodiment of the present application;
图2为本申请区块链多方见证方法第一实施例的流程示意图;FIG. 2 is a schematic flowchart of a first embodiment of a multi-party witness method for applying a blockchain;
图3为本申请实施例中多方见证的系统架构示意图。FIG. 3 is a schematic diagram of the system architecture of multi-party witness in an embodiment of the application.
本申请目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。The realization, functional characteristics, and advantages of the purpose of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings.
发明实施例Invention embodiment
本发明的实施方式Embodiments of the invention
应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。It should be understood that the specific embodiments described here are only used to explain the application, and are not used to limit the application.
如图1所示,图1是本申请实施例方案涉及的硬件运行环境的设备结构示意图。As shown in FIG. 1, FIG. 1 is a schematic diagram of the device structure of the hardware operating environment involved in the solution of the embodiment of the present application.
本申请实施例终端可以是PC机或服务器设备。The terminal in the embodiment of the present application may be a PC or a server device.
如图1所示,该终端可以包括:处理器1001,例如CPU,网络接口1004,用户接口1003,存储器1005,通信总线1002。其中,通信总线1002用于实现这些组件之间的连接通信。用户接口1003可以包括显示屏(Display)、输入单元比如键盘(Keyboard),可选用户接口1003还可以包括标准的有线接口、无线接口。网络接口1004可选的可以包括标准的有线接口、无线接口(如WI-FI接口)。存储器1005可以是高速RAM存储器,也可以是稳定的存储器(non-volatile memory),例如磁盘存储器。存储器1005可选的还可以是独立于前述处理器1001的存储装置。As shown in FIG. 1, the terminal may include a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, and a communication bus 1002. Among them, the communication bus 1002 is used to implement connection and communication between these components. The user interface 1003 may include a display screen (Display) and an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 1005 may be a high-speed RAM memory, or a non-volatile memory (non-volatile memory), such as a magnetic disk memory. Optionally, the memory 1005 may also be a storage device independent of the foregoing processor 1001.
本领域技术人员可以理解,图1中示出的设备结构并不构成对设备的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。Those skilled in the art can understand that the structure of the device shown in FIG. 1 does not constitute a limitation on the device, and may include more or fewer components than those shown in the figure, or a combination of certain components, or different component arrangements.
如图1所示,作为一种计算机存储介质的存储器1005中可以包括操作系统、网络通信模块、用户接口模块以及多方见证程序。As shown in FIG. 1, the memory 1005 as a computer storage medium may include an operating system, a network communication module, a user interface module, and a multi-party witness program.
在图1所示的设备中,网络接口1004主要用于连接见证参与方节点,与见证参与方节点进行数据通信;用户接口1003主要用于连接客户端(用户端),与客户端进行数据通信;而处理器1001可以用于调用存储器1005中存储的多方见证程序,并执行下述区块链多方见证方法各个实施例中的操作。In the device shown in FIG. 1, the network interface 1004 is mainly used to connect to witness participant nodes and perform data communication with the witness participant nodes; the user interface 1003 is mainly used to connect to the client (user side) and perform data communication with the client ; And the processor 1001 can be used to call the multi-party witness program stored in the memory 1005, and perform operations in each embodiment of the following blockchain multi-party witness method.
基于上述硬件结构,提出本申请区块链多方见证方法实施例。Based on the above hardware structure, an embodiment of the blockchain multi-party witness method of this application is proposed.
参照图2,图2为本申请区块链多方见证方法第一实施例的流程示意图,所述方法包括:Referring to Fig. 2, Fig. 2 is a schematic flowchart of a first embodiment of a blockchain multi-party witness method according to the application, and the method includes:
步骤S10,获取待见证的数据,计算所述待见证的数据的哈希值并使用预先保存的见证发起方私钥对所述哈希值进行签名,根据经所述见证发起方私钥签名后的所述哈希值和预设的多方见证完成条件信息生成见证请求消息;Step S10: Obtain the data to be witnessed, calculate the hash value of the data to be witnessed, and sign the hash value using the pre-stored private key of the witness initiator. Generating a witness request message from the hash value and preset multi-party witness completion condition information;
本实施例区块链多方见证方法应用于见证发起方节点,其中见证发起方可以为联盟链中的见证发起机构,在联盟链的语境下,机构指代的是逻辑意义上参与组网区块链的成员,每个机构会提供自己的节点来参与物理意义上的组网,也就是说区块链组网中的多个节点可能归属于同一个机构。The blockchain multi-party witness method of this embodiment is applied to the witness initiator node, where the witness initiator can be a witness initiator in the alliance chain. In the context of the alliance chain, an organization refers to a logically participating network area For the members of the blockchain, each organization will provide its own node to participate in the physical networking, which means that multiple nodes in the blockchain networking may belong to the same organization.
为保证本申请正常实施,需首先完成区块链的初始化部署,该初始化部署涉及区块链的节点部署、组网及部署智能合约三个环节,具体如下:In order to ensure the normal implementation of this application, the initial deployment of the blockchain needs to be completed first. The initial deployment involves the node deployment, networking, and deployment of smart contracts of the blockchain. The details are as follows:
a、节点部署。多机构各部署一个或多个区块链节点,节点的本地配置信息包括唯一标识ID及其所属机构信息。a. Node deployment. Each organization deploys one or more blockchain nodes, and the local configuration information of the node includes a unique identification ID and the organization information to which it belongs.
b、组网。节点的本地配置的初始状态只含该节点自身信息(唯一标识ID和所属机构信息),后续将动态写入其他新入网节点的信息。节点在启动时读取本地配置,获取节点信息并载入自身缓存,后续需获取节点结构关联信息时直接从缓存中获取。新节点加入已有的区块链网络时,将自身信息通知全网其他节点,通过共识机制实现网络中所有节点的信息全网一致(本地配置和缓存均一致)。b. Networking. The initial state of the node's local configuration only contains the node's own information (unique identification ID and organization information), and the information of other newly-connected nodes will be dynamically written later. The node reads the local configuration at startup, obtains the node information and loads it into its own cache, and directly obtains it from the cache when it needs to obtain the node structure related information later. When a new node joins the existing blockchain network, it notifies other nodes of the entire network of its own information, and realizes that the information of all nodes in the network is consistent throughout the network (local configuration and cache are consistent) through a consensus mechanism.
c、部署智能合约。该智能合约用于后续判断签名列表的有效性及其是否满足多方见证完成条件,并予以记录,其中见证完成条件由见证发起机构与见证参与机构协商定义。该智能合约也提供对已见证数据及其见证完成条件的查询接口。c. Deploy smart contracts. The smart contract is used to subsequently determine the validity of the signature list and whether it meets the multi-party witness completion conditions, and records them. The witness completion conditions are defined by the witness initiator and the witness participating institutions through negotiation. The smart contract also provides a query interface for the witnessed data and its completion conditions.
在完成区块链的初始化部署后,即可以执行基于待见证的数据的多方见证,区块链中的多方见证的应用场景包括存证、投票等。After the initial deployment of the blockchain is completed, multi-party witness based on the data to be witnessed can be executed. The application scenarios of multi-party witness in the blockchain include evidence deposit, voting, etc.
参照图3,图3为本申请实施例中多方见证的系统架构示意图。图中示出了机构、节点及消息流转间的关系,机构和节点间可直连或通过代理实现连接。其中机构ACD(节点1、2、4、5)参与此次多方见证过程,设机构A为见证发起方,机构A下的节点1为见证发起方节点,机构C和D为见证参与方,下面,将结合具体实施方式对图3中的消息流转过程进行说明。Referring to FIG. 3, FIG. 3 is a schematic diagram of the system architecture of multi-party witness in an embodiment of the application. The figure shows the relationship between institutions, nodes, and message flows. Institutions and nodes can be connected directly or through agents. Institution ACD (nodes 1, 2, 4, 5) participates in this multi-party witness process. Let institution A be the witness initiator, node 1 under institution A is the witness initiator node, and institutions C and D are witness participants. , The message flow process in FIG. 3 will be described in conjunction with specific implementations.
首先,见证发起方节点(节点1)获取待见证的数据,计算该待见证的数据的哈希值并使用自身私钥对计算得到的哈希值进行签名,其中,计算哈希值的算法包括但不限于MD4、MD5、SHA1等哈希算法;然后,见证发起方节点根据该经自身私钥签名后的哈希值和预设的多方见证完成条件信息生成见证请求消息。First, the witness initiator node (node 1) obtains the data to be witnessed, calculates the hash value of the data to be witnessed, and signs the calculated hash value with its own private key. The algorithm for calculating the hash value includes But it is not limited to hash algorithms such as MD4, MD5, SHA1; then, the witness initiator node generates a witness request message according to the hash value signed by its own private key and the preset multi-party witness completion condition information.
在一实施方式中,为区分不同的见证请求消息,所述根据经所述见证发起方私钥签名后的所述哈希值和预设的多方见证完成条件信息生成见证请求消息的步骤可以包括:生成见证请求消息的唯一标识信息;将所述唯一标识信息、经所述见证发起方私钥签名后的所述哈希值和预设的多方见证完成条件信息打包成 见证请求消息。In one embodiment, in order to distinguish different witness request messages, the step of generating a witness request message based on the hash value signed by the witness initiator private key and preset multi-party witness completion condition information may include : Generate unique identification information of the witness request message; package the unique identification information, the hash value signed by the private key of the witness initiator, and preset multi-party witness completion condition information into a witness request message.
这里,不妨设见证请求消息的唯一标识信息为Seq,经见证发起方A私钥签名后的哈希值为Hash(A),预设的多方见证完成条件信息为Condition,将这三者打包成的见证请求消息可以表示为:<Seq,Hash(A),Condition,Request>,其中Request代表请求字段。Here, you might as well set the unique identification information of the witness request message as Seq, the hash value signed by the private key of the witness initiator A is Hash(A), the preset multi-party witness completion condition information is Condition, and these three are packaged into The witness request message can be expressed as: <Seq, Hash(A), Condition, Request>, where Request represents the request field.
进一步地,本实施例中,为方便用户识别,可以对多方见证完成条件进行形式化描述,比如,当多方见证完成条件规定多方见证的完成需两个机构签名,包括机构A的签名,和机构CD中任一机构的签名时,该多方见证完成条件可以表示为:[A(CD)]。当然,多方见证完成条件的描述形式并不限于所举的例子,具体实施时可灵活设置。Further, in this embodiment, in order to facilitate user identification, the completion conditions of multi-party witness can be described formally. For example, when the completion condition of multi-party witness stipulates that the completion of multi-party witness requires the signature of two institutions, including the signature of institution A and the institution When signing by any institution in the CD, the completion condition of the multi-party witness can be expressed as: [A(CD)]. Of course, the description form of the completion condition of multi-party witness is not limited to the examples given, and it can be flexibly set during specific implementation.
步骤S20,将所述待见证的数据和所述见证请求消息发送至预设的见证参与方节点,并接收各见证参与方节点返回的见证响应消息;Step S20: Send the data to be witnessed and the witness request message to a preset witness participant node, and receive a witness response message returned by each witness participant node;
该步骤中,见证发起方节点(节点1)将待见证的数据和所述见证请求消息发送至预设的见证参与方节点(节点4、5)。其中,将待见证的数据发送至预设的见证参与方节点可以通过独立于区块链之外的专网进行发送,如此即使待见证的数据的数据量较大,也不会影响区块链的性能,当然,将待见证的数据发送至预设的见证参与方节点可以通过链上通信的形式发送;而将见证请求消息发送至预设的见证参与方节点一般是通过链上通信的形式发送,即将见证请求消息走链上通信广播发送给预设的见证参与方节点。In this step, the witness initiator node (node 1) sends the data to be witnessed and the witness request message to the preset witness participant nodes (nodes 4, 5). Among them, sending the data to be witnessed to the preset witness participant nodes can be sent through a private network independent of the blockchain, so that even if the amount of data to be witnessed is large, it will not affect the blockchain Of course, sending the data to be witnessed to the preset witness participant node can be sent in the form of on-chain communication; while sending the witness request message to the preset witness participant node is generally in the form of on-chain communication Send, that is, the witness request message will be sent to the preset witness participant node through the communication broadcast on the chain.
见证参与方节点在接收到见证请求消息后,进行以下判断操作:After receiving the witness request message, the witness participant node performs the following judgment operations:
1)哈希值签名是否是真实有效的。具体为见证参与方节点使用预先保存的见证发起方公钥解密哈希值的签名,当哈希值的签名能够被见证发起方公钥解密时,判定该哈希值签名是真实有效的;1) Whether the hash value signature is true and valid. Specifically, the witness participant node uses the pre-saved witness initiator public key to decrypt the hash value signature. When the hash value signature can be decrypted by the witness initiator public key, it is determined that the hash value signature is true and valid;
2)是否为未处理的见证请求消息。具体为通过见证请求消息的唯一标识信息Seq识别是否为未处理的见证请求消息;2) Whether it is an unprocessed witness request message. Specifically, the unique identification information Seq of the witness request message is used to identify whether it is an unprocessed witness request message;
3)见证请求消息中的哈希值是否与自身存储的需见证数据的哈希值一致。具体为当接收到见证参与方发送的待见证的数据后,计算该待见证的数据的哈希值,后续接收到见证请求消息时,判断见证请求消息中的哈希值是否与自身存 储的需见证数据的哈希值一致。3) Whether the hash value in the witness request message is consistent with the hash value of the data to be witnessed stored by itself. Specifically, when the data to be witnessed sent by the witness participant is received, the hash value of the data to be witnessed is calculated, and when the witness request message is subsequently received, it is determined whether the hash value in the witness request message is consistent with its own storage requirements. The hash value of the witness data is consistent.
4)是否认可见证请求消息中的见证完成条件。具体为见证参与方用户根据实际业务场景人为判断。4) Whether to approve the witness completion condition in the witness request message. Specifically, the witness participant users make artificial judgments based on actual business scenarios.
如果上述任一条件的判断结果为否,则见证参与方节点抛弃该见证请求消息;如果上述条件均判断为是,则见证参与方节点使用自身私钥对待见证的数据的哈希值进行签名,比如,当机构A向机构C发送见证请求消息<Seq,Hash(A),Condition,Request>时,机构C节点即使用自身私钥对待见证的数据的哈希值进行签名,签名后的哈希值为Hash(C),此时机构C节点进一步将见证请求消息的唯一标识信息Seq、经自身私钥签名后的哈希值Hash(C)和预设的多方见证完成条件信息Condition打包成见证响应消息返回给节点A,该见证响应消息可以表示为:<Seq,Hash(C),Condition,Response>,其中Response代表响应字段。之后,由见证发起方节点接收各见证参与方节点返回的见证响应消息。If the judgment result of any of the above conditions is no, the witness participant node discards the witness request message; if the above conditions are all judged to be yes, the witness participant node uses its own private key to sign the hash value of the data to be witnessed. For example, when institution A sends a witness request message <Seq, Hash(A), Condition, Request> to institution C, the node of institution C uses its private key to sign the hash value of the data to be witnessed, and the signed hash The value is Hash(C). At this time, the organization C node further packs the unique identification information Seq of the witness request message, the hash value Hash(C) signed by its own private key, and the preset multi-party witness completion condition information Condition into a witness The response message is returned to node A, and the witness response message can be expressed as: <Seq, Hash(C), Condition, Response>, where Response represents the response field. After that, the witness initiator node receives the witness response message returned by each witness participant node.
步骤S30,从所述见证响应消息中获取各见证参与方节点使用自身私钥对所述哈希值进行签名的签名信息,形成签名列表;Step S30: Obtain the signature information of each witness participant node using its own private key to sign the hash value from the witness response message to form a signature list;
该步骤中,见证发起方节点从接收到的见证响应消息中获取各见证参与方节点使用自身私钥对哈希值进行签名的签名信息,形成签名列表,其中,签名信息包括各见证参与方节点所属机构标识、节点标识和经见证参与方私钥签名后的哈希值。In this step, the witness initiator node obtains the signature information of each witness participant node using its own private key to sign the hash value from the received witness response message to form a signature list, where the signature information includes each witness participant node Organization ID, node ID, and hash value signed by the witness participant's private key.
步骤S40,发起基于所述签名列表的链上共识;Step S40, initiate an on-chain consensus based on the signature list;
该步骤中,见证发起方节点发起基于签名列表的链上共识。具体地,该步骤S40可以进一步包括:根据经所述见证发起方私钥签名后的所述哈希值、所述签名列表和所述多方见证完成条件信息生成一笔上链交易;执行所述上链交易的上链操作,以使区块链中的所有节点对所述上链交易进行共识。In this step, the witness initiator node initiates an on-chain consensus based on the signature list. Specifically, this step S40 may further include: generating an on-chain transaction based on the hash value signed by the witness initiator private key, the signature list, and the multi-party witness completion condition information; and executing the The on-chain operation of the on-chain transaction, so that all nodes in the blockchain can reach a consensus on the on-chain transaction.
本实施例中,见证发起方节点在发起链上共识时,根据经自身私钥签名后的哈希值、签名列表和多方见证完成条件信息生成一笔上链交易,然后执行该上链交易的上链操作,即调用智能合约发送一笔上链交易,以使区块链中的所有节点对该上链交易进行共识。比如,当见证发起方为机构A时,交易的数据可以表示为:<Hash(A),Sign List,Condition>,其中Sign List为签名列表(如图3中 签名列表包含机构A签名Sign A和机构D签名Sign D)。In this embodiment, when the witness initiator node initiates an on-chain consensus, it generates an on-chain transaction based on the hash value signed by its own private key, the signature list, and the completion condition information of the multi-party witness, and then executes the on-chain transaction. The on-chain operation is to call the smart contract to send an on-chain transaction so that all nodes in the blockchain can reach a consensus on the on-chain transaction. For example, when the witness initiator is institution A, the transaction data can be expressed as: <Hash(A), Sign List, Condition>, where Sign List is the signature list (as shown in Figure 3, the signature list contains the signatures of institution A, Sign A and Sign D of Institution D).
需要说明的是,该参与共识的节点为区块链中的所有机构的所有节点,即,如图3中既包括见证发起方节点1、2,也包括见证参与方节点4、5,也包括除见证发起方节点和见证参与方节点以外的节点3。区块链中所有机构的所有节点对签名列表中的签名进行有效性和真实性验证,并验证签名列表是否满足智能合约所规定的多方见证完成条件,验证结果将影响共识结果,进而影响交易是否上链成功。It should be noted that the nodes participating in the consensus are all nodes of all institutions in the blockchain, that is, as shown in Figure 3, it includes both witness initiator nodes 1, 2, and witness participant nodes 4, 5, and also Node 3 other than the witness initiator node and the witness participant node. All nodes of all institutions in the blockchain verify the validity and authenticity of the signatures in the signature list, and verify whether the signature list meets the multi-party witness completion conditions specified by the smart contract. The verification result will affect the consensus result and then affect the transaction. The chain succeeded.
其中,多方见证的完成条件可以灵活设置,包括但不限于:Among them, the completion conditions of multi-party witness can be flexibly set, including but not limited to:
1)要求收集特定机构的签名为一般性的见证要求,例如存证业务需收集业务机构/存证机构/仲裁机构的签名;1) It is a general witness requirement to collect the signatures of specific institutions, for example, the signatures of business institutions/depositing institutions/arbitration institutions must be collected for certificate deposit business;
2)要求收集够一定区块链节点个数的签名,体现了民主集中制中少数服从多数的原则;2) It is required to collect signatures for a certain number of blockchain nodes, which embodies the principle that the minority obey the majority in democratic centralism;
3)为防止某一机构通过部署大量节点成为节点大多数,导致只需收集该机构下节点的签名即可满足见证完成条件情况的出现,要求统计时一机构下多个节点的签名最多只算该机构的两个签名,在此基础上再结合少数服从多数的原则来判断多方见证是否能完成,此规则为要求收集一定机构个数签名的规则;3) In order to prevent a certain organization from deploying a large number of nodes to become the majority of nodes, resulting in a situation where only the signatures of nodes under the organization can meet the witness completion conditions, the signatures of multiple nodes under an organization are only counted at most when statistics are required The two signatures of the organization are combined with the principle of the minority to obey the majority to determine whether the multi-party witness can be completed. This rule requires the collection of a certain number of signatures of the organization;
4)只需某些机构中任意机构签名即可。4) It only needs to be signed by any institution in some institutions.
上述多方见证的完成条件可单一使用,也可混合使用。上述完成条件可以形式化描述并上链记录,例如:存在机构ABCD,多方见证的完成条件描述为[A(CD)],表示此次多方见证的完成需两个机构签名,包括机构A的签名,和机构CD中任一机构的签名(B机构不需参与此次见证)。The completion conditions of the above-mentioned multi-party witness can be used singly or mixed. The above completion conditions can be described formally and recorded on the chain. For example, there is an institution ABCD, and the completion condition of multi-party witness is described as [A(CD)], which means that the completion of this multi-party witness requires the signatures of two institutions, including the signature of institution A , And the signature of any institution in institution CD (B institution does not need to participate in this witness).
步骤S50,当所述链上共识达成时,判定所述待见证的数据完成了多方见证。Step S50: When the consensus on the chain is reached, it is determined that the data to be witnessed has completed multi-party witness.
本实施例中,将基于所述签名列表的链上共识达成时,即判定待见证的数据完成了多方见证。具体实施时,区块链共识算法可采用现有的PBFT(Practical Byzantine Fault Tolerance,拜占庭容错)算法或RAFT算法(一种分布式一致性算法),而共识达成条件由具体采用的共识算法决定,本实施例对此不作赘述。In this embodiment, when the on-chain consensus based on the signature list is reached, it is determined that the data to be witnessed has completed multi-party witness. In specific implementation, the blockchain consensus algorithm can use the existing PBFT (Practical Byzantine Fault Tolerance, Byzantine Fault Tolerance) algorithm or RAFT algorithm (a distributed consensus algorithm), and the consensus reaching conditions are determined by the specific consensus algorithm used. This embodiment will not repeat this description.
交易的数据<Hash(A),Sign List,Condition>上链即确认,全网数据一致, 各区块链节点均可查可验。见证发起/参与机构ACD可设置交易回调,当交易数据上链成功(该见证过程完成)得到通知。The transaction data <Hash(A), Sign List, Condition> is confirmed when it is uploaded to the chain. The data on the entire network is consistent, and all blockchain nodes can be checked and verified. The witness initiating/participating agency ACD can set a transaction callback, and be notified when the transaction data is successfully connected to the chain (the witness process is completed).
业务机构若需要发起查验时,具备查验功能的机构(如图3中C为查验机构)基于各机构均统一的待见证的数据的哈希值(待见证的数据的唯一标识),从区块链上提取交易数据,判断数据的有效性、真实性及其是否满足多方见证完成条件,由此实现对多方见证数据的查验。If a business organization needs to initiate an inspection, the organization with inspection function (C in Figure 3 is the inspection organization) based on the hash value of the data to be witnessed (the unique identifier of the data to be witnessed) that is unified by each organization, from the block The transaction data is extracted on the chain, and the validity, authenticity of the data and whether it meets the completion conditions of the multi-party witness is determined, thereby realizing the inspection of the multi-party witness data.
本实施例提出的区块链多方见证方法,见证发起方节点收集签名的机制由现有的“上链签名交易收集”转为“链上通信收集”,即在收集各见证参与方节点的签名时,见证发起方节点和见证参与方节点均无需对待见证的数据的哈希值签名后再发送上链交易,而是见证发起方节点收集满足见证完成条件的签名列表后再发起基于该签名列表的链上共识,即将签名列表一次性上链,当链上共识达成时,判定待见证的数据完成了多方见证,通过这种方式,提升了多方见证的执行性能并降低了数据存储压力,从而便于多方见证的大规模应用。In the blockchain multi-party witness method proposed in this embodiment, the mechanism for witnessing initiator nodes to collect signatures is changed from the existing "on-chain signature transaction collection" to "on-chain communication collection", that is, the signature of each witness participant node is collected At the time, the witness initiator node and the witness participant node do not need to sign the hash value of the data to be witnessed before sending the transaction on the chain. Instead, the witness initiator node collects the signature list that meets the witness completion condition and then initiates the list based on the signature On-chain consensus, that is, the signature list is put on the chain at a time. When the on-chain consensus is reached, it is determined that the data to be witnessed has completed multi-party witness. In this way, the performance of multi-party witness is improved and the data storage pressure is reduced. Large-scale application to facilitate multi-party witness.
进一步地,基于本申请区块链多方见证方法第一实施例,提出本申请区块链多方见证方法第二实施例。Further, based on the first embodiment of the blockchain multi-party witness method of the present application, a second embodiment of the blockchain multi-party witness method of the present application is proposed.
在本实施例中,上述步骤S40之前,还可以包括:对所述签名列表中的签名信息进行有效性验证;当所述有效性验证通过时,判断所述签名信息是否满足所述多方见证完成条件信息中规定的多方见证完成条件;若所述签名信息满足所述多方见证完成条件信息中规定的多方见证完成条件,则执行步骤:发起基于所述签名列表的链上共识。In this embodiment, before the above step S40, it may further include: verifying the validity of the signature information in the signature list; when the validity verification is passed, determining whether the signature information satisfies the multi-party witness completion The multi-party witness completion condition specified in the condition information; if the signature information meets the multi-party witness completion condition specified in the multi-party witness completion condition information, the execution step is to initiate an on-chain consensus based on the signature list.
具体地,见证发起方节点在发起基于签名列表的链上共识之前,可以首先对签名列表中的签名信息进行有效性验证,该对所述签名列表中的签名信息进行有效性验证的步骤可以包括:使用预先保存的见证参与方公钥解密所述签名列表中的签名信息;当所述签名列表中的签名信息能够被所述见证参与方公钥解密时,判定所述签名列表中的签名信息是有效的。比如见证发起方机构A预先保存见证参与方机构C的公钥,则可以使用该公钥解密机构C的签名信息,如果解密机构C的签名信息能够被该公钥解密,即判定所述签名列表中的机构C的签名信息是有效的。Specifically, before initiating an on-chain consensus based on the signature list, the witness initiator node may first verify the validity of the signature information in the signature list, and the step of verifying the validity of the signature information in the signature list may include : Use the pre-saved witness participant public key to decrypt the signature information in the signature list; when the signature information in the signature list can be decrypted by the witness participant public key, determine the signature information in the signature list It is vaild. For example, the witness initiator institution A pre-stores the public key of the witness participant institution C, and the public key can be used to decrypt the signature information of the institution C. If the signature information of the decryption institution C can be decrypted by the public key, the signature list is determined The signature information of organization C in is valid.
当有效性验证通过时,见证发起方节点根据智能合约进一步判断签名列表中的签名信息是否满足多方见证完成条件信息中规定的多方见证完成条件,多方见证完成条件具体参照上述第一实施例的描述;若满足,则可以执行发起基于签名列表的链上共识的步骤。When the validity verification is passed, the witness initiator node further determines whether the signature information in the signature list meets the multi-party witness completion conditions specified in the multi-party witness completion condition information according to the smart contract. For the multi-party witness completion conditions, refer to the description of the first embodiment above. ; If it is satisfied, the steps of initiating an on-chain consensus based on the signature list can be executed.
本实施例见证发起方节点在收集到满足多方见证完成条件的签名信息之后,才发起基于签名列表的链上共识,通过这种方式,保证了上链交易数据的准确性、真实性,进一步提高了多方见证的效率。In this embodiment, the witness initiator node initiates an on-chain consensus based on the signature list only after collecting the signature information that meets the completion conditions of the multi-party witness. In this way, the accuracy and authenticity of the on-chain transaction data are guaranteed and further improved The efficiency of multi-party witness.
进一步地,基于本申请区块链多方见证方法第一实施例,提出本申请区块链多方见证方法第三实施例。Further, based on the first embodiment of the blockchain multi-party witness method of the present application, a third embodiment of the blockchain multi-party witness method of the present application is proposed.
在本实施例中,上述步骤S20可以包括:读取预先保存在本地的Topic节点列表,所述Topic节点列表用于记录预先关注了同一Topic的见证发起方节点和见证参与方节点,其中Topic表示所述待见证的数据的哈希值;从所述Topic节点列表中随机选取预设数量的目标节点,将所述待见证的数据和所述见证请求消息发送至所述目标节点,并接收所述目标节点返回的见证响应消息。In this embodiment, the above step S20 may include: reading a list of topic nodes pre-stored locally, where the topic node list is used to record witness initiator nodes and witness participant nodes that have paid attention to the same topic in advance, where Topic represents The hash value of the data to be witnessed; randomly select a preset number of target nodes from the Topic node list, send the data to be witnessed and the witness request message to the target node, and receive all The witness response message returned by the target node.
在本实施例中,考虑到网络可靠性受限(比如节点5连不上节点1)的情况,为减少网络压力提升性能,可以对链上收集签名的流程进行优化,该优化主要是通过引入基于Topic的关注、分组、组播、消息转发、见证响应消息原路返回的机制实现的。In this embodiment, considering the limited network reliability (for example, node 5 cannot connect to node 1), in order to reduce network pressure and improve performance, the process of collecting signatures on the chain can be optimized. The optimization is mainly by introducing It is realized based on the mechanism of Topic's attention, grouping, multicasting, message forwarding, and witness response message return.
首先,见证发起方节点本地预先保存了一Topic节点列表,该Topic节点列表用于记录预先关注了同一Topic的见证发起方节点和见证参与方节点,其中Topic表示所述待见证的数据的哈希值;之后见证发起方节点在生成见证请求消息后,可以读取该Topic节点列表并从中随机选取预设数量的目标节点,然后将待见证的数据和见证请求消息发送至选取的目标节点,并接收目标节点返回的见证响应消息。First, the witness initiator node locally pre-stores a topic node list, which is used to record witness initiator nodes and witness participant nodes that have paid attention to the same topic in advance, where Topic represents the hash of the data to be witnessed After the witness initiator node generates a witness request message, it can read the Topic node list and randomly select a preset number of target nodes from it, and then send the data to be witnessed and the witness request message to the selected target node, and Receive the witness response message returned by the target node.
以图3为例,当节点1准备发送基于某一Topic的见证请求消息时,从本地Topic节点列表(包括节点1、2、4、5)中选择一定数量的目标节点发送该见证请求消息,其中选择的目标节点不包括自身节点,目标节点收到见证请求消息后,判断自身是否关注了该Topic,若是,则对见证请求消息的上一来源节点进行本 地记录,并转发该消息,转发路由规则为:从本地记录关注该Topic的节点列表中选择一定数量的节点发送该见证请求消息,其中选择的节点不能为该见证请求消息的上一来源节点和自身节点。之后,接收到见证请求消息的节点返回对应的见证响应消息,节点发送见证响应消息的路由规则为:根据见证响应消息的Seq字段从本地记录中找出该消息的上一来源节点,作为响应消息的下一转发节点,直至发送到原见证请求消息的源节点。Taking Figure 3 as an example, when node 1 is ready to send a witness request message based on a topic, a certain number of target nodes are selected from the local Topic node list (including nodes 1, 2, 4, and 5) to send the witness request message. The selected target node does not include its own node. After receiving the witness request message, the target node judges whether it pays attention to the topic. If so, it records the previous source node of the witness request message locally, forwards the message, and forwards the route The rule is: select a certain number of nodes from the local record of the node list that pays attention to the topic to send the witness request message, and the selected node cannot be the previous source node and the own node of the witness request message. After that, the node that receives the witness request message returns the corresponding witness response message, and the routing rule for the node to send the witness response message is: according to the Seq field of the witness response message, find the previous source node of the message from the local record as the response message The next forwarding node until it is sent to the source node of the original witness request message.
比如,节点1发送见证请求消息到节点4,节点4构造见证响应消息发送到1,并记录该见证请求消息来源节点1,同时转发该消息到节点5,节点5收到消息后构造的见证响应消息将路由到节点4,再路由到节点1,这样,在节点5连不上节点1的情况下,节点5和节点1之间也能够通过其他节点的消息转发实现对应的见证请求和见证响应过程,从而进一步提高了网络性能,保证了见证发起方节点能够顺利收集各见证参与方节点的签名。For example, node 1 sends a witness request message to node 4, node 4 constructs a witness response message and sends it to 1, and records the source of the witness request message, node 1, and forwards the message to node 5, which is the witness response constructed after node 5 receives the message The message will be routed to node 4 and then routed to node 1. In this way, if node 5 is not connected to node 1, node 5 and node 1 can also realize the corresponding witness request and witness response through message forwarding from other nodes This process further improves the network performance and ensures that the witness initiator node can successfully collect the signatures of the witness participant nodes.
进一步地,基于本申请区块链多方见证方法第三实施例,提出本申请区块链多方见证方法第四实施例。Further, based on the third embodiment of the blockchain multi-party witness method of the present application, a fourth embodiment of the blockchain multi-party witness method of the present application is proposed.
在本实施例中,步骤S20之前还可以包括:创建Topic节点列表;当接收到其他节点发送的Topic消息时,使用所述见证发起方私钥解密所述Topic消息,其中Topic消息为使用见证发起方公钥对所述待见证的数据的哈希值进行加密后的消息;当所述Topic消息能够被所述见证发起方私钥解密时,将所述Topic消息的发送节点添加至所述Topic节点列表中。In this embodiment, before step S20, it may further include: creating a Topic node list; when receiving a Topic message sent by another node, decrypting the Topic message using the witness initiator private key, where the Topic message is initiated using the witness A message in which the public key of the party encrypts the hash value of the data to be witnessed; when the Topic message can be decrypted by the private key of the witness initiator, the sending node of the Topic message is added to the Topic Node list.
在本实施例中,见证发起方节点可以首先创建一个Topic节点列表,后续当接收到其他节点发送的Topic消息时,使用自身私钥解密接收到的Topic消息,其中Topic消息为使用见证发起方公钥对所述待见证的数据的哈希值进行加密后的消息;若该Topic消息能够被自身私钥解密,则见证发起方节点将该Topic消息的发送节点添加至Topic节点列表中,表示自身知道了该Topic消息的发送节点关注了该Topic消息中的Topic。In this embodiment, the witness initiator node can first create a Topic node list, and subsequently when receiving Topic messages sent by other nodes, use its own private key to decrypt the received Topic messages, where the Topic message is the public using the witness initiator. The key encrypts the hash value of the data to be witnessed; if the Topic message can be decrypted by its own private key, the witness initiator node adds the sending node of the Topic message to the Topic node list, indicating itself Knowing that the sending node of the Topic message pays attention to the Topic in the Topic message.
以图3为例,机构A、C、D各自对待见证的数据计算哈希值(即Topic),并使用对方机构的公钥进行加密后发送给对方机构,以此表明自身的节点关注了该Topic。对某一Topic的共同关注节点将参与到基于该Topic的多方见证过程。例如 机构下A节点1发送给节点4的内容为:使用节点4所属机构C的公钥签名后的Topic,表示让节点4知道节点1关注了该Topic。注意:这里的对方机构包括机构B。Taking Figure 3 as an example, organizations A, C, and D each calculate a hash value (namely Topic) for the data to be witnessed, and use the public key of the other organization to encrypt the data and send it to the other organization to show that its own node pays attention to the Topic. The nodes of common concern for a topic will participate in the multi-party witness process based on the topic. For example, the content sent by node A from node 1 to node 4 under the organization is: Topic signed with the public key of organization C to which node 4 belongs, which means that node 4 knows that node 1 pays attention to the topic. Note: The counterparty organization here includes organization B.
机构A、B、C、D的所有节点1、2、3、4、5在收到Topic消息后,使用自身机构的私钥解密出Hash值,并将该Topic消息的发送节点添加至本地Topic节点列表中。理想情况下,机构A、C、D所部署的存活且互联的区块链节点1、2、4、5均具有一致的Topic节点列表(即节点1、2、4、5各自本地记录了节点1、2、4、5关注了同一Topic)。All nodes 1, 2, 3, 4, and 5 of organizations A, B, C, and D, after receiving the Topic message, use the private key of their own organization to decrypt the hash value, and add the sending node of the Topic message to the local Topic Node list. Ideally, the surviving and interconnected blockchain nodes 1, 2, 4, and 5 deployed by institutions A, C, and D all have a consistent list of Topic nodes (that is, nodes 1, 2, 4, and 5 each record the node locally 1, 2, 4, 5 follow the same topic).
通过引入Topic的关注流程,后续基于某一待见证的数据的哈希值(即Topic)的见证过程的见证请求消息只在关注了该Topic的节点间发送,比如图3中节点1的见证请求消息只在图示的Topic分组通信范围内发送,由此限制了链上消息的通信范围,减少了对带宽的占用,提高了对并发见证的处理能力。By introducing the follow process of Topic, subsequent witness request messages based on the hash value of a certain data to be witnessed (ie Topic) witness process are only sent between nodes that follow the topic, such as the witness request of node 1 in Figure 3 Messages are only sent within the communication range of the Topic packet as shown in the figure, which limits the communication range of messages on the chain, reduces the bandwidth occupation, and improves the processing capability of concurrent witnesses.
本申请还提供一种区块链多方见证装置。本申请区块链多方见证装置装置包括:This application also provides a block chain multi-party witness device. The multi-party witness device for the blockchain of this application includes:
请求生成模块,用于获取待见证的数据,计算所述待见证的数据的哈希值并使用预先保存的见证发起方私钥对所述哈希值进行签名,根据经所述见证发起方私钥签名后的所述哈希值和预设的多方见证完成条件信息生成见证请求消息;The request generation module is used to obtain the data to be witnessed, calculate the hash value of the data to be witnessed and use the pre-stored private key of the witness initiator to sign the hash value according to the private key of the witness initiator. Generating a witness request message after the hash value signed by the key and preset multi-party witness completion condition information;
请求发送模块,用于将所述见证请求消息发送至预设的见证参与方节点,并接收各见证参与方节点返回的见证响应消息;A request sending module, configured to send the witness request message to a preset witness participant node, and receive a witness response message returned by each witness participant node;
获取模块,用于从所述见证响应消息中获取各见证参与方节点使用自身私钥对所述哈希值进行签名的签名信息,形成签名列表;The obtaining module is used to obtain the signature information of each witness participant node using its own private key to sign the hash value from the witness response message to form a signature list;
共识发起模块,用于发起基于所述签名列表的链上共识;The consensus initiation module is used to initiate an on-chain consensus based on the signature list;
判定模块,用于当所述链上共识达成时,判定所述待见证的数据完成了多方见证。The judging module is used to judge that the data to be witnessed has completed multi-party witness when the consensus on the chain is reached.
进一步地,所述请求生成模块还用于:Further, the request generation module is also used for:
生成见证请求消息的唯一标识信息;Generate the unique identification information of the witness request message;
将所述唯一标识信息、经所述见证发起方私钥签名后的所述哈希值和预设的多方见证完成条件信息打包成见证请求消息。The unique identification information, the hash value signed by the private key of the witness initiator, and preset multi-party witness completion condition information are packaged into a witness request message.
进一步地,所述区块链多方见证装置还包括:Further, the blockchain multi-party witness device further includes:
验证模块,用于对所述签名列表中的签名信息进行有效性验证;The verification module is used to verify the validity of the signature information in the signature list;
判断模块,用于当所述有效性验证通过时,判断所述签名信息是否满足所述多方见证完成条件信息中规定的多方见证完成条件;A judging module, used for judging whether the signature information meets the multi-party witness completion condition specified in the multi-party witness completion condition information when the validity verification is passed;
所述共识发起模块,还用于在所述签名信息满足所述多方见证完成条件信息中规定的多方见证完成条件时,发起基于所述签名列表的链上共识。The consensus initiation module is also configured to initiate an on-chain consensus based on the signature list when the signature information meets the multi-party witness completion condition specified in the multi-party witness completion condition information.
进一步地,所述验证模块还用于:Further, the verification module is also used for:
使用预先保存的见证参与方公钥解密所述签名列表中的签名信息;Decrypt the signature information in the signature list using the pre-saved public key of the witness participant;
当所述签名列表中的签名信息能够被所述见证参与方公钥解密时,判定所述签名列表中的签名信息是有效的。When the signature information in the signature list can be decrypted by the public key of the witness participant, it is determined that the signature information in the signature list is valid.
进一步地,所述共识发起模块还用于:Further, the consensus initiation module is also used for:
根据经所述见证发起方私钥签名后的所述哈希值、所述签名列表和所述多方见证完成条件信息生成一笔上链交易;Generate an on-chain transaction based on the hash value signed by the witness initiator private key, the signature list, and the multi-party witness completion condition information;
执行所述上链交易的上链操作,以使区块链中的所有节点对所述上链交易进行共识。The on-chain operation of the on-chain transaction is performed so that all nodes in the blockchain can reach a consensus on the on-chain transaction.
进一步地,所述请求发送模块还用于:Further, the request sending module is also used for:
读取预先保存在本地的Topic节点列表,所述Topic节点列表用于记录预先关注了同一Topic的见证发起方节点和见证参与方节点,其中Topic表示所述待见证的数据的哈希值;Read a list of topic nodes pre-stored locally, where the topic node list is used to record witness initiator nodes and witness participant nodes that have paid attention to the same topic in advance, where Topic represents the hash value of the data to be witnessed;
从所述Topic节点列表中随机选取预设数量的目标节点,将所述待见证的数据和所述见证请求消息发送至所述目标节点,并接收所述目标节点返回的见证响应消息。A preset number of target nodes are randomly selected from the Topic node list, the data to be witnessed and the witness request message are sent to the target node, and the witness response message returned by the target node is received.
进一步地,所述区块链多方见证装置还包括:Further, the blockchain multi-party witness device further includes:
创建模块,用于创建Topic节点列表;Create module to create a list of Topic nodes;
解密模块,用于当接收到其他节点发送的Topic消息时,使用所述见证发起方私钥解密所述Topic消息,其中Topic消息为使用见证发起方公钥对所述待见证的数据的哈希值进行加密后的消息;The decryption module is used to decrypt the Topic message using the private key of the witness initiator when a Topic message sent by another node is received, where the Topic message is a hash of the data to be witnessed using the public key of the witness initiator The value of the encrypted message;
添加模块,用于当所述Topic消息能够被所述见证发起方私钥解密时,将所述Topic消息的发送节点添加至所述Topic节点列表中。The adding module is configured to add the sending node of the Topic message to the Topic node list when the Topic message can be decrypted by the private key of the witness initiator.
上述各程序模块所执行的操作可参照本申请区块链多方见证方法实施例,此处不再赘述。For the operations performed by the above-mentioned program modules, refer to the embodiment of the blockchain multi-party witness method of this application, which will not be repeated here.
本申请还提供一种计算机可读存储介质。The application also provides a computer-readable storage medium.
本申请计算机可读存储介质上存储有多方见证程序,所述多方见证程序被处理器执行时实现如上所述的区块链多方见证方法的步骤。A multi-party witness program is stored on the computer-readable storage medium of the present application, and the multi-party witness program is executed by a processor to realize the steps of the blockchain multi-party witness method as described above.
其中,在所述处理器上运行的多方见证程序被执行时所实现的方法可参照本申请区块链多方见证方法各个实施例,此处不再赘述。The method implemented when the multi-party witness program running on the processor is executed can refer to the various embodiments of the blockchain multi-party witness method of the present application, which will not be repeated here.
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者系统不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者系统所固有的要素。在没有更多限制的情况下,由语句“包括一个......”限定的要素,并不排除在包括该要素的过程、方法、物品或者系统中还存在另外的相同要素。It should be noted that in this article, the terms "include", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements not only includes those elements, It also includes other elements that are not explicitly listed, or elements inherent to the process, method, article, or system. If there are no more restrictions, the element defined by the sentence "including a..." does not exclude the existence of other identical elements in the process, method, article or system that includes the element.
上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。The serial numbers of the foregoing embodiments of the present application are only for description, and do not represent the advantages and disadvantages of the embodiments.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在如上所述的一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本申请各个实施例所述的方法。Through the description of the above embodiments, those skilled in the art can clearly understand that the method of the above embodiments can be implemented by means of software plus the necessary general hardware platform. Of course, it can also be achieved by hardware, but in many cases the former is better.的实施方式。 Based on this understanding, the technical solution of this application essentially or the part that contributes to the existing technology can be embodied in the form of a software product, and the computer software product is stored in a storage medium (such as ROM/RAM) as described above. , Magnetic disk, optical disk), including several instructions to make a terminal device (can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) execute the method described in each embodiment of the present application.
以上仅为本申请的优选实施例,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。The above are only preferred embodiments of this application, and do not limit the scope of this application. Any equivalent structure or equivalent process transformation made using the content of the description and drawings of this application, or directly or indirectly used in other related technical fields , The same reason is included in the scope of patent protection of this application.

Claims (20)

  1. 一种区块链多方见证方法,其中,所述区块链多方见证方法包括如下步骤:A block chain multi-party witness method, wherein the block chain multi-party witness method includes the following steps:
    获取待见证的数据,计算所述待见证的数据的哈希值并使用预先保存的见证发起方私钥对所述哈希值进行签名,根据经所述见证发起方私钥签名后的所述哈希值和预设的多方见证完成条件信息生成见证请求消息;Obtain the data to be witnessed, calculate the hash value of the data to be witnessed and use the pre-saved witness initiator private key to sign the hash value, according to the signature of the witness initiator private key Hash value and preset multi-party witness completion condition information generates a witness request message;
    将所述待见证的数据和所述见证请求消息发送至预设的见证参与方节点,并接收各见证参与方节点返回的见证响应消息;Sending the data to be witnessed and the witness request message to a preset witness participant node, and receive a witness response message returned by each witness participant node;
    从所述见证响应消息中获取各见证参与方节点使用自身私钥对所述哈希值进行签名的签名信息,形成签名列表;Obtain the signature information of each witness participant node using its own private key to sign the hash value from the witness response message to form a signature list;
    发起基于所述签名列表的链上共识;Initiate an on-chain consensus based on the signature list;
    当所述链上共识达成时,判定所述待见证的数据完成了多方见证。When the consensus on the chain is reached, it is determined that the data to be witnessed has completed multi-party witness.
  2. 如权利要求1所述的区块链多方见证方法,其中,所述根据经所述见证发起方私钥签名后的所述哈希值和预设的多方见证完成条件信息生成见证请求消息的步骤包括:The blockchain multi-party witness method according to claim 1, wherein the step of generating a witness request message based on the hash value signed by the witness initiator private key and preset multi-party witness completion condition information include:
    生成见证请求消息的唯一标识信息;Generate the unique identification information of the witness request message;
    将所述唯一标识信息、经所述见证发起方私钥签名后的所述哈希值和预设的多方见证完成条件信息打包成见证请求消息。The unique identification information, the hash value signed by the private key of the witness initiator, and preset multi-party witness completion condition information are packaged into a witness request message.
  3. 如权利要求1所述的区块链多方见证方法,其中,所述发起基于所述签名列表的链上共识的步骤之前,还包括:The blockchain multi-party witness method of claim 1, wherein before the step of initiating an on-chain consensus based on the signature list, the method further comprises:
    对所述签名列表中的签名信息进行有效性验证;Verify the validity of the signature information in the signature list;
    当所述有效性验证通过时,判断所述签名信息是否满足所述多方见证完成条件信息中规定的多方见证完成条件;When the validity verification is passed, determine whether the signature information meets the multi-party witness completion condition specified in the multi-party witness completion condition information;
    若所述签名信息满足所述多方见证完成条件信息中规定的多方见证完成条件,则执行步骤:发起基于所述签名列表的链上共识。If the signature information satisfies the multi-party witness completion condition specified in the multi-party witness completion condition information, perform the step of initiating an on-chain consensus based on the signature list.
  4. 如权利要求3所述的区块链多方见证方法,其中,所述对所述签名 列表中的签名信息进行有效性验证的步骤包括:The blockchain multi-party witness method according to claim 3, wherein the step of verifying the validity of the signature information in the signature list comprises:
    使用预先保存的见证参与方公钥解密所述签名列表中的签名信息;Decrypt the signature information in the signature list using the pre-saved public key of the witness participant;
    当所述签名列表中的签名信息能够被所述见证参与方公钥解密时,判定所述签名列表中的签名信息是有效的。When the signature information in the signature list can be decrypted by the public key of the witness participant, it is determined that the signature information in the signature list is valid.
  5. 如权利要求1所述的区块链多方见证方法,其中,所述发起基于所述签名列表的链上共识的步骤包括:The blockchain multi-party witness method according to claim 1, wherein the step of initiating an on-chain consensus based on the signature list comprises:
    根据经所述见证发起方私钥签名后的所述哈希值、所述签名列表和所述多方见证完成条件信息生成一笔上链交易;Generate an on-chain transaction based on the hash value signed by the witness initiator private key, the signature list, and the multi-party witness completion condition information;
    执行所述上链交易的上链操作,以使区块链中的所有节点对所述上链交易进行共识。The on-chain operation of the on-chain transaction is performed so that all nodes in the blockchain can reach a consensus on the on-chain transaction.
  6. 如权利要求1所述的区块链多方见证方法,其中,所述将所述待见证的数据和所述见证请求消息发送至预设的见证参与方节点,并接收各见证参与方节点返回的见证响应消息的步骤包括:The blockchain multi-party witness method according to claim 1, wherein said sending said data to be witnessed and said witness request message to a preset witness participant node, and receiving a return from each witness participant node The steps to witness the response message include:
    读取预先保存在本地的Topic节点列表,所述Topic节点列表用于记录预先关注了同一Topic的见证发起方节点和见证参与方节点,其中Topic表示所述待见证的数据的哈希值;Read a list of topic nodes pre-stored locally, where the topic node list is used to record witness initiator nodes and witness participant nodes that have paid attention to the same topic in advance, where Topic represents the hash value of the data to be witnessed;
    从所述Topic节点列表中随机选取预设数量的目标节点,将所述待见证的数据和所述见证请求消息发送至所述目标节点,并接收所述目标节点返回的见证响应消息。A preset number of target nodes are randomly selected from the Topic node list, the data to be witnessed and the witness request message are sent to the target node, and the witness response message returned by the target node is received.
  7. 如权利要求6所述的区块链多方见证方法,其中,所述将所述待见证的数据和所述见证请求消息发送至预设的见证参与方节点,并接收各见证参与方节点返回的见证响应消息的步骤之前,还包括:The blockchain multi-party witness method according to claim 6, wherein said sending said data to be witnessed and said witness request message to a preset witness participant node, and receiving a return from each witness participant node Before witnessing the response message, it also includes:
    创建Topic节点列表;Create a list of Topic nodes;
    当接收到其他节点发送的Topic消息时,使用所述见证发起方私钥解密所述Topic消息,其中Topic消息为使用见证发起方公钥对所述待见证的数据的哈希值进行加密后的消息;When a Topic message sent by another node is received, the witness initiator private key is used to decrypt the Topic message, where the Topic message is the result of using the witness initiator public key to encrypt the hash value of the data to be witnessed news;
    当所述Topic消息能够被所述见证发起方私钥解密时,将所述Topic消息的发送节点添加至所述Topic节点列表中。When the Topic message can be decrypted by the witness initiator private key, the sending node of the Topic message is added to the Topic node list.
  8. 一种区块链多方见证装置,其中,所述区块链多方见证装置包括:A block chain multi-party witness device, wherein the block chain multi-party witness device includes:
    请求生成模块,用于获取待见证的数据,计算所述待见证的数据的哈希值并使用预先保存的见证发起方私钥对所述哈希值进行签名,根据经所述见证发起方私钥签名后的所述哈希值和预设的多方见证完成条件信息生成见证请求消息;The request generation module is used to obtain the data to be witnessed, calculate the hash value of the data to be witnessed and use the pre-stored private key of the witness initiator to sign the hash value according to the private key of the witness initiator. Generating a witness request message after the hash value signed by the key and preset multi-party witness completion condition information;
    请求发送模块,用于将所述见证请求消息发送至预设的见证参与方节点,并接收各见证参与方节点返回的见证响应消息;A request sending module, configured to send the witness request message to a preset witness participant node, and receive a witness response message returned by each witness participant node;
    获取模块,用于从所述见证响应消息中获取各见证参与方节点使用自身私钥对所述哈希值进行签名的签名信息,形成签名列表;The obtaining module is used to obtain the signature information of each witness participant node using its own private key to sign the hash value from the witness response message to form a signature list;
    共识发起模块,用于发起基于所述签名列表的链上共识;The consensus initiation module is used to initiate an on-chain consensus based on the signature list;
    判定模块,用于当所述链上共识达成时,判定所述待见证的数据完成了多方见证。The judging module is used to judge that the data to be witnessed has completed multi-party witness when the consensus on the chain is reached.
  9. 如权利要求8所述的区块链多方见证装置,其中,所述请求生成模块还用于:The blockchain multi-party witness device according to claim 8, wherein the request generation module is further used for:
    生成见证请求消息的唯一标识信息;Generate the unique identification information of the witness request message;
    将所述唯一标识信息、经所述见证发起方私钥签名后的所述哈希值和预设的多方见证完成条件信息打包成见证请求消息。The unique identification information, the hash value signed by the private key of the witness initiator, and preset multi-party witness completion condition information are packaged into a witness request message.
  10. 如权利要求8所述的区块链多方见证装置,其中,所述区块链多方见证装置还包括:The block chain multi-party witness device according to claim 8, wherein the block chain multi-party witness device further comprises:
    验证模块,用于对所述签名列表中的签名信息进行有效性验证;The verification module is used to verify the validity of the signature information in the signature list;
    判断模块,用于当所述有效性验证通过时,判断所述签名信息是否满足所述多方见证完成条件信息中规定的多方见证完成条件;A judging module, used for judging whether the signature information meets the multi-party witness completion condition specified in the multi-party witness completion condition information when the validity verification is passed;
    所述共识发起模块,还用于在所述签名信息满足所述多方见证完成条件信息中规定的多方见证完成条件时,发起基于所述签名列表的链上共识。The consensus initiation module is also configured to initiate an on-chain consensus based on the signature list when the signature information meets the multi-party witness completion condition specified in the multi-party witness completion condition information.
  11. 如权利要求10所述的区块链多方见证装置,其中,所述验证模块还用于:The block chain multi-party witness device of claim 10, wherein the verification module is further used for:
    使用预先保存的见证参与方公钥解密所述签名列表中的签名信息;Decrypt the signature information in the signature list using the pre-saved public key of the witness participant;
    当所述签名列表中的签名信息能够被所述见证参与方公钥解密时,判定所述签名列表中的签名信息是有效的。When the signature information in the signature list can be decrypted by the public key of the witness participant, it is determined that the signature information in the signature list is valid.
  12. 如权利要求8所述的区块链多方见证装置,其中,所述共识发起模块还用于:The blockchain multi-party witness device according to claim 8, wherein the consensus initiation module is further used for:
    根据经所述见证发起方私钥签名后的所述哈希值、所述签名列表和所述多方见证完成条件信息生成一笔上链交易;Generate an on-chain transaction based on the hash value signed by the witness initiator private key, the signature list, and the multi-party witness completion condition information;
    执行所述上链交易的上链操作,以使区块链中的所有节点对所述上链交易进行共识。The on-chain operation of the on-chain transaction is performed so that all nodes in the blockchain can reach a consensus on the on-chain transaction.
  13. 如权利要求8所述的区块链多方见证装置,其中,所述请求发送模块还用于:The blockchain multi-party witness device according to claim 8, wherein the request sending module is further used for:
    读取预先保存在本地的Topic节点列表,所述Topic节点列表用于记录预先关注了同一Topic的见证发起方节点和见证参与方节点,其中Topic表示所述待见证的数据的哈希值;Read a list of topic nodes pre-stored locally, where the topic node list is used to record witness initiator nodes and witness participant nodes that have paid attention to the same topic in advance, where Topic represents the hash value of the data to be witnessed;
    从所述Topic节点列表中随机选取预设数量的目标节点,将所述待见证的数据和所述见证请求消息发送至所述目标节点,并接收所述目标节点返回的见证响应消息。A preset number of target nodes are randomly selected from the Topic node list, the data to be witnessed and the witness request message are sent to the target node, and the witness response message returned by the target node is received.
  14. 如权利要求13所述的区块链多方见证装置,其中,所述区块链多方见证装置还包括:The block chain multi-party witness device according to claim 13, wherein the block chain multi-party witness device further comprises:
    创建模块,用于创建Topic节点列表;Create module to create a list of Topic nodes;
    解密模块,用于当接收到其他节点发送的Topic消息时,使用所述见证发起方私钥解密所述Topic消息,其中Topic消息为使用见证发起方公钥对所述待见证的数据的哈希值进行加密后的消息;The decryption module is used to decrypt the Topic message using the private key of the witness initiator when a Topic message sent by another node is received, where the Topic message is a hash of the data to be witnessed using the public key of the witness initiator The value of the encrypted message;
    添加模块,用于当所述Topic消息能够被所述见证发起方私钥解密时,将所述Topic消息的发送节点添加至所述Topic节点列表中。The adding module is configured to add the sending node of the Topic message to the Topic node list when the Topic message can be decrypted by the private key of the witness initiator.
  15. 一种区块链多方见证设备,其中,所述区块链多方见证设备包括:存储器、处理器及存储在所述存储器上并可在所述处理器上运行的多方见证程序,所述多方见证程序被所述处理器执行时实现如下步骤:A blockchain multi-party witness device, wherein the blockchain multi-party witness device includes: a memory, a processor, and a multi-party witness program stored on the memory and running on the processor. The multi-party witness The following steps are implemented when the program is executed by the processor:
    获取待见证的数据,计算所述待见证的数据的哈希值并使用预先保存的见证发起方私钥对所述哈希值进行签名,根据经所述见证发起方私钥签名后的所述哈希值和预设的多方见证完成条件信息生成见证请求消息;Obtain the data to be witnessed, calculate the hash value of the data to be witnessed and use the pre-saved witness initiator private key to sign the hash value, according to the signature of the witness initiator private key Hash value and preset multi-party witness completion condition information generates a witness request message;
    将所述待见证的数据和所述见证请求消息发送至预设的见证参与方节点,并接收各见证参与方节点返回的见证响应消息;Sending the data to be witnessed and the witness request message to a preset witness participant node, and receive a witness response message returned by each witness participant node;
    从所述见证响应消息中获取各见证参与方节点使用自身私钥对所述哈希值进行签名的签名信息,形成签名列表;Obtain the signature information of each witness participant node using its own private key to sign the hash value from the witness response message to form a signature list;
    发起基于所述签名列表的链上共识;Initiate an on-chain consensus based on the signature list;
    当所述链上共识达成时,判定所述待见证的数据完成了多方见证。When the consensus on the chain is reached, it is determined that the data to be witnessed has completed multi-party witness.
  16. 如权利要求15所述的区块链多方见证设备,其中,所述多方见证程序被所述处理器执行时还实现如下步骤:The blockchain multi-party witness device of claim 15, wherein the following steps are further implemented when the multi-party witness program is executed by the processor:
    生成见证请求消息的唯一标识信息;Generate the unique identification information of the witness request message;
    将所述唯一标识信息、经所述见证发起方私钥签名后的所述哈希值和预设的多方见证完成条件信息打包成见证请求消息。The unique identification information, the hash value signed by the private key of the witness initiator, and preset multi-party witness completion condition information are packaged into a witness request message.
  17. 如权利要求15所述的区块链多方见证设备,其中,所述多方见证程序被所述处理器执行时还实现如下步骤:The blockchain multi-party witness device of claim 15, wherein the following steps are further implemented when the multi-party witness program is executed by the processor:
    对所述签名列表中的签名信息进行有效性验证;Verify the validity of the signature information in the signature list;
    当所述有效性验证通过时,判断所述签名信息是否满足所述多方见证完成条件信息中规定的多方见证完成条件;When the validity verification is passed, determine whether the signature information meets the multi-party witness completion condition specified in the multi-party witness completion condition information;
    若所述签名信息满足所述多方见证完成条件信息中规定的多方见证完成条件,则执行步骤:发起基于所述签名列表的链上共识。If the signature information satisfies the multi-party witness completion condition specified in the multi-party witness completion condition information, perform the step of initiating an on-chain consensus based on the signature list.
  18. 一种计算机可读存储介质,其中,所述计算机可读存储介质上存 储有多方见证程序,所述多方见证程序被处理器执行时实现如下步骤:A computer-readable storage medium, wherein a multi-party witness program is stored on the computer-readable storage medium, and the following steps are implemented when the multi-party witness program is executed by a processor:
    获取待见证的数据,计算所述待见证的数据的哈希值并使用预先保存的见证发起方私钥对所述哈希值进行签名,根据经所述见证发起方私钥签名后的所述哈希值和预设的多方见证完成条件信息生成见证请求消息;Obtain the data to be witnessed, calculate the hash value of the data to be witnessed and use the pre-saved witness initiator private key to sign the hash value, according to the signature of the witness initiator private key Hash value and preset multi-party witness completion condition information generates a witness request message;
    将所述待见证的数据和所述见证请求消息发送至预设的见证参与方节点,并接收各见证参与方节点返回的见证响应消息;Sending the data to be witnessed and the witness request message to a preset witness participant node, and receive a witness response message returned by each witness participant node;
    从所述见证响应消息中获取各见证参与方节点使用自身私钥对所述哈希值进行签名的签名信息,形成签名列表;Obtain the signature information of each witness participant node using its own private key to sign the hash value from the witness response message to form a signature list;
    发起基于所述签名列表的链上共识;Initiate an on-chain consensus based on the signature list;
    当所述链上共识达成时,判定所述待见证的数据完成了多方见证。When the consensus on the chain is reached, it is determined that the data to be witnessed has completed multi-party witness.
  19. 如权利要求18所述的计算机可读存储介质,其中,所述多方见证程序被处理器执行时还实现如下步骤:18. The computer-readable storage medium of claim 18, wherein the following steps are further implemented when the multi-party witness program is executed by the processor:
    生成见证请求消息的唯一标识信息;Generate the unique identification information of the witness request message;
    将所述唯一标识信息、经所述见证发起方私钥签名后的所述哈希值和预设的多方见证完成条件信息打包成见证请求消息。The unique identification information, the hash value signed by the private key of the witness initiator, and preset multi-party witness completion condition information are packaged into a witness request message.
  20. 如权利要求18所述的计算机可读存储介质,其中,所述多方见证程序被处理器执行时还实现如下步骤:18. The computer-readable storage medium of claim 18, wherein the following steps are further implemented when the multi-party witness program is executed by the processor:
    对所述签名列表中的签名信息进行有效性验证;Verify the validity of the signature information in the signature list;
    当所述有效性验证通过时,判断所述签名信息是否满足所述多方见证完成条件信息中规定的多方见证完成条件;When the validity verification is passed, determine whether the signature information meets the multi-party witness completion condition specified in the multi-party witness completion condition information;
    若所述签名信息满足所述多方见证完成条件信息中规定的多方见证完成条件,则执行步骤:发起基于所述签名列表的链上共识。If the signature information satisfies the multi-party witness completion condition specified in the multi-party witness completion condition information, perform the step of initiating an on-chain consensus based on the signature list.
PCT/CN2020/074687 2019-02-20 2020-02-11 Block chain multi-party witness method, apparatus and device, and computer-readable storage medium WO2020168937A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910135223.1 2019-02-20
CN201910135223.1A CN109936457B (en) 2019-02-20 2019-02-20 Block chain multi-party witness method, device, equipment and computer readable storage medium

Publications (1)

Publication Number Publication Date
WO2020168937A1 true WO2020168937A1 (en) 2020-08-27

Family

ID=66985846

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/074687 WO2020168937A1 (en) 2019-02-20 2020-02-11 Block chain multi-party witness method, apparatus and device, and computer-readable storage medium

Country Status (2)

Country Link
CN (1) CN109936457B (en)
WO (1) WO2020168937A1 (en)

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112118112A (en) * 2020-09-08 2020-12-22 中国联合网络通信集团有限公司 Certificate copy using method and node equipment
CN112738244A (en) * 2020-12-29 2021-04-30 合肥达朴汇联科技有限公司 Block chain audit traceability system
CN113032489A (en) * 2021-03-29 2021-06-25 湖北央中巨石信息技术有限公司 Asynchronous consensus method, system, device and medium based on block chain
CN113076376A (en) * 2021-03-29 2021-07-06 湖北央中巨石信息技术有限公司 Multi-party asynchronous sampling consensus method, system, device and medium based on block chain
CN113225191A (en) * 2021-03-24 2021-08-06 湖南宸瀚信息科技有限责任公司 Method and device for generating consensus node, storage medium and processor
CN113378144A (en) * 2021-07-14 2021-09-10 湖北央中巨石信息技术有限公司 Image file consensus method, system, device and medium based on block chain
CN113468574A (en) * 2021-07-21 2021-10-01 招商华软信息有限公司 Block chain data uplink method and device
CN113722137A (en) * 2021-08-26 2021-11-30 杭州优海信息系统有限公司 Method and device for sharing fault repair scheme of industrial intelligent device
CN113904869A (en) * 2021-11-10 2022-01-07 深圳前海微众银行股份有限公司 Method for detecting malicious node in block chain and block chain
CN114422970A (en) * 2020-10-28 2022-04-29 中国联合网络通信集团有限公司 Short message tracing method, device and equipment
CN114819932A (en) * 2020-09-21 2022-07-29 支付宝(杭州)信息技术有限公司 Service processing method and device based on block chain
CN115147133A (en) * 2022-07-04 2022-10-04 南京邮电大学 Block chain technology-based geographical indication product source tracing position proving method
WO2024055407A1 (en) * 2022-09-14 2024-03-21 中化现代农业有限公司 Internet of things data on-chain method and system based on terminal device
CN113904869B (en) * 2021-11-10 2024-04-19 深圳前海微众银行股份有限公司 Method for detecting malicious nodes in blockchain and blockchain

Families Citing this family (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109936457B (en) * 2019-02-20 2022-04-26 深圳前海微众银行股份有限公司 Block chain multi-party witness method, device, equipment and computer readable storage medium
CN110458560B (en) * 2019-07-12 2021-10-12 创新先进技术有限公司 Method and apparatus for transaction verification
US10951417B2 (en) 2019-07-12 2021-03-16 Advanced New Technologies Co., Ltd. Blockchain-based transaction verification
CN110659906B (en) * 2019-09-20 2022-06-24 腾讯科技(深圳)有限公司 Bill information processing method, related device and medium
CN110688410B (en) * 2019-09-23 2021-03-19 创新先进技术有限公司 Suggestion processing method and device based on block chain and electronic equipment
CN110689349B (en) * 2019-10-08 2023-07-11 深圳前海微众银行股份有限公司 Transaction hash value storage and searching method and device in blockchain
CN112769742A (en) * 2019-11-06 2021-05-07 电科云(北京)科技有限公司 Message verification method, device and storage medium in SPDZ series protocol
CN112700248B (en) * 2020-07-03 2022-09-02 支付宝(杭州)信息技术有限公司 Block chain consensus method, device and system based on Byzantine fault-tolerant algorithm
CN112422290A (en) * 2020-10-27 2021-02-26 中思博安科技(北京)有限公司 Block chain-based data uplink method, device and system
CN112270556A (en) * 2020-11-23 2021-01-26 苏州园启软件有限公司 Method for verifying authenticity of electronic contract, electronic device and storage medium
CN112380555B (en) * 2020-11-27 2024-03-12 南京知麦信息科技有限公司 Agricultural product traceability information uplink method based on blockchain intelligent contract
CN112488656A (en) * 2020-12-04 2021-03-12 紫绶(上海)信息科技有限公司 Method, device, processor and storage medium for realizing peer-to-peer multi-party digital service universe management based on block chain
CN112564972B (en) * 2020-12-09 2022-04-05 华东师范大学 Formalized modeling and security verification method of block chain PBFT consensus algorithm based on Event-B method
CN112766979A (en) * 2021-01-26 2021-05-07 特斯联科技集团有限公司 Rapid electronic payment method and device
CN112560072B (en) * 2021-02-18 2021-06-04 腾讯科技(深圳)有限公司 Key management method, device, medium and equipment based on block chain
CN113255001B (en) * 2021-06-09 2023-05-23 湖北央中巨石信息技术有限公司 Block chain-based calculation accounting method, system and device and medium
CN114338728B (en) * 2022-03-15 2022-06-10 杭州费尔斯通科技有限公司 Consensus method and system based on shared data
CN115941191B (en) * 2022-08-24 2023-09-22 明启智能科技(广东)有限公司 Generation and verification method for non-consensus blocks in block chain and witness nodes

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108848056A (en) * 2018-05-03 2018-11-20 南京理工大学 Block chain common recognition method based on verifying
US20180359096A1 (en) * 2017-06-09 2018-12-13 Ecole Polytechnique Federale De Lausanne (Epfl) Cryptographically Verifiable Data Structure Having Multi-Hop Forward and Backwards Links and Associated Systems and Methods
CN109002732A (en) * 2018-07-17 2018-12-14 深圳前海微众银行股份有限公司 Data deposit card method, apparatus and system and data evidence collecting method
CN109936457A (en) * 2019-02-20 2019-06-25 深圳前海微众银行股份有限公司 Block chain witnesses method, apparatus, equipment and computer readable storage medium in many ways

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109165944B (en) * 2018-08-21 2021-01-26 京东数字科技控股有限公司 Multi-party signature authentication method, device, equipment and storage medium based on block chain

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180359096A1 (en) * 2017-06-09 2018-12-13 Ecole Polytechnique Federale De Lausanne (Epfl) Cryptographically Verifiable Data Structure Having Multi-Hop Forward and Backwards Links and Associated Systems and Methods
CN108848056A (en) * 2018-05-03 2018-11-20 南京理工大学 Block chain common recognition method based on verifying
CN109002732A (en) * 2018-07-17 2018-12-14 深圳前海微众银行股份有限公司 Data deposit card method, apparatus and system and data evidence collecting method
CN109936457A (en) * 2019-02-20 2019-06-25 深圳前海微众银行股份有限公司 Block chain witnesses method, apparatus, equipment and computer readable storage medium in many ways

Cited By (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112118112B (en) * 2020-09-08 2022-09-02 中国联合网络通信集团有限公司 Certificate copy using method and node equipment
CN112118112A (en) * 2020-09-08 2020-12-22 中国联合网络通信集团有限公司 Certificate copy using method and node equipment
CN114819932A (en) * 2020-09-21 2022-07-29 支付宝(杭州)信息技术有限公司 Service processing method and device based on block chain
CN114422970A (en) * 2020-10-28 2022-04-29 中国联合网络通信集团有限公司 Short message tracing method, device and equipment
CN114422970B (en) * 2020-10-28 2023-06-27 中国联合网络通信集团有限公司 Short message tracing method, device and equipment
CN112738244B (en) * 2020-12-29 2022-06-24 合肥达朴汇联科技有限公司 Block chain audit traceability system
CN112738244A (en) * 2020-12-29 2021-04-30 合肥达朴汇联科技有限公司 Block chain audit traceability system
CN113225191A (en) * 2021-03-24 2021-08-06 湖南宸瀚信息科技有限责任公司 Method and device for generating consensus node, storage medium and processor
CN113225191B (en) * 2021-03-24 2024-02-13 湖南宸瀚信息科技有限责任公司 Generation method and device of consensus node, storage medium and processor
CN113032489A (en) * 2021-03-29 2021-06-25 湖北央中巨石信息技术有限公司 Asynchronous consensus method, system, device and medium based on block chain
CN113076376A (en) * 2021-03-29 2021-07-06 湖北央中巨石信息技术有限公司 Multi-party asynchronous sampling consensus method, system, device and medium based on block chain
CN113076376B (en) * 2021-03-29 2024-02-06 湖北央中巨石信息技术有限公司 Multi-party asynchronous sampling consensus method, system and device based on block chain and medium
CN113378144A (en) * 2021-07-14 2021-09-10 湖北央中巨石信息技术有限公司 Image file consensus method, system, device and medium based on block chain
CN113378144B (en) * 2021-07-14 2022-09-02 湖北央中巨石信息技术有限公司 Image file consensus method, system, device and medium based on block chain
CN113468574A (en) * 2021-07-21 2021-10-01 招商华软信息有限公司 Block chain data uplink method and device
CN113722137A (en) * 2021-08-26 2021-11-30 杭州优海信息系统有限公司 Method and device for sharing fault repair scheme of industrial intelligent device
CN113904869A (en) * 2021-11-10 2022-01-07 深圳前海微众银行股份有限公司 Method for detecting malicious node in block chain and block chain
CN113904869B (en) * 2021-11-10 2024-04-19 深圳前海微众银行股份有限公司 Method for detecting malicious nodes in blockchain and blockchain
CN115147133A (en) * 2022-07-04 2022-10-04 南京邮电大学 Block chain technology-based geographical indication product source tracing position proving method
WO2024055407A1 (en) * 2022-09-14 2024-03-21 中化现代农业有限公司 Internet of things data on-chain method and system based on terminal device

Also Published As

Publication number Publication date
CN109936457A (en) 2019-06-25
CN109936457B (en) 2022-04-26

Similar Documents

Publication Publication Date Title
WO2020168937A1 (en) Block chain multi-party witness method, apparatus and device, and computer-readable storage medium
US20200235988A1 (en) Changing a master node in a blockchain system
US20220239496A1 (en) Blockchain consensus method, device and system
WO2022095244A1 (en) Cross-chain transaction method, system and apparatus, device, and storage medium
WO2023024742A1 (en) Data processing method and apparatus, and computer device and storage medium
CN110601816B (en) Lightweight node control method and device in block chain system
WO2020224239A1 (en) Block chain implementation method,device, system and storage medium
CN111314067A (en) Block storage method and device, computer equipment and storage medium
CN112600678B (en) Data processing method, device, equipment and storage medium
US20200250655A1 (en) Efficient, environmental and consumer friendly consensus method for cryptographic transactions
CN111211911B (en) Collaborative signature method, device, equipment and system
CN111275555B (en) Block chain transaction processing method, transaction node and block chain system
CN110096894B (en) Data anonymous sharing system and method based on block chain
CN111339116A (en) Block chain-based method for sharing open bank data
CN113255014B (en) Data processing method based on block chain and related equipment
CN113301114A (en) Block chain consensus node selection method and device, computer equipment and storage medium
CN116112187B (en) Remote proving method, device, equipment and readable storage medium
WO2022057106A1 (en) Credibility verification system for digital asset data packet
CN113902440A (en) Distributed key-based alliance chain cross-chain transaction method and device
US20230259930A1 (en) Cross-chain transaction processing method and apparatus, electronic device, and storage medium
Peng et al. Secure lightweight stream data outsourcing for internet of things
da Costa et al. Securing light clients in blockchain with DLCP
CN114418769A (en) Block chain transaction charging method and device and readable storage medium
JP5001968B2 (en) Certificate authority setting device and certificate authority setting method for setting a certificate authority that guarantees the validity of the public key of each user in a social network
CN111311412A (en) Decentralized transaction confirmation method and device and server

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: 20760249

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20760249

Country of ref document: EP

Kind code of ref document: A1