A blockchain endorsement method and device, an electronic device, and a storage medium

By aggregating endorsement signatures in the blockchain and generating target signatures, the problems of large data transmission volume and low verification efficiency in the blockchain endorsement process are solved, and efficient endorsement result verification is achieved.

CN117155574BActive Publication Date: 2026-06-26TENCENT TECHNOLOGY (SHENZHEN) CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
TENCENT TECHNOLOGY (SHENZHEN) CO LTD
Filing Date
2022-05-23
Publication Date
2026-06-26

AI Technical Summary

Technical Problem

In existing technologies, the problems of large data transmission volume and low verification efficiency in the blockchain endorsement process are mainly due to the fact that the triggering node needs to attach multiple endorsement signatures to the business proposal data set, and the consensus node needs to verify multiple endorsement signatures separately.

Method used

By deploying smart contracts in the blockchain, endorsement requests are initiated to a specified number of endorsing nodes. The obtained endorsement signatures are aggregated to generate the target endorsement signature, which is then sent to the consensus node for verification. The consensus node only needs to verify the target endorsement signature once to verify the results of multiple endorsing nodes.

Benefits of technology

This reduces the amount of data transmitted, improves the verification efficiency of blockchain endorsements, shortens the verification time, and enhances the overall verification efficiency of endorsement results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117155574B_ABST
    Figure CN117155574B_ABST
Patent Text Reader

Abstract

The embodiment of the application provides a blockchain endorsement method and device, electronic equipment and a storage medium. The method can be applied to an endorsement node in a blockchain. In the embodiment of the application, through a deployed smart contract and obtained business proposal, a corresponding endorsement request is initiated to a specified number of endorsement nodes in the blockchain, and when a specified number of endorsement signatures are obtained, each endorsement signature is aggregated to generate a corresponding target endorsement signature. In the subsequent signature verification process, the embodiment of the application can reflect that the current initiated business proposal has obtained the endorsement result of the M endorsement nodes for the business proposal based on the generated target endorsement signature, thereby reducing the transmission data amount of the business proposal in the network, shortening the long waiting time required in the subsequent signature verification process, and further improving the verification efficiency of the blockchain endorsement result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of blockchain technology, and in particular to a blockchain endorsement method, apparatus, electronic device, and storage medium. Background Technology

[0002] A blockchain is a distributed dataset that combines data blocks into a chain-like data structure and uses cryptography to ensure the security of its stored data. Smart contracts are a typical application of blockchain technology, aiming to achieve intelligent and efficient business scheduling among contract nodes on the chain by using specified computer program code embedded in the blockchain.

[0003] Specifically, see Figure 1 As shown, to enhance the credibility of a business proposal initiated in the blockchain, a specific endorsement strategy is typically set when the triggering node deploys the smart contract corresponding to the proposal. This strategy ensures that a specified number of endorsing nodes in the blockchain provide endorsement signatures for the proposal before its execution. Specifically, each application node in the blockchain with endorsement functionality can sign the current business proposal based on metadata (representing a randomly generated data unit) and its corresponding endorsement private key. The generated endorsement signature reflects the endorsement result of the corresponding endorsing node for the business proposal.

[0004] Based on this, the aforementioned triggering node can initiate corresponding scheduling requests to several endorsement nodes associated with it by specifying the title parameters of the business proposal, so as to further append the endorsement signatures of the multiple endorsement nodes in response to it to the data set corresponding to the aforementioned business proposal. Based on the above method, the consensus node in the blockchain can perform multiple verifications on the multiple endorsement signatures it obtains based on the endorsement public keys it carries, that is, verify the endorsement results of multiple endorsement nodes respectively according to the metadata carried by each endorsement signature and its corresponding endorsement public key.

[0005] However, the above-mentioned methods still have the following drawbacks in the relevant technologies:

[0006] 1) In the above process, the triggering node needs to attach the endorsement signatures of multiple endorsing nodes to the data set corresponding to the current business proposal in order to prove that the business proposal has been endorsed by a specified number of endorsing nodes. This method will increase the amount of data transmitted in the blockchain, thereby burdening the network transmission in the blockchain and affecting the verification efficiency of the endorsement results.

[0007] 2) After the consensus node receives the business proposal sent by the triggering node, it needs to verify the endorsement results of the multiple endorsement signatures it carries based on the multiple endorsement public keys it carries. This method usually results in a long endorsement verification process for the consensus node, which leads to low verification efficiency of blockchain endorsement in actual situations. Summary of the Invention

[0008] This application provides a method, apparatus, electronic device, and storage medium for obtaining blockchain endorsement results, which can improve the verification efficiency of blockchain endorsement results.

[0009] On one hand, embodiments of this application provide a blockchain endorsement method, which is applied to endorsement nodes in a blockchain that have smart contracts deployed. The method includes:

[0010] Obtain business proposals initiated by triggering nodes in the blockchain, where the business proposals contain information to be uploaded to the blockchain.

[0011] Based on smart contracts, endorsement requests for business proposals are initiated to N other endorsing nodes in the blockchain, and endorsement signatures of M endorsing nodes are obtained, where M∈[1,N], and each endorsement signature is obtained based on the endorsement private key carried by the corresponding endorsing node.

[0012] The obtained M endorsement signatures are aggregated to generate a corresponding target endorsement signature, wherein the target endorsement signature represents the endorsement result of the M endorsement nodes.

[0013] The business proposal carrying the target endorsement signature is sent to the consensus node in the blockchain, so that the consensus node can verify the target endorsement signature based on at least M pre-set endorsement public keys.

[0014] On one hand, embodiments of this application provide a blockchain endorsement device, which is applied to an endorsement node in a blockchain that has a smart contract deployed thereon. The device includes:

