WO2019185066A1 - 一种区块链背书方法及装置 - Google Patents

一种区块链背书方法及装置 Download PDF

Info

Publication number
WO2019185066A1
WO2019185066A1 PCT/CN2019/080734 CN2019080734W WO2019185066A1 WO 2019185066 A1 WO2019185066 A1 WO 2019185066A1 CN 2019080734 W CN2019080734 W CN 2019080734W WO 2019185066 A1 WO2019185066 A1 WO 2019185066A1
Authority
WO
WIPO (PCT)
Prior art keywords
version
transaction
identifier
information
endorsement
Prior art date
Application number
PCT/CN2019/080734
Other languages
English (en)
French (fr)
Inventor
丁健
曹朝
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2019185066A1 publication Critical patent/WO2019185066A1/zh

Links

Images

Classifications

    • 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

  • the present application relates to the field of blockchain, and in particular to a blockchain endorsement method and apparatus.
  • a blockchain is a chained data structure that combines data blocks in a sequential manner and is cryptographically guaranteed to be non-tamperable and unforgeable distributed ledgers.
  • a smart contract is a typical application of blockchain technology. It is essentially a coded instance of a contract between two parties, based on a replicable, shared distributed ledger, and executed in accordance with the terms of the trading contract.
  • the trigger condition or execution result of the smart contract may depend on the information outside the contract content, that is, the transaction auxiliary information, that is, the transaction auxiliary information is used to assist the execution of the smart contract.
  • the transaction auxiliary information that is, the transaction auxiliary information is used to assist the execution of the smart contract.
  • the exchange between different currencies needs to be completed according to real-time exchange rate pricing, and the real-time exchange rate is the transaction auxiliary information of the currency exchange contract. It can be seen that the input of reasonable transaction assistance information is the key to ensure the correct execution of the smart contract.
  • the traditional technology obtains the transaction auxiliary information in real time according to the information acquisition request generated by the endorsing peer, and the transaction auxiliary information acquired by different endorsement nodes is different, resulting in different endorsement nodes to the smart contract.
  • the results of the implementation are also different, affecting the success rate and efficiency of the transaction.
  • the embodiment of the present invention provides a blockchain endorsement method and device, which can solve different transaction auxiliary information acquired by different endorsement nodes, and result in different execution results of different endorsement nodes on smart contracts, affecting the success rate and efficiency of transactions.
  • the problem can solve different transaction auxiliary information acquired by different endorsement nodes, and result in different execution results of different endorsement nodes on smart contracts, affecting the success rate and efficiency of transactions. The problem.
  • a blockchain endorsement method comprising:
  • each endorsement node can endorse the smart contract by using the target version of the transaction assistance information, that is, each endorsement node uses the same transaction auxiliary information to endorse the smart contract, so the execution result of each endorsement node on the smart contract The same, thereby increasing the success rate and efficiency of the transaction.
  • the determining the target version from the plurality of versions includes: determining, in the transaction auxiliary information of the several versions, the version with the earliest acquisition time as the one target version. Since the transaction auxiliary information of the target version is the transaction auxiliary information with the earliest acquisition time in each version, it is ensured that the transaction auxiliary information finally participating in the endorsement is determined as soon as possible after the member node initiates the transaction request, so that the smart contract can be endorsed as soon as possible. To ensure the timeliness of the transaction.
  • the determining a target version from the plurality of versions includes: signing, by using an identifier of an endorsement node, the transaction assistance information of the plurality of versions, and the version with the highest number of signatures
  • the endorsement node is a node that endorses the smart contract with transaction assistance information of the one target version.
  • the transaction auxiliary information is considered to be the transaction auxiliary information approved by the endorsement node.
  • the transaction auxiliary information of the version with the most signatures corresponds to the maximum number of endorsement nodes that recognize the transaction auxiliary information, that is, the transaction auxiliary information has the highest degree of recognition. Using the most recognized transaction auxiliary information as the auxiliary information of the target version, and using the target version of the transaction auxiliary information to endorse the smart contract, the fairness of the transaction can be guaranteed.
  • the determining that the version with the most number of signatures is the one target version comprises: determining a version with the highest number of signatures and not lower than the first preset number as the target version.
  • the first preset number of times is greater than or equal to the minimum number of signatures required to implement endorsement of the smart contract.
  • the transaction auxiliary information indicating the target version has the highest recognition degree, and the recognition degree is not lower than a certain threshold, so that the target version is utilized.
  • the transaction assistance information endorses the smart contract, which can further ensure the fairness of the transaction.
  • the identifier of the plurality of versions of the transaction assistance information is signed by using an identifier of the endorsement node, and the version with the maximum number of signatures and not lower than the first preset number of times is determined as the one
  • the target version includes: for each endorsement node identifier, using the identifier of the endorsement node, respectively, to sign the transaction auxiliary information of the version corresponding to the identifier of the endorsement node in the plurality of versions; if the plurality of versions of the transaction If the target version does not appear in the auxiliary information, and the total number of signatures is greater than or equal to the first preset number of times, traversing each version of the transaction auxiliary information in the candidate version set, wherein the candidate version set includes a signed version of the transaction assistance information; for each version of the candidate transaction information in the candidate version set, traversing the identifier of the signed endorsement node in a preset order, if the current version of the transaction assistance information is not current An identification signature of the endorsement node, using the identifier
  • the method further includes: using the next version of the transaction assistance information as the current version of the transaction.
  • Auxiliary information performing the step of traversing the identifier of the signed endorsement node in a preset order, thereby determining that the degree of recognition is the highest from the plurality of versions of the transaction assistance information, and the recognition degree is not lower than a certain threshold Target version.
  • the signing by using the identifier of the endorsement node, the transaction auxiliary information of the version corresponding to the endorsement node in the plurality of versions, respectively: using the identifier of the endorsement node, respectively
  • the latest version of the transaction assistance information corresponding to the signature in several versions is signed.
  • the number of signatures of the transaction auxiliary information of each version is determined, and the transaction auxiliary information of the target version is further determined.
  • the traversing each version of the transaction auxiliary information in the candidate version set includes: traversing each version of the transaction assistance in the candidate version set according to a version number from low to high or high to low information. Thereby, the number of signatures of the transaction auxiliary information of each version is determined, and the transaction auxiliary information of the target version is further determined.
  • the traversing the identifier of the signed endorsement node in a preset order comprises: signing the transaction assistance information corresponding to the corresponding version of the plurality of versions from morning to night Or traversing the identity of the signed endorsement node from late to early signature order.
  • the number of signatures of the transaction auxiliary information of each version is determined, and the transaction auxiliary information of the target version is further determined.
  • some combination methods are finally determined
  • the transaction assistance information of the target version is the transaction assistance information of the version in which the version number is relatively centered.
  • Some of the combination methods finally determine that the transaction auxiliary information of the target version is the transaction auxiliary information with the version number of the front or the back. In practical applications, one of the implementation methods can be selected according to actual needs.
  • a blockchain endorsement method comprising:
  • an information acquisition request from an endorsement node carrying a description of information required for endorsement of the smart contract; obtaining a plurality of versions of transaction assistance information according to the information description, and from the plurality of versions Determining a target version; transmitting, to the endorsement node, the transaction assistance information of the one target version, the transaction assistance information of the one target version being used by the endorsement node to endorse the smart contract.
  • Each endorsement node endorses the smart contract by using the target version of the transaction assistance information, that is, each endorsement node uses the same transaction auxiliary information to endorse the smart contract, so each endorsement node performs the same execution result on the tender contract, thereby improving the The success rate and efficiency of the transaction.
  • the determining the target version from the plurality of versions includes: determining, in the transaction auxiliary information of the several versions, the version with the earliest acquisition time as the one target version.
  • the determining, by using the identifier of the endorsement node, the transaction assistance information of the plurality of versions, and signing the signature The version is determined to be the one target version.
  • the determining that the version with the most number of signatures is the one target version comprises: determining a version with the highest number of signatures and not lower than the first preset number as the target version.
  • the first preset number of times is greater than or equal to the minimum number of signatures required to implement endorsement of the smart contract.
  • the identifier of the plurality of versions of the transaction assistance information is signed by using an identifier of the endorsement node, and the version with the maximum number of signatures and not lower than the first preset number of times is determined as the one
  • the target version includes: for each endorsement node identifier, using the identifier of the endorsement node, respectively, to sign the transaction auxiliary information of the version corresponding to the identifier of the endorsement node in the plurality of versions; if the plurality of versions of the transaction If the target version does not appear in the auxiliary information, and the total number of signatures is greater than or equal to the first preset number of times, traversing each version of the transaction auxiliary information in the candidate version set, wherein the candidate version set includes a signed version of the transaction assistance information; for each version of the candidate transaction information in the candidate version set, traversing the identifier of the signed endorsement node in a preset order, if the current version of the transaction assistance information is not current An identification signature of the endorsement node, using the identifier
  • the method further includes: using the next version of the transaction assistance information as the current version of the transaction.
  • the auxiliary information performs the step of traversing the identifier of the signed endorsement node in a preset order.
  • the signing by using the identifier of the endorsement node, the transaction auxiliary information of the version corresponding to the endorsement node in the plurality of versions, respectively: using the identifier of the endorsement node, respectively The latest version of the transaction assistance information corresponding to the signature in several versions is signed.
  • the traversing each version of the transaction auxiliary information in the candidate version set includes: traversing each version of the transaction assistance in the candidate version set according to a version number from low to high or high to low information.
  • the traversing the identifier of the signed endorsement node in a preset order comprises: signing the transaction assistance information corresponding to the corresponding version of the plurality of versions from morning to night Or traversing the identity of the signed endorsement node from late to early signature order.
  • a blockchain endorsement device includes: a first obtaining unit, configured to acquire information descriptions of information required for endorsement of a smart contract; and a first determining unit, Obtaining a plurality of versions of transaction assistance information according to the information description, and determining a target version from the plurality of versions; an endorsement unit configured to perform the smart contract with the transaction assistance information of the one target version endorsement.
  • the first determining unit is configured to determine, in the transaction auxiliary information of the several versions, the version with the earliest acquisition time as the one target version.
  • the first determining unit is configured to sign the transaction assistance information of the plurality of versions by using an identifier of the endorsement node, and determine a version with the most number of signatures as the target version.
  • the endorsement node is a node that endorses the smart contract by using the transaction assistance information of the one target version.
  • the determining that the version with the most number of signatures is the one target version comprises: determining a version with the highest number of signatures and not lower than the first preset number as the target version.
  • the first preset number of times is greater than or equal to the minimum number of signatures required to implement endorsement of the smart contract.
  • the identifier of the plurality of versions of the transaction assistance information is signed by using an identifier of the endorsement node, and the version with the maximum number of signatures and not lower than the first preset number of times is determined as the one
  • the target version includes: for each endorsement node identifier, using the identifier of the endorsement node, respectively, to sign the transaction auxiliary information of the version corresponding to the identifier of the endorsement node in the plurality of versions; if the plurality of versions of the transaction If the target version does not appear in the auxiliary information, and the total number of signatures is greater than or equal to the first preset number of times, traversing each version of the transaction auxiliary information in the candidate version set, wherein the candidate version set includes a signed version of the transaction assistance information; for each version of the candidate transaction information in the candidate version set, traversing the identifier of the signed endorsement node in a preset order, if the current version of the transaction assistance information is not current An identification signature of the endorsement node, using the identifier
  • the first determining unit is further configured to: use the next version of the transaction assistance information as the The current version of the transaction assistance information performs the step of traversing the identification of the signed endorsement node in a predetermined order.
  • the signing by using the identifier of the endorsement node, the transaction auxiliary information of the version corresponding to the endorsement node in the plurality of versions, respectively: using the identifier of the endorsement node, respectively The latest version of the transaction assistance information corresponding to the signature in several versions is signed.
  • the traversing each version of the transaction auxiliary information in the candidate version set includes: traversing each version of the transaction assistance in the candidate version set according to a version number from low to high or high to low information.
  • the traversing the identifier of the signed endorsement node in a preset order comprises: signing the transaction assistance information corresponding to the corresponding version of the plurality of versions from morning to night Or traversing the identity of the signed endorsement node from late to early signature order.
  • a blockchain endorsement device configured to acquire an information acquisition request from an endorsement node, where the information acquisition request carries a pair of intelligence a description of the information required for the endorsement of the contract; a second determining unit, configured to acquire a plurality of versions of the transaction auxiliary information according to the information description, and determine a target version from the plurality of versions; the sending unit is configured to: Transmitting, to the endorsement node, the transaction assistance information of the one target version, the transaction assistance information of the one target version is used by the endorsement node to endorse the smart contract.
  • the second determining unit is configured to determine, in the transaction auxiliary information of the several versions, the version with the earliest acquisition time as the one target version.
  • the second determining unit is configured to use the identifier of the endorsement node to sign the transaction auxiliary information of the plurality of versions, and determine a version with the most number of signatures as the one Target version.
  • the determining that the version with the most number of signatures is the target version comprises: determining a version with the maximum number of signatures and not lower than the first preset number as the one.
  • the target version, the first preset number of times is greater than or equal to the minimum number of signatures required to implement endorsement of the smart contract.
  • the method uses the identifier of the endorsement node to sign the transaction auxiliary information of the plurality of versions, and determines the version with the maximum number of signatures and not lower than the first preset number of times.
  • the transaction auxiliary information of the corresponding version of the identifier of the endorsement node is signed once by using the identifier of the endorsement node; If the one target version does not appear in the version of the transaction auxiliary information, and the total number of signatures is greater than or equal to the first preset number of times, traversing each version of the transaction auxiliary information in the candidate version set, wherein the candidate version is selected
  • the set includes the transaction assistance information of the signed version; for each version of the transaction auxiliary information in the candidate version set, traversing the identifier of the signed endorsement node in a preset order, if the current version of the transaction assistance The information is not signed by the identifier of the current endorsement node, and the current version is identified by using the identifier of the
  • the second determining unit is further configured to use the next version of the transaction assistance information as the The current version of the transaction assistance information performs the step of traversing the identification of the signed endorsement node in a predetermined order.
  • the signing by using the identifier of the endorsement node, the transaction auxiliary information of the version corresponding to the endorsement node in the plurality of versions, respectively: using the endorsement node respectively
  • the identifier is used to sign the latest version of the transaction assistance information corresponding to the signature in the several versions.
  • the traversing each version of the transaction auxiliary information in the candidate version set includes: traversing each version of the transaction assistance in the candidate version set according to a version number from low to high or high to low information.
  • the traversing the identifier of the signed endorsement node in a preset order comprises: signing the transaction assistance information corresponding to the corresponding version of the plurality of versions from morning to night Or traversing the identity of the signed endorsement node from late to early signature order.
  • a fifth aspect of the present application provides a blockchain endorsement device, the device comprising: a processor and a memory; the memory for storing an instruction; the processor, configured to execute the instruction in the memory The method of any of the above first aspects.
  • a sixth aspect of the present application provides a blockchain endorsement device, the device comprising: a processor and a memory; the memory for storing an instruction; the processor, configured to execute the instruction in the memory The method of any of the above second aspects is performed.
  • a seventh aspect of the present application provides a computer readable storage medium comprising instructions which, when executed on a computer, cause the computer to perform the method of any of the above first aspects.
  • An eighth aspect of the present application provides a computer readable storage medium comprising instructions which, when executed on a computer, cause the computer to perform the method of any of the above second aspects.
  • a ninth aspect of the present application provides a computer program product comprising instructions which, when run on a computer, cause the computer to perform the method of any of the preceding aspects.
  • a tenth aspect of the present application provides a computer readable storage medium comprising instructions, when executed on a computer, causing a computer to perform the method of any of the above second aspects
  • FIG. 1 is a schematic flowchart of a blockchain endorsement method according to an embodiment of the present application.
  • FIG. 2 is a schematic flowchart of determining transaction auxiliary information of a target version according to an embodiment of the present application
  • FIG. 3 is a schematic diagram of an application scenario provided by an embodiment of the present application.
  • FIG. 4 is a schematic flowchart of a blockchain endorsement method according to an embodiment of the present application.
  • FIG. 5 is a schematic flowchart of still another blockchain endorsement method according to an embodiment of the present application.
  • FIG. 6 is a schematic structural diagram of a blockchain endorsement device according to an embodiment of the present application.
  • FIG. 7 is a schematic structural diagram of a blockchain endorsement device according to an embodiment of the present application.
  • FIG. 8 is a schematic structural diagram of a blockchain endorsement device according to an embodiment of the present disclosure.
  • the embodiment of the present invention provides a blockchain endorsement method and device for solving different transaction assistance information acquired by different endorsement nodes, which results in different execution results of different endorsement nodes on the smart contract, affecting the success rate of the transaction and The problem of efficiency.
  • An endorsement node is a special member node.
  • An endorsement node is a node that endorses a smart contract, that is, a node that simulates executing a smart contract. That is to say, the endorsement node can simulate the execution of the smart contract and obtain the execution result of the smart contract.
  • the role of the node in different smart contract transactions can be different.
  • the first node acts as a member node to initiate a first smart contract transaction
  • the first node acts as an endorsement node for simulating execution of a second smart contract transaction.
  • the endorsement node simulation execution smart contract is referred to as "the endorsement node endorses the smart contract”.
  • the trigger condition or execution result of the smart contract may depend on the information outside the contract content, that is, the transaction auxiliary information, that is, the transaction auxiliary information is used to assist the execution of the smart contract.
  • the exchange between different currencies needs to be completed according to real-time exchange rate pricing, and the real-time exchange rate is the transaction auxiliary information of the currency exchange contract.
  • the transaction auxiliary information must be obtained first, and then the smart contract is endorsed by the obtained transaction auxiliary information. It can be understood that if the transaction auxiliary information is fixed, then the transaction auxiliary information acquired by each endorsement node is the same, and the endorsement results of the endorsement of the smart contract by the respective endorsement nodes are the same.
  • transaction auxiliary information is dynamically changed, in general, there may be a certain difference in the time when each endorsement node obtains the transaction auxiliary information, that is, the transaction auxiliary information acquired by each endorsement node may be different. Therefore, if each endorsement node uses the transaction assistance information acquired by itself to endorse the smart contract, the execution results of the different endorsement nodes on the smart contract may be different, which may affect the success rate and efficiency of the transaction.
  • each endorsement node can endorse the smart contract by using the target version of the transaction auxiliary information, that is, each endorsement node uses the same transaction auxiliary information to endorse the smart contract, so each endorsement The node performs the same result for the smart contract, which improves the success rate and efficiency of the transaction.
  • FIG. 1 it is a schematic flowchart of a blockchain endorsement method according to an embodiment of the present application.
  • the blockchain endorsement method provided by the embodiment of the present application is described in detail below.
  • the blockchain endorsement method provided by the embodiment of the present application can be applied to the first server.
  • the first server may include a functional entity that can implement the function of the endorsement node and a functional entity that can acquire the transaction assistance information.
  • the first server may include a functional entity that can implement the function of the endorsement node, a functional entity that can implement the function of the member node, and a functional entity that can obtain the transaction assistance information.
  • the blockchain endorsement method provided by the embodiment of the present application can be implemented by the following steps 101 to 103.
  • Step 101 Obtain a description of the information required for endorsing the smart contract.
  • the information required for endorsing the smart contract mentioned in the embodiment of the present application includes transaction auxiliary information.
  • the embodiment of the present application does not specifically limit the specific form of the information description of the information required for endorsement of the smart contract and the specific content included therein.
  • the information description of the information required for endorsement of the smart contract may include information such as the type of transaction assistance information, and, for example, the information description of the information required for endorsement of the smart contract may include information such as the source of the transaction assistance information. .
  • step 101 is different.
  • the specific implementation of the step 101 can be implemented in multiple implementation manners.
  • the transaction request sent by the member node may carry the information description of the information required for the endorsement of the smart contract. Therefore, in the embodiment of the present application, the endorsement node may send the transaction request from the member node. Get a description of the information needed to endorse a smart contract. In another possible implementation manner, the transaction request sent by the member node may carry the contract ID of the smart contract, and the endorsement node may find the smart contract corresponding to the contract ID from the database according to the contract ID. A description of the information that requires information.
  • the specific implementation of the step 101 may be implemented in various implementation manners.
  • the user can utilize the member node to send a transaction request. Therefore, in a possible implementation manner, the transaction request sent by the member node may carry the information description of the information required for the endorsement of the smart contract. Therefore, in the embodiment of the present application, the first server may send the information from the member node. The transaction request obtains a description of the information required to endorse the smart contract. In another possible implementation manner, the transaction request sent by the member node may carry the contract ID of the smart contract, and the first server may, according to the contract ID, find the smart contract corresponding to the contract ID from the database for endorsement. A description of the information required for the information.
  • the information description of the information required for the endorsement of the smart contract may be pre-stored in a database, where the database stores the correspondence between the contract ID of the smart contract and the information description of the information required by the smart contract to endorse, therefore,
  • the first server or the endorsement node can find the information description of the information required for the endorsement of the smart contract from the database according to the contract ID of the smart contract.
  • Step 102 Acquire a plurality of versions of transaction assistance information according to the information description, and determine a target version from the plurality of versions.
  • step 102 there may be multiple implementation manners.
  • the first server may send an information acquisition request to the information source capable of providing the transaction assistance information.
  • the first server may send multiple information acquisition requests to the information source, and the information source may return one version of the transaction assistance information to the first server every time the information acquisition request is received, in another
  • the first server only sends an information acquisition request to the information source, and the information source may periodically send a version of the transaction assistance information to the first server after receiving the information acquisition request.
  • the embodiment of the present application does not specifically limit the number of versions of the transaction assistance information.
  • the number of versions can be determined based on specific smart contract transactions. As an example, the number of versions of the transaction assistance information may be five.
  • the transaction assistance information may be stored in the corresponding storage space.
  • the first server may use the key.
  • the value-value method stores the acquired transaction assistance information.
  • the use of the key-value method to store the acquired transaction auxiliary information means that a version number is set for the transaction auxiliary information, and when the transaction auxiliary information is stored, the version number corresponding to the transaction auxiliary information is stored correspondingly.
  • the version number and the transaction auxiliary information are stored correspondingly, that is, when the transaction auxiliary information of the version number is stored, a correspondence relationship is established between the version number and the transaction auxiliary information. That is to say, the transaction auxiliary information corresponding to the version number can be retrieved by the version number, and the version number corresponding to the transaction auxiliary information can also be retrieved by using the transaction auxiliary information.
  • the transaction auxiliary information "Data2"; the version number “3” and the transaction auxiliary information Data3 are correspondingly stored, and the transaction auxiliary information "Data3” can be retrieved by the version number "3”; the version number "4" and the transaction auxiliary information Data4 are correspondingly stored.
  • the transaction assistance information "Data4" can be retrieved by the version number "4"; the version number "5" and the transaction assistance information Data5 are stored correspondingly, and the transaction assistance information "Data5" can be retrieved by the version number "5".
  • version numbers shown in Table 1 are 1, 2, 3, 4, and 5.
  • Table 1 is only a schematic description, and the version number may be other forms, for example, the version numbers of the five versions are 1.0, 1.1, 1.2, 1.3, 1.4, and 1.5.
  • the version numbers corresponding to the transaction auxiliary information of each version are different from each other.
  • determining a target version from the plurality of versions means that a version of the transaction assistance information is determined in the transaction assistance information of the plurality of target versions.
  • Step 103 Endoring the smart contract by using the transaction assistance information of the one target version.
  • each endorsement node participating in the endorsement may use the target version of the transaction assistance information to endorse the smart contract.
  • the embodiment of the present application does not specifically limit the specific implementation of the endorsement of the smart contract by the endorsement node using the transaction auxiliary information corresponding to the target version, and the specific implementation may be determined according to the specific transaction of the smart contract.
  • the blockchain endorsement method provided by the embodiment of the present application firstly obtains information descriptions of information required for endorsement of a smart contract; and then, according to the information description, acquires several versions of transaction auxiliary information, and assists from several versions of the transaction. A target version is determined in the information; finally, the smart contract is endorsed with the target version of the transaction assistance information. That is to say, in the embodiment of the present application, although the transaction assistance information acquired by different endorsement nodes may be different, each endorsement node does not endorse the smart contract by using the transaction auxiliary information obtained by itself, but uses the target version.
  • the transaction auxiliary information endorses the smart contract, that is, each endorsement node uses the same transaction auxiliary information to endorse the smart contract, so the endorsement nodes perform the same result on the tender contract, thereby improving the success rate and efficiency of the transaction.
  • step 102 “determining a target version from the several versions” may have multiple implementation manners, and “the plurality of steps from step 102 will be described below.
  • step 102 “determining a target version from the several versions” may determine, in a specific implementation, the version of the transaction assistance information of the plurality of versions, the earliest version of the acquisition time as a target. version.
  • the version with the earliest acquisition time is determined as a target version. Then, it is necessary to determine which version of the transaction auxiliary information of each version has the earliest acquisition time of the transaction auxiliary information.
  • the version number and the transaction assistance information are stored correspondingly, that is, when the transaction assistance information of the version number is stored, a correspondence relationship is established between the version number and the transaction assistance information. Therefore, in the present embodiment, the version number of the transaction assistance information can be utilized to determine which version of the transaction assistance information has the earliest acquisition time.
  • the change trend of the version number corresponding to the transaction auxiliary information may be determined according to the time sequence of the transaction auxiliary information acquisition. For example, the time when the transaction assistance information is acquired is from morning to night, and the version number of the corresponding transaction auxiliary information is from small to large. That is to say, the smaller the version number, the earlier the acquisition time of the corresponding transaction auxiliary information, the larger the version number, and the later the acquisition time of the corresponding transaction auxiliary information. In this way, the transaction auxiliary information with the smallest version number can be determined as the transaction auxiliary information with the earliest acquisition time, thereby determining the transaction auxiliary information of a target version.
  • the transaction auxiliary information of the target version is the transaction auxiliary information with the earliest acquisition time in each version, it is ensured that the transaction auxiliary information finally participating in the endorsement is determined as soon as possible after the member node initiates the transaction request, so that the smart contract can be endorsed as soon as possible. To ensure the timeliness of the transaction.
  • step 102 "determining a target version from the several versions", in a specific implementation, may use the identifier of the endorsement node to sign the transaction assistance information of several versions, and The version with the most signatures is determined to be a target version.
  • the endorsement node is a node that endorses the smart contract by using the transaction assistance information of the one target version.
  • the identity of the endorsement node is used to uniquely identify the endorsement node.
  • the specific expression form of the identifier of the endorsement node is not specifically limited in the embodiment of the present application.
  • the identifier of the endorsement node is represented by an 8-bit binary number, the identifier of the endorsement node A is 0000-0001, and the identifier of the endorsement node B is 0000-0010.
  • the transaction auxiliary information is considered to be the transaction auxiliary information approved by the endorsement node.
  • the transaction auxiliary information is considered to be the transaction auxiliary information approved by the endorsement node. For example, if the identifier of the endorsement node A signs the transaction assistance information of the version 1, the transaction assistance information of the version 1 is the transaction assistance information approved by the endorsement node A.
  • the transaction auxiliary information of the version with the highest number of signatures corresponds to the maximum number of endorsement nodes that recognize the transaction auxiliary information, that is, the transaction assistance information has the highest degree of recognition.
  • the transaction auxiliary information of the target version has the highest degree of recognition in the transaction auxiliary information of each version, but also that the recognition degree is not lower than a certain threshold.
  • the degree of recognition is not lower than a certain threshold, and may be embodied in that the number of times the transaction auxiliary information of the target version is signed is not lower than the first preset number of times. That is, the transaction auxiliary information of the target version is signed by the identifier of the first preset number of endorsement nodes.
  • the version with the highest number of signatures and not lower than the first preset number of times may be determined as the target version, wherein the first preset number of times is greater than or equal to the implementation of the smart contract.
  • the minimum number of signatures required for endorsement For example, the minimum number of signatures required to implement an endorsement of a smart contract is 3, the version 1 of the transaction assistance information has the most signatures, and the number of signatures is 5, since the number of signatures 5 is greater than the minimum signature required to implement the endorsement of the smart contract. The number is 3, therefore, the transaction assistance information of version 1 is used as the transaction auxiliary information of the target version.
  • a plurality of versions of transaction auxiliary information are signed by using the identifier of the endorsement node, and a version with the maximum number of signatures and not lower than the first preset number is determined as a specific implementation of the target version.
  • the method shown in FIG. 2 can be implemented by the following steps 201 to 205.
  • Step 201 For each endorsement node identifier, use the identifier of the endorsement node to sign the transaction auxiliary information of the version corresponding to the identifier of the endorsement node in a plurality of versions.
  • the identifier of an endorsement node can only sign one version of the transaction assistance information.
  • the endorsement nodes participating in the signature are endorsement node A, endorsement node B, endorsement node C, endorsement node D, Endorsement node E, endorsement node F.
  • the identifier of an endorsement node only one of the five versions can be selected for signature by using the identifier of the endorsement node, and multiple versions cannot be selected for signature at the same time.
  • the transaction assistance information of version 1 cannot be signed with the identity of the endorsement node A, and the transaction assistance information of version 2 is also signed.
  • the transaction auxiliary information corresponding to the identifier of the endorsement node may include multiple situations.
  • the transaction auxiliary information corresponding to the version corresponding to the identifier of the endorsement node is signed once in several versions, and there are also multiple implementation manners.
  • the transaction assistance information corresponding to the version of the endorsement node refers to the latest version of the transaction assistance information in several versions.
  • the time for signing the transaction auxiliary information by using the identifiers of the respective endorsement nodes is different. Since the transaction auxiliary information may be changed in real time, the latest version of the transaction auxiliary information corresponding to different times may be different. Therefore, each endorsement node The transaction assistance information of the corresponding version may also be different when the signature is signed.
  • the transaction auxiliary information is signed by the identifier of the endorsement node A
  • the currently existing transaction auxiliary information is version 1, that is, version 1 is the latest version of the transaction auxiliary information, and at this time, the version of the endorsement node A is used.
  • the transaction auxiliary information of 1 is signed; when the transaction auxiliary information is signed by the identifier of the endorsement node B, the currently existing transaction auxiliary information is version 1, version 2 and version 3, and version 3 is the latest version of the transaction auxiliary information.
  • the signature auxiliary information of the version 3 is signed by using the identifier of the endorsement node B; when the transaction auxiliary information is signed by the identifier of the endorsement node C, the currently existing transaction auxiliary information is version 1, version 2, and version 3, that is, version 3 For the latest version of the transaction assistance information, at this time, the transaction auxiliary information of version 3 is signed by the identifier of the endorsement node C; similarly, in the process of the subsequent signature, the transaction auxiliary information of the version 4 is identified by the identifier of the endorsement node D. Signature; use the identifier of the endorsement node E to sign the transaction assistance information of version 4; use the label of the endorsement node F Additional information on the transaction version 5 is signed.
  • the transaction auxiliary information corresponding to the version of the endorsement node refers to the transaction auxiliary information of the version signed by the identifier of any one of the endorsement nodes in the plurality of versions.
  • signing the transaction auxiliary information of the version corresponding to the identifier of the endorsement node in a plurality of versions which means that the identifier of the endorsement node in the plurality of versions is used by using the identifier of the endorsement node
  • the transaction auxiliary information of the version not signed by the identifier of any endorsement node is signed.
  • the transaction assistance information is signed by the identifier of the endorsement node G
  • since the currently existing transaction assistance information is version 1, version 2, version 3, version 4, and version 5.
  • Version 2 is not signed by the identifier of any endorsement node.
  • the transaction auxiliary information corresponding to version 2 is the transaction auxiliary information corresponding to the version of the endorsement node G
  • the transaction auxiliary information of version 2 is identified by the identifier of the endorsement node G. Sign it.
  • Table 3 The signature results are shown in Table 3 below.
  • Step 202 If a target version does not appear in the transaction auxiliary information of the plurality of versions, and the total number of signatures is greater than or equal to the first preset number of times, traversing the transaction auxiliary information of each version in the selected version set, wherein the candidate version set is selected Contains the transaction assistance information for the signed version.
  • occurrence of a target version mentioned in step 202 means that there is a version of the transaction auxiliary information corresponding to the maximum number of signatures, and the number of signatures is greater than or equal to the first preset number of times.
  • there is no target version which means that there is no version of the transaction auxiliary information, and the number of signatures is greater than or equal to the first preset number.
  • step 201 it is possible that some versions of the transaction assistance information are signed by the identifiers of the plurality of endorsement nodes, and the number of signatures is greater than the first preset number of times, that is, a target version may appear. If a target version appears, the smart contract is endorsed using the target version of the transaction assistance information, and step 202 and subsequent steps need not be performed.
  • the candidate version set contains the transaction auxiliary information of the signed version, that is, in step 202, the transaction auxiliary information of the signed version is traversed and executed.
  • Step 203 and subsequent steps so as to determine the transaction auxiliary information of a target version from the set of candidate versions; the transaction auxiliary information of the unsigned version can be directly discarded and not processed.
  • the candidate version set includes version 1, version 3, version 4, and version 5, and transaction auxiliary information of version 1, version 3, version 4, and version 5 can be traversed and executed.
  • Step 203 and subsequent steps to determine the transaction auxiliary information of a target version, and the transaction auxiliary information of version 2 can be directly discarded and not processed.
  • the traversal when traversing the transaction auxiliary information of each version in the selected version set, the traversal may be performed in a certain order. This embodiment does not specifically limit the sequence.
  • the version number may be high to low. Or traversing the transaction assistance information of each version in the selected version set in a low-to-high order.
  • traversing the transaction auxiliary information of each version in the selected version set it can be traversed according to the order of version 1, version 3, version 4, and version 5, or according to version 5, version 4, and version. 3 and the order of version 1 is traversed.
  • Step 203 Traverse the identifier of the signed endorsement node in a preset order for each version of the transaction auxiliary information in the set of selected versions. If the current version of the transaction assistance information is not signed by the identifier of the current endorsement node, step 203a is performed.
  • step 203b is performed.
  • Step 203a Sign the current version of the transaction assistance information by using the identifier of the current endorsement node.
  • step 204 is performed.
  • Step 203b The transaction assistance information of the next version is used as the transaction auxiliary information of the current version, and step 203 is performed.
  • the current version transaction information mentioned in step 203 refers to the transaction auxiliary information of the traversed version corresponding to the current time when the transaction auxiliary information in the selected version set is traversed. For example, if the transaction auxiliary information of the traversed version corresponding to the current time is the transaction auxiliary information of version 3, the transaction auxiliary information of the current version is the transaction auxiliary information of version 3.
  • the transaction auxiliary information of the current version mentioned in the step 203 refers to the transaction assistance of the version corresponding to the first position of the sorting position when the traversal of the transaction auxiliary information of each version in the selected version set is treated in a certain order. information.
  • the transaction assistance information of the version 1 is the transaction assistance information of the current version.
  • the identifier of the signed endorsement node is traversed in a preset order. This embodiment does not specifically limit the preset sequence. As an example, the identity of the signed endorsement node may be traversed from the morning to the night or from the late to the early signature sequence when signing the transaction assistance information for the corresponding version of the plurality of versions.
  • the order from the morning to the end is the identifier of the node A, the identifier of the node B, and the node C.
  • the identifier of the node, the identifier of the node D, the identifier of the node E, and the identifier of the node F may be used.
  • the order of the identifier of the node D, the identifier of the node E, and the identifier of the node F is traversed.
  • the order from the late to the early is the identifier of the node F, the identifier of the node E, and the node.
  • the identifier of the D, the identifier of the node C, the identifier of the node B, and the identifier of the node A is traversed.
  • the identifier of the node F may be used for each version of the transaction auxiliary information in the candidate version set.
  • the order of the identifier, the identifier of the node C, the identifier of the node B, and the identifier of the node A is traversed.
  • Step 204 If the current version of the transaction auxiliary information signature number is the most and not lower than the first preset number of times, the current version is determined as a target version.
  • step 204 it should be noted that if the current version of the transaction auxiliary information has the highest number of signatures and is not lower than the first preset number, the current version can be directly determined as a target version, the process ends, and the current version is not traversed. Subsequent versions. For example, when the version of the transaction auxiliary information is traversed in the order of version 1, version 3, version 4, and version 5, the current version is version 3, and the number of transaction auxiliary information signatures of version 3 is the most and not lower than the first preset number.
  • the version 3 transaction assistance information can be directly used as a target version of the transaction assistance information to end the process. The operation of traversing the identity of the signed endorsement node in a preset order is no longer performed on the transaction assistance information of Release 4 and Version 5.
  • the transaction auxiliary information of each version in the candidate version set may be traversed in the order of the version number from high to low or low to high.
  • the transaction auxiliary information of the corresponding version in the plurality of versions may be signed by the early The signature of the signed endorsement node is traversed by late or late signature sequence.
  • auxiliary information when determining the transaction auxiliary information of a target version from the transaction auxiliary information in the candidate version set, the order of traversing the transaction auxiliary information for each version, and the transaction for each version in the selected version set
  • the auxiliary information may include four possible implementations as shown in Table 4 below.
  • step 201 is as shown in Table 2, the methods described in FIG. 2 are respectively introduced for the four implementation schemes.
  • the first implementation scheme when traversing the transaction auxiliary information for each version according to the order of version 1, version 3, version 4, and version 5, the transaction auxiliary information for version 1, version 3, version 4, and version 5 is based on node A
  • the identity, the identity of the Node B, the identity of the node C, the identity of the node D, the identity of the node E, and the identity of the node F traverse the identity of the endorsement node.
  • Step 201 is executed.
  • the current version is the transaction auxiliary information of version 1.
  • the identifier of each endorsement node is traversed, and the identifier of the current node is the identifier of node A. Since the transaction auxiliary information of version 1 has been used by the node. The identification signature of A, therefore, the transaction assistance information of version 3 is used as the transaction assistance information of the current version, and the identifiers of the respective endorsement nodes are traversed. Since the transaction assistance information of version 3 is not signed by the identity of node A, at this time, the transaction assistance information of version 3 is signed by the identity of node A. At this time, the version 3 signature number is the most, which is 3 times, and is not lower than the first preset number of 3, and the version 3 transaction assistance information is used as the target version of the transaction assistance information. End the process.
  • the second implementation scheme when the transaction auxiliary information is traversed according to the order of version 1, version 3, version 4, and version 5, the transaction auxiliary information for version 1, version 3, version 4, and version 5 is based on the node F.
  • the identity, the identity of the node E, the identity of the node D, the identity of the node C, the identity of the node B, and the identity of the node A traverse the identity of the endorsement node.
  • Step 201 is executed.
  • the current version is the transaction auxiliary information of version 1.
  • the identifier of each endorsement node is traversed, and the identifier of the current node is the identifier of the node F. Since the transaction auxiliary information of version 1 is not The identity of the node F is signed, so the transaction assistance information of version 1 is signed with the identity of the node F.
  • the number of signatures of the transaction auxiliary information of the version 1 is the largest, it does not exceed three, and thus the identification of the endorsement nodes that have been signed is continued.
  • the current node becomes the node E.
  • the transaction auxiliary information of the version 1 is not signed by the identifier of the node E
  • the transaction auxiliary information of the version 1 is signed by the identifier of the node E.
  • the number of signatures of the version 1 is the most, which is 3 times, and is not lower than the first preset number of 3, and the transaction auxiliary information of the version 1 is used as the transaction auxiliary information of the target version. End the process.
  • the third implementation scheme when traversing the auxiliary information of each version according to the order of version 5, version 4, version 3, and version 1, the transaction auxiliary information for version 5, version 4, version 3, and version 1 is based on node A
  • the identity, the identity of the Node B, the identity of the node C, the identity of the node D, the identity of the node E, and the identity of the node F traverse the identity of the endorsement node.
  • Step 201 is performed.
  • the current version is version 5 of the transaction assistance information.
  • the identifier of each endorsement node is traversed.
  • the identifier of the current node is the identifier of the node A.
  • the version 5 transaction assistance information is not The identity signature of node A, therefore, the version 5 transaction assistance information is signed with the identity of node A.
  • the number of signatures of the transaction auxiliary information of the version 5 is the largest, it does not exceed 3, and thus the identification of the endorsement nodes that have been signed is continued.
  • the current node becomes the node B.
  • the transaction auxiliary information of the version 5 is not signed by the identifier of the node B, the transaction auxiliary information of the version 5 is signed by the identifier of the node B.
  • the version 5 has the most signatures, 3 times, and is not lower than the first preset number of 3, and the version 5 transaction assistance information is used as the target version of the transaction assistance information. End the process.
  • the fourth implementation scheme when traversing the transaction auxiliary information of each version according to the order of version 5, version 4, version 3, and version 1, the transaction auxiliary information for version 5, version 4, version 3, and version 1 is based on node A
  • the identity, the identity of the Node B, the identity of the node C, the identity of the node D, the identity of the node E, and the identity of the node F traverse the identity of the endorsement node.
  • Step 201 is performed.
  • the current version is version 5 of the transaction assistance information.
  • the identifier of each endorsement node is traversed.
  • the identifier of the current node is the identifier of the node F. Since the transaction auxiliary information of version 5 has been used by the node.
  • the signature of F is signed. Therefore, the transaction assistance information of version 4 is used as the transaction assistance information of the current version, and the identifiers of the respective endorsement nodes are traversed. Since the transaction auxiliary information of version 4 is not signed by the identifier of the node F, at this time, the transaction auxiliary information of version 4 is signed by the identifier of the node F.
  • the version 4 signature number is the most, which is 3 times, and is not lower than the first preset number of 3, and the version 4 transaction assistance information is used as the target version of the transaction assistance information. End the process.
  • the transaction auxiliary information of the target version with the recognition degree not lower than a certain threshold can be obtained, thereby completing the endorsement of the smart contract by using the target version of the transaction auxiliary information.
  • the transaction assistance information of the final target version is the transaction assistance information of the version with the version number being relatively centered.
  • the transaction assistance information of the target version is finally determined to be transaction assistance information with a version number before or after. In practical applications, one of the implementation methods can be selected according to actual needs.
  • FIG. 3 is a schematic diagram of an application scenario provided by the embodiment of the present application.
  • the member node 100 initiates a transaction, sends a transaction request to the endorsement node 200, the oracle 300 obtains multiple versions of transaction assistance information from the information source 400, and determines a target version of the transaction assistance information, the endorsement node 200
  • the smart contract is endorsed with the target version of the transaction assistance information.
  • the blockchain endorsement method provided by the embodiment of the present application can be applied to the first server.
  • the first server may include the transaction node 100, the endorsement node 200, and the oracle 300.
  • the oracle 300 determines, from among the several versions of the transaction assistance information obtained from the information source 400, the version with the earliest acquisition time as the transaction assistance information of the target version.
  • the number of endorsement nodes may be multiple, but FIG. 3 only schematically shows an endorsement node.
  • Step 401 Member node 100 sends a transaction request to endorsement node 200.
  • the transaction request is used to initiate a smart contract transaction.
  • the contract ID of the smart contract can be included in the transaction request.
  • Step 402 The endorsement node 200 determines that the transaction assistance information is needed according to the transaction request.
  • the endorsement node 200 may determine whether the transaction request requires transaction assistance information according to the contract ID carried in the transaction request.
  • Step 403 The endorsement node 200 sends a transaction assistance information acquisition request to the oracle 300.
  • the transaction assistance information acquisition request in step 403 is used to request transaction assistance information required for endorsement of the smart contract.
  • Step 404 The oracle 300 obtains the information description of the transaction auxiliary information, and queries the local uncached transaction auxiliary information.
  • the oracle 300 can determine the specific content of the required transaction assistance information according to the information description of the transaction assistance information. Therefore, according to the specific content of the transaction auxiliary information, it is found whether the transaction auxiliary information has been cached locally.
  • the version number corresponding to the transaction auxiliary information is correspondingly stored.
  • Step 405 The oracle 300 obtains the transaction assistance information from the data source 400, and determines, among the several versions of the transaction assistance information obtained from the information source 400, the version with the earliest acquisition time as the target version of the transaction assistance information.
  • the oracle 300 determines the version with the earliest acquisition time among the plurality of versions of the transaction assistance information as the transaction auxiliary information of the target version.
  • the oracle 300 may also use the identifier of the endorsement node to sign the transaction assistance information of the plurality of versions, and determine the transaction auxiliary information of the version with the highest number of signatures as the transaction auxiliary information of the target version.
  • the oracle 300 uses the identifier of the endorsement node to sign a plurality of versions of the transaction assistance information, and determines the transaction assistance information of the version with the highest number of signatures and the number of signatures not lower than the first predetermined number of times as the transaction assistance of the target version. information.
  • Step 406 The oracle 300 transmits the target version of the transaction assistance information to the endorsement node 200.
  • Step 407 The endorsement node 200 endorses the smart contract according to the transaction assistance information of the target version.
  • step 406 and step 407 it should be noted that when the number of endorsement nodes is plural, the oracle 300 can transmit the transaction assistance information of the target version to each endorsement node, so that each endorsement node utilizes the target version of the transaction. Auxiliary information endorses smart contracts.
  • Step 408 The endorsement node 200 sends the result of endorsing the smart contract to the transaction node 100.
  • Step 409 The transaction node 100 determines that the execution results of the endorsements of the smart contracts by the respective endorsement nodes are the same. Determine the success of the smart contract transaction.
  • each endorsement node does not endorse the smart contract by using the transaction auxiliary information obtained by itself, but uses the target version.
  • the transaction auxiliary information endorses the smart contract, that is, each endorsement node uses the same transaction auxiliary information to endorse the smart contract, so the endorsement nodes perform the same result on the tender contract, thereby improving the success rate and efficiency of the transaction.
  • the above embodiment introduces a method and apparatus applicable to blockchain endorsement.
  • the embodiment of the present application further provides a blockchain endorsement method, which is applied to a second server.
  • the second server can include a functional entity that can obtain transaction assistance information.
  • the second server mentioned herein may include, for example, the oracle 300 described in FIG.
  • the blockchain endorsement provided by the embodiment of the present application is introduced below with reference to FIG. 5.
  • the blockchain endorsement method provided by the embodiment of the present application can be implemented by the following steps 501 to 503.
  • Step 501 Acquire an information acquisition request from an endorsement node, where the information acquisition request carries a description of information required for endorsement of the smart contract.
  • the user can utilize the member node to send a transaction request.
  • the endorsement node can determine whether the transaction request requires transaction assistance information according to the transaction request sent by the member node. If the transaction request requires transaction assistance information, the endorsement node sends an information acquisition request to the second server.
  • the endorsement node and the member node mentioned in step 501 may be functional entities independent of the second server.
  • the endorsement node and the member node may be functional entities included in the third server. .
  • the embodiment of the present application does not specifically limit the specific form of the information description of the information required for endorsement of the smart contract and the specific content included therein.
  • the information description of the information required for endorsement of the smart contract may include information such as the type of transaction assistance information, and, for example, the information description of the information required for endorsement of the smart contract may include information such as the source of the transaction assistance information. .
  • Step 502 Acquire a plurality of versions of transaction assistance information according to the information description, and determine a target version from the plurality of versions of the transaction assistance information.
  • the embodiment of the present application does not specifically limit the number of versions of the transaction assistance information.
  • the number of versions can be determined based on specific smart contract transactions. As an example, the number of versions of the transaction assistance information may be five.
  • the transaction auxiliary information may be stored in a corresponding storage space, and a version number is set for the transaction auxiliary information, and the corresponding storage is stored when the transaction auxiliary information is stored.
  • the version number corresponding to the transaction assistance information It can be understood that the version number and the transaction auxiliary information are stored correspondingly, that is, when the transaction auxiliary information of the version number is stored, a correspondence relationship is established between the version number and the transaction auxiliary information. That is to say, the transaction auxiliary information corresponding to the version number can be retrieved by the version number, and the version number corresponding to the transaction auxiliary information can also be retrieved by using the transaction auxiliary information.
  • determining a target version from the plurality of versions means determining a version of the transaction assistance information in the transaction assistance information of the plurality of target versions.
  • Step 502 is the same as the content of step 102.
  • Step 502 refers to the description of related content in step 102, and details are not described herein again.
  • Step 503 Send a target version of the transaction assistance information to the endorsement node, and the one version of the transaction assistance information is used by the endorsement node to endorse the smart contract.
  • the embodiment of the present application does not specifically limit the number of endorsement nodes, and the second server may send the target version of the transaction assistance information to one or more endorsement nodes, so that one or more endorsement nodes that receive the target version of the transaction assistance information are utilized.
  • the target version of the transaction assistance information endorses the smart contract.
  • the embodiment of the present application does not specifically limit the specific implementation of the endorsement of the smart contract by the endorsement node using the transaction auxiliary information corresponding to the target version, and the specific implementation may be determined according to the specific transaction of the smart contract.
  • the blockchain endorsement method provided by the embodiment of the present application firstly obtains an information acquisition request from an endorsement node, and the information acquisition request carries a description of information required for endorsement of the smart contract; and then, according to the information description, several pieces are obtained. a version of the transaction assistance information, and determining a target version from the plurality of versions of the transaction assistance information; finally, transmitting a target version of the transaction assistance information to the endorsement node, the target auxiliary version of the transaction assistance information being used for the endorsement node Endorsing smart contracts.
  • each endorsement node endorses the smart contract by using the target version of the transaction auxiliary information, that is, each endorsement node uses the same transaction auxiliary information to endorse the smart contract, so each endorsement node
  • the results of the execution of the tender contract are the same, which improves the success rate and efficiency of the transaction.
  • determining a target version from several versions includes:
  • the version with the earliest acquisition time is determined as a target version.
  • determining a target version from several versions includes:
  • determining the version with the most number of signatures as a target version includes:
  • the version with the highest number of signatures and not lower than the first preset number is determined as a target version, and the first preset number is greater than or equal to the minimum number of signatures required to implement endorsement of the smart contract.
  • using the identifier of the endorsement node to sign the version of the transaction assistance information, and determining the version with the highest number of signatures and not lower than the first preset number as a target version includes:
  • the transaction auxiliary information of the version corresponding to the identifier of the endorsement node is signed once in each version by using the identifier of the endorsement node;
  • a target version does not appear in the version of the transaction auxiliary information, and the total number of signatures is greater than or equal to the first preset number of times, traversing the transaction auxiliary information of each version in the selected version set, wherein the selected version set includes Signed version of transaction assistance information;
  • the current version of the transaction auxiliary information signature is the most frequently and not lower than the first preset number, the current version is determined as a target version.
  • the method further includes:
  • the next version of the transaction assistance information is used as the current version of the transaction assistance information, and the step of traversing the identity of the signed endorsement node in a preset order is performed.
  • signing the transaction auxiliary information of the version corresponding to the endorsement node in several versions includes:
  • the latest version of the transaction assistance information corresponding to the signature in several versions is signed by using the identifier of the endorsement node.
  • traversing each version of the transaction assistance information in the candidate version set includes:
  • the transaction auxiliary information of each version in the selected version set is traversed according to the version number from low to high or high to low.
  • traversing the identifiers of the signed endorsement nodes in a predetermined order includes:
  • the signature of the signed endorsement node is traversed from the morning to the night or from the late to the early signature sequence.
  • a related apparatus for implementing the above-described blockchain endorsement method applied to the first server is further provided.
  • a blockchain endorsement device 600 is provided in an embodiment of the present application.
  • the communication device 600 specifically corresponds to the function of the blockchain endorsement method provided above.
  • the function of the blockchain endorsement device 600 can be implemented by hardware or by executing corresponding software by hardware.
  • the hardware or software includes one or more units corresponding to the functions described above, which may be software and/or hardware.
  • the apparatus 600 may include a first obtaining unit 610, a first determining unit 620, and an endorsement unit 630.
  • the first obtaining unit 610 is configured to obtain a description of information required for endorsing the smart contract
  • a first determining unit 620 configured to acquire a plurality of versions of transaction assistance information according to the information description, and determine a target version from the plurality of versions;
  • the endorsement unit 630 is configured to endorse the smart contract with a target version of the transaction assistance information.
  • the first determining unit 620 is configured to determine, in a plurality of versions of the transaction assistance information, the version with the earliest acquisition time as a target version.
  • the first determining unit 620 is configured to sign the version of the transaction assistance information by using the identifier of the endorsement node, and determine the version with the most number of signatures as a target version, and the endorsement node utilizes one
  • the target version of the transaction assistance information is the node that endorses the smart contract.
  • determining the version with the most number of signatures as a target version includes:
  • the version with the highest number of signatures and not lower than the first preset number is determined as a target version, and the first preset number is greater than or equal to the minimum number of signatures required to implement endorsement of the smart contract.
  • using the identifier of the endorsement node to sign the version of the transaction assistance information, and determining the version with the highest number of signatures and not lower than the first preset number as a target version includes:
  • the transaction auxiliary information of the version corresponding to the identifier of the endorsement node is signed once in each version by using the identifier of the endorsement node;
  • a target version does not appear in the version of the transaction auxiliary information, and the total number of signatures is greater than or equal to the first preset number of times, traversing the transaction auxiliary information of each version in the selected version set, wherein the selected version set includes Signed version of transaction assistance information;
  • the current version of the transaction auxiliary information signature is the most frequently and not lower than the first preset number, the current version is determined as a target version.
  • the first determining unit 620 is further configured to:
  • the next version of the transaction assistance information is used as the current version of the transaction assistance information, and the step of traversing the identity of the signed endorsement node in a preset order is performed.
  • signing the transaction auxiliary information of the version corresponding to the endorsement node in the plurality of versions includes:
  • the latest version of the transaction assistance information corresponding to the signature in several versions is signed by using the identifier of the endorsement node.
  • traversing each version of the transaction assistance information in the candidate version set includes:
  • the transaction auxiliary information of each version in the selected version set is traversed according to the version number from low to high or high to low.
  • traversing the identifiers of the signed endorsement nodes in a predetermined order includes:
  • the signature of the signed endorsement node is traversed from the morning to the night or from the late to the early signature sequence.
  • a related apparatus for implementing the above-described blockchain endorsement method applied to the second server is further provided.
  • a blockchain endorsement device 700 is provided in the embodiment of the present application, and the communication device 700 specifically corresponds to the function of the blockchain endorsement method provided above.
  • the function of the blockchain endorsement device 700 can be implemented by hardware or by executing corresponding software through hardware.
  • the hardware or software includes one or more units corresponding to the functions described above, which may be software and/or hardware.
  • the apparatus 700 may include a second acquisition unit 710, a second acquisition unit 720, and a transmission unit 730.
  • the second obtaining unit 710 is configured to obtain an information acquiring request from the endorsement node, where the information acquiring request carries a description of information required for endorsing the smart contract;
  • a second determining unit 720 configured to acquire a plurality of versions of transaction assistance information according to the information description, and determine a target version from the plurality of versions;
  • the sending unit 730 is configured to send a target version of the transaction assistance information to the endorsement node, and the target version of the transaction assistance information is used by the endorsement node to endorse the smart contract.
  • the second determining unit 720 is configured to determine, in a plurality of versions of the transaction assistance information, the version with the earliest acquisition time as a target version.
  • the second determining unit 720 is configured to sign the version of the transaction assistance information by using the identifier of the endorsement node, and determine the version with the most number of signatures as a target version.
  • determining the version with the most number of signatures as a target version includes:
  • the version with the highest number of signatures and not lower than the first preset number is determined as a target version, and the first preset number is greater than or equal to the minimum number of signatures required to implement endorsement of the smart contract.
  • using the identifier of the endorsement node to sign the version of the transaction assistance information, and determining the version with the highest number of signatures and not lower than the first preset number as a target version includes:
  • the transaction auxiliary information of the version corresponding to the identifier of the endorsement node is signed once in each version by using the identifier of the endorsement node;
  • a target version does not appear in the version of the transaction auxiliary information, and the total number of signatures is greater than or equal to the first preset number of times, traversing the transaction auxiliary information of each version in the selected version set, wherein the selected version set includes Signed version of transaction assistance information;
  • the current version of the transaction auxiliary information signature is the most frequently and not lower than the first preset number, the current version is determined as a target version.
  • the second determining unit 720 is further configured to execute the next version of the transaction assistance information as the current version of the transaction assistance information. The step of traversing the identity of the signed endorsement node in a preset order.
  • signing the transaction auxiliary information of the version corresponding to the endorsement node in the plurality of versions includes:
  • the latest version of the transaction assistance information corresponding to the signature in several versions is signed by using the identifier of the endorsement node.
  • traversing each version of the transaction assistance information in the candidate version set includes:
  • the transaction auxiliary information of each version in the selected version set is traversed according to the version number from low to high or high to low.
  • traversing the identifiers of the signed endorsement nodes in a predetermined order includes:
  • the signature of the signed endorsement node is traversed from the morning to the night or from the late to the early signature sequence.
  • the communication device 800 includes a processor 810, a communication interface 820, and a memory 830.
  • the number of the processors 810 in the communication device 800 may be one or more, and one processor is taken as an example in FIG.
  • the processor 810, the communication interface 820, and the memory 830 may be connected through a bus system or other manners, wherein the connection through the bus system 840 is taken as an example in FIG.
  • the processor 810 can be a central processing unit (CPU), a network processor (NP), or a combination of a CPU and an NP.
  • Processor 810 can also further include a hardware chip.
  • the hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof.
  • the PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a general array logic (GAL), or any combination thereof.
  • the memory 830 may include a volatile memory (English: volatile memory), such as a random-access memory (RAM); the memory 830 may also include a non-volatile memory, such as a fast A flash memory (English: flash memory), a hard disk drive (HDD) or a solid-state drive (SSD); the memory 410 may also include a combination of the above types of memories.
  • volatile memory such as a random-access memory (RAM)
  • non-volatile memory such as a fast A flash memory (English: flash memory), a hard disk drive (HDD) or a solid-state drive (SSD)
  • the memory 410 may also include a combination of the above types of memories.
  • the memory 830 can be used to store transaction assistance information for each version.
  • the memory 830 stores an operating system and programs, executable modules or data structures, or a subset thereof, or an extended set thereof, wherein the programs may include various operational instructions for implementing various operations.
  • the operating system can include a variety of system programs for implementing various basic services and handling hardware-based tasks.
  • the processor 810 can read the program in the memory 830 to implement the communication method provided by the embodiment of the present application.
  • the bus system 840 can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus.
  • the bus system 840 can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is shown in Figure 8, but it does not mean that there is only one bus or one type of bus.
  • the embodiment of the present application further provides a computer readable storage medium, including instructions, when executed on a computer, causing a computer to execute the communication method provided by the above method embodiment.
  • the embodiment of the present application also provides a computer readable storage medium, including instructions, when executed on a computer, causing the computer to execute the blockchain endorsement method applied to the first server.
  • the embodiment of the present application further provides a computer readable storage medium, comprising instructions, when executed on a computer, causing the computer to execute the blockchain endorsement method applied to the second server.
  • the embodiment of the present application also provides a computer program product comprising instructions, when executed on a computer, causing the computer to execute the blockchain endorsement method applied to the first server.
  • the embodiment of the present application also provides a computer program product comprising instructions, when executed on a computer, causing the computer to execute the blockchain endorsement method applied to the second server.
  • the disclosed system, apparatus, and method may be implemented in other manners.
  • the device embodiments described above are merely illustrative.
  • the division of the unit is only a logical function division.
  • there may be another division manner for example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be in an electrical, mechanical or other form.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
  • the integrated unit if implemented in the form of a software functional unit and sold or used as a standalone product, may be stored in a computer readable storage medium.
  • a computer readable storage medium A number of instructions are included to cause a computer device (which may be a personal computer, a first server, or a network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present application.
  • the foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like. .

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Technology Law (AREA)
  • General Physics & Mathematics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • Development Economics (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • Economics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

本申请实施例公开了一种区块链背书方法及装置,该方法包括:首先,获取对智能合约进行背书所需要信息的信息描述;然后,根据该信息描述获取若干个版本的交易辅助信息,并从若干个版本的交易辅助信息中确定出一个目标版本;最后,利用目标版本的交易辅助信息对智能合约进行背书。也就是说,在本申请实施例中,各个背书节点均可以利用目标版本的交易辅助信息对智能合约进行背书,即,各背书节点是利用相同的交易辅助信息对智能合约进行背书,故各背书节点对智能合约的执行结果相同,从而提高了交易的成功率和效率。

Description

一种区块链背书方法及装置
本申请要求于2018年3月31日提交中国专利局、申请号为201810319127.8、发明名称为“一种区块链背书方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及区块链领域,尤其涉及一种区块链背书方法及装置。
背景技术
区块链(blockchain)是一种将数据区块以顺序相连的方式组合成的一种链式数据结构,并以密码学方式保证的不可篡改和不可伪造的分布式账本。智能合约(smart contract)是区块链技术的一种典型应用,其实质上是交易双方合约的代码化实例,基于可复制的、共享的分布式账本上,并按照交易合约的规定执行交易。
与实际商务合约类似,智能合约的触发条件或执行结果可能会依赖于合约内容之外的信息,即交易辅助信息,也就是说,交易辅助信息用于辅助智能合约的执行。例如不同货币之间的兑换需要根据实时的汇率定价完成交易,而其中的实时汇率就是货币兑换合约的交易辅助信息。可见,合理的交易辅助信息的输入是保证智能合约正确执行的关键。
由于一些交易辅助信息是动态变化的,传统技术根据背书节点(endorsing peer)产生的信息获取请求实时获取交易辅助信息,不同的背书节点获取到的交易辅助信息不同,导致不同背书节点对智能合约的执行结果也不同,影响交易的成功率和效率。
发明内容
本申请实施例提供了一种区块链背书方法及装置,可以解决不同的背书节点获取到的交易辅助信息不同,导致不同背书节点对智能合约的执行结果也不同,影响交易的成功率和效率的问题。
在本申请实施例的第一方面,提供了一种区块链背书方法,该方法包括:
获取对智能合约进行背书所需要信息的信息描述;根据所述信息描述获取若干个版本的交易辅助信息,并从所述若干个版本中确定出一个目标版本;利用所述一个目标版本的交易辅助信息对所述智能合约进行背书。由此可见,各个背书节点均可以利用目标版本的交易辅助信息对智能合约进行背书,即,各背书节点是利用相同的交易辅助信息对智能合约进行背书,故各背书节点对智能合约的执行结果相同,从而提高了交易的成功率和效率。
在一种可能的实现方式中,所述从所述若干个版本中确定出一个目标版本包括:将所述若干个版本的交易辅助信息中,获取时间最早的版本确定为所述一个目标版本。由于该目标版本的交易辅助信息是各个版本中获取时间最早的交易辅助信息,因此,可以保证在成员节点发起交易请求之后,尽快确定最终参与背书的交易辅助信息,从而可以尽快对智能合约进行背书,保证了交易的及时性。
在一种可能的实现方式中,所述从所述若干个版本中确定出一个目标版本包括:利用背书节点的标识对所述若干个版本的交易辅助信息进行签名,并将签名次数最多的版本确定为所述一个目标版本,所述背书节点为利用所述一个目标版本的交易辅助信息对所述智能合约进行背书的节点。利用背书节点的标识对交易辅助信息进行签名之后,即可认为该交易辅助信息是该背书节点认可的交易辅助信息。签名次数最多的版本的交易辅助信息,对应的,认可该交易辅助信息的背书节点的数目最多,也就是说,该交易辅助信息的认可度最高。将认可度最高的交易辅助信息作为目标版本的辅助信息,并利用该目标版本的交易辅助信息对智能合约进行背书,可以保证交易的公平性。
在一种可能的实现方式中,所述将签名次数最多的版本确定为所述一个目标版本包括:将签名次数最多且不低于第一预设次数的版本确定为所述一个目标版本,所述第一预设次数大于或等于实现对所述智能合约进行背书所需要的最少签名数目。当目标版本的签名次数最多且不低于第一预设次数时,表示目标版本的交易辅助信息的认可度最高,并且其认可度要不低于一定的阈值,这样一来,利用该目标版本的交易辅助信息对智能合约进行背书,可以进一步保证交易的公平性。
在一种可能的实现方式中,所述利用背书节点的标识对所述若干个版本的交易辅助信息进行签名,并将签名次数最多且不低于第一预设次数的版本确定为所述一个目标版本包括:对于每个背书节点标识,分别利用该背书节点的标识,对所述若干个版本中与该背书节点的标识对应版本的交易辅助信息进行一次签名;若所述若干个版本的交易辅助信息中未出现所述一个目标版本,且签名总次数大于或等于所述第一预设次数,则遍历待选版本集合中各版本交易辅助信息,其中,所述待选版本集合包括已被签名的版本的交易辅助信息;对于所述待选版本集合中的每个版本交易辅助信息,按照预设顺序遍历所述已进行签名的背书节点的标识,若当前版本的交易辅助信息未被当前背书节点的标识签名,则利用所述当前背书节点的标识对所述当前版本的交易辅助信息签名;若所述当前版本的交易辅助信息签名次数最多且不低于所述第一预设次数,则将所述当前版本确定为所述一个目标版本。由此可见,采用本申请实施例采用的方法,可以从若干个版本的交易辅助信息中确定认可度最高,并且其认可度不低于一定的阈值的目标版本。
在一种可能的实现方式中,若所述当前版本的交易辅助信息被所述当前背书节点的标识签名,则所述方法还包括:将下一个版本的交易辅助信息作为所述当前版本的交易辅助信息,执行所述按照预设顺序遍历所述已进行签名的背书节点的标识的步骤,从而从若干个版本的交易辅助信息中确定认可度最高,并且其认可度不低于一定的阈值的目标版本。
在一种可能的实现方式中,所述分别利用该背书节点的标识,对所述若干个版本中与该背书节点对应版本的交易辅助信息进行签名包括:分别利用该背书节点的标识,对所述若干个版本中签名时对应的最新版本的交易辅助信息进行签名。从而确定各个版本的交易辅助信息的签名次数,并进一步确定出目标版本的交易辅助信息。
在一种可能的实现方式中,所述遍历待选版本集合中各版本交易辅助信息包括:按照版本号由低到高或由高到低的顺序遍历所述待选版本集合中各版本交易辅助信息。从而确定各个版本的交易辅助信息的签名次数,并进一步确定出目标版本的交易辅助信息。
在一种可能的实现方式中,所述按照预设顺序遍历所述已进行签名的背书节点的标识包括:按照对所述若干个版本中对应版本的交易辅助信息进行签名时,由早到晚或由晚到早的签名顺序,遍历所述已进行签名的背书节点的标识。从而确定各个版本的交易辅助信息的签名次数,并进一步确定出目标版本的交易辅助信息。根据对各版本交易辅助信息进行遍历的顺序,以及,对于待选版本集合中的每个版本交易辅助信息,对已进行签名的背书节点的标识进行遍历的顺序的组合,其中一些组合方式最终确定的目标版本的交易辅助信息是版本号比较居中的版本的交易辅助信息。其中另一些组合方式最终确定目标版本的交易辅助信息是版本号靠前或者靠后的交易辅助信息。在实际应用中,可以根据实际需要选择其中一种实现方式。
在本申请实施例的第二方面,提供了一种区块链背书方法,该方法包括:
获取来自于背书节点的信息获取请求,所述信息获取请求携带有对智能合约进行背书所需要信息的信息描述;根据所述信息描述获取若干个版本的交易辅助信息,并从所述若干个版本中确定出一个目标版本;向所述背书节点发送所述一个目标版本的交易辅助信息,所述一个目标版本的交易辅助信息用于所述背书节点对所述智能合约进行背书。各背书节点是利用目标版本的交易辅助信息对智能合约进行背书,即,各背书节点是利用相同的交易辅助信息对智能合约进行背书,故各背书节点对稚嫩合约的执行结果相同,从而提高了交易的成功率和效率。
在一种可能的实现方式中,所述从所述若干个版本中确定出一个目标版本包括:将所述若干个版本的交易辅助信息中,获取时间最早的版本确定为所述一个目标版本。
在一种可能的实现方式中,所述从所述若干个版本中确定出一个目标版本包括:利用所述背书节点的标识对所述若干个版本的交易辅助信息进行签名,并将签名次数最多的版本确定为所述一个目标版本。
在一种可能的实现方式中,所述将签名次数最多的版本确定为所述一个目标版本包括:将签名次数最多且不低于第一预设次数的版本确定为所述一个目标版本,所述第一预设次数大于或等于实现对所述智能合约进行背书所需要的最少签名数目。
在一种可能的实现方式中,所述利用背书节点的标识对所述若干个版本的交易辅助信息进行签名,并将签名次数最多且不低于第一预设次数的版本确定为所述一个目标版本包括:对于每个背书节点标识,分别利用该背书节点的标识,对所述若干个版本中与该背书节点的标识对应版本的交易辅助信息进行一次签名;若所述若干个版本的交易辅助信息中未出现所述一个目标版本,且签名总次数大于或等于所述第一预设次数,则遍历待选版本集合中各版本交易辅助信息,其中,所述待选版本集合包括已被签名的版本的交易辅助信息;对于所述待选版本集合中的每个版本交易辅助信息,按照预设顺序遍历所述已进行签名的背书节点的标识,若当前版本的交易辅助信息未被当前背书节点的标识签名,则利用所述当前背书节点的标识对所述当前版本的交易辅助信息签名;若所述当前版本的交易辅助信息签名次数最多且不低于所述第一预设次数,则将所述当前版本确定为所述一个目标版本。
在一种可能的实现方式中,若所述当前版本的交易辅助信息被所述当前背书节点的标 识签名,则所述方法还包括:将下一个版本的交易辅助信息作为所述当前版本的交易辅助信息,执行所述按照预设顺序遍历所述已进行签名的背书节点的标识的步骤。
在一种可能的实现方式中,所述分别利用该背书节点的标识,对所述若干个版本中与该背书节点对应版本的交易辅助信息进行签名包括:分别利用该背书节点的标识,对所述若干个版本中签名时对应的最新版本的交易辅助信息进行签名。
在一种可能的实现方式中,所述遍历待选版本集合中各版本交易辅助信息包括:按照版本号由低到高或由高到低的顺序遍历所述待选版本集合中各版本交易辅助信息。
在一种可能的实现方式中,所述按照预设顺序遍历所述已进行签名的背书节点的标识包括:按照对所述若干个版本中对应版本的交易辅助信息进行签名时,由早到晚或由晚到早的签名顺序,遍历所述已进行签名的背书节点的标识。
在本申请实施例的第三方面,提供了一种区块链背书装置,该装置包括:第一获取单元,用于获取对智能合约进行背书所需要信息的信息描述;第一确定单元,用于根据所述信息描述获取若干个版本的交易辅助信息,并从所述若干个版本中确定出一个目标版本;背书单元,用于利用所述一个目标版本的交易辅助信息对所述智能合约进行背书。
在一种可能的实现方式中,所述第一确定单元,用于将所述若干个版本的交易辅助信息中,获取时间最早的版本确定为所述一个目标版本。
在一种可能的实现方式中,所述第一确定单元,用于利用背书节点的标识对所述若干个版本的交易辅助信息进行签名,并将签名次数最多的版本确定为所述一个目标版本,所述背书节点为利用所述一个目标版本的交易辅助信息对所述智能合约进行背书的节点。
在一种可能的实现方式中,所述将签名次数最多的版本确定为所述一个目标版本包括:将签名次数最多且不低于第一预设次数的版本确定为所述一个目标版本,所述第一预设次数大于或等于实现对所述智能合约进行背书所需要的最少签名数目。
在一种可能的实现方式中,所述利用背书节点的标识对所述若干个版本的交易辅助信息进行签名,并将签名次数最多且不低于第一预设次数的版本确定为所述一个目标版本包括:对于每个背书节点标识,分别利用该背书节点的标识,对所述若干个版本中与该背书节点的标识对应版本的交易辅助信息进行一次签名;若所述若干个版本的交易辅助信息中未出现所述一个目标版本,且签名总次数大于或等于所述第一预设次数,则遍历待选版本集合中各版本交易辅助信息,其中,所述待选版本集合包括已被签名的版本的交易辅助信息;对于所述待选版本集合中的每个版本交易辅助信息,按照预设顺序遍历所述已进行签名的背书节点的标识,若当前版本的交易辅助信息未被当前背书节点的标识签名,则利用所述当前背书节点的标识对所述当前版本的交易辅助信息签名;若所述当前版本的交易辅助信息签名次数最多且不低于所述第一预设次数,则将所述当前版本确定为所述一个目标版本。
在一种可能的实现方式中,若所述当前版本的交易辅助信息被所述当前背书节点的标识签名,则所述第一确定单元还用于:将下一个版本的交易辅助信息作为所述当前版本的交易辅助信息,执行所述按照预设顺序遍历所述已进行签名的背书节点的标识的步骤。
在一种可能的实现方式中,所述分别利用该背书节点的标识,对所述若干个版本中与 该背书节点对应版本的交易辅助信息进行签名包括:分别利用该背书节点的标识,对所述若干个版本中签名时对应的最新版本的交易辅助信息进行签名。
在一种可能的实现方式中,所述遍历待选版本集合中各版本交易辅助信息包括:按照版本号由低到高或由高到低的顺序遍历所述待选版本集合中各版本交易辅助信息。
在一种可能的实现方式中,所述按照预设顺序遍历所述已进行签名的背书节点的标识包括:按照对所述若干个版本中对应版本的交易辅助信息进行签名时,由早到晚或由晚到早的签名顺序,遍历所述已进行签名的背书节点的标识。
在本申请实施例的第四方面,提供了一种区块链背书装置,该装置包括:第二获取单元,用于获取来自于背书节点的信息获取请求,所述信息获取请求携带有对智能合约进行背书所需要信息的信息描述;第二确定单元,用于根据所述信息描述获取若干个版本的交易辅助信息,并从所述若干个版本中确定出一个目标版本;发送单元,用于向所述背书节点发送所述一个目标版本的交易辅助信息,所述一个目标版本的交易辅助信息用于所述背书节点对所述智能合约进行背书。
在一种可能的实现方式中,所述第二确定单元,用于将所述若干个版本的交易辅助信息中,获取时间最早的版本确定为所述一个目标版本。
在一种可能的实现方式中,所述第二确定单元,用于利用所述背书节点的标识对所述若干个版本的交易辅助信息进行签名,并将签名次数最多的版本确定为所述一个目标版本。
在一种可能的实现方式中,其特征在于,所述将签名次数最多的版本确定为所述一个目标版本包括:将签名次数最多且不低于第一预设次数的版本确定为所述一个目标版本,所述第一预设次数大于或等于实现对所述智能合约进行背书所需要的最少签名数目。
在一种可能的实现方式中,其特征在于,所述利用背书节点的标识对所述若干个版本的交易辅助信息进行签名,并将签名次数最多且不低于第一预设次数的版本确定为所述一个目标版本包括:对于每个背书节点标识,分别利用该背书节点的标识,对所述若干个版本中与该背书节点的标识对应版本的交易辅助信息进行一次签名;若所述若干个版本的交易辅助信息中未出现所述一个目标版本,且签名总次数大于或等于所述第一预设次数,则遍历待选版本集合中各版本交易辅助信息,其中,所述待选版本集合包括已被签名的版本的交易辅助信息;对于所述待选版本集合中的每个版本交易辅助信息,按照预设顺序遍历所述已进行签名的背书节点的标识,若当前版本的交易辅助信息未被当前背书节点的标识签名,则利用所述当前背书节点的标识对所述当前版本的交易辅助信息签名;若所述当前版本的交易辅助信息签名次数最多且不低于所述第一预设次数,则将所述当前版本确定为所述一个目标版本。
在一种可能的实现方式中,若所述当前版本的交易辅助信息被所述当前背书节点的标识签名,则所述第二确定单元,还用于将下一个版本的交易辅助信息作为所述当前版本的交易辅助信息,执行所述按照预设顺序遍历所述已进行签名的背书节点的标识的步骤。
在一种可能的实现方式中,其特征在于,所述分别利用该背书节点的标识,对所述若干个版本中与该背书节点对应版本的交易辅助信息进行签名包括:分别利用该背书节点的标识,对所述若干个版本中签名时对应的最新版本的交易辅助信息进行签名。
在一种可能的实现方式中,所述遍历待选版本集合中各版本交易辅助信息包括:按照版本号由低到高或由高到低的顺序遍历所述待选版本集合中各版本交易辅助信息。
在一种可能的实现方式中,所述按照预设顺序遍历所述已进行签名的背书节点的标识包括:按照对所述若干个版本中对应版本的交易辅助信息进行签名时,由早到晚或由晚到早的签名顺序,遍历所述已进行签名的背书节点的标识。本申请第五方面提供了一种区块链背书设备,所述设备包括:处理器和存储器;所述存储器,用于存储指令;所述处理器,用于执行所述存储器中的所述指令,执行以上第一方面任意一项所述的方法。
本申请第六方面提供了一种区块链背书设备,所述设备包括:处理器和存储器;所述存储器,用于存储指令;所述处理器,用于执行所述存储器中的所述指令,执行以上第二方面任意一项所述的方法。
本申请第七方面提供了一种计算机可读存储介质,包括指令,当其在计算机上运行时,使得计算机执行以上第一方面任意一项所述的方法。
本申请第八方面提供了一种计算机可读存储介质,包括指令,当其在计算机上运行时,使得计算机执行以上第二方面任意一项所述的方法。
本申请第九方面提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行以上第一方面任意一项所述的方法。
本申请第十方面提供了一种计算机可读存储介质,包括指令,当其在计算机上运行时,使得计算机执行以上第二方面任意一项所述的方法
附图说明
图1为本申请实施例提供的一种区块链背书方法的流程示意图;
图2为本申请实施例提供的一种确定一个目标版本的交易辅助信息的流程示意图;
图3为本申请实施例提供的一个应用场景的示意图;
图4为本申请实施例提供的一种区块链背书方法的流程示意图;
图5为本申请实施例提供的又一种区块链背书方法的流程示意图;
图6为本申请实施例提供的一种区块链背书装置的结构示意图;
图7为本申请实施例提供的一种区块链背书装置的结构示意图;
图8为本申请实施例提供的一种区块链背书设备的结构示意图。
具体实施方式
本申请实施例提供了一种区块链背书方法及装置,用于解决不同的背书节点获取到的交易辅助信息不同,导致不同背书节点对智能合约的执行结果也不同,影响交易的成功率和效率的问题。
本发明的说明书和权利要求书及上述附图中的术语“第一”、“第二”、“第三”、“第四”等(如果存在)是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的实施例能够以除了在这里图示或描述的内容以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在 于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、***、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。
为方便理解,首先,对执行智能合约涉及的重要概念进行解释。
在智能合约中,主要涉及两类重要的节点。一类是成员节点,另一类是背书节点。成员节点可以与客户端相连,用户可以通过客户端连接成员节点发起智能合约交易,即用户可以利用成员节点发送交易请求。背书节点是一种特殊的成员节点,背书节点是指,对智能合约进行背书的节点,即模拟执行智能合约的节点。也就是说,背书节点可以模拟执行智能合约,获得智能合约的执行结果。
需要说明的是,对于任一节点而言,该节点在不同的智能合约交易中扮演的角色可以不同。例如,在第一智能合约交易中,第一节点作为成员节点,发起第一智能合约交易;在第二智能合约交易中,第一节点作为背书节点,用于模拟执行第二智能合约交易。
在本申请实施例的以下描述中,将“背书节点模拟执行智能合约”称为“背书节点对智能合约进行背书”。
需要说明的是,智能合约的触发条件或执行结果可能会依赖于合约内容之外的信息,即交易辅助信息,也就是说,交易辅助信息用于辅助智能合约的执行。例如不同货币之间的兑换需要根据实时的汇率定价完成交易,而其中的实时汇率就是货币兑换合约的交易辅助信息。
在执行智能合约时,一般需要多个背书节点对智能合约进行背书,并且在参与背书的背书节点中存在一定数目的背书节点对智能合约的执行结果相同时,才认为智能节约交易成功。多个背书节点对智能合约进行背书之前,要先获取交易辅助信息,然后利用获取的交易辅助信息对智能合约进行背书。可以理解的是,若交易辅助信息是固定不变的,那么各个背书节点获取的交易辅助信息相同,则各个背书节点对智能合约进行背书的结果相同。但是,由于一些交易辅助信息是动态变化的,一般而言,各个背书节点获取交易辅助信息的时间可能存在一定的差异,即各个背书节点获取到的交易辅助信息可能不同。因此,若各个背书节点利用自身获取到的交易辅助信息对智能合约进行背书,则不同背书节点对智能合约的执行结果可能不同,故而可能会影响交易的成功率和效率。
鉴于此,在本申请是实例中,首先,获取对智能合约进行背书所需要信息的信息描述;然后,根据该信息描述获取若干个版本的交易辅助信息,并从若干个版本的交易辅助信息中确定出一个目标版本;最后,利用目标版本的交易辅助信息对智能合约进行背书。也就是说,在本申请实施例中,各个背书节点均可以利用目标版本的交易辅助信息对智能合约进行背书,即,各背书节点是利用相同的交易辅助信息对智能合约进行背书,故各背书节点对智能合约的执行结果相同,从而提高了交易的成功率和效率。
参见图1,该图为本申请实施例提供的一种区块链背书方法的流程示意图。以下对本申请实施例提供的区块链背书方法进行详细介绍。
本申请实施例提供的区块链背书方法,可以应用于第一服务器。
在一种可能的实现方式中,第一服务器可以包括可以实现背书节点功能的功能实体和 可以获取交易辅助信息的功能实体。
在另一种可能的实现方式中,第一服务器可以包括可以实现背书节点功能的功能实体、可以实现成员节点功能的功能实体和可以获取交易辅助信息的功能实体。
本申请实施例提供的区块链背书方法可以通过如下步骤101至步骤103实现。
步骤101:获取对智能合约进行背书所需要信息的信息描述。
需要说明的是,本申请实施例中提及的对智能合约进行背书所需要信息,包括,交易辅助信息。
需要说明的是,本申请实施例不具体限定对智能合约进行背书所需要信息的信息描述的具体形式以及所包含具体内容。例如,对智能合约进行背书所需要的信息的信息描述可以包含交易辅助信息的类型等信息描述,又如,对智能合约进行背书所需要的信息的信息描述可以包含交易辅助信息的来源等信息描述。
需要说明的是,第一服务器的结构不同,步骤101的具体实现方式不同。
当第一服务器包括可以实现背书节点功能的功能实体、可以实现成员节点功能的功能实体以及可以获取交易辅助信息的功能实体时,步骤101在具体实现时,可以有多种实现方式。
在一种可能的实现方式中,成员节点发送的交易请求中,可以携带该智能合约进行背书所需要信息的信息描述,因此,在本申请实施例中,背书节点可以从成员节点发送的交易请求中获取对智能合约进行背书所需要信息的信息描述。在另一种可能的实现方式中,成员节点发送的交易请求中,可以携带该智能合约的合约ID,背书节点可以根据该合约ID,从数据库中找到该合约ID对应的该智能合约进行背书所需要信息的信息描述。
当第一服务器包括可以实现背书节点功能的功能实体和可以获取交易辅助信息的功能实体时,步骤101在具体实现时,可以有多种实现方式。
如前文所述,用户可以利用成员节点发送交易请求。因此,在一种可能的实现方式中,成员节点发送的交易请求中,可以携带该智能合约进行背书所需要信息的信息描述,因此,在本申请实施例中,第一服务器可以从成员节点发送的交易请求中获取对智能合约进行背书所需要信息的信息描述。在另一种可能的实现方式中,成员节点发送的交易请求中,可以携带该智能合约的合约ID,第一服务器可以根据该合约ID,从数据库中找到该合约ID对应的该智能合约进行背书所需要信息的信息描述。
需要说明的是,智能合约进行背书所需要的信息的信息描述可以预先存储在数据库中,该数据库中存储有智能合约的合约ID与智能合约进行背书所需要信息的信息描述的对应关系,因此,第一服务器或背书节点可以根据智能合约的合约ID从数据库中查找到该智能合约进行背书所需要的信息的信息描述。
步骤102:根据信息描述获取若干个版本的交易辅助信息,并从该若干个版本中确定出一个目标版本。
需要说明的是,步骤102在具体实现时,可以有多种实现方式。
需要说明的是,第一服务器获取交易辅助信息时,可以向能够提供该交易辅助信息的信息源发送信息获取请求。在一种可能的实现方式中,第一服务器可以向信息源发送多次 信息获取请求,信息源可以每接收到一次信息获取请求,则向第一服务器返回一个版本的交易辅助信息,在另一种可能的实现方式中,第一服务器仅向信息源发送一次信息获取请求,信息源也可以在接收到一次信息获取请求之后,定期向第一服务器主动发送一个版本交易辅助信息。
需要说明的是,本申请实施例不具体限定交易辅助信息的版本的数目。该版本的数目可以根据具体的智能合约交易确定。作为一种示例,交易辅助信息的版本的数目可以为5。
需要说明的是,在本申请实施例中,第一服务器获取到交易辅助信息之后,可以将交易辅助信息存储在相应的存储空间中,在一种可能的实现方式中,第一服务器可以利用键-值(key-value)方式存储获取的交易辅助信息。利用键-值(key-value)方式存储获取的交易辅助信息,是指,为交易辅助信息设置一个版本号,存储交易辅助信息时,对应存储与该交易辅助信息对应的版本号。可以理解的是,版本号与交易辅助信息是对应存储的,即在存储版本号的交易辅助信息时,为版本号和交易辅助信息建立了对应关系。也就是说,通过版本号可以检索到与该版本号对应的交易辅助信息,利用交易辅助信息也可以检索到该交易辅助信息对应的版本号。
表1
版本号 交易辅助信息
1 Data1
2 Data2
3 Data3
4 Data4
5 Data5
例如,可结合表1进行理解,一共获取了5个版本的交易辅助信息,在进行存储时,存储这5个版本的交易辅助信息以及与该5个版本的交易辅助信息对应的版本号。版本号“1”和交易辅助信息Data1对应存储,通过版本号“1”可以检索到交易辅助信息“Data1”;版本号“2”和交易辅助信息Data2对应存储,通过版本号“2”可以检索到交易辅助信息“Data2”;版本号“3”和交易辅助信息Data3对应存储,通过版本号“3”可以检索到交易辅助信息“Data3”;版本号“4”和交易辅助信息Data4对应存储,通过版本号“4”可以检索到交易辅助信息“Data4”;版本号“5”和交易辅助信息Data5对应存储,通过版本号“5”可以检索到交易辅助信息“Data5”。
需要说明的是,虽然表1所示的版本号为1、2、3、4、5。但是表1只是示意性的说明,版本号还可以是其它的形式,例如5个版本的版本号为1.0、1.1、1.2、1.3、1.4、1.5。只要各个版本的交易辅助信息对应的版本号互不相同即可。
在本申请实施例中,从该若干个版本中确定出一个目标版本,是指,在若干个目标版本的交易辅助信息中,确定出一个版本的交易辅助信息。
步骤103:利用该一个目标版本的交易辅助信息对智能合约进行背书。
在确定目标版本的交易辅助信息之后,各个参与背书的背书节点可以均利用该目标版本的交易辅助信息对智能合约进行背书。
本申请实施例不具体限定背书节点利用目标版本对应的交易辅助信息对智能合约进行背书的具体实现,具体实现可以根据智能合约的具体交易确定。
本申请实施例提供的区块链背书方法,首先,获取对智能合约进行背书所需要信息的信息描述;然后,根据该信息描述获取若干个版本的交易辅助信息,并从若干个版本的交易辅助信息中确定出一个目标版本;最后,利用目标版本的交易辅助信息对智能合约进行背书。也就是说,在本申请实施例中,虽然不同背书节点获取到的交易辅助信息可能不同,但是,各背书节点并不是利用自身获得的交易辅助信息对智能合约进行背书,而是利用目标版本的交易辅助信息对智能合约进行背书,即,各背书节点是利用相同的交易辅助信息对智能合约进行背书,故各背书节点对稚嫩合约的执行结果相同,从而提高了交易的成功率和效率。
需要说明的是,以上实施例提供的区块链背书方法,步骤102中“从该若干个版本中确定出一个目标版本”可以有多种实现方式,以下将介绍步骤102中“从该若干个版本中确定出一个目标版本”的具体实现方式。
在一种可能实现的方式中,步骤102中“从该若干个版本中确定出一个目标版本”在具体实现时,可以将若干个版本的交易辅助信息中,获取时间最早的版本确定为一个目标版本。
可以理解的是,若要将若干个版本的交易辅助信息中,获取时间最早的版本确定为一个目标版本。则需要确定各个版本的交易辅助信息中,哪一个版本的交易辅助信息的获取时间最早。如前文所述,版本号与交易辅助信息是对应存储的,即在存储版本号的交易辅助信息时,为版本号和交易辅助信息建立了对应关系。因此,在本实施例中,可以利用交易辅助信息的版本号来确定哪一个版本的交易辅助信息的获取时间最早。具体地,在存储版本号与交易辅助信息时,可以按照交易辅助信息获取的时间顺序,确定交易辅助信息对应的版本号的变化趋势。例如,交易辅助信息获取的时间由早到晚,对应的交易辅助信息的版本号由小到大。也就是说,版本号越小,对应的交易辅助信息的获取时间越早,版本号越大,对应的交易辅助信息的获取时间越晚。这样一来,就可以将版本号最小的交易辅助信息确定为获取时间最早的交易辅助信息,从而确定出一个目标版本的交易辅助信息。
由于该目标版本的交易辅助信息是各个版本中获取时间最早的交易辅助信息,因此,可以保证在成员节点发起交易请求之后,尽快确定最终参与背书的交易辅助信息,从而可以尽快对智能合约进行背书,保证了交易的及时性。
在另一种可能实现的方式中,步骤102中“从该若干个版本中确定出一个目标版本”在具体实现时,可以利用背书节点的标识对若干个版本的交易辅助信息进行签名,并将签名次数最多的版本确定为一个目标版本。其中,背书节点为利用该一个目标版本的交易辅助信息对智能合约进行背书的节点。
背书节点的标识用于唯一标识背书节点。本申请实施例对背书节点的标识的具体表现形式不做具体限定。例如,背书节点的标识用8比特2进制数表示,背书节点A的标识为 0000-0001,背书节点B的标识为0000-0010。
在本申请实施例中,利用背书节点的标识对交易辅助信息进行签名之后,即可认为该交易辅助信息是该背书节点认可的交易辅助信息。例如,背书节点A的标识对版本1的交易辅助信息进行了签名,则说明版本1的交易辅助信息是背书节点A认可的交易辅助信息。
可以理解的是,签名次数最多的版本的交易辅助信息,对应的,认可该交易辅助信息的背书节点的数目最多,也就是说,该交易辅助信息的认可度最高。将认可度最高的交易辅助信息作为目标版本的辅助信息,并利用该目标版本的交易辅助信息对智能合约进行背书,可以保证交易的公平性。
需要说明的是,在实际应用中,不仅要求在各个版本的交易辅助信息中,目标版本的交易辅助信息的认可度最高,还要求其认可度要不低于一定的阈值。具体地,认可度不低于一定的阈值,可以体现在,该目标版本的交易辅助信息被签名的次数不低于第一预设次数。即该目标版本的交易辅助信息被不低于第一预设数目个背书节点的标识签名。
因此,在本申请实施例中,确定目标版本时,可以将签名次数最多且不低于第一预设次数的版本确定为目标版本,其中,第一预设次数大于或等于实现对智能合约进行背书所需要的最少签名数目。例如,实现对智能合约进行背书所需要的最少签名数目为3,版本1的交易辅助信息的签名次数最多,签名次数为5次,由于签名次数5大于实现对智能合约进行背书所需要的最少签名数目3,因此,将版本1的交易辅助信息作为目标版本的交易辅助信息。
以下结合图2对利用背书节点的标识对若干个版本的交易辅助信息进行签名,并将签名次数最多且不低于第一预设次数的版本确定为一个目标版本的具体实现方式。图2所示的方法,可以通过如下步骤201至步骤205实现。
步骤201:对于每个背书节点标识,分别利用该背书节点的标识,对若干个版本中与该背书节点的标识对应版本的交易辅助信息进行一次签名。
需要说明的是,在步骤201中,一个背书节点的标识只能对一个版本的交易辅助信息进行签名。例如,当前有版本1、版本2、版本3,版本4、版本5这5个版本的交易辅助信息,参与签名的背书节点分别为背书节点A、背书节点B、背书节点C、背书节点D、背书节点E、背书节点F。对于一个背书节点的标识而言,只能利用该背书节点的标识从5个版本中选择其中一个版本进行签名,不能同时选择多个版本进行签名。例如,不能利用背书节点A的标识对版本1的交易辅助信息签名,又对版本2的交易辅助信息进行签名。
需要说明的是,在本申请实施例中,与该背书节点的标识对应版本的交易辅助信息,可以包含多种情况。相应的,利用该背书节点的标识,对若干个版本中与该背书节点的标识对应版本的交易辅助信息进行一次签名,也有多种实现方式。
第一种情况,与该背书节点的标识对应版本的交易辅助信息,是指,若干个版本中最新版本的交易辅助信息。
相应的,利用该背书节点的标识,对若干个版本中与该背书节点的标识对应版本的交易辅助信息进行一次签名,是指,利用背书节点的标识,对若干个版本中的交易辅助信息 中该背书节点的标识签名时对应的最新版本的交易辅助信息进行签名。
可以理解的是,利用各个背书节点的标识对交易辅助信息进行签名的时间不同,由于交易辅助信息可能是实时变化的,故而不同时间对应的最新版本的交易辅助信息可能不同,因此,各个背书节点的标识签名时对应版本的交易辅助信息也可能不同。
举例而言,利用背书节点A的标识对交易辅助信息进行签名时,当前存在的交易辅助信息为版本1,即版本1为最新版本的交易辅助信息,此时,利用背书节点A的标识对版本1的交易辅助信息进行签名;利用背书节点B的标识对交易辅助信息进行签名时,当前存在的交易辅助信息为版本1、版本2和版本3,版本3为最新版本的交易辅助信息,此时,利用背书节点B的标识对版本3的交易辅助信息进行签名;利用背书节点C的标识对交易辅助信息进行签名时,当前存在的交易辅助信息为版本1、版本2和版本3,即版本3为最新版本的交易辅助信息,此时,利用背书节点C的标识对版本3的交易辅助信息进行签名;同理,在后续签名的过程中,利用背书节点D的标识对版本4的交易辅助信息进行签名;利用背书节点E的标识对版本4的交易辅助信息进行签名;利用背书节点F的标识对版本5的交易辅助信息进行签名。
利用各背书节点的标识对各版本的交易辅助信息进行签名的结果如下表2所示。
表2
交易辅助信息版本 签名的背书节点的标识
1 A
2  
3 B和C
4 D和E
5 F
从表2可以看出,采用以上第一种情况所提供的方法执行步骤201之后,可能一些版本的交易辅助信息被多个背书节点的标识签名,例如,版本3和版本4对应的交易辅助信息均被2个背书节点的标识签名;而一些版本的交易辅助信息未被任何一个背书节点的标识签名,例如,版本2对应的交易辅助信息未被任何一个背书节点的标识签名。
第二种情况:与该背书节点的标识对应版本的交易辅助信息,是指,若干个版本中未被任意一个背书节点的标识签名的版本的交易辅助信息。
相应的,利用该背书节点的标识,对若干个版本中与该背书节点的标识对应版本的交易辅助信息进行一次签名,是指,利用背书节点的标识,对若干个版本中该背书节点的标识签名时未被任意一个背书节点的标识签名的版本的交易辅助信息进行签名。
举例而言,对于表2所示的情况,利用背书节点G的标识对交易辅助信息进行签名时,由于当前存在的交易辅助信息为版本1、版本2、版本3、版本4和版本5。版本2并未被任意一个背书节点的标识签名,此时,版本2对应的交易辅助信息为与背书节点G的标识对应版本的交易辅助信息,利用背书节点G的标识对版本2的交易辅助信息进行签名。签名结果如下表3所示。
表3
交易辅助信息版本 签名的背书节点的标识
1 A
2 G
3 B和C
4 D和E
5 F
步骤202:若若干个版本的交易辅助信息中未出现一个目标版本,且签名总次数大于或等于第一预设次数,则遍历待选版本集合中各版本交易辅助信息,其中,待选版本集合中包含已被签名的版本的交易辅助信息。
需要说明的是,步骤202中提及的出现一个目标版本,是指,存在一个版本的交易辅助信息对应的签名次数最多,且签名次数大于或等于第一预设次数。相应的,未出现一个目标版本,是指,不存在一个版本的交易辅助信息最多,且签名次数大于或等于第一预设次数。
可以理解的是,执行步骤201之后,可能一些版本的交易辅助信息被多个背书节点的标识签名,并且签名次数大于第一预设次数,即可能出现一个目标版本。若出现一个目标版本,则利用该目标版本的交易辅助信息对智能合约进行背书,无需执行步骤202及后续步骤。
需要说明的是,在步骤202中,待选版本集合中包含已被签名的版本的交易辅助信息,也就是说,在步骤202中,对已被签名的版本的交易辅助信息进行遍历,并执行步骤203及后续步骤,从而从待选版本集合中确定一个目标版本的交易辅助信息;对未被签名的版本的交易辅助信息,可以直接丢弃,不再处理。例如,对于表2所示的情况,待选版本集合中包含版本1、版本3、版本4以及版本5,可以对版本1、版本3、版本4以及版本5的交易辅助信息进行遍历,并执行步骤203及后续步骤,从而确定一个目标版本的交易辅助信息,对于版本2的交易辅助信息,可以直接丢弃,不再处理。
需要说明的是,在遍历待选版本集合中各版本交易辅助信息时,可以按照一定的顺序进行遍历,本申请实施例不具体限定该顺序,作为一种示例,可以按照版本号由高到低或者由低到高的顺序遍历待选版本集合中各版本交易辅助信息。例如,对于表2所示的情况,遍历待选版本集合中各版本交易辅助信息时,可以根据版本1、版本3、版本4以及版本5的顺序遍历,也可以根据版本5、版本4、版本3以及版本1的顺序进行遍历。
步骤203:对于待选版本集合中的每个版本交易辅助信息,按照预设顺序遍历已进行签名的背书节点的标识。若当前版本的交易辅助信息未被当前背书节点的标识签名,则执行步骤203a。
若当前版本的交易辅助信息已经被当前背书节点的标识签名,则执行步骤203b。
步骤203a:利用当前背书节点的标识对当前版本的交易辅助信息签名。
步骤203a执行之后,执行步骤204。
步骤203b:将下一个版本的交易辅助信息作为当前版本的交易辅助信息,执行步骤 203。
需要说明的是,步骤203中提及的当前版本交易信息是指,对待选版本集合中的交易辅助信息进行遍历时,当前时刻对应的遍历的版本的交易辅助信息。例如,当前时刻对应的遍历的版本的交易辅助信息为版本3的交易辅助信息,则当前版本的交易辅助信息为版本3的交易辅助信息。
如前文所述,在遍历待选版本集合中各版本交易辅助信息时,可以按照一定的顺序进行遍历。步骤203首次被执行时,步骤203中提及的当前版本的交易辅助信息是指,按照一定的顺序对待选版本集合中各版本交易辅助信息遍历时,排序位置第一所对应的版本的交易辅助信息。例如,根据版本1、版本3、版本4以及版本5的顺序对各版本交易辅助信息遍历时,步骤203首次被执行时,版本1的交易辅助信息为当前版本的交易辅助信息。
需要说明的是,关于步骤203中提及的对于待选版本集合中的每个版本交易辅助信息,按照预设顺序遍历已进行签名的背书节点的标识。本申请实施例不具体限定该预设顺序。作为一种示例,可以按照对若干个版本的对应版本的交易辅助信息进行签名时,由早到晚或者由晚到早的签名顺序,遍历已经签名的背书节点的标识。
例如,对于表2所示的情况,各个背书节点的标识对若干个版本的对应版本的交易辅助信息进行签名时,由早到晚的顺序是,节点A的标识、节点B的标识、节点C的标识、节点D的标识、节点E的标识、节点F的标识,因此,对于待选版本集合中的每个版本交易辅助信息,可以根据节点A的标识、节点B的标识、节点C的标识、节点D的标识、节点E的标识、节点F的标识的顺序进行遍历。又如,对于表2所示的情况,各个背书节点的标识对若干个版本的对应版本的交易辅助信息进行签名时,由晚到早的顺序是,节点F的标识、节点E的标识、节点D的标识、节点C的标识、节点B的标识、节点A的标识,因此,对于待选版本集合中的每个版本交易辅助信息,可以根据节点F的标识、节点E的标识、节点D的标识、节点C的标识、节点B的标识、节点A的标识的顺序进行遍历。
步骤204:若当前版本的交易辅助信息签名次数最多且不低于第一预设次数,则将当前版本确定为一个目标版本。
关于步骤204,需要说明的是,若当前版本的交易辅助信息的签名次数最多且不低于第一预设次数,则可以直接将当前版本确定为一个目标版本,结束流程,不再遍历当前版本的后续版本。例如,按照版本1、版本3、版本4以及版本5的顺序对各版本交易辅助信息遍历时,当前版本为版本3,版本3的交易辅助信息签名次数最多且不低于第一预设次数,则可以直接将版本3的交易辅助信息作为一个目标版本的交易辅助信息,结束流程。不再对版本4和版本5的交易辅助信息执行按照预设顺序遍历已进行签名的背书节点的标识的操作。
可以理解的是,如上文所述,对各版本交易辅助信息进行遍历时,可以按照版本号由高到低或者由低到高的顺序遍历待选版本集合中各版本交易辅助信息。对于待选版本集合中的每个版本交易辅助信息,按照预设顺序遍历已进行签名的背书节点的标识时,可以按照对所述若干个版本中对应版本的交易辅助信息进行签名时,由早到晚或由晚到早的签名顺序,遍历所述已进行签名的背书节点的标识。也就是说,从待选版本集合中的交易辅助 信息中确定一个目标版本的交易辅助信息时,根据对各版本交易辅助信息进行遍历的顺序,以及,对于待选版本集合中的每个版本交易辅助信息,对已进行签名的背书节点的标识进行遍历的顺序的组合,可以包括如下表4所示的4种可能的实现方案。
表4
Figure PCTCN2019080734-appb-000001
以下在第一预设次数为3,步骤201的执行结果如表2所示的情况下,分别对这4种实现方案介绍图2所述的方法。
第1种实现方案:根据版本1、版本3、版本4以及版本5的顺序对各版本交易辅助信息遍历时,对于版本1、版本3、版本4以及版本5的交易辅助信息,根据节点A的标识、节点B的标识、节点C的标识、节点D的标识、节点E的标识、节点F的标识的顺序遍历背书节点的标识。
步骤201执行结束,当前版本为版本1的交易辅助信息,针对版本1的交易辅助信息,遍历各个背书节点的标识,当前节点的标识为节点A的标识,由于版本1的交易辅助信息已经被节点A的标识签名,因此,将版本3的交易辅助信息作为当前版本的交易辅助信息,遍历各个背书节点的标识。由于版本3的交易辅助信息并未被节点A的标识签名,此时,利用节点A的标识对版本3的交易辅助信息签名。此时,版本3的签名次数最多,为3次,且不低于第一预设次数3,则将版本3的交易辅助信息作为目标版本的交易辅助信息。结束流程。
第2种实现方案:根据版本1、版本3、版本4以及版本5的顺序对各版本交易辅助信息遍历时,对于版本1、版本3、版本4以及版本5的交易辅助信息,根据节点F的标识、节点E的标识、节点D的标识、节点C的标识、节点B的标识、节点A的标识的顺序遍历背书节点的标识。
步骤201执行结束,当前版本为版本1的交易辅助信息,针对版本1的交易辅助信息,遍历各个背书节点的标识,当前节点的标识为节点F的标识,由于版本1的交易辅助信息并未被节点F的标识签名,因此,利用节点F的标识对版本1的交易辅助信息签名。此时,版本1的交易辅助信息的签名次数虽然最多,但并未超过3,故而继续遍历各个已进行签名的背书节点的标识。对应的,当前节点变为节点E,由于版本1的交易辅助信息并未被节点E的标识签名,因此,利用节点E的标识对版本1的交易辅助信息签名。此时,版本1的签名次数最多,为3次,且不低于第一预设次数3,则将版本1的交易辅助信息作为目标版本的交易辅助信息。结束流程。
第3种实现方案:根据版本5、版本4、版本3以及版本1的顺序对各版本交易辅助信息遍历时,对于版本5、版本4、版本3以及版本1的交易辅助信息,根据节点A的标识、 节点B的标识、节点C的标识、节点D的标识、节点E的标识、节点F的标识的顺序遍历背书节点的标识。
步骤201执行结束,当前版本为版本5的交易辅助信息,针对版本5的交易辅助信息,遍历各个背书节点的标识,当前节点的标识为节点A的标识,由于版本5的交易辅助信息并未被节点A的标识签名,因此,利用节点A的标识对版本5的交易辅助信息签名。此时,版本5的交易辅助信息的签名次数虽然最多,但并未超过3,故而继续遍历各个已进行签名的背书节点的标识。对应的,当前节点变为节点B,由于版本5的交易辅助信息并未被节点B的标识签名,因此利用节点B的标识对版本5的交易辅助信息签名。此时,版本5的签名次数最多,为3次,且不低于第一预设次数3,则将版本5的交易辅助信息作为目标版本的交易辅助信息。结束流程。
第4种实现方案:根据版本5、版本4、版本3以及版本1的顺序对各版本交易辅助信息遍历时,对于版本5、版本4、版本3以及版本1的交易辅助信息,根据节点A的标识、节点B的标识、节点C的标识、节点D的标识、节点E的标识、节点F的标识的顺序遍历背书节点的标识。
步骤201执行结束,当前版本为版本5的交易辅助信息,针对版本5的交易辅助信息,遍历各个背书节点的标识,当前节点的标识为节点F的标识,由于版本5的交易辅助信息已经被节点F的标识签名,因此,将版本4的交易辅助信息作为当前版本的交易辅助信息,遍历各个背书节点的标识。由于版本4的交易辅助信息并未被节点F的标识签名,此时,利用节点F的标识对版本4的交易辅助信息签名。此时,版本4的签名次数最多,为3次,且不低于第一预设次数3,则将版本4的交易辅助信息作为目标版本的交易辅助信息。结束流程。
利用以上四种方案,可以获得认可度不低于一定的阈值的目标版本的交易辅助信息,从而利用该目标版本的交易辅助信息完成对智能合约的背书。从以上四种方案可知,对于方案1和方案4,最终确定的目标版本的交易辅助信息是版本号比较居中的版本的交易辅助信息。对于方案2和方案3,最终确定目标版本的交易辅助信息是版本号靠前或者靠后的交易辅助信息。在实际应用中,可以根据实际需要选择其中一种实现方式。
以上内容对本申请实施例提供的区块链背书方法进行了描述,请结合图3进行理解,图3为本申请实施例提供的一个应用场景示意图。在该场景下,成员节点100发起交易,向背书节点200发送交易请求,预言机300从信息源400处获取多个版本的交易辅助信息,并确定出一个目标版本的交易辅助信息,背书节点200利用目标版本的交易辅助信息对智能合约进行背书。
本申请实施例提供的区块链背书方法,可以应用于第一服务器,具体地,在图3所示的场景中,第一服务器可以包括交易节点100、背书节点200和预言机300。在该场景下,预言机300将从信息源400处获得的若干个版本的交易辅助信息中,获取时间最早的版本确定为目标版本的交易辅助信息。需要说明的是,在实际应用中,背书节点的个数可以为多个,但是图3只是示意性的示出了一个背书节点。
下面结合图3所示的应用场景以及图4对本申请实施例提供的区块链背书方法进行描述。
步骤401:成员节点100向背书节点200发送交易请求。
需要说明的是,该交易请求用于发起智能合约交易。该交易请求中可以包含智能合约的合约ID。
步骤402:背书节点200根据交易请求确定需要交易辅助信息。
背书节点200接收到交易请求之后,可以根据该交易请求中携带的合约ID确定该交易请求是否需要交易辅助信息。
步骤403:背书节点200向预言机300发送交易辅助信息获取请求。
步骤403中的交易辅助信息获取请求,用于请求对该智能合约进行背书需要的交易辅助信息。
步骤404:预言机300获取交易辅助信息的信息描述,并查询到本地未缓存交易辅助信息。
需要说明的是,预言机300可以根据交易辅助信息的信息描述确定,所需要的交易辅助信息的具体内容。从而根据交易辅助信息的具体内容查询到本地是否已经缓存交易辅助信息。
需要说明的是,预言机300可以将存储交易辅助信息时,对应存储与该交易辅助信息对应的版本号。
步骤405:预言机300从数据源400处获取交易辅助信息,并将从信息源400处获得的若干个版本的交易辅助信息中,获取时间最早的版本确定为目标版本的交易辅助信息。
需要说明的是,虽然在步骤405中,预言机300将若干个版本的交易辅助信息中,获取时间最早的版本确定为目标版本的交易辅助信息。但是,在另一种实现方式中,预言机300也可以利用背书节点的标识对若干个版本的交易辅助信息进行签名,并将签名次数最多的版本的交易辅助信息确定为目标版本的交易辅助信息。或者,预言机300利用背书节点的标识对若干个版本的交易辅助信息进行签名,并将签名次数最多且签名次数不低于第一预设次数的版本的交易辅助信息确定为目标版本的交易辅助信息。
步骤406:预言机300将目标版本的交易辅助信息发送给背书节点200。
步骤407:背书节点200根据目标版本的交易辅助信息对智能合约进行背书。
关于步骤406和步骤407,需要说明的是,当背书节点的个数为多个时,预言机300可以将目标版本的交易辅助信息发送给各个背书节点,以使得各个背书节点利用目标版本的交易辅助信息对智能合约进行背书。
步骤408:背书节点200将对智能合约进行背书的结果发送至交易节点100。
步骤409:交易节点100确定各个背书节点对智能合约进行背书的执行结果相同。判定智能合约交易成功。
本申请实施例提供的区块链背书方法,虽然不同背书节点获取到的交易辅助信息可能不同,但是,各背书节点并不是利用自身获得的交易辅助信息对智能合约进行背书,而是利用目标版本的交易辅助信息对智能合约进行背书,即,各背书节点是利用相同的交易辅 助信息对智能合约进行背书,故各背书节点对稚嫩合约的执行结果相同,从而提高了交易的成功率和效率。
以上实施例介绍了一种可应用于区块链背书方法及装置。本申请实施例提供还提供一种区块链背书方法,该方法应用于第二服务器。第二服务器可以包括可以获取交易辅助信息的功能实体。此处提及的第二服务器,例如可以包括图3所述的预言机300。
以下结合图5对本申请实施例提供的区块链背书进行介绍。本申请实施例提供的区块链背书方法,可以通过如下步骤501至步骤503实现。
步骤501:获取来自背书节点的信息获取请求,信息获取请求携带有对智能合约进行背书所需要信息的信息描述。
如前文所述,用户可以利用成员节点发送交易请求。背书节点可以根据成员节点发送的交易请求,判断该交易请求是否需要交易辅助信息。若该交易请求需要交易辅助信息,则背书节点向第二服务器发送信息获取请求。
需要说明的是,步骤501中提及的背书节点以及成员节点,可以是独立于第二服务器的功能实体,作为一种实施例,背书节点和成员节点可以是第三服务器中所包含的功能实体。
需要说明的是,本申请实施例不具体限定对智能合约进行背书所需要信息的信息描述的具体形式以及所包含具体内容。例如,对智能合约进行背书所需要的信息的信息描述可以包含交易辅助信息的类型等信息描述,又如,对智能合约进行背书所需要的信息的信息描述可以包含交易辅助信息的来源等信息描述。
步骤502:根据信息描述获取若干个版本的交易辅助信息,并从若干个版本的交易辅助信息中确定出一个目标版本。
需要说明的是,本申请实施例不具体限定交易辅助信息的版本的数目。该版本的数目可以根据具体的智能合约交易确定。作为一种示例,交易辅助信息的版本的数目可以为5。
需要说明的是,在本申请实施例中,获取到交易辅助信息之后,可以将交易辅助信息存储在相应的存储空间中,并为交易辅助信息设置一个版本号,存储交易辅助信息时,对应存储与该交易辅助信息对应的版本号。可以理解的是,版本号与交易辅助信息是对应存储的,即在存储版本号的交易辅助信息时,为版本号和交易辅助信息建立了对应关系。也就是说,通过版本号可以检索到与该版本号对应的交易辅助信息,利用交易辅助信息也可以检索到该交易辅助信息对应的版本号。
在本申请实施例中,从该若干个版本中确定出一个目标版本,是指,在若干个目标版本的交易辅助信息中,确定一个版本的交易辅助信息。
步骤502与步骤102的内容相同,具体描述可以参考步骤102中相关内容的描述,在此不再赘述。
步骤503:向背书节点发送一个目标版本的交易辅助信息,该一个版本的交易辅助信息用于背书节点对智能合约进行背书。
本申请实施例不具体限定背书节点的数目,第二服务器可以将目标版本的交易辅助信 息发送给一个或多个背书节点,以使得接收到目标版本的交易辅助信息的一个或多个背书节点利用该目标版本的交易辅助信息对智能合约进行背书。
本申请实施例不具体限定背书节点利用目标版本对应的交易辅助信息对智能合约进行背书的具体实现,具体实现可以根据智能合约的具体交易确定。
本申请实施例提供的区块链背书方法,首先,获取来自于背书节点的信息获取请求,信息获取请求携带有对智能合约进行背书所需要信息的信息描述;然后,根据该信息描述获取若干个版本的交易辅助信息,并从若干个版本的交易辅助信息中确定出一个目标版本;最后,向所述背书节点发送一个目标版本的交易辅助信息,该一个目标版本的交易辅助信息用于背书节点对智能合约进行背书。也就是说,在本申请实施例中,各背书节点是利用目标版本的交易辅助信息对智能合约进行背书,即,各背书节点是利用相同的交易辅助信息对智能合约进行背书,故各背书节点对稚嫩合约的执行结果相同,从而提高了交易的成功率和效率。
在一种可能的实现中,从若干个版本中确定出一个目标版本包括:
将若干个版本的交易辅助信息中,获取时间最早的版本确定为一个目标版本。
在一种可能的实现中,从若干个版本中确定出一个目标版本包括:
利用背书节点的标识对若干个版本的交易辅助信息进行签名,并将签名次数最多的版本确定为一个目标版本。
在一种可能的实现中,将签名次数最多的版本确定为一个目标版本包括:
将签名次数最多且不低于第一预设次数的版本确定为一个目标版本,第一预设次数大于或等于实现对智能合约进行背书所需要的最少签名数目。
在一种可能的实现中,利用背书节点的标识对若干个版本的交易辅助信息进行签名,并将签名次数最多且不低于第一预设次数的版本确定为一个目标版本包括:
对于每个背书节点标识,分别利用该背书节点的标识,对若干个版本中与该背书节点的标识对应版本的交易辅助信息进行一次签名;
若若干个版本的交易辅助信息中未出现一个目标版本,且签名总次数大于或等于第一预设次数,则遍历待选版本集合中各版本交易辅助信息,其中,待选版本集合包括已被签名的版本的交易辅助信息;
对于待选版本集合中的每个版本交易辅助信息,按照预设顺序遍历已进行签名的背书节点的标识,若当前版本的交易辅助信息未被当前背书节点的标识签名,则利用当前背书节点的标识对当前版本的交易辅助信息签名;
若当前版本的交易辅助信息签名次数最多且不低于第一预设次数,则将当前版本确定为一个目标版本。
在一种可能的实现中,若当前版本的交易辅助信息被当前背书节点的标识签名,则方法还包括:
将下一个版本的交易辅助信息作为当前版本的交易辅助信息,执行按照预设顺序遍历已进行签名的背书节点的标识的步骤。
在一种可能的实现中,分别利用该背书节点的标识,对若干个版本中与该背书节点对 应版本的交易辅助信息进行签名包括:
分别利用该背书节点的标识,对若干个版本中签名时对应的最新版本的交易辅助信息进行签名。
在一种可能的实现中,遍历待选版本集合中各版本交易辅助信息包括:
按照版本号由低到高或由高到低的顺序遍历待选版本集合中各版本交易辅助信息。
在一种可能的实现中,按照预设顺序遍历已进行签名的背书节点的标识包括:
按照对若干个版本中对应版本的交易辅助信息进行签名时,由早到晚或由晚到早的签名顺序,遍历已进行签名的背书节点的标识。
需要说明的是,以上应用于第二服务器的区块链背书方法与应用于第一服务器的区块链背书方法的部分实现方式类似,故而可以参考前述对于应用于第一服务器的区块链背书方法的描述部分,在此不再赘述。
为便于更好的实施本申请实施例的上述方案,下面还提供用于实施上述应用于第一服务器的区块链背书方法的相关装置。
请参考图6所示,本申请实施例提供的一种区块链背书装置600,该通信装置600具体对应于上述提供的区块链背书方法的功能。该区块链背书装置600的功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。硬件或软件包括一个或多个与上述功能相对应的单元,单元可以是软件和/或硬件。该装置600可以包括:第一获取单元610、第一确定单元620和背书单元630。
第一获取单元610,用于获取对智能合约进行背书所需要信息的信息描述;
第一确定单元620,用于根据信息描述获取若干个版本的交易辅助信息,并从若干个版本中确定出一个目标版本;
背书单元630,用于利用一个目标版本的交易辅助信息对智能合约进行背书。
在一种可能的实现中,第一确定单元620,用于将若干个版本的交易辅助信息中,获取时间最早的版本确定为一个目标版本。
在一种可能的实现中,第一确定单元620,用于利用背书节点的标识对若干个版本的交易辅助信息进行签名,并将签名次数最多的版本确定为一个目标版本,背书节点为利用一个目标版本的交易辅助信息对智能合约进行背书的节点。
在一种可能的实现中,将签名次数最多的版本确定为一个目标版本包括:
将签名次数最多且不低于第一预设次数的版本确定为一个目标版本,第一预设次数大于或等于实现对智能合约进行背书所需要的最少签名数目。
在一种可能的实现中,利用背书节点的标识对若干个版本的交易辅助信息进行签名,并将签名次数最多且不低于第一预设次数的版本确定为一个目标版本包括:
对于每个背书节点标识,分别利用该背书节点的标识,对若干个版本中与该背书节点的标识对应版本的交易辅助信息进行一次签名;
若若干个版本的交易辅助信息中未出现一个目标版本,且签名总次数大于或等于第一预设次数,则遍历待选版本集合中各版本交易辅助信息,其中,待选版本集合包括已被签 名的版本的交易辅助信息;
对于待选版本集合中的每个版本交易辅助信息,按照预设顺序遍历已进行签名的背书节点的标识,若当前版本的交易辅助信息未被当前背书节点的标识签名,则利用当前背书节点的标识对当前版本的交易辅助信息签名;
若当前版本的交易辅助信息签名次数最多且不低于第一预设次数,则将当前版本确定为一个目标版本。
在一种可能的实现中,若当前版本的交易辅助信息被当前背书节点的标识签名,则第一确定单元620还用于:
将下一个版本的交易辅助信息作为当前版本的交易辅助信息,执行按照预设顺序遍历已进行签名的背书节点的标识的步骤。
在一种可能的实现中,分别利用该背书节点的标识,对若干个版本中与该背书节点对应版本的交易辅助信息进行签名包括:
分别利用该背书节点的标识,对若干个版本中签名时对应的最新版本的交易辅助信息进行签名。
在一种可能的实现中,遍历待选版本集合中各版本交易辅助信息包括:
按照版本号由低到高或由高到低的顺序遍历待选版本集合中各版本交易辅助信息。
在一种可能的实现中,按照预设顺序遍历已进行签名的背书节点的标识包括:
按照对若干个版本中对应版本的交易辅助信息进行签名时,由早到晚或由晚到早的签名顺序,遍历已进行签名的背书节点的标识。
需要说明的是,上述装置各模块/单元之间的信息交互、执行过程等内容,由于与本申请实施例方法实施例基于同一构思,其带来的技术效果与本申请实施例方法实施例相同,具体内容可参见本申请实施例前述所示的方法实施例中的叙述,此处不再赘述。
为便于更好的实施本申请实施例的上述方案,下面还提供用于实施上述应用于第二服务器的区块链背书方法的相关装置。
请参考图7所示,本申请实施例提供的一种区块链背书装置700,该通信装置700具体对应于上述提供的区块链背书方法的功能。该区块链背书装置700的功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。硬件或软件包括一个或多个与上述功能相对应的单元,单元可以是软件和/或硬件。该装置700可以包括:第二获取单元710、第二获取单元720和发送单元730。
第二获取单元710,用于获取来自于背书节点的信息获取请求,信息获取请求携带有对智能合约进行背书所需要信息的信息描述;
第二确定单元720,用于根据信息描述获取若干个版本的交易辅助信息,并从若干个版本中确定出一个目标版本;
发送单元730,用于向背书节点发送一个目标版本的交易辅助信息,一个目标版本的交易辅助信息用于背书节点对智能合约进行背书。
在一种可能的实现中,第二确定单元720,用于将若干个版本的交易辅助信息中,获 取时间最早的版本确定为一个目标版本。
在一种可能的实现中,第二确定单元720,用于利用背书节点的标识对若干个版本的交易辅助信息进行签名,并将签名次数最多的版本确定为一个目标版本。
在一种可能的实现中,将签名次数最多的版本确定为一个目标版本包括:
将签名次数最多且不低于第一预设次数的版本确定为一个目标版本,第一预设次数大于或等于实现对智能合约进行背书所需要的最少签名数目。
在一种可能的实现中,利用背书节点的标识对若干个版本的交易辅助信息进行签名,并将签名次数最多且不低于第一预设次数的版本确定为一个目标版本包括:
对于每个背书节点标识,分别利用该背书节点的标识,对若干个版本中与该背书节点的标识对应版本的交易辅助信息进行一次签名;
若若干个版本的交易辅助信息中未出现一个目标版本,且签名总次数大于或等于第一预设次数,则遍历待选版本集合中各版本交易辅助信息,其中,待选版本集合包括已被签名的版本的交易辅助信息;
对于待选版本集合中的每个版本交易辅助信息,按照预设顺序遍历已进行签名的背书节点的标识,若当前版本的交易辅助信息未被当前背书节点的标识签名,则利用当前背书节点的标识对当前版本的交易辅助信息签名;
若当前版本的交易辅助信息签名次数最多且不低于第一预设次数,则将当前版本确定为一个目标版本。
在一种可能的实现中,若当前版本的交易辅助信息被当前背书节点的标识签名,则第二确定单元720,还用于将下一个版本的交易辅助信息作为当前版本的交易辅助信息,执行按照预设顺序遍历已进行签名的背书节点的标识的步骤。
在一种可能的实现中,分别利用该背书节点的标识,对若干个版本中与该背书节点对应版本的交易辅助信息进行签名包括:
分别利用该背书节点的标识,对若干个版本中签名时对应的最新版本的交易辅助信息进行签名。
在一种可能的实现中,遍历待选版本集合中各版本交易辅助信息包括:
按照版本号由低到高或由高到低的顺序遍历待选版本集合中各版本交易辅助信息。
在一种可能的实现中,按照预设顺序遍历已进行签名的背书节点的标识包括:
按照对若干个版本中对应版本的交易辅助信息进行签名时,由早到晚或由晚到早的签名顺序,遍历已进行签名的背书节点的标识。
需要说明的是,上述装置各模块/单元之间的信息交互、执行过程等内容,由于与本申请实施例方法实施例基于同一构思,其带来的技术效果与本申请实施例方法实施例相同,具体内容可参见本申请实施例前述所示的方法实施例中的叙述,此处不再赘述。
接下来介绍本申请实施例中的区块链背书设备。请参阅图8所示,通信设备800包括:处理器810、通信接口820和和存储器830。其中通信设备800中的处理器810的数量可以一个或多个,图8中以一个处理器为例。本申请实施例中,处理器810、通信接口820和存储器830可通过总线***或其它方式连接,其中,图8中以通过总线***840连接为例。
处理器810可以是中央处理器(central processing unit,CPU),网络处理器(network processor,NP)或者CPU和NP的组合。处理器810还可以进一步包括硬件芯片。上述硬件芯片可以是专用集成电路(application-specific integrated circuit,ASIC),可编程逻辑器件(programmable logic device,PLD)或其组合。上述PLD可以是复杂可编程逻辑器件(complex programmable logic device,CPLD),现场可编程逻辑门阵列(field-programmable gate array,FPGA),通用阵列逻辑(generic array logic,GAL)或其任意组合。
存储器830可以包括易失性存储器(英文:volatile memory),例如随机存取存储器(random-access memory,RAM);存储器830也可以包括非易失性存储器(英文:non-volatile memory),例如快闪存储器(英文:flash memory),硬盘(hard disk drive,HDD)或固态硬盘(solid-state drive,SSD);存储器410还可以包括上述种类的存储器的组合。
存储器830可以用于存储各个版本的交易辅助信息。
可选地,存储器830存储有操作***和程序、可执行模块或者数据结构,或者它们的子集,或者它们的扩展集,其中,程序可包括各种操作指令,用于实现各种操作。操作***可包括各种***程序,用于实现各种基础业务以及处理基于硬件的任务。处理器810可以读取存储器830中的程序,实现本申请实施例提供的通信方法。
总线***840可以是外设部件互连标准(peripheral component interconnect,PCI)总线或扩展工业标准结构(extended industry standard architecture,EISA)总线等。总线***840可以分为地址总线、数据总线、控制总线等。为便于表示,图8中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。本申请实施例还提供一种计算机可读存储介质,包括指令,当其在计算机上运行时,使得计算机执行以上方法实施例提供的通信方法。
需要说明的是,无论是执行以上所述应用于第一服务器的区块链背书方法的区块链背书设备,还是执行以上所述应用于第二服务器的区块链背书方法的区块链背书设备,均可以采用图8所示的结构。故在此仅以示出图8,不再对分别进行说明。
本申请实施例还提供了一种计算机可读存储介质,包括指令,当其在计算机上运行时,使得计算机执行以上应用于第一服务器的区块链背书方法。
本申请实施例还提供了一种计算机可读存储介质,包括指令,当其在计算机上运行时,使得计算机执行以上应用于第二服务器的区块链背书方法。
本申请实施例还提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行以上应用于第一服务器的区块链背书方法。
本申请实施例还提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行以上应用于第二服务器的区块链背书方法。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的***,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的***,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的 划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个***,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,第一服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围。

Claims (42)

  1. 一种区块链背书方法,其特征在于,所述方法包括:
    获取对智能合约进行背书所需要信息的信息描述;
    根据所述信息描述获取若干个版本的交易辅助信息,并从所述若干个版本中确定出一个目标版本;
    利用所述一个目标版本的交易辅助信息对所述智能合约进行背书。
  2. 根据权利要求1所述的方法,其特征在于,所述从所述若干个版本中确定出一个目标版本包括:
    将所述若干个版本的交易辅助信息中,获取时间最早的版本确定为所述一个目标版本。
  3. 根据权利要求1所述的方法,其特征在于,所述从所述若干个版本中确定出一个目标版本包括:
    利用背书节点的标识对所述若干个版本的交易辅助信息进行签名,并将签名次数最多的版本确定为所述一个目标版本,所述背书节点为利用所述一个目标版本的交易辅助信息对所述智能合约进行背书的节点。
  4. 根据权利要求3所述的方法,其特征在于,所述将签名次数最多的版本确定为所述一个目标版本包括:
    将签名次数最多且不低于第一预设次数的版本确定为所述一个目标版本,所述第一预设次数大于或等于实现对所述智能合约进行背书所需要的最少签名数目。
  5. 根据权利要求4所述的方法,其特征在于,所述利用背书节点的标识对所述若干个版本的交易辅助信息进行签名,并将签名次数最多且不低于第一预设次数的版本确定为所述一个目标版本包括:
    对于每个背书节点标识,分别利用该背书节点的标识,对所述若干个版本中与该背书节点的标识对应版本的交易辅助信息进行一次签名;
    若所述若干个版本的交易辅助信息中未出现所述一个目标版本,且签名总次数大于或等于所述第一预设次数,则遍历待选版本集合中各版本交易辅助信息,其中,所述待选版本集合包括已被签名的版本的交易辅助信息;
    对于所述待选版本集合中的每个版本交易辅助信息,按照预设顺序遍历所述已进行签名的背书节点的标识,若当前版本的交易辅助信息未被当前背书节点的标识签名,则利用所述当前背书节点的标识对所述当前版本的交易辅助信息签名;
    若所述当前版本的交易辅助信息签名次数最多且不低于所述第一预设次数,则将所述当前版本确定为所述一个目标版本。
  6. 根据权利要求5所述的方法,其特征在于,若所述当前版本的交易辅助信息被所述当前背书节点的标识签名,则所述方法还包括:
    将下一个版本的交易辅助信息作为所述当前版本的交易辅助信息,执行所述按照预设顺序遍历所述已进行签名的背书节点的标识的步骤。
  7. 根据权利要求5所述的方法,其特征在于,所述分别利用该背书节点的标识,对 所述若干个版本中与该背书节点对应版本的交易辅助信息进行签名包括:
    分别利用该背书节点的标识,对所述若干个版本中签名时对应的最新版本的交易辅助信息进行签名。
  8. 根据权利要求5所述的方法,其特征在于,所述遍历待选版本集合中各版本交易辅助信息包括:
    按照版本号由低到高或由高到低的顺序遍历所述待选版本集合中各版本交易辅助信息。
  9. 根据权利要求5-8任一项所述的方法,其特征在于,所述按照预设顺序遍历所述已进行签名的背书节点的标识包括:
    按照对所述若干个版本中对应版本的交易辅助信息进行签名时,由早到晚或由晚到早的签名顺序,遍历所述已进行签名的背书节点的标识。
  10. 一种区块链背书方法,其特征在于,所述方法包括:
    获取来自于背书节点的信息获取请求,所述信息获取请求携带有对智能合约进行背书所需要信息的信息描述;
    根据所述信息描述获取若干个版本的交易辅助信息,并从所述若干个版本中确定出一个目标版本;
    向所述背书节点发送所述一个目标版本的交易辅助信息,所述一个目标版本的交易辅助信息用于所述背书节点对所述智能合约进行背书。
  11. 根据权利要求10所述的方法,其特征在于,所述从所述若干个版本中确定出一个目标版本包括:
    将所述若干个版本的交易辅助信息中,获取时间最早的版本确定为所述一个目标版本。
  12. 根据权利要求10所述的方法,其特征在于,所述从所述若干个版本中确定出一个目标版本包括:
    利用所述背书节点的标识对所述若干个版本的交易辅助信息进行签名,并将签名次数最多的版本确定为所述一个目标版本。
  13. 根据权利要求12所述的方法,其特征在于,所述将签名次数最多的版本确定为所述一个目标版本包括:
    将签名次数最多且不低于第一预设次数的版本确定为所述一个目标版本,所述第一预设次数大于或等于实现对所述智能合约进行背书所需要的最少签名数目。
  14. 根据权利要求13所述的方法,其特征在于,所述利用背书节点的标识对所述若干个版本的交易辅助信息进行签名,并将签名次数最多且不低于第一预设次数的版本确定为所述一个目标版本包括:
    对于每个背书节点标识,分别利用该背书节点的标识,对所述若干个版本中与该背书节点的标识对应版本的交易辅助信息进行一次签名;
    若所述若干个版本的交易辅助信息中未出现所述一个目标版本,且签名总次数大于或等于所述第一预设次数,则遍历待选版本集合中各版本交易辅助信息,其中,所述待选版 本集合包括已被签名的版本的交易辅助信息;
    对于所述待选版本集合中的每个版本交易辅助信息,按照预设顺序遍历所述已进行签名的背书节点的标识,若当前版本的交易辅助信息未被当前背书节点的标识签名,则利用所述当前背书节点的标识对所述当前版本的交易辅助信息签名;
    若所述当前版本的交易辅助信息签名次数最多且不低于所述第一预设次数,则将所述当前版本确定为所述一个目标版本。
  15. 根据权利要求14所述的方法,其特征在于,若所述当前版本的交易辅助信息被所述当前背书节点的标识签名,则所述方法还包括:
    将下一个版本的交易辅助信息作为所述当前版本的交易辅助信息,执行所述按照预设顺序遍历所述已进行签名的背书节点的标识的步骤。
  16. 根据权利要求14所述的方法,其特征在于,所述分别利用该背书节点的标识,对所述若干个版本中与该背书节点对应版本的交易辅助信息进行签名包括:
    分别利用该背书节点的标识,对所述若干个版本中签名时对应的最新版本的交易辅助信息进行签名。
  17. 根据权利要求14所述的方法,其特征在于,所述遍历待选版本集合中各版本交易辅助信息包括:
    按照版本号由低到高或由高到低的顺序遍历所述待选版本集合中各版本交易辅助信息。
  18. 根据权利要求14-17任一项所述的方法,其特征在于,所述按照预设顺序遍历所述已进行签名的背书节点的标识包括:
    按照对所述若干个版本中对应版本的交易辅助信息进行签名时,由早到晚或由晚到早的签名顺序,遍历所述已进行签名的背书节点的标识。
  19. 一种区块链背书装置,其特征在于,所述装置包括:
    第一获取单元,用于获取对智能合约进行背书所需要信息的信息描述;
    第一确定单元,用于根据所述信息描述获取若干个版本的交易辅助信息,并从所述若干个版本中确定出一个目标版本;
    背书单元,用于利用所述一个目标版本的交易辅助信息对所述智能合约进行背书。
  20. 根据权利要求19所述的装置,其特征在于,所述第一确定单元,用于将所述若干个版本的交易辅助信息中,获取时间最早的版本确定为所述一个目标版本。
  21. 根据权利要求19所述的装置,其特征在于,所述第一确定单元,用于利用背书节点的标识对所述若干个版本的交易辅助信息进行签名,并将签名次数最多的版本确定为所述一个目标版本,所述背书节点为利用所述一个目标版本的交易辅助信息对所述智能合约进行背书的节点。
  22. 根据权利要求21所述的装置,其特征在于,所述将签名次数最多的版本确定为所述一个目标版本包括:
    将签名次数最多且不低于第一预设次数的版本确定为所述一个目标版本,所述第一预设次数大于或等于实现对所述智能合约进行背书所需要的最少签名数目。
  23. 根据权利要求22所述的装置,其特征在于,所述利用背书节点的标识对所述若干个版本的交易辅助信息进行签名,并将签名次数最多且不低于第一预设次数的版本确定为所述一个目标版本包括:
    对于每个背书节点标识,分别利用该背书节点的标识,对所述若干个版本中与该背书节点的标识对应版本的交易辅助信息进行一次签名;
    若所述若干个版本的交易辅助信息中未出现所述一个目标版本,且签名总次数大于或等于所述第一预设次数,则遍历待选版本集合中各版本交易辅助信息,其中,所述待选版本集合包括已被签名的版本的交易辅助信息;
    对于所述待选版本集合中的每个版本交易辅助信息,按照预设顺序遍历所述已进行签名的背书节点的标识,若当前版本的交易辅助信息未被当前背书节点的标识签名,则利用所述当前背书节点的标识对所述当前版本的交易辅助信息签名;
    若所述当前版本的交易辅助信息签名次数最多且不低于所述第一预设次数,则将所述当前版本确定为所述一个目标版本。
  24. 根据权利要求23所述的装置,其特征在于,若所述当前版本的交易辅助信息被所述当前背书节点的标识签名,则所述第一确定单元还用于:
    将下一个版本的交易辅助信息作为所述当前版本的交易辅助信息,执行所述按照预设顺序遍历所述已进行签名的背书节点的标识的步骤。
  25. 根据权利要求23所述的装置,其特征在于,所述分别利用该背书节点的标识,对所述若干个版本中与该背书节点对应版本的交易辅助信息进行签名包括:
    分别利用该背书节点的标识,对所述若干个版本中签名时对应的最新版本的交易辅助信息进行签名。
  26. 根据权利要求23所述的装置,其特征在于,所述遍历待选版本集合中各版本交易辅助信息包括:
    按照版本号由低到高或由高到低的顺序遍历所述待选版本集合中各版本交易辅助信息。
  27. 根据权利要求23-26任一项所述的装置,其特征在于,所述按照预设顺序遍历所述已进行签名的背书节点的标识包括:
    按照对所述若干个版本中对应版本的交易辅助信息进行签名时,由早到晚或由晚到早的签名顺序,遍历所述已进行签名的背书节点的标识。
  28. 一种区块链背书装置,其特征在于,所述装置包括:
    第二获取单元,用于获取来自于背书节点的信息获取请求,所述信息获取请求携带有对智能合约进行背书所需要信息的信息描述;
    第二确定单元,用于根据所述信息描述获取若干个版本的交易辅助信息,并从所述若干个版本中确定出一个目标版本;
    发送单元,用于向所述背书节点发送所述一个目标版本的交易辅助信息,所述一个目标版本的交易辅助信息用于所述背书节点对所述智能合约进行背书。
  29. 根据权利要求28所述的装置,其特征在于,所述第二确定单元,用于将所述若 干个版本的交易辅助信息中,获取时间最早的版本确定为所述一个目标版本。
  30. 根据权利要求28所述的装置,其特征在于,所述第二确定单元,用于利用所述背书节点的标识对所述若干个版本的交易辅助信息进行签名,并将签名次数最多的版本确定为所述一个目标版本。
  31. 根据权利要求30所述的装置,其特征在于,所述将签名次数最多的版本确定为所述一个目标版本包括:
    将签名次数最多且不低于第一预设次数的版本确定为所述一个目标版本,所述第一预设次数大于或等于实现对所述智能合约进行背书所需要的最少签名数目。
  32. 根据权利要求31所述的装置,其特征在于,所述利用背书节点的标识对所述若干个版本的交易辅助信息进行签名,并将签名次数最多且不低于第一预设次数的版本确定为所述一个目标版本包括:
    对于每个背书节点标识,分别利用该背书节点的标识,对所述若干个版本中与该背书节点的标识对应版本的交易辅助信息进行一次签名;
    若所述若干个版本的交易辅助信息中未出现所述一个目标版本,且签名总次数大于或等于所述第一预设次数,则遍历待选版本集合中各版本交易辅助信息,其中,所述待选版本集合包括已被签名的版本的交易辅助信息;
    对于所述待选版本集合中的每个版本交易辅助信息,按照预设顺序遍历所述已进行签名的背书节点的标识,若当前版本的交易辅助信息未被当前背书节点的标识签名,则利用所述当前背书节点的标识对所述当前版本的交易辅助信息签名;
    若所述当前版本的交易辅助信息签名次数最多且不低于所述第一预设次数,则将所述当前版本确定为所述一个目标版本。
  33. 根据权利要求32所述的装置,其特征在于,若所述当前版本的交易辅助信息被所述当前背书节点的标识签名,则所述第二确定单元,还用于将下一个版本的交易辅助信息作为所述当前版本的交易辅助信息,执行所述按照预设顺序遍历所述已进行签名的背书节点的标识的步骤。
  34. 根据权利要求32所述的装置,其特征在于,所述分别利用该背书节点的标识,对所述若干个版本中与该背书节点对应版本的交易辅助信息进行签名包括:
    分别利用该背书节点的标识,对所述若干个版本中签名时对应的最新版本的交易辅助信息进行签名。
  35. 根据权利要求32所述的装置,其特征在于,所述遍历待选版本集合中各版本交易辅助信息包括:
    按照版本号由低到高或由高到低的顺序遍历所述待选版本集合中各版本交易辅助信息。
  36. 根据权利要求32-35任一项所述的装置,其特征在于,所述按照预设顺序遍历所述已进行签名的背书节点的标识包括:
    按照对所述若干个版本中对应版本的交易辅助信息进行签名时,由早到晚或由晚到早的签名顺序,遍历所述已进行签名的背书节点的标识。
  37. 一种区块链背书设备,所述设备包括:处理器和存储器;
    所述存储器,用于存储指令;
    所述处理器,用于执行所述存储器中的所述指令,执行权利要求1-9任意一项所述的方法。
  38. 一种区块链背书设备,所述设备包括:处理器和存储器;
    所述存储器,用于存储指令;
    所述处理器,用于执行所述存储器中的所述指令,执行权利要求10-18任意一项所述的方法。
  39. 一种计算机可读存储介质,包括指令,当其在计算机上运行时,使得计算机执行以上权利要求1-9任意一项所述的方法。
  40. 一种计算机可读存储介质,包括指令,当其在计算机上运行时,使得计算机执行以上权利要求10-18任意一项所述的方法。
  41. 一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行以上权利要求1-9任意一项所述的方法。
  42. 一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行以上权利要求10-18任意一项所述的方法。
PCT/CN2019/080734 2018-03-31 2019-04-01 一种区块链背书方法及装置 WO2019185066A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810319127.8 2018-03-31
CN201810319127.8A CN110322345B (zh) 2018-03-31 2018-03-31 一种区块链背书方法及装置

Publications (1)

Publication Number Publication Date
WO2019185066A1 true WO2019185066A1 (zh) 2019-10-03

Family

ID=68059499

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/080734 WO2019185066A1 (zh) 2018-03-31 2019-04-01 一种区块链背书方法及装置

Country Status (2)

Country Link
CN (1) CN110322345B (zh)
WO (1) WO2019185066A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11349637B2 (en) * 2019-11-04 2022-05-31 International Business Machines Corporation Random node selection for permissioned blockchain
CN111953648A (zh) * 2020-06-22 2020-11-17 北京欧链科技有限公司 基于区块链预言机的数据处理方法、装置及电子设备

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150379510A1 (en) * 2012-07-10 2015-12-31 Stanley Benjamin Smith Method and system to use a block chain infrastructure and Smart Contracts to monetize data transactions involving changes to data included into a data supply chain.
CN107425982A (zh) * 2017-07-07 2017-12-01 众安信息技术服务有限公司 一种实现智能合约数据加密的方法和区块链
CN107451874A (zh) * 2017-07-27 2017-12-08 武汉天喻信息产业股份有限公司 基于区块链的电子***综合处理方法及***

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101699472B (zh) * 2009-10-23 2011-06-22 北京派瑞根科技开发有限公司 支持连续背书签名的电子签章
US9954807B2 (en) * 2015-03-11 2018-04-24 Microsoft Technology Licensing, Llc Endorsement indications in communication environments
US20170140408A1 (en) * 2015-11-16 2017-05-18 Bank Of America Corporation Transparent self-managing rewards program using blockchain and smart contracts
CN107392765A (zh) * 2017-07-25 2017-11-24 深圳前海万企联金融服务有限公司 基于买方资金在银行监管的票据交易方法及其***

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150379510A1 (en) * 2012-07-10 2015-12-31 Stanley Benjamin Smith Method and system to use a block chain infrastructure and Smart Contracts to monetize data transactions involving changes to data included into a data supply chain.
CN107425982A (zh) * 2017-07-07 2017-12-01 众安信息技术服务有限公司 一种实现智能合约数据加密的方法和区块链
CN107451874A (zh) * 2017-07-27 2017-12-08 武汉天喻信息产业股份有限公司 基于区块链的电子***综合处理方法及***

Also Published As

Publication number Publication date
CN110322345B (zh) 2024-04-23
CN110322345A (zh) 2019-10-11

Similar Documents

Publication Publication Date Title
AU2021218110B2 (en) Learning from distributed data
WO2020186901A1 (zh) 基于区块链的数据核对***、方法、计算设备及存储介质
US11823178B2 (en) Optimization of high volume transaction performance on a blockchain
US11694093B2 (en) Generation of training data to train a classifier to identify distinct physical user devices in a cross-device context
EP2916242B1 (en) Graph-based entity resolution for documents using either bucket or record centric parallelization
US11409789B2 (en) Determining identity in an image that has multiple people
CN107123047B (zh) 基于债券交易的数据采集***及其数据采集方法
WO2020220764A1 (zh) 基于区块链的数据压缩、查询方法及装置和电子设备
WO2020134606A1 (zh) 基于区块链的***冲红方法及装置和电子设备
WO2022048357A1 (zh) 交易背书方法、装置及存储介质
US20210042311A1 (en) Dynamic prioritization of attributes to determine search space size of each term, then index on those sizes as attributes
WO2021098139A1 (zh) 跨链交易的状态数据的存储方法、装置及存储介质
CN110362700B (zh) 数据处理方法、装置、计算机设备及存储介质
WO2019185066A1 (zh) 一种区块链背书方法及装置
WO2023174119A1 (zh) 数字内容处理方法、装置、电子设备、存储介质及产品
CN107635012B (zh) 一种消息匹配方法、服务器和计算机可读存储介质
US20220198579A1 (en) System and method for dimensionality reduction of vendor co-occurrence observations for improved transaction categorization
CN112598510B (zh) 资源数据处理方法和装置
JP7389114B2 (ja) 取引システムを実施するネットワークノードのサブセット内の文脈ベースのフィルタリング
US11869072B2 (en) System for facilitating mobile home purchase transactions
JP2022153339A (ja) データベースシステムにおけるレコードマッチング(データベースシステムにおけるレコードマッチングのコンピュータ実装方法、コンピュータプログラム、コンピュータシステム)
US20160267593A1 (en) Systems and methods for obtaining and executing computer code specified by code orders in an electronic trading venue
US20220417223A1 (en) Managing Communication Of Sensitive Information
US11861384B2 (en) Methods and systems for generating recommendations based on explainable decision trees for users of a software application
US20230051532A1 (en) Pipelined credit checking

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

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 19775998

Country of ref document: EP

Kind code of ref document: A1