[0015] The acquisition module is used to obtain business proposals initiated by triggering nodes in the blockchain, where the business proposals contain information to be uploaded to the chain.

[0016] The acquisition module is used to initiate endorsement requests for business proposals to N other endorsing nodes in the blockchain based on smart contracts, and obtain the endorsement signatures of M endorsing nodes, where M∈[1,N], and each endorsement signature is obtained based on the endorsement private key carried by the corresponding endorsing node.

[0017] An aggregation module is used to aggregate the obtained M endorsement signatures to generate a corresponding target endorsement signature, wherein the target endorsement signature represents the endorsement result of the M endorsement nodes;

[0018] The delivery module is used to send the business proposal carrying the target endorsement signature to the consensus node in the blockchain, so that the consensus node can verify the endorsement results of the M endorsement nodes based on the preset at least M endorsement public keys.

[0019] Optionally, the business proposal may also include: the trigger signature of the trigger node for the business proposal;

[0020] When, based on a smart contract, an endorsement request for a business proposal is initiated to N other endorsing nodes in the blockchain, the data collection module is specifically used for:

[0021] Verify the trigger signature.

[0022] Upon successful signature verification, an endorsement request for the business proposal is initiated to N other endorsing nodes in the blockchain based on the smart contract.

[0023] Optionally, when aggregating the obtained M endorsement signatures to generate the corresponding target endorsement signature, the aggregation module is specifically used for:

[0024] The metadata carried by each of the M endorsement signatures is aggregated to obtain the corresponding target metadata, wherein each metadata represents: a random data unit generated by the corresponding endorsement node for the business proposal;

[0025] Based on the target metadata, the obtained M endorsement signatures are aggregated to generate the corresponding target endorsement signature.

[0026] Optionally, the target endorsement signature carries target metadata;

[0027] When a business proposal carrying the target endorsement signature is sent to the consensus node in the blockchain, the transmission module is specifically used for:

[0028] The business proposal carrying the target metadata and target endorsement signature is sent to the consensus node in the blockchain, so that the consensus node can obtain the corresponding verification public key based on at least M preset endorsement public keys, and then verify the endorsement results of the M endorsement nodes based on the target metadata and verification public key.

[0029] Optionally, before sending the target endorsement signature to at least one consensus node in the blockchain, the aggregation module is also used to:

[0030] Aggregate the node identifiers of M endorsing nodes to generate corresponding target identifier information, wherein each node identifier is associated with a preset endorsement public key;

[0031] When a business proposal carrying the target endorsement signature is sent to at least one consensus node in the blockchain, the transmission module is specifically used for:

[0032] A business proposal carrying target identification information and target endorsement signature is sent to at least one consensus node in the blockchain, so that at least one consensus node can obtain the corresponding M target endorsement public keys from at least M preset endorsement public keys based on the target identification information carried, and verify the target endorsement signature based on the M target endorsement public keys.

[0033] Optionally, when the consensus node successfully verifies the endorsement results of M endorsing nodes, it generates a business block containing the business proposal.

[0034] After sending the business proposal carrying the target endorsement signature to the consensus node in the blockchain, the transmission module is also used for:

[0035] Synchronize the business blocks.

[0036] Based on the synchronized business blocks, the execution result of the business proposal is obtained.

[0037] On one hand, embodiments of this application provide a computer device that stores a computer program executable by a blockchain endorsement method. When the program is run on the computer device, the computer device executes the steps of the blockchain endorsement method described above.

[0038] On the one hand, embodiments of this application provide a computer-readable storage medium storing a computer program executable by a computer device, which, when run on the computer device, causes the computer device to perform the steps of the blockchain endorsement method described above.

[0039] In one aspect, embodiments of this application also provide a computer program product that, when invoked by a computer, causes the computer to execute the method described in the first aspect.

[0040] This application provides a blockchain endorsement method, apparatus, electronic device, and storage medium. The method can be applied to endorsement nodes in a blockchain. Specifically, the endorsement nodes applied to the above method can initiate corresponding endorsement requests to a specified number of endorsement nodes in the blockchain through deployed smart contracts and obtained business proposals. When obtaining each endorsement signature in response, the nodes aggregate the endorsement signatures to generate a corresponding target endorsement signature and send the target endorsement signature to the consensus nodes in the blockchain, so that the consensus nodes can verify the endorsement results of the endorsement nodes.

[0041] Based on the above method, the embodiments of this application can aggregate multiple endorsement signatures and generate a corresponding target endorsement signature when multiple endorsement signatures are obtained. By attaching the target endorsement signature to the initiated business proposal, it can be proven that the business proposal has been endorsed by multiple endorsement nodes, avoiding the problem of increased data transmission caused by attaching multiple endorsement signatures at the same time. On the other hand, since the consensus node only needs to verify the target endorsement signature carried by the business proposal once after obtaining it, it can simultaneously verify the endorsement results of the multiple endorsement nodes, further avoiding the problem of long verification time caused by repeated verification of multiple endorsement signatures, thereby improving the verification efficiency of blockchain endorsement results. Attached Figure Description

[0042] Figure 1 A related technical schematic diagram provided for an embodiment of this application;

[0043] Figure 2A A schematic diagram of a data sharing system provided in an embodiment of this application;

[0044] Figure 2B A schematic diagram of a blockchain structure is provided for an embodiment of this application;

[0045] Figure 3 A schematic diagram of a blockchain system provided in this application embodiment;

[0046] Figure 4 A schematic diagram of key distribution provided in an embodiment of this application;

[0047] Figure 5 A flowchart of a blockchain endorsement method provided in this application embodiment;

[0048] Figure 6 A schematic diagram of an endorsement signature acquisition process provided in this application embodiment;

[0049] Figure 7 A schematic diagram illustrating a target endorsement signature acquisition process provided in this application embodiment;

[0050] Figure 8 This application provides a schematic diagram of a block generation process.

[0051] Figure 9 A logical diagram illustrating a blockchain endorsement scenario provided in this application embodiment;

[0052] Figure 10 A logical diagram illustrating another blockchain endorsement scenario provided in this application embodiment;

[0053] Figure 11 A schematic diagram of the structure of a blockchain endorsement device provided in this application embodiment;

[0054] Figure 12 This is a schematic diagram of an electronic device provided in an embodiment of this application. Detailed Implementation

[0055] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this invention.

[0056] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in sequences other than those illustrated or described herein.

[0057] The design concept of this application is as follows:

[0058] This application relates to the field of blockchain technology, in which blockchain technology is a distributed network data management technology that uses cryptography and distributed consensus protocols to ensure the security of network transmission and access.

[0059] In related technologies, to enhance the credibility of a business proposal constructed by a triggering node in a blockchain (i.e., to gain consensus among a majority of nodes in the chain), before the proposal is formally initiated, a scheduling request containing the corresponding proposal parameters must be constructed based on the deployed smart contract, and broadcast to the current cluster of endorsing nodes in the blockchain. Furthermore, each endorsing node in the blockchain that receives the current scheduling request can generate a corresponding endorsement signature based on randomly generated data units and the corresponding endorsement private key, reflecting the endorsing node's endorsement of the business proposal.

[0060] Based on the above process, when the triggering node obtains a specified number of endorsement signatures, it needs to package them and attach them to the data set corresponding to the above business proposal. Then, by re-initiating the above business proposal, the triggering node will enable the consensus node cluster that receives the business proposal to verify the endorsement results of multiple endorsement nodes in turn based on the endorsement public key it carries and the multiple endorsement signatures it has received.

[0061] However, based on the above process, the following defects still exist:

[0062] 1) In the above process, the triggering node needs to attach the endorsement signatures of multiple endorsing nodes to the data set corresponding to the current business proposal in order to prove that the business proposal has been endorsed by a specified number of endorsing nodes. This method will increase the amount of data transmitted in the blockchain, thereby burdening the network transmission in the blockchain and affecting the verification efficiency of the endorsement results.

[0063] 2) After the consensus node receives the business proposal sent by the triggering node, it needs to verify the endorsement results of the multiple endorsement signatures it carries based on the multiple endorsement public keys it carries. This method usually results in a long endorsement verification process for the consensus node, which leads to low verification efficiency of blockchain endorsement in actual situations.

[0064] To improve the endorsement efficiency of blockchain, this application proposes a blockchain endorsement method, apparatus, electronic device, and storage medium. The method can be applied to endorsement nodes in the blockchain. Specifically, through a deployed smart contract and a obtained business proposal, a corresponding endorsement request is initiated to a specified number of endorsement nodes in the blockchain. When obtaining each endorsement signature in response, the endorsement signatures are aggregated to generate a corresponding target endorsement signature. The target endorsement signature, representing the endorsement results of multiple endorsement nodes, is then sent to a consensus node in the blockchain, enabling the consensus node to verify the endorsement results of multiple endorsement nodes step by step.

[0065] Based on the above method, this application embodiment can reflect the endorsement results of multiple endorsement nodes by attaching a generated target endorsement signature to the initiated business proposal, thus avoiding the problem of increased data transmission volume caused by attaching multiple endorsement signatures together. On the other hand, since the consensus node in the blockchain only needs to aggregate the preset endorsement public key, it can verify the endorsement results of multiple endorsement nodes at once based on the aggregated verification public key, which greatly shortens the problem of long verification time for the endorsement results of multiple endorsement nodes, thereby improving the verification efficiency of the blockchain endorsement results.

[0066] The following provides examples of application scenarios applicable to the blockchain endorsement method in this application embodiment. (See attached document.) Figure 2A As shown, it is a schematic diagram of an application scenario applicable to the embodiments of this application, which includes a data sharing system deployed with blockchain.

[0067] See Figure 2AThe data sharing system shown is used for data sharing between nodes. This system can include multiple nodes 202, which can refer to various clients within the system. Each node 202, during normal operation, receives input information and maintains the shared data within the system based on this information. To ensure interoperability within the system, information connections exist between each node, allowing for information transmission. For example, when any node in the system receives input information, other nodes retrieve this input information according to a consensus algorithm and store it as part of the shared data, ensuring data consistency across all nodes.

[0068] Each node in the data sharing system has a corresponding node identifier. Furthermore, each node can store the node identifiers of other nodes in the data sharing system, so that generated blocks can be broadcast to other nodes in the system based on their node identifiers. Each node can maintain a node identifier list as shown in the table below, storing the node name and node identifier in this list. The node identifier can be an IP (Internet Protocol) address or any other information that can be used to identify the node. Table 1 only uses the node sequence number as an example.

[0069] Table 1

[0070] Node Name Node identifier Node 1 1 Node 2 2 … … Node N N

[0071] Each node in the data-sharing system stores the same blockchain. A blockchain consists of multiple blocks; see [link to blockchain documentation]. Figure 2B A blockchain consists of multiple blocks. The genesis block includes a block header and a block body. The block header stores input information feature values, version number, timestamp, and difficulty value, while the block body stores the input information. The next block after the genesis block takes the genesis block as its parent block. The next block also includes a block header and a block body. The block header stores the input information feature values ​​of the current block, the block header feature values ​​of the parent block, version number, timestamp, and difficulty value, and so on. This ensures that the block data stored in each block is related to the block data stored in the parent block, guaranteeing the security of the input information in the blocks.

[0072] In the aforementioned data sharing system, any machine, such as a server or terminal, can join and become a node. This node can be located in the application layer of the blockchain and is used to implement specific business according to actual business needs. It records data related to the implementation of functions to form record data, carries a digital signature in the record data to indicate the source of the task data, and sends the record data to other nodes in the data sharing system. When other nodes successfully verify the source and integrity of the record data (i.e., reach a data consensus), they add the record data to a temporary block.

[0073] Specifically, in the aforementioned data sharing system, the business functions of the nodes may include:

[0074] 1) Key generation is used to generate specific public and private key pairs for each node in the data sharing system, so that each node can achieve data consensus on specified business proposals by other nodes in the subsequent process based on its public system parameters and the corresponding public and private key pairs it carries.

[0075] 2) Proposal sharing is used to build and initiate business proposals for a specific business function. The business proposal can contain a specified business type to represent the query or modification operations performed on the specified business data stored therein.

[0076] 3) Endorsement, used to obtain the pre-execution result of the above business proposal, and based on the obtained pre-execution result, to generate an endorsement signature for the business proposal. Specifically, the endorsement signature can be generated based on the system parameters published by the above public node and the corresponding endorsement private key it carries.

[0077] In an optional embodiment, one of the endorsement nodes in the aforementioned data sharing system with endorsement functionality can act as a proxy endorsement node to collect endorsement signatures from a specified number of other endorsement nodes in the blockchain when the aforementioned business proposal is initiated, thereby reducing the operational pressure on the triggering node.

[0078] 4) Consensus is used to verify the endorsement signature carried in subsequent business proposals to determine the data source and integrity of the current business proposal. Optionally, when the verification is successful, the consensus node can add the corresponding business data to the specified temporary block.

[0079] It is worth noting that each system node mentioned above only represents a business function possessed by the corresponding physical node in the actual scenario, and does not represent the physical node itself. Therefore, in an optional embodiment, each physical node may also actually carry one or more business functions specified above. For example, it may simultaneously have the two different business functions of endorsement and consensus mentioned above, so as to be used as a corresponding endorsement node and consensus node in this application embodiment.

[0080] For example, in one alternative embodiment, it is assumed that the above data sharing system contains 10 physical nodes (node ​​1-node 10), and the business functions of each node are shown in Table 2 below:

[0081] Table 2

[0082] Node Name Business Functions Node 1 Key generation Node 2 Proposal sharing Nodes 3-6 endorsement Nodes 7-10 consensus

[0083] Based on the business functions shown in Table 2 above, please refer to... Figure 3 The diagram shown is a schematic of a blockchain system corresponding to the aforementioned data sharing system. The system includes a key generation node 301, a triggering node 302, an endorsement node 303, and a consensus node 304.

[0084] In an optional embodiment, the aforementioned blockchain system may include smart contracts. These smart contracts, implemented through code deployed on the blockchain and executed when certain conditions are met, represent the execution of contractual terms between specific nodes, such as the endorsement strategy for trigger node 302. Specifically, the smart contract can be represented as follows: when trigger node 302 initiates a business proposal, it needs to obtain endorsement signatures from a specified number of endorsing nodes in the blockchain. It is worth noting that in practical scenarios, the aforementioned smart contract is not limited to executing contracts for specifying business proposals; it can also execute contracts for processing received information.

[0085] In one alternative embodiment, see [reference] Figure 4 As shown, before triggering node 302 initiates a business proposal, key generating node 301 can use a specific key generation algorithm to generate and distribute a specific public-private key pair for each other node in the blockchain. <x i ,y i >(x i This represents the private key carried by other nodes, y i The public key pair represents the public key carried by the corresponding other node (where i represents the node name of the corresponding other node); optionally, the aforementioned other nodes include, but are not limited to, the triggering node, the endorsing node, or other combinations of nodes mentioned above, and this application does not impose any restrictions on this; specifically, in the embodiments of this application, the aforementioned public-private key pair can be obtained in the following ways:

[0086] x i ∈[1,p-1]

[0087]

[0088] Where p is a large prime number that makes it infeasible to compute discrete logarithms on GF(p), g is the primitive of GF(p), and GF(p) is a specified prime field. Based on the above formula, the key generation node 301 can generate and distribute a specific public-private key pair for each other node in the blockchain system, and publish the above system parameters p and g along with a preset secure hash function H to each other node in the system as the basic condition for node consensus in the blockchain.

[0089] Furthermore, based on the above Figure 3 The blockchain system shown in this application provides a blockchain endorsement method. This method can be executed by a designated endorsement node with endorsement function in the blockchain system. For ease of description, this application embodiment refers to node 3 as a designated proxy endorsement node. See reference... Figure 5 As shown, the method includes:

[0090] S501: Obtain a business proposal initiated by a trigger node in the blockchain.

[0091] Specifically, the aforementioned business proposal represents a transaction proposal initiated by the triggering node that contains information to be uploaded to the blockchain, such as a shared ledger.

[0092] In an optional embodiment, the business proposal may further include a trigger signature of the triggering node for the current business proposal. The trigger signature may be obtained based on the triggering private key carried by the triggering node and the business parameters of the aforementioned business proposal, so as to be used by the proxy endorsing node to verify the trigger signature carried therein when it receives the initiated business proposal, and to determine the legality of the triggering node's own signature.

[0093] In an optional embodiment, the business proposal may further include the business type corresponding to the current proposal. For example, in this embodiment, the business type may be represented as a "read" business type and a "write" business type, respectively. The "read" business type is used to characterize the query operation performed by the current business proposal on the specified business data stored, and the "write" business type is used to characterize the modification operation performed by the current business proposal on the specified business data stored. When the business proposal sent by the current triggering node is obtained, the proxy endorsement node may respond to the endorsement operation to be performed by the current business proposal based on the "write" business type it carries.

[0094] In an optional embodiment, the business proposal may also include a corresponding business timestamp to indicate the initiation time of the current business proposal.

[0095] For example, the aforementioned proxy endorsement node can receive business proposals initiated by the triggering node. <TRANSACTION,tx,ty,t,c j >σ cjWhere tx is the business entity of the business proposal, and c j The node name that triggers the event, <>σ cj This indicates the trigger signature corresponding to the trigger node, and ty is the business type of the business proposal, which is "write" business type.

[0096] S502: Based on a smart contract, initiate endorsement requests for a business proposal to N other endorsing nodes in the blockchain and obtain endorsement signatures from M endorsing nodes.

[0097] Specifically, when the proxy endorsing node successfully verifies the trigger signature and business timestamp carried in the business proposal, it can initiate an endorsement request for the business proposal to N other endorsing nodes in the blockchain based on the smart contract deployed in the blockchain system, so as to obtain the endorsement signatures of M endorsing nodes in the blockchain for the business proposal, where M∈[1,N], N is the number of endorsing nodes associated with the triggering node, and M is the number of endorsement signatures specified in the smart contract.

[0098] For example, see Figure 6 As shown, assuming the number of endorsement signatures specified in the smart contract is 3, when the corresponding signature and business timestamp verification are successfully triggered in the business proposal obtained by the proxy endorsement node, the corresponding endorsement request can be initiated to other endorsement nodes (nodes 4-6) in the blockchain based on the smart contract deployed in the blockchain shown in the figure. For ease of understanding, in this embodiment of the application, the broadcast method is adopted to simultaneously initiate endorsement requests to multiple other endorsement nodes, and the endorsement signatures of 3 arbitrary endorsement nodes are collected according to the deployed smart contract.

[0099] It can be understood that the endorsement nodes mentioned above can be other endorsement nodes (nodes 4-6) that initiated the endorsement request, or they can be proxy endorsement nodes that execute the current blockchain endorsement method. This application does not limit this.

[0100] In an optional embodiment, corresponding to the system parameters p and g disclosed by the aforementioned key generation node and the preset secure hash function H, the other endorsement or proxy endorsement nodes mentioned above can obtain the corresponding endorsement signatures in the following ways:

[0101]

[0102]

[0103] Where l represents the node identifier of the corresponding endorsement node, and k l k represents a random number corresponding to the endorsement node. l ∈[1,p-1], x lThis indicates that the endorsement private key carried by the corresponding endorsement node was obtained by the aforementioned key distribution node.

[0104] S503: Aggregate the obtained M endorsement signatures to generate the corresponding target endorsement signature.

[0105] Furthermore, after collecting a specified number of endorsement signatures from the smart contract, the M obtained endorsement signatures are aggregated based on a multi-signature algorithm to generate the corresponding target endorsement signature.

[0106] In an optional embodiment, corresponding to the system parameters p and g disclosed by the key generation node and the preset secure hash function H, the metadata r randomly generated by each endorsement node based on the business proposal can be used. l The obtained M endorsement signatures are aggregated to generate the corresponding target endorsement signature. Specifically, the metadata of the obtained M endorsement nodes can be aggregated, and the endorsement signatures of the M endorsement nodes can be aggregated based on the corresponding target metadata obtained from the aggregation operation to generate the corresponding target endorsement signature. Specifically, the target endorsement signature obtained from the above aggregation operation...<S,R> σ l As shown in the following formula.

[0107]

[0108]

[0109] Furthermore, based on the above method, the endorsement results of each endorser node are determined by the M endorsement signatures obtained through the proxy endorsement nodes, and the multiple endorsement results are converted into a single multi-endorsement signature, which can simultaneously represent the endorsement results of the M endorser nodes. Since the data volume of the target endorsement signature is much smaller than the total data volume of the original M endorsement signatures, the corresponding data volume is greatly reduced when the target endorsement signature is appended to the data set corresponding to the current business proposal, thus further improving the endorsement verification efficiency in the blockchain.

[0110] In one optional embodiment, before sending the target endorsement signature to the consensus nodes in the blockchain, the node identifiers of the M endorsement nodes can be aggregated to generate corresponding target identifier information. Each node identifier is associated with a preset endorsement public key. By further attaching the target identifier information to the data set corresponding to the current business proposal, each consensus node can determine the corresponding M target endorsement public keys based on the target identifier information it carries, and verify the endorsement results of the M endorsement nodes based on the verification public key obtained by aggregating the target endorsement public keys.

[0111] For example, see Figure 7As shown, assuming that in the above process, the endorsement signatures of the proxy endorsement node (node ​​3) and two endorsement nodes (node ​​4 and node 5) for the current business proposal are obtained, the proxy endorsement result can be aggregated based on the multiple endorsement signatures obtained to generate the corresponding target endorsement signature. Based on the node identifiers of each of the above endorsement nodes, the proxy endorsement node can further generate target identifier information representing the identifiers of multiple endorsement nodes, so that the subsequent consensus node can verify the generated target endorsement signature based on the target identifier information carried.

[0112] S504: Send the business proposal carrying the target endorsement signature to the consensus node in the blockchain so that the consensus node can verify the endorsement results of the M endorsement nodes based on the preset at least M endorsement public keys.

[0113] Furthermore, the proxy endorsing node broadcasts the business proposal carrying the target endorsement signature to the consensus node cluster in the blockchain. Optionally, it may also send the business proposal carrying the target endorsement signature to at least one designated consensus node in the cluster, so that the aforementioned at least one consensus node can make it public to the consensus node cluster in the blockchain through broadcasting or other means.

[0114] In an optional embodiment, corresponding to the system parameters p and g disclosed by the key generation node and the preset secure hash function H, the consensus node can determine the verification public key corresponding to the target endorsement signature in the following way:

[0115]

[0116] Among them, y l This represents the endorsement public key preset by the corresponding consensus node. This endorsement public key can be publicly obtained by the aforementioned key distribution node. In an optional embodiment, each endorsement public key is associated with the node identifier of the corresponding endorsement node. Then, each consensus node can determine and obtain each endorsement public key corresponding to the corresponding node identifier based on the obtained target identifier information, so as to aggregate the various endorsement public keys and obtain the corresponding verification public key.

[0117] Furthermore, after obtaining the verification public key, each consensus node verifies the target endorsement signature carried in the current business proposal based on the publicly available system parameters. In one optional embodiment, the target endorsement signature can be verified based on a configured verification equation, as shown below:

[0118] R R g S =Y RH(m) mod p

[0119] Wherein, R is the target metadata carried by the aforementioned target endorsement signature, S is the target endorsement signature corresponding to the M endorsement signatures, and p, g, and H are the aforementioned disclosed system parameters.

[0120] Based on the above method, consensus nodes can verify the endorsement results of multiple endorsement nodes simultaneously by verifying the target endorsement signature once through publicly available system parameters. This avoids the large waiting time caused by multiple verifications and further improves the endorsement verification efficiency of the blockchain.

[0121] For further details, please refer to [link / reference]. Figure 8 As shown, after the consensus node successfully verifies the target endorsement signature, it can generate a business block corresponding to the current business proposal through consensus algorithms such as Raft and PBFT, and place the business block into the currently configured blockchain. After the business block is on the chain, the aforementioned proxy endorsement node can further synchronize the latest block from the consensus node to obtain the execution result of the business proposal it initiated.

[0122] See Figure 9 The diagram shown is a logical schematic of a blockchain endorsement scenario provided in an embodiment of this application. The logical schematic includes a blockchain composed of multiple terminal devices or server devices, wherein each terminal device or server can be regarded as a corresponding blockchain node contained in the blockchain; it is assumed that the blockchain carries a smart contract that can be used to share the ledger.

[0123] As one example, in such Figure 9 In the blockchain endorsement scenario described above, the target object can construct and initiate a business proposal (TRANSACTION) for modifying its stored business data through a trigger node with proposal construction capabilities in the blockchain. By receiving endorsement operations from designated endorsing nodes, a specified number of endorsement signatures are collected and aggregated to ensure the target object's business proposal meets the endorsement policy configured in the blockchain. Furthermore, the endorser nodes, through the aggregated target endorsement signatures, reconstruct and initiate the corresponding business proposal. After the consensus node successfully verifies the target endorsement signature, a new block can be generated. Based on these steps, the target object can obtain the corresponding business execution result without needing to acquire the specified number of endorsement signatures itself.

[0124] See Figure 10 The diagram shown is a logical schematic of another blockchain endorsement scenario provided in this application embodiment. The logical schematic includes terminal devices added to the blockchain and multiple servers, wherein each terminal device or server can be regarded as a blockchain node included in the blockchain.

[0125] As another embodiment, in such Figure 10 In the other blockchain endorsement scenario shown above, based on the blockchain endorsement method proposed in this application embodiment, the terminal device can initiate a specified business proposal T without further signature collection. Instead, it can collect the endorsement signature s1 of the management server and aggregate the endorsement signature s2 generated by itself by having the logistics server receiving the business proposal endorse the business proposal. When the aggregation is successful, the generated target endorsement signature S is appended to the business proposal T and sent to the specified audit server.

[0126] Furthermore, in another embodiment described above, the audit server, based on the verification method proposed in this application, only needs to verify the received target endorsement signature S once to quickly determine the verification results of endorsement signatures s1 and s2. This method significantly improves the efficiency of endorsement operations before generating block B and further enhances the verification efficiency of endorsement signatures by consensus nodes in the blockchain, ensuring rapid consensus on the initiated business proposal. On the other hand, based on this method, terminal devices no longer need to perform excessive collection operations to quickly obtain the execution result of the current business proposal from the synchronized business block, thereby further improving the target object's business experience with the business executed on the blockchain.

[0127] Based on the application scenarios presented by the two embodiments above, it can be seen that the blockchain endorsement method proposed in this application can verify that the current business proposal has obtained the endorsement results of multiple endorsement nodes by generating a single target endorsement signature. This avoids the problem of increased data transmission caused by the joint attachment of multiple endorsement signatures, and improves the transmission rate of the current business proposal in the network. On the other hand, since the consensus node only needs to obtain the verification results of multiple endorsement results based on the aggregated verification public key, the verification time of endorsement signatures in the blockchain is greatly shortened, and the endorsement efficiency of the blockchain is improved.

[0128] Based on the same technical concept, this application provides a schematic diagram of the structure of a blockchain endorsement device, such as... Figure 11 As shown, the device 1100 includes:

[0129] The acquisition module 1101 is used to obtain business proposals initiated by triggering nodes in the blockchain, wherein the business proposals contain information to be uploaded to the blockchain.

[0130] The acquisition module 1102 is used to initiate endorsement requests for business proposals to N other endorsing nodes in the blockchain based on smart contracts, and obtain the endorsement signatures of M endorsing nodes, where M∈[1,N], and each endorsement signature is obtained based on the endorsement private key carried by the corresponding endorsing node.

[0131] The aggregation module 1103 is used to aggregate the obtained M endorsement signatures to generate a corresponding target endorsement signature, wherein the target endorsement signature represents the endorsement result of the M endorsement nodes;

[0132] The transmission module 1104 is used to send a business proposal carrying the target endorsement signature to a consensus node in the blockchain, so that the consensus node can verify the endorsement results of the M endorsement nodes based on a preset set of at least M endorsement public keys.

[0133] Optionally, the business proposal may also include: the trigger signature of the trigger node for the business proposal;

[0134] When, based on a smart contract, an endorsement request for a business proposal is initiated to N other endorsing nodes in the blockchain, the collection module 1102 is specifically used for:

[0135] Verify the trigger signature.

[0136] Upon successful signature verification, an endorsement request for the business proposal is initiated to N other endorsing nodes in the blockchain based on the smart contract.

[0137] Optionally, when aggregating the obtained M endorsement signatures to generate the corresponding target endorsement signature, the aggregation module 1103 is specifically used for:

[0138] The metadata carried by each of the M endorsement signatures is aggregated to obtain the corresponding target metadata, wherein each metadata represents: a random data unit generated by the corresponding endorsement node for the business proposal;

[0139] Based on the target metadata, the obtained M endorsement signatures are aggregated to generate the corresponding target endorsement signature.

[0140] Optionally, the target endorsement signature carries target metadata;

[0141] When sending a business proposal carrying the target endorsement signature to the consensus node in the blockchain, the transmission module 1104 is specifically used for:

[0142] The business proposal carrying the target metadata and target endorsement signature is sent to the consensus node in the blockchain, so that the consensus node can obtain the corresponding verification public key based on at least M preset endorsement public keys, and then verify the endorsement results of the M endorsement nodes based on the target metadata and verification public key.

[0143] Optionally, before sending the target endorsement signature to at least one consensus node in the blockchain, the aggregation module 1103 is also used to:

[0144] Aggregate the node identifiers of M endorsing nodes to generate corresponding target identifier information, wherein each node identifier is associated with a preset endorsement public key;

[0145] When sending a business proposal carrying the target endorsement signature to at least one consensus node in the blockchain, the transmission module 1104 is specifically used for:

[0146] A business proposal carrying target identification information and target endorsement signature is sent to at least one consensus node in the blockchain, so that at least one consensus node can obtain the corresponding M target endorsement public keys from at least M preset endorsement public keys based on the target identification information carried, and verify the target endorsement signature based on the M target endorsement public keys.

[0147] Optionally, when the consensus node successfully verifies the endorsement results of M endorsing nodes, it generates a business block containing the business proposal.

[0148] After sending the business proposal carrying the target endorsement signature to the consensus node in the blockchain, the transmission module 1104 is also used for:

[0149] Synchronize the business blocks.

[0150] Based on the synchronized business blocks, the execution result of the business proposal is obtained.

[0151] This application provides a blockchain endorsement method, apparatus, electronic device, and storage medium. The method can be applied to endorsement nodes in a blockchain. Specifically, the endorsement nodes applied to the above method can initiate corresponding endorsement requests to a specified number of endorsement nodes in the blockchain through deployed smart contracts and obtained business proposals. When obtaining each endorsement signature in response, the nodes aggregate the endorsement signatures to generate a corresponding target endorsement signature and send the target endorsement signature to the consensus nodes in the blockchain, so that the consensus nodes can verify the endorsement results of the endorsement nodes.

[0152] Based on the above method, the embodiments of this application can aggregate multiple endorsement signatures and generate a corresponding target endorsement signature when multiple endorsement signatures are obtained. By attaching the target endorsement signature to the initiated business proposal, it can be proven that the business proposal has been endorsed by multiple endorsement nodes, avoiding the problem of increased data transmission caused by attaching multiple endorsement signatures at the same time. On the other hand, since the consensus node only needs to verify the target endorsement signature carried by the business proposal once after obtaining it, it can simultaneously verify the endorsement results of the multiple endorsement nodes, further avoiding the problem of long verification time caused by repeated verification of multiple endorsement signatures, thereby improving the endorsement efficiency of the blockchain.

[0153] Based on the same technical concept, embodiments of this application provide a computer device, which may be a terminal device and / or a server, such as... Figure 12 As shown, it includes at least one processor 1201 and a memory 1202 connected to at least one processor. In this embodiment, the specific connection medium between the processor 1201 and the memory 1202 is not limited. Figure 12 Taking the connection between processor 1201 and memory 1202 via a bus as an example, the bus can be divided into address bus, data bus, control bus, etc.

[0154] In this embodiment of the application, the memory 1202 stores instructions that can be executed by at least one processor 1201. By executing the instructions stored in the memory 1202, at least one processor 1201 can perform the steps of the blockchain endorsement method described above.

[0155] The processor 1201 serves as the control center of the computer device, connecting various parts of the device via interfaces and lines. It enables blockchain endorsement by running or executing instructions stored in the memory 1202 and accessing data stored in the memory 1202. Optionally, the processor 1201 may include one or more processing units. The processor 1201 may integrate an application processor and a modem processor. The application processor primarily handles the operating system, user interface, and applications, while the modem processor primarily handles wireless communication. It is understood that the modem processor may not be integrated into the processor 1201. In some embodiments, the processor 1201 and the memory 1202 may be implemented on the same chip; in other embodiments, they may be implemented on separate chips.

[0156] Processor 1201 can be a general-purpose processor, such as a central processing unit (CPU), digital signal processor, application-specific integrated circuit (ASIC), field-programmable gate array (FPGA), or other programmable logic device, discrete gate or transistor logic device, or discrete hardware component, capable of implementing or executing the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly manifested as being executed by a hardware processor, or executed by a combination of hardware and software modules within the processor.

[0157] Memory 1202, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules. Memory 1202 may include at least one type of storage medium, such as flash memory, hard disk, multimedia card, card-type memory, random access memory (RAM), static random access memory (SRAM), programmable read-only memory (PROM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), magnetic memory, magnetic disk, optical disk, etc. Memory 1202 can be any other medium capable of carrying or storing desired program code in the form of instructions or data structures that can be accessed by a computer, but is not limited thereto. In the embodiments of this application, memory 1202 can also be a circuit or any other device capable of implementing storage functions for storing program instructions and / or data.

[0158] Based on the same inventive concept, embodiments of this application provide a computer-readable storage medium storing a computer program executable by a computer device, which, when run on the computer device, causes the computer device to perform the steps of the above-described blockchain endorsement method.

[0159] Based on the same inventive concept, this application provides a computer program product, which includes a computer program stored on a computer-readable storage medium. The computer program includes program instructions, which, when executed by a computer, cause the computer to perform the steps of the above-described blockchain endorsement method.

[0160] Those skilled in the art will understand that embodiments of the present invention can be provided as methods or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0161] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0162] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0163] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0164] Although preferred embodiments of the invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including both the preferred embodiments and all changes and modifications falling within the scope of the invention.

[0165] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include these modifications and variations.

Claims

1. A blockchain endorsement method, characterized in that, This is applied to endorsement nodes that have smart contracts deployed in a blockchain, including: Obtain a business proposal initiated by a triggering node in the blockchain, wherein the business proposal contains information to be uploaded to the blockchain; Based on the smart contract, endorsement requests for the business proposal are initiated to N other endorsing nodes in the blockchain, and endorsement signatures of M endorsing nodes are obtained, where M∈[1,N], and each endorsement signature is obtained based on the endorsement private key carried by the corresponding endorsing node. The metadata carried by each of the M endorsement signatures is aggregated to obtain the corresponding target metadata, wherein each metadata represents: a random data unit generated by the corresponding endorsement node for the business proposal; Based on the target metadata, the M endorsement signatures are aggregated to generate a corresponding target endorsement signature; wherein, the target endorsement signature represents the endorsement result of the M endorsement nodes; The business proposal carrying the target endorsement signature is sent to the consensus node in the blockchain, so that the consensus node verifies the endorsement results of the M endorsement nodes based on at least M preset endorsement public keys.

2. The method as described in claim 1, characterized in that, The business proposal also includes: the trigger signature of the triggering node for the business proposal; The step of initiating endorsement requests for the business proposal to N other endorsing nodes in the blockchain based on the smart contract includes: Verify the trigger signature; Upon successful signature verification, based on the smart contract, endorsement requests for the business proposal are initiated to N other endorsing nodes in the blockchain.

3. The method as described in claim 1, characterized in that, The target endorsement signature carries target metadata; The step of sending the business proposal carrying the target endorsement signature to the consensus node in the blockchain includes: The business proposal carrying the target metadata and the target endorsement signature is sent to the consensus node in the blockchain, so that the consensus node obtains the corresponding verification public key based on at least M preset endorsement public keys, and then verifies the endorsement results of the M endorsement nodes based on the target metadata and the verification public key.

4. The method according to any one of claims 1-3, characterized in that, Before sending the target endorsement signature to the consensus node in the blockchain, the method further includes: Aggregate the node identifiers of M endorsing nodes to generate corresponding target identifier information, wherein each node identifier is associated with a preset endorsement public key; The step of sending the business proposal carrying the target endorsement signature to the consensus node in the blockchain includes: The business proposal carrying the target identification information and the target endorsement signature is sent to the consensus node in the blockchain, so that the consensus node can obtain the corresponding M target endorsement public keys from at least M preset endorsement public keys based on the target identification information carried, and verify the endorsement results of the M endorsement nodes based on the M target endorsement public keys.

5. The method as described in claim 4, characterized in that, When the consensus node successfully verifies the endorsement results of the M endorsing nodes, it generates a business block containing the business proposal. After sending the business proposal carrying the target endorsement signature to the consensus node in the blockchain, the process further includes: Synchronize the aforementioned business blocks; Based on the synchronized business blocks, the execution result of the business proposal is obtained.

6. A blockchain endorsement device, characterized in that, This is applied to endorsement nodes that have smart contracts deployed in a blockchain, including: The acquisition module is used to obtain business proposals initiated by triggering nodes in the blockchain, wherein the business proposals contain information to be uploaded to the blockchain; The acquisition module is used to initiate endorsement requests for the business proposal to N other endorsing nodes in the blockchain based on the smart contract, and obtain the endorsement signatures of M endorsing nodes, where M∈[1,N], and each endorsement signature is obtained based on the endorsement private key carried by the corresponding endorsing node. The aggregation module is used to aggregate the metadata carried by each of the M endorsement signatures to obtain the corresponding target metadata, wherein each metadata represents: a random data unit generated by the corresponding endorsement node for the business proposal; Based on the target metadata, the M endorsement signatures are aggregated to generate a corresponding target endorsement signature; wherein, the target endorsement signature represents the endorsement result of the M endorsement nodes; The transmission module is used to send the business proposal carrying the target endorsement signature to the consensus node in the blockchain, so that the consensus node can verify the endorsement results of the M endorsement nodes based on at least M preset endorsement public keys.

7. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps of any of the methods described in claims 1-5.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that, when executed on a computer, cause the computer to perform the method as described in any one of claims 1-5.

9. A computer program product, characterized in that, When the computer program product is invoked by a computer, it causes the computer to perform the method as described in any one of claims 1-5.