WO2021056968A1 - 用于执行智能合约的方法和装置 - Google Patents

用于执行智能合约的方法和装置 Download PDF

Info

Publication number
WO2021056968A1
WO2021056968A1 PCT/CN2020/077569 CN2020077569W WO2021056968A1 WO 2021056968 A1 WO2021056968 A1 WO 2021056968A1 CN 2020077569 W CN2020077569 W CN 2020077569W WO 2021056968 A1 WO2021056968 A1 WO 2021056968A1
Authority
WO
WIPO (PCT)
Prior art keywords
transaction
smart contract
execution
executed
consensus
Prior art date
Application number
PCT/CN2020/077569
Other languages
English (en)
French (fr)
Inventor
邵珠光
Original Assignee
北京海益同展信息科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 北京海益同展信息科技有限公司 filed Critical 北京海益同展信息科技有限公司
Priority to JP2022504251A priority Critical patent/JP7339425B2/ja
Priority to US17/630,647 priority patent/US12008556B2/en
Priority to EP20868769.9A priority patent/EP3989149A4/en
Publication of WO2021056968A1 publication Critical patent/WO2021056968A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/178Techniques for file synchronisation in file systems
    • 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
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3825Use of electronic signatures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/04Payment circuits
    • G06Q20/06Private payment circuits, e.g. involving electronic currency used among participants of a common payment scheme
    • G06Q20/065Private payment circuits, e.g. involving electronic currency used among participants of a common payment scheme using e-cash
    • 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
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/40Authorisation, e.g. identification of payer or payee, verification of customer or shop credentials; Review and approval of payers, e.g. check credit lines or negative lists
    • G06Q20/401Transaction verification
    • 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
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • 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
    • H04L9/3236Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/50Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using hash chains, e.g. blockchains or hash trees
    • 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
    • G06Q2220/00Business processing using cryptography
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2209/00Additional information or applications relating to cryptographic mechanisms or cryptographic arrangements for secret or secure communication H04L9/00
    • H04L2209/46Secure multiparty computation, e.g. millionaire problem
    • H04L2209/463Electronic voting
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2209/00Additional information or applications relating to cryptographic mechanisms or cryptographic arrangements for secret or secure communication H04L9/00
    • H04L2209/56Financial cryptography, e.g. electronic payment or e-cash

Definitions

  • the embodiments of the present disclosure relate to the field of computer technology, and in particular to methods and devices for executing smart contracts.
  • a smart contract is a computer protocol designed to spread, verify, or execute a contract in an information-based way. Smart contracts allow for trusted transactions without a third party, which are traceable and irreversible.
  • the business system calls the blockchain system to execute the smart contract at the execution time of the smart contract to ensure the synchronization of the execution of the smart contract by each node in the blockchain system.
  • the embodiments of the present disclosure propose methods and devices for executing smart contracts.
  • an embodiment of the present disclosure provides a method for executing a smart contract.
  • the method includes: in response to determining that a preset execution time for executing the smart contract is reached, determining whether it has been received in the blockchain system A pre-execution transaction sent by other nodes to execute smart contracts; in response to determining that the pre-execution transaction submitted by other nodes has not been received, the pre-execution transaction corresponding to this node is generated, and the generated pre-execution transaction is sent to the block Chain system; Consensus with other nodes on the pre-execution transaction corresponding to the smart contract; obtain and execute the smart contract according to the pre-execution transaction after the consensus.
  • determining whether the pre-execution transaction sent by other nodes in the blockchain system where the smart contract is executed has been received including: determining Whether the node belongs to the preset authority node of the smart contract; in response to determining that the node belongs to the preset authority node of the smart contract, determine whether it has reached the preset execution time of the smart contract; in response to the determination that the execution of the smart contract is reached At the preset execution time, it is determined whether the pre-execution transaction sent by other nodes in the blockchain system where the smart contract is executed has been received.
  • sending the generated pre-executed transaction to the blockchain system where it is located includes: sending the generated pre-executed transaction to the non-authorized node in the blockchain system, so that the non-authorized node performs the following steps: Determine whether the node sending the pre-executed transaction belongs to the preset authority node of the smart contract; in response to determining that the node sending the pre-executed transaction belongs to the preset authority node of the smart contract, determine whether it has been received in the blockchain system Pre-executed transactions sent by other nodes, and/or determine whether the pre-execution transaction of the smart contract with other nodes has completed consensus; in response to determining that the pre-execution transaction submitted by other nodes has not been received, and/or it is determined that there is no agreement with other nodes Complete consensus on the pre-execution transaction of the smart contract, send the received pre-execution transaction to the blockchain system where it is located; and make a consensus on the pre-execution transaction of the smart contract with other nodes
  • the pre-executed transaction after the consensus is executed to record the pre-executed transaction after the consensus.
  • the pre-executed transaction includes signature information of the node that generated the pre-executed transaction; and the pre-executed transaction after the consensus is executed to record the pre-executed transaction after the consensus, including: deleting the signature in the pre-executed transaction after the consensus Information and the execution of the pre-executed transaction after the consensus with the signature information deleted, to record the pre-executed transaction after the consensus with the signature information deleted.
  • the above method further includes: receiving a submission transaction for submitting a smart contract, wherein the submission transaction includes a preset execution time of the smart contract; determining whether the submitted transaction is an abnormal submission transaction; If it is not an abnormal submission transaction, send the submission transaction to the blockchain system where it is located; make a consensus on the submission transaction corresponding to the smart contract with other nodes; perform the consensus submission transaction to record the consensus submission transaction.
  • the transaction submission further includes at least one of the following: a smart contract, a contract identifier used to identify the smart contract, preset authority node information, preset execution times, and preset execution time interval.
  • an embodiment of the present disclosure provides a device for executing a smart contract.
  • the device includes: a determining unit configured to determine whether the location has been received in response to determining that the preset execution time for executing the smart contract is reached.
  • the generating unit is configured to generate a pre-executed transaction corresponding to this node in response to determining that the pre-executed transaction submitted by other nodes is not received , And send the generated pre-executed transaction to the blockchain system;
  • the consensus unit is configured to agree with other nodes on the pre-executed transaction corresponding to the smart contract;
  • the execution unit is configured to obtain the pre-executed transaction based on the consensus And execute smart contracts.
  • the above-mentioned determining unit is further configured to determine whether the current node belongs to the preset authority node of the smart contract; in response to determining that the current node belongs to the preset authority node of the smart contract, it is determined whether it reaches the smart contract's preset authority node.
  • the preset execution time in response to determining that the preset execution time for executing the smart contract is reached, it is determined whether the pre-execution transaction sent by other nodes in the blockchain system where the smart contract is executed has been received.
  • the above-mentioned generating unit is further configured to send the generated pre-executed transaction to the non-authorized node in the blockchain system, so that the non-authorized node performs the following steps: determine whether the node sending the pre-executed transaction is smart The preset authority node of the contract; in response to determining that the node sending the pre-executed transaction belongs to the preset authority node of the smart contract, determine whether the pre-executed transaction sent by other nodes in the blockchain system has been received, and / Or determine whether the pre-execution transaction of the smart contract has been reached consensus with other nodes; in response to determining that the pre-execution transaction submitted by other nodes has not been received, and/or it is determined that the pre-execution transaction of the smart contract has not been reached consensus with other nodes, Send the received pre-executed transaction to the blockchain system where it is located; agree with other nodes on the pre-executed transaction of the smart contract.
  • the above-mentioned execution unit is further configured to execute a pre-executed transaction after a consensus to record the pre-executed transaction after a consensus.
  • the pre-executed transaction includes the signature information of the node that generated the pre-executed transaction; and the above-mentioned execution unit is further configured to: delete the signature information in the pre-executed transaction after the consensus, and execute the consensus with the deleted signature information
  • the subsequent pre-execution transaction records the pre-execution transaction after the consensus with the signature information deleted.
  • the above-mentioned apparatus further includes: a receiving unit configured to receive a submission transaction for submitting a smart contract, wherein the submission transaction includes a preset execution time of the smart contract; the above-mentioned determining unit is further configured to determine Whether the submitted transaction is an abnormal submission transaction; the above-mentioned device further includes: a sending unit configured to send the submitted transaction to the blockchain system where it is located in response to determining that the submitted transaction is not an abnormal submission transaction; the above-mentioned consensus unit is further configured to Other nodes agree on the submitted transaction corresponding to the smart contract; the above-mentioned execution unit is further configured to execute the submitted transaction after the consensus to record the submitted transaction after the consensus.
  • the aforementioned submission transaction further includes at least one of the following: a smart contract, a contract identifier for identifying the smart contract, preset authority node information, preset execution times, and preset execution time interval.
  • the embodiments of the present disclosure provide an electronic device that includes: one or more processors; a storage device for storing one or more programs; when one or more programs are used by one or more Execution by two processors, so that one or more processors implement the method described in any implementation manner of the first aspect.
  • the embodiments of the present disclosure provide a computer-readable medium on which a computer program is stored, and when the computer program is executed by a processor, the method as described in any implementation manner in the first aspect is implemented.
  • the method and device for executing smart contracts provided by the embodiments of the present disclosure, through the nodes in the blockchain system, at the execution time of the smart contract, if it is determined that the pre-execution transaction of the smart contract submitted by other nodes is not received, the cost is generated
  • the pre-execution transaction corresponding to the node is sent to the blockchain system where it is located, and then each node agrees on the pre-execution transaction of the smart contract, and completes the timing execution of the smart contract according to the pre-execution transaction after the consensus, which eliminates the need
  • the user-side business system actively calls the blockchain system at the execution time of the smart contract, but each node in the blockchain system completes the timing execution of the smart contract based on the pre-executed transaction.
  • this method shields the problem of inconsistent clocks of various nodes. Even if the clocks of various nodes are inconsistent, it can ensure the synchronization of the execution of smart contracts by various nodes.
  • Fig. 1 is an exemplary system architecture diagram to which an embodiment of the present disclosure can be applied;
  • Fig. 2 is a flowchart of an embodiment of a method for executing a smart contract according to the present disclosure
  • Fig. 3 is a flowchart of another embodiment of a method for executing a smart contract according to the present disclosure
  • Fig. 4 is a flowchart of another embodiment of a method for executing a smart contract according to the present disclosure
  • Fig. 5 is a schematic structural diagram of an embodiment of an apparatus for executing smart contracts according to the present disclosure
  • Fig. 6 is a schematic structural diagram of an electronic device suitable for implementing embodiments of the present disclosure.
  • FIG. 1 shows an exemplary architecture 100 of an embodiment of a method for executing a smart contract or a device for executing a smart contract of the present disclosure can be applied.
  • the system architecture 100 may include terminal devices 101, 102, 103, a network 104, and a blockchain system 105.
  • the blockchain system 105 may include one or more nodes, and the nodes may be communicatively connected.
  • the network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the blockchain system 105.
  • the network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, and so on.
  • the terminal devices 101, 102, 103 may be hardware or software.
  • the terminal devices 101, 102, 103 can be various electronic devices, including but not limited to smart phones, tablet computers, e-book readers, laptop portable computers, desktop computers, and so on.
  • the terminal devices 101, 102, and 103 are software, they can be installed in the electronic devices listed above. It can be implemented as multiple software or software modules (for example, multiple software or software modules for providing distributed services), or as a single software or software module. There is no specific limitation here.
  • One or more nodes in the blockchain system 105 can provide various services, for example, can receive smart contract related transactions submitted on the terminal devices 101, 102, 103, and complete the execution of the smart contract.
  • the methods for executing smart contracts provided by the embodiments of the present disclosure are generally executed by nodes in the blockchain system 105.
  • the devices for executing smart contracts are generally set in the blockchain system. 105 in the node.
  • the nodes in the blockchain system 105 may be a single server, or may be composed of multiple servers or multiple server clusters.
  • the above-mentioned server may be hardware or software.
  • the server When the server is hardware, it can be implemented as a distributed server cluster composed of multiple servers, or as a single server.
  • the server When the server is software, it can be implemented as multiple software or software modules (for example, multiple software or software modules for providing distributed services), or as a single software or software module. There is no specific limitation here.
  • terminal devices, networks, and blockchain systems in Figure 1 are merely illustrative. According to implementation needs, there can be any number of terminal devices, networks and blockchain systems.
  • FIG. 2 it shows a process 200 of an embodiment of a method for executing a smart contract according to the present disclosure.
  • the method for executing smart contracts includes the following steps:
  • Step 201 In response to determining that the preset execution time for executing the smart contract is reached, it is determined whether the pre-execution transaction sent by other nodes in the blockchain system where the smart contract is executed has been received.
  • the execution subject of the method for executing the smart contract may pre-store the corresponding relationship between the smart contract and its corresponding execution time. At this time, the above-mentioned execution subject can poll whether the execution time of the smart contract is reached according to the preset time interval.
  • the execution subject of the method for executing the smart contract (the node in the blockchain system 105 as shown in FIG. 1) can check the locally stored information to determine whether it has received the data sent by other nodes. Pre-execution transactions for executing smart contracts.
  • the above-mentioned execution subject may store instruction information used to indicate whether to receive a pre-execution transaction sent by another node and used to execute a smart contract. At this time, you can check the instruction information to determine whether the instruction information sent by other nodes for executing the pre-execution transaction of the smart contract is received.
  • the above-mentioned execution subject may store the correspondence between the received pre-execution transaction sent by other nodes and used to execute the smart contract and the smart contract. At this point, it is possible to check whether the smart contract corresponds to a pre-executed transaction to determine whether the instruction information for executing the pre-executed transaction of the smart contract is received from other nodes.
  • the pre-execution transaction sent by other nodes in the blockchain system for executing the smart contract it can indicate that other nodes have processed the pre-execution transaction of the smart contract. This can indicate that the execution of the smart contract by the above-mentioned executive body is not synchronized with other nodes. At this time, the above-mentioned execution entity may not need to execute the pre-execution transaction of the smart contract, so as to avoid the repeated execution of the pre-execution transaction of the smart contract.
  • Step 202 in response to determining that the pre-executed transaction submitted by other nodes is not received, generate the pre-executed transaction corresponding to the current node, and send the generated pre-executed transaction to the blockchain system.
  • the method of sending the generated pre-executed transaction may be different according to the different blockchain system.
  • each node can directly communicate with other nodes.
  • the above-mentioned execution subject can send the generated pre-execution transaction to each node in the blockchain system.
  • each node can only communicate with several neighboring nodes.
  • the above-mentioned execution subject may send the generated pre-execution transaction to several neighboring nodes.
  • the nodes adjacent to the above-mentioned execution subject can send the received pre-executed transactions to several adjacent nodes, and through continuous propagation between nodes, the pre-executed transactions can be sent to the entire blockchain system.
  • a pre-execution identifier for identifying the pre-execution transaction may be generated at the same time.
  • the pre-execution identification may be generated based on the contract identification and execution identification used to identify the smart contract.
  • the contract identification can be generated based on the user identification of the above-mentioned user, so that different contract identifications can be obtained more conveniently for different users.
  • the execution identifier can be determined based on the preset execution information of the smart contract.
  • the execution information may include at least one of the following: execution time, execution times, execution time interval, and so on.
  • each node in the blockchain system may first determine whether the received pre-executed transaction is an abnormal pre-executed transaction, so as to avoid malicious submission of the pre-executed transaction. Specifically, the pre-executed transaction polarity can be verified based on the information included in the pre-executed transaction to determine whether the received pre-executed transaction is an abnormal pre-executed transaction.
  • the pre-executed transaction can include the signature information of the node.
  • Step 203 Consensus with other nodes on the pre-execution transaction corresponding to the smart contract.
  • various existing consensus mechanisms can be used to achieve consensus on the pre-execution transaction of the smart contract.
  • POW Proof of Work, Proof of Work
  • POS Proof of Stake, Proof of Equity
  • BFT Bozantine Fault Tolerance, Byzantine Fault Tolerance
  • Different blockchain systems can adopt different consensus mechanisms.
  • each node in the blockchain system Through the consensus of each node in the blockchain system on the pre-executed transaction corresponding to the smart contract, the consistency of the execution sequence of the pre-executed transaction of the smart contract by each node can be guaranteed. In other words, it can be guaranteed that each node executes the pre-execution transaction of the smart contract after the execution of a certain transaction ends.
  • the consensus mechanism is a well-known technology that has been extensively researched and applied at present, and will not be repeated here.
  • Step 204 Obtain and execute the smart contract according to the pre-executed transaction after the consensus.
  • the smart contract corresponding to the pre-executed transaction and the smart contract can be obtained. It should be understood that each node in the blockchain system needs to be consistent in the execution of smart contracts. Therefore, while the above-mentioned execution subject executes the smart contract, other nodes will also execute the smart contract to realize the synchronization of the execution of the smart contract by each node.
  • the pre-execution transaction may be executed in the order of execution after the consensus to record the pre-execution transaction after the consensus. It should be understood that the execution of pre-executed transactions by each node in the blockchain system is also consistent. Therefore, while the above-mentioned execution subject executes the pre-executed transaction, other nodes will also execute the pre-executed transaction to record the pre-executed transaction after the consensus. Execute the transaction.
  • the submission transaction used to submit the smart contract can be recorded through the following steps:
  • Step 1 Receive a submission transaction for submitting a smart contract.
  • the above-mentioned execution subject can directly receive the submitted transaction of the smart contract submitted by the user who develops the smart contract.
  • other nodes may receive smart contracts submitted by users who develop smart contracts.
  • the above-mentioned execution subject may receive smart contract submission transactions sent by other nodes.
  • the submitted transaction may include the preset execution time of the smart contract.
  • the transaction submission further includes at least one of the following: a smart contract, a contract identifier for identifying the smart contract, preset authority node information, preset execution times, and preset execution time interval.
  • the authority node information can be used to indicate the authority node of the smart contract.
  • the authority node of the smart contract can be preset by the above-mentioned user.
  • the number of authority nodes can also be set by the user according to actual application requirements. Different smart contracts can set different authority nodes correspondingly. For example, the user can preset the node whose contract ID ends with 0 as the authority node.
  • the number of authority nodes cannot be too small to avoid problems such as single points of failure.
  • the nodes in the blockchain system can be divided into authorized nodes and non-authorized nodes, and the authorized and non-authorized nodes can be controlled to perform different operations according to actual application requirements.
  • Step 2 Determine whether the submitted transaction is an abnormal submission transaction.
  • the security of the submitted transaction can be judged, so as to avoid the occurrence of maliciously sent submitted transactions and other situations, thereby causing damage to the blockchain system.
  • different methods can be selected to verify the submitted transaction to determine whether the submitted transaction is an abnormal submitted transaction.
  • the submitted transaction when the submitted transaction includes a contract identifier for identifying a smart contract, it can be determined whether the contract identifier is unique. If the contract identifier is not unique, it can be determined that the submitted transaction is an abnormal submission transaction.
  • the submitted transaction when the submitted transaction includes authority node information, it can be determined whether the submitted transaction is an abnormal submission transaction by determining whether the authority node information meets a preset condition. If it is determined that the authority node information does not meet the preset conditions, it can be determined whether the submitted transaction is an abnormal submission transaction.
  • the preset conditions can be flexibly set according to different application scenarios.
  • the preset condition may include the value range of the number of authority nodes.
  • the value range of to determine whether the submitted transaction is an abnormal submission transaction can be preset according to actual application scenarios. If it is determined that the number of executions does not meet the value range of the preset number of executions, and/or it is determined that the execution time interval does not meet the value range of the preset execution time interval, it can be determined that the submitted transaction is an abnormal submission transaction.
  • Step 3 In response to determining that the submitted transaction is not an abnormal submission transaction, the submitted transaction is sent to the blockchain system where it is located.
  • Step 4 Consensus with other nodes on the submitted transaction corresponding to the smart contract.
  • the consensus of each node in the blockchain system on the submission transaction corresponding to the smart contract can ensure the consistency of the execution sequence of the submission transaction of the smart contract by each node. In other words, it can be guaranteed that each node executes the submitted transaction of the smart contract after the execution of a certain transaction.
  • Step 5 execute the submitted transaction after the consensus to record the submitted transaction after the consensus. It should be understood that each node in the blockchain system is also consistent with the execution of the submitted transaction of the smart contract. Therefore, when the above-mentioned execution subject executes the submitted transaction, other nodes will also execute the submitted transaction to record the consensus submission. transaction.
  • each node in the blockchain system can record some of the information contained in the submitted transaction of the smart contract to facilitate the subsequent execution of the smart contract.
  • the contract identifier can be included in the submitted transaction.
  • each node can distinguish different smart contracts by recording the contract identifier.
  • the submitted transaction may include the preset execution time, execution times, execution time interval, etc. of the smart contract.
  • each node can poll to determine whether it reaches the execution time of the smart contract by recording the preset execution time, execution times, execution time interval, etc. of the smart contract, and complete the intelligence according to the preset execution times and execution time interval. Effective execution of the contract.
  • the authority node information may be included in the submission transaction. At this time, each node can verify whether the node sending the submitted transaction is the authority node.
  • the pre-execution transaction corresponding to the current node is generated.
  • the transaction is executed and sent to the blockchain system where it is located, and then each node agrees on the pre-executed transaction of the smart contract, and completes the timing execution of the smart contract according to the pre-executed transaction after the consensus, thereby realizing each in the blockchain system
  • the node automatically completes the timing execution of the smart contract based on the pre-executed transaction, avoiding the problem that the execution of the smart contract is not synchronized due to the inconsistent clocks of each node and each node executes the smart contract according to its own clock.
  • FIG. 3 shows a process 300 of yet another embodiment of a method for executing a smart contract.
  • the process 300 of the method for executing smart contracts includes the following steps:
  • Step 301 Determine whether the current node belongs to the preset authority node of the smart contract.
  • the above-mentioned execution subject may locally store the corresponding relationship between the smart contract and its corresponding preset authority node in advance. At this time, it is possible to determine whether the current node belongs to the preset authority node of the smart contract by determining whether the current node is included in the preset authority node corresponding to the smart contract.
  • the execution subject if the execution subject has previously executed the submission transaction of the smart contract that includes the authority node information, the execution subject records the authority node information corresponding to the smart contract. At this time, the above-mentioned execution subject can determine whether the current node belongs to the preset authority node of the smart contract based on the pre-recorded authority node information.
  • Step 302 In response to determining that the current node belongs to the preset authority node of the smart contract, it is determined whether the preset execution time of the smart contract has been reached.
  • the local authority node of the smart contract may pre-store the corresponding relationship between the smart contract and its corresponding execution time. At this time, the above-mentioned execution subject can poll whether the execution time of the smart contract is reached according to the preset time interval. Non-authority nodes may not need to detect the execution time of the smart contract to reduce resource consumption during the execution of the smart contract.
  • Step 303 In response to determining that the preset execution time for executing the smart contract is reached, it is determined whether the pre-execution transaction sent by other nodes in the blockchain system where the smart contract is executed has been received.
  • Step 304 in response to determining that the pre-executed transaction submitted by other nodes has not been received, generate the pre-executed transaction corresponding to the current node, and send the generated pre-executed transaction to the blockchain system.
  • the generated pre-executed transaction is sent to the non-authorized node in the blockchain system, so that the non-authorized node performs the following steps:
  • Step 1 Determine whether the node sending the pre-executed transaction belongs to the preset authority node of the smart contract.
  • the above-mentioned execution subject may locally pre-store the identification of the authority node of the smart contract. At this time, it can be determined whether the node sending the pre-executed transaction belongs to the preset authority node of the smart contract according to the identity of the node sending the pre-executed transaction.
  • the pre-executed transaction may include signature information of the node that generates the pre-executed transaction.
  • each node in the blockchain system can pre-store the signature information of the authority node of the smart contract.
  • Step 2 In response to determining that the node sending the pre-executed transaction belongs to the preset authority node of the smart contract, it is determined whether the pre-executed transaction sent by other nodes in the blockchain system where it is located has been received, and/or whether it has been Other nodes complete a consensus on the pre-execution transaction of the smart contract.
  • the pre-execution transaction sent by other nodes in the blockchain system where it is located has been received, and/or it has been confirmed that the pre-execution transaction of the smart contract has been reached with other nodes, it can indicate that other nodes have processed the pre-execution transaction of the smart contract.
  • the transaction is executed, and the execution of the smart contract by the non-authorized node is out of sync with other nodes. At this time, the non-authorized node may no longer need to execute the pre-executed transaction of the smart contract, so as to avoid the repeated execution of the pre-executed transaction of the smart contract.
  • Step 3 In response to determining that the pre-execution transaction submitted by other nodes has not been received, and/or it is determined that the pre-execution transaction of the smart contract has not been agreed with other nodes, the received pre-execution transaction is sent to the blockchain system where it is located.
  • Step 4 Consensus with other nodes on the pre-execution transaction of the smart contract.
  • Step 305 Consensus with other nodes on the pre-execution transaction corresponding to the smart contract.
  • Step 306 Obtain and execute the smart contract according to the pre-executed transaction after the consensus.
  • the method provided by the above-mentioned embodiment of the present disclosure generates and sends the pre-executed transaction of the smart contract to the block by controlling the authority node in the blockchain system at the execution time of the smart contract and has not received the pre-executed transaction submitted by other nodes.
  • each node in the blockchain system agrees and executes the pre-execution transaction of the smart contract to complete the execution of the smart contract.
  • the number of nodes that generate pre-execution transactions of smart contracts can be reduced, thereby reducing the network communication pressure of the blockchain system, and avoiding network storms and other situations.
  • FIG. 4 shows a process 400 of yet another embodiment of a method for executing a smart contract.
  • the process 400 of the method for executing a smart contract includes the following steps:
  • Step 401 In response to determining that the preset execution time for executing the smart contract is reached, determine whether the pre-execution transaction sent by other nodes in the blockchain system where the smart contract is executed has been received.
  • a node in the blockchain system when a node in the blockchain system sends a pre-executed transaction of a smart contract, it can add its own signature information to the pre-executed transaction. Afterwards, the source of the pre-executed transaction can also be verified based on the signature information to ensure the correctness of the pre-executed transaction.
  • Step 402 in response to determining that the pre-executed transaction submitted by other nodes is not received, generate the pre-executed transaction corresponding to the current node, and send the generated pre-executed transaction to the blockchain system.
  • the above-mentioned execution subject may add the signature information of the node to the pre-executed transaction when generating the corresponding pre-executed transaction.
  • Step 403 Consensus with other nodes on the pre-execution transaction corresponding to the smart contract.
  • Step 404 Delete the signature information in the pre-executed transaction after the consensus, and execute the pre-executed transaction after the consensus with the signature information deleted, so as to record the pre-executed transaction after the consensus with the signature information deleted.
  • the signature information in the pre-execution transaction after the consensus recorded by each node may be different. Based on this, if the pre-executed transaction including the signature information is directly executed, the pre-executed transaction recorded by each node may be inconsistent.
  • the present disclosure provides an embodiment of a device for executing smart contracts.
  • the device embodiment corresponds to the method embodiment shown in FIG. Specifically, it can be applied to various electronic devices.
  • the device 500 for executing smart contracts includes a determining unit 501, a generating unit 502, a consensus unit 503, and an executing unit 504.
  • the determining unit is configured to determine whether it has received a pre-execution transaction sent by other nodes in the blockchain system where it is used to execute the smart contract in response to determining that the preset execution time for executing the smart contract is reached;
  • the unit is configured to generate a pre-executed transaction corresponding to the node in response to determining that it has not received a pre-executed transaction submitted by other nodes, and send the generated pre-executed transaction to the blockchain system;
  • the consensus unit is configured to communicate with other nodes The nodes make a consensus on the pre-execution transaction corresponding to the smart contract;
  • the execution unit is configured to obtain and execute the smart contract according to the pre-execution transaction after the consensus.
  • step 201 in the device 500 for executing smart contracts: the specific processing of the determining unit 501, the generating unit 502, the consensus unit 503, and the executing unit 504 and the technical effects brought by them can be referred to the corresponding embodiments in FIG. 2 respectively.
  • the related descriptions of step 201, step 202, step 203, and step 204 in step 201 will not be repeated here.
  • the determining unit 501 is configured to determine whether it has received the data sent by other nodes in the blockchain system in response to determining that the preset execution time of the smart contract is reached.
  • a pre-executed transaction used to execute a smart contract is configured to generate a pre-executed transaction corresponding to the node in response to determining that the pre-executed transaction submitted by other nodes is not received, and send the generated pre-executed transaction to the block Chain system;
  • the consensus unit 503 is configured to agree with other nodes on the pre-executed transaction corresponding to the smart contract;
  • the execution unit 504 is configured to obtain and execute the smart contract according to the pre-executed transaction after the consensus.
  • the above-mentioned determining unit 501 is further configured to determine whether the current node belongs to the preset authority node of the smart contract; in response to determining that the current node belongs to the preset authority of the smart contract The node determines whether it has reached the preset execution time of the smart contract; in response to determining that the preset execution time of the smart contract has been reached, it determines whether it has received the smart contract sent by other nodes in the blockchain system where it is used to execute the smart The pre-execution transaction of the contract.
  • the aforementioned generating unit 502 is further configured to send the generated pre-executed transaction to the non-authorized node in the blockchain system, so that the non-authorized node performs the following steps: confirm to send Whether the node of the pre-executed transaction belongs to the preset authority node of the smart contract; in response to determining that the node sending the pre-executed transaction belongs to the preset authority node of the smart contract, it is determined whether it has received other nodes in the blockchain system where it is located
  • the pre-execution transaction of the contract completes the consensus, and the received pre-execution transaction is sent to the blockchain system where it is located; and the pre-execution transaction
  • the above-mentioned execution unit 504 is further configured to execute a pre-executed transaction after a consensus to record the pre-executed transaction after a consensus.
  • the pre-executed transaction includes the signature information of the node that generated the pre-executed transaction; and the execution unit 504 is further configured to: delete the signature information in the pre-executed transaction after the consensus, and Execute the pre-executed transaction after the consensus with the signature information deleted to record the pre-executed transaction after the consensus with the signature information deleted.
  • the above-mentioned device further includes: a receiving unit (not shown in the figure) configured to receive a submission transaction for submitting a smart contract, wherein the submission transaction includes a smart contract’s pre-order
  • the above-mentioned determining unit 501 is further configured to determine whether the submitted transaction belongs to an abnormally submitted transaction; the above-mentioned device further includes: a sending unit (not shown in the figure) is configured to respond to determining that the submitted transaction does not belong to an abnormally submitted transaction, Send the submitted transaction to the blockchain system where it is located; the above-mentioned consensus unit 503 is further configured to agree with other nodes on the submitted transaction corresponding to the smart contract; the above-mentioned execution unit 504 is further configured to execute the submitted transaction after the consensus to record the consensus Submit the transaction afterwards.
  • the determining unit determines whether it has received the data sent by other nodes in the blockchain system where it is used to execute the smart contract.
  • Pre-executed transaction in response to determining that the pre-executed transaction submitted by other nodes is not received, the generating unit generates the pre-executed transaction corresponding to the node, and sends the generated pre-executed transaction to the blockchain system; the consensus unit and other nodes are smart
  • the pre-execution transaction corresponding to the contract carries out a consensus; the execution unit obtains and executes the smart contract according to the pre-execution transaction after the consensus, so that each node in the blockchain system can complete the timing execution of the smart contract based on the pre-execution transaction. Ensure the synchronization of the execution of smart contracts by each node.
  • FIG. 6 shows a schematic structural diagram of an electronic device (for example, a node in the blockchain system 105 in FIG. 1) 600 suitable for implementing embodiments of the present disclosure.
  • the electronic device shown in FIG. 6 is only an example, and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
  • the electronic device 600 may include a processing device (such as a central processing unit, a graphics processor, etc.) 601, which may be loaded into a random access device according to a program stored in a read-only memory (ROM) 602 or from a storage device 608.
  • the program in the memory (RAM) 603 executes various appropriate actions and processing.
  • various programs and data required for the operation of the electronic device 600 are also stored.
  • the processing device 601, the ROM 602, and the RAM 603 are connected to each other through a bus 604.
  • An input/output (I/O) interface 605 is also connected to the bus 604.
  • the following devices can be connected to the I/O interface 605: including input devices 606 such as touch screens, touch pads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; including, for example, liquid crystal displays (LCD), speakers, vibration An output device 607 such as a device; a storage device 608 such as a magnetic tape and a hard disk; and a communication device 609.
  • the communication device 609 may allow the electronic device 600 to perform wireless or wired communication with other devices to exchange data.
  • FIG. 6 shows an electronic device 600 having various devices, it should be understood that it is not required to implement or have all the illustrated devices. It may alternatively be implemented or provided with more or fewer devices. Each block shown in FIG. 6 may represent one device, or may represent multiple devices as needed.
  • an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart.
  • the computer program may be downloaded and installed from the network through the communication device 609, or installed from the storage device 608, or installed from the ROM 602.
  • the processing device 601 the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.
  • the computer-readable medium described in the embodiments of the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two.
  • the computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or a combination of any of the above. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable removable Programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above.
  • the computer-readable storage medium may be any tangible medium that contains or stores a program, and the program may be used by or in combination with an instruction execution system, apparatus, or device.
  • a computer-readable signal medium may include a data signal propagated in a baseband or as a part of a carrier wave, and a computer-readable program code is carried therein. This propagated data signal can take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing.
  • the computer-readable signal medium may also be any computer-readable medium other than the computer-readable storage medium.
  • the computer-readable signal medium may send, propagate, or transmit the program for use by or in combination with the instruction execution system, apparatus, or device .
  • the program code contained on the computer-readable medium can be transmitted by any suitable medium, including but not limited to: wire, optical cable, RF (Radio Frequency), etc., or any suitable combination of the above.
  • the above-mentioned computer-readable medium may be included in the above-mentioned electronic device; or it may exist alone without being assembled into the electronic device.
  • the above-mentioned computer-readable medium carries one or more programs.
  • the electronic device In response to determining that the preset execution time for executing the smart contract is reached, determine whether it has been received Pre-executed transactions sent by other nodes in the blockchain system to execute smart contracts; in response to determining that the pre-executed transactions submitted by other nodes have not been received, the pre-executed transactions corresponding to this node are generated, and the generated
  • the pre-executed transaction is sent to the blockchain system; the pre-executed transaction corresponding to the smart contract is agreed with other nodes; the smart contract is obtained and executed according to the pre-executed transaction after the consensus.
  • the computer program code for performing the operations of the embodiments of the present disclosure can be written in one or more programming languages or a combination thereof, the programming languages including object-oriented programming languages-such as Java, Smalltalk, C++, It also includes conventional procedural programming languages-such as "C" language or similar programming languages.
  • the program code can be executed entirely on the user's computer, partly on the user's computer, executed as an independent software package, partly on the user's computer and partly executed on a remote computer, or entirely executed on the remote computer or server.
  • the remote computer can be connected to the user’s computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (for example, using an Internet service provider to Connect via the Internet).
  • LAN local area network
  • WAN wide area network
  • each block in the flowchart or block diagram may represent a module, program segment, or part of code, and the module, program segment, or part of code contains one or more for realizing the specified logical function Executable instructions.
  • the functions marked in the block may also occur in a different order from the order marked in the drawings. For example, two blocks shown in succession can actually be executed substantially in parallel, and they can sometimes be executed in the reverse order, depending on the functions involved.
  • each block in the block diagram and/or flowchart, and the combination of the blocks in the block diagram and/or flowchart can be implemented by a dedicated hardware-based system that performs the specified functions or operations Or it can be realized by a combination of dedicated hardware and computer instructions.
  • the units involved in the embodiments described in the present disclosure may be implemented in a software manner, and may also be implemented in a hardware manner.
  • the described unit can also be provided in the processor, for example, it can be described as: a processor includes a determination unit, a generation unit, a consensus unit, and an execution unit. Among them, the names of these units do not constitute a limitation on the unit itself under certain circumstances.
  • the determination unit can also be described as "in response to determining that the preset execution time of the smart contract is reached, it is determined whether it has been received.
  • a unit used to execute pre-execution transactions of smart contracts sent by other nodes in the blockchain system ".

Landscapes

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

Abstract

本公开的实施例公开了用于执行智能合约的方法和装置。该方法的一具体实施方式包括:响应于确定到达执行智能合约的预设的执行时刻,确定是否已接收所在的区块链系统中的其他节点发送的、用于执行智能合约的预执行交易;响应于确定未接收到其他节点提交的预执行交易,生成本节点对应的预执行交易,以及发送所生成的预执行交易至区块链系统;与其它节点对智能合约对应的预执行交易进行共识;根据共识后的预执行交易,获取并执行智能合约。该实施方式实现了由区块链系统中的各个节点基于预执行交易完成智能合约的定时执行。

Description

用于执行智能合约的方法和装置
本专利申请要求于2019年09月24日提交的、申请号为201910904191.7、发明名称为″用于执行智能合约的方法和装置″的中国专利申请的优先权,该申请的全文以引用的方式并入本申请中。
技术领域
本公开的实施例涉及计算机技术领域,具体涉及用于执行智能合约的方法和装置。
背景技术
智能合约是一种旨在以信息化方式传播、验证或执行合同的计算机协议。智能合约允许在没有第三方的情况下进行可信交易,这些交易可追踪且不可逆转。
目前,许多智能合约通常都需要定时执行。由于区块链系统中的各节点都有自己独立的时钟,因此,各节点很难保持时钟同步。因此,区块链系统自身很难控制各个节点执行智能合约的同步性。
一般地,都是由业务系统在智能合约的执行时刻,调用区块链系统以执行智能合约,以保证区块链系统中的各节点执行智能合约的同步性。
发明内容
本公开的实施例提出了用于执行智能合约的方法和装置。
第一方面,本公开的实施例提供了一种用于执行智能合约的方法,该方法包括:响应于确定到达执行智能合约的预设的执行时刻,确定是否已接收所在的区块链系统中的其他节点发送的、用于执行智能合约的预执行交易;响应于确定未接收到其他节点提交的预执行交易,生成本节点对应的预执行交易,以及发送所生成的预执行交易至区块链系统;与其它节点对智能合约对应的预执行交易进行共识;根据共识后的预执行交易,获取并执行智能合约。
在一些实施例中,响应于确定到达执行智能合约的预设的执行时刻,确定是否已接收所在的区块链系统中的其他节点发送的、用于执行智能合约的预执行交易,包括:确定本节点是否属于智能合约的、预设的权限节点;响应于确定本节点属于智能合约的、预设的权限节点,确定是否到达智能合约的、预设的执行时刻;响应于确定到达执行智能合约的预设的执行时刻,确定是否已接收所在的区块链系统中的其他节点发送的、用于执行智能合约的预执行交易。
在一些实施例中,发送所生成的预执行交易至所在的区块链系统,包括:发送所生成的预执行交易至区块链系统中的非权限节点,以使非权限节点执行如下步骤:确定发送预执行交易的节点是否属于智能合约的、预设的权限节点;响应于确定发送预执行交易的节点属于智能合约的、预设的权限节点,确定是否已接收所在的区块链系统中的其他节点发送的预执行交易,和/或确定是否已与其它节点对智能合约的预执行交易完成共识;响应于确定未接收到其他节点提交的预执行交易,且/或确定未与其它节点对智能合约的预执行交易完成共识,发送接收到的预执行交易至所在的区块链系统;与其它节点对智能合约的预执行交易进行共识。
在一些实施例中,执行共识后的预执行交易,以记录共识后的预执行交易。
在一些实施例中,预执行交易包括生成预执行交易的节点的签名信息;以及执行共识后的预执行交易,以记录共识后的预执行交易,包括:删除共识后的预执行交易中的签名信息,以及执行删除了签名信息的、共识后的预执行交易,以记录删除了签名信息的、共识后的预执行交易。
在一些实施例中,上述方法还包括:接收用于提交智能合约的提交交易,其中,提交交易包括智能合约的、预设的执行时刻;确定提交交易是否属于异常提交交易;响应于确定提交交易不属于异常提交交易,发送提交交易至所在的区块链系统;与其它节点对智能合约对应的提交交易进行共识;执行共识后的提交交易,以记录共识后的提交交易。
在一些实施例中,提交交易还包括以下至少一项:智能合约、用于标识智能合约的合约标识、预设的权限节点信息、预设的执行次数、预设的执行时间间隔。
第二方面,本公开的实施例提供了一种用于执行智能合约的装置,该装置包括:确定单元,被配置成响应于确定到达执行智能合约的预设的执行时刻,确定是否已接收所在的区块链系统中的其他节点发送的、用于执行智能合约的预执行交易;生成单元,被配置成响应于确定未接收到其他节点提交的预执行交易,生成本节点对应的预执行交易,以及发送所生成的预执行交易至区块链系统;共识单元,被配置成与其它节点对智能合约对应的预执行交易进行共识;执行单元,被配置成根据共识后的预执行交易,获取并执行智能合约。
在一些实施例中,上述确定单元进一步被配置成确定本节点是否属于智能合约的、预设的权限节点;响应于确定本节点属于智能合约的、预设的权限节点,确定是否到达智能合约的、预设的执行时刻;响应于确定到达执行智能合约的预设的执行时刻,确定是否已接收所在的区块链系统中的其他节点发送的、用于执行智能合约的预执行交易。
在一些实施例中,上述生成单元进一步被配置成发送所生成的预执行交易至区块链系统中的非权限节点,以使非权限节点执行如下步骤:确定发送预执行交易的节点是否属于智能合约的、预设的权限节点;响应于确定发送预执行交易的节点属于智能合约的、预设的权限节点,确定是否已接收所在的区块链系统中的其他节点发送的预执行交易,和/或确定是否已与其它节点对智能合约的预执行交易完成共识;响应于确定未接收到其他节点提交的预执行交易,且/或确定未与其它节点对智能合约的预执行交易完成共识,发送接收到的预执行交易至所在的区块链系统;与其它节点对智能合约的预执行交易进行共识。
在一些实施例中,上述执行单元进一步被配置成执行共识后的预执行交易,以记录共识后的预执行交易。
在一些实施例中,预执行交易包括生成预执行交易的节点的签名 信息;以及上述执行单元进一步被配置成:删除共识后的预执行交易中的签名信息,以及执行删除了签名信息的、共识后的预执行交易,以记录删除了签名信息的、共识后的预执行交易。
在一些实施例中,上述装置还包括:接收单元,被配置成接收用于提交智能合约的提交交易,其中,提交交易包括智能合约的、预设的执行时刻;上述确定单元进一步被配置成确定提交交易是否属于异常提交交易;上述装置还包括:发送单元,被配置成响应于确定提交交易不属于异常提交交易,发送提交交易至所在的区块链系统;上述共识单元,进一步被配置成与其它节点对智能合约对应的提交交易进行共识;上述执行单元进一步被配置成执行共识后的提交交易,以记录共识后的提交交易。
在一些实施例中,上述提交交易还包括以下至少一项:智能合约、用于标识智能合约的合约标识、预设的权限节点信息、预设的执行次数、预设的执行时间间隔。
第三方面,本公开的实施例提供了一种电子设备,该电子设备包括:一个或多个处理器;存储装置,用于存储一个或多个程序;当一个或多个程序被一个或多个处理器执行,使得一个或多个处理器实现如第一方面中任一实现方式描述的方法。
第四方面,本公开的实施例提供了一种计算机可读介质,其上存储有计算机程序,该计算机程序被处理器执行时实现如第一方面中任一实现方式描述的方法。
本公开的实施例提供的用于执行智能合约的方法和装置,通过区块链系统中的节点在智能合约的执行时刻,若确定未接收到其他节点提交的智能合约的预执行交易,生成本节点对应的预执行交易并发送至所在的区块链系统,然后各节点针对智能合约的预执行交易进行共识,并根据共识后的预执行交易,完成智能合约的定时执行,由此可以不需要用户侧的业务系统在智能合约的执行时刻主动调用区块链系统,而是由区块链系统中的各个节点基于预执行交易完成智能合约的定时执行。同时,这种方式屏蔽了各个节点的时钟不一致的问题,即使各个节点的时钟不一致,也可以保证各个节点执行智能合约的同步 性。
附图说明
通过阅读参照以下附图所作的对非限制性实施例所作的详细描述,本公开的其它特征、目的和优点将会变得更明显:
图1是本公开的一个实施例可以应用于其中的示例性系统架构图;
图2是根据本公开的用于执行智能合约的方法的一个实施例的流程图;
图3是根据本公开的用于执行智能合约的方法的又一个实施例的流程图;
图4是根据本公开的用于执行智能合约的方法的又一个实施例的流程图;
图5是根据本公开的用于执行智能合约的装置的一个实施例的结构示意图;
图6是适于用来实现本公开的实施例的电子设备的结构示意图。
具体实施方式
下面结合附图和实施例对本公开作进一步的详细说明。可以理解的是,此处所描述的具体实施例仅仅用于解释相关发明,而非对该发明的限定。另外还需要说明的是,为了便于描述,附图中仅示出了与有关发明相关的部分。
需要说明的是,在不冲突的情况下,本公开中的实施例及实施例中的特征可以相互组合。下面将参考附图并结合实施例来详细说明本公开。
图1示出了可以应用本公开的用于执行智能合约的方法或用于执行智能合约的装置的实施例的示例性架构100。
如图1所示,系统架构100可以包括终端设备101、102、103,网络104和区块链系统105。区块链系统105可以包括一个或多个节点,节点之间可以通信连接。网络104用以在终端设备101、102、103 和区块链系统105之间提供通信链路的介质。网络104可以包括各种连接类型,例如有线、无线通信链路或者光纤电缆等等。
终端设备101、102、103可以是硬件,也可以是软件。当终端设备101、102、103为硬件时,可以是各种电子设备,包括但不限于智能手机、平板电脑、电子书阅读器、膝上型便携计算机和台式计算机等等。当终端设备101、102、103为软件时,可以安装在上述所列举的电子设备中。其可以实现成多个软件或软件模块(例如用来提供分布式服务的多个软件或软件模块),也可以实现成单个软件或软件模块。在此不做具体限定。
区块链系统105中的一个或多个节点可以提供各种服务,例如可以接收终端设备101、102、103上提交的智能合约的相关交易,并完成智能合约的执行。
需要说明的是,本公开的实施例所提供的种用于执行智能合约的方法一般由区块链系统105中的节点执行,相应地,用于执行智能合约的装置一般设置于区块链系统105中的节点中。
需要指出的是,区块链系统105中的节点可以是单一服务器,也可以由多个服务器或多个服务器集群构成。其中,上述服务器可以是硬件,也可以是软件。当服务器为硬件时,可以实现成多个服务器组成的分布式服务器集群,也可以实现成单个服务器。当服务器为软件时,可以实现成多个软件或软件模块(例如用来提供分布式服务的多个软件或软件模块),也可以实现成单个软件或软件模块。在此不做具体限定。
应该理解,图1中的终端设备、网络和区块链系统的数目仅仅是示意性的。根据实现需要,可以具有任意数目的终端设备、网络和区块链系统。
继续参考图2,其示出了根据本公开的用于执行智能合约的方法的一个实施例的流程200。该用于执行智能合约的方法包括以下步骤:
步骤201,响应于确定到达执行智能合约的预设的执行时刻,确定是否已接收所在的区块链系统中的其他节点发送的、用于执行智能 合约的预执行交易。
在本实施例中,用于执行智能合约的方法的执行主体(如图1所示的区块链系统105中的节点)的本地可以预先存储有智能合约与其对应的执行时刻的对应关系。此时,上述执行主体可以按照预设的时间间隔轮询是否到达执智能合约的执行时刻。
在本实施例中,用于执行智能合约的方法的执行主体(如图1所示的区块链系统105中的节点)可以通过查看本地存储的信息确定是否已接收到其它节点发送的、用于执行智能合约的预执行交易。
例如,上述执行主体可以存储用于指示是否接收到其它节点发送的、用于执行智能合约的预执行交易的指示信息。此时,可以通过查看指示信息以确定是否接收到其它节点发送的、用于执行智能合约的预执行交易的指示信息。
又例如,上述执行主体可以存储接收到的其它节点发送的、用于执行智能合约的预执行交易与智能合约之间的对应关系。此时,可以通过查看智能合约是否对应有预执行交易以确定是否接收到其它节点发送的、用于执行智能合约的预执行交易的指示信息。
若确定已接收到所在的区块链系统中的其他节点发送的、用于执行智能合约的预执行交易,可以表明其它节点已处理过智能合约的预执行交易。由此可以表明上述执行主体针对智能合约的执行与其它节点不同步。此时,上述执行主体就可以没有必要再执行智能合约的预执行交易,以避免智能合约的预执行交易的重复执行等情况。
步骤202,响应于确定未接收到其他节点提交的预执行交易,生成本节点对应的预执行交易,以及发送所生成的预执行交易至区块链系统。
在本实施例中,根据所在的区块链系统的不同,发送所生成的预执行交易的方式可以不同。例如,在一些区块链系统中,每个节点都可以直接与其它各节点进行通信。此时,上述执行主体可以发送所生成的预执行交易至区块链系统中的各节点。在一些区块链系统中,每个节点只能与其邻近的若干节点进行通信。此时,上述执行主体可以发送所生成的预执行交易至其邻近的若干节点。然后,上述执行主体 邻近的节点可以发送其接收到的预执行交易至其邻近的若干节点,通过节点之间的不断传播,可以将预执行交易发送至整个区块链系统。
可选地,在生成预执行交易时,可以同时生成用于标识预执行交易的预执行标识。
可选地,预执行标识可以基于用于标识智能合约的合约标识和执行标识生成。其中,合约标识可以基于上述用户的用户标识生成,从而针对不同用户可以较方便的得到不同的合约标识。其中,执行标识可以基于智能合约的预设的执行信息确定。其中,执行信息可以包括如下至少一项:执行时刻、执行次数、执行时间间隔等。
可选地,区块链系统中的各节点在接收到预执行交易时,可以先确定接收到的预执行交易是否属于异常预执行交易,以避免出现恶意提交预执行交易等情况。具体地,可以基于预执行交易中包括的各信息对预执行交易极性校验,以确定接收到的预执行交易是否属于异常预执行交易。
可选地,预执行交易中可以包括本节点的签名信息。
步骤203,与其它节点对智能合约对应的预执行交易进行共识。
在本实施例中,可以采用现有的各种共识机制对智能合约的预执行交易进行共识。例如,POW(Proof of Work,工作证明)、POS(Proof of Stake,股权证明)、BFT(Byzantine Fault Tolerance,拜占庭容错技术)等等。不同的区块链系统可以采用不同的共识机制。
通过区块链系统中的各节点对智能合约对应的预执行交易的共识,可保证各个节点对智能合约的预执行交易的执行顺序的一致性。换言之,可以保证各个节点都是在某个交易执行结束之后执行智能合约的预执行交易。
共识机制是目前广泛研究和应用的公知技术,在此不再赘述。
步骤204,根据共识后的预执行交易,获取并执行智能合约。
在本实施例中,在区块链系统中的各节点对智能合约对应的预执行交易进行共识之后,可以获取预执行交易对应的智能合约并智能合约。应当可以理解,区块链系统中的各个节点针对智能合约的执行是需要保持一致的。因此,在上述执行主体执行智能合约的同时,其它 节点也会执行智能合约,实现各个节点针对智能合约的执行的同步性。
可选地,可以按照共识后的执行顺序执行预执行交易,以记录共识后的预执行交易。应当可以理解,区块链系统中的各个节点针对预执行交易的执行也是一致的,因此,在上述执行主体执行预执行交易的同时,其它节点也会执行预执行交易,以记录共识后的预执行交易。
可选地,可以通过如下步骤记录用于提交智能合约的提交交易:
步骤一,接收用于提交智能合约的提交交易。
在本步骤中,上述执行主体可以直接接收开发智能合约的用户提交的智能合约的提交交易。在一些情况下,可以由其它节点接收开发智能合约的用户提交的智能合约,此时,上述执行主体可以接收其它节点发送的智能合约的提交交易。
其中,提交交易可以包括智能合约的、预设的执行时刻。
可选地,提交交易还包括以下至少一项:智能合约、用于标识智能合约的合约标识、预设的权限节点信息、预设的执行次数、预设的执行时间间隔。
其中,权限节点信息可以用于指示智能合约的权限节点。其中,智能合约的权限节点可以由上述用户预先设置。权限节点的数目也可以由用户根据实际应用需求设置。不同的智能合约可以对应设置不同的权限节点。例如,用户可以预先设置合约标识以0结尾的节点作为权限节点。
一般地,权限节点的数目不能过少,以避免出现单点故障等问题。
由此,可以将区块链系统中的节点划分为权限节点和非权限节点,进而可以根据实际的应用需求控制权限和非权限节点执行不同的操作。
应当可以理解,智能合约的提交交易中的内容可以由上述用户根据实际的应用需求灵活设置。
步骤二,确定提交交易是否属于异常提交交易。
在本步骤中,可以对提交交易的安全性进行判断,以避免出现恶意发送的提交交易等情况,进而对区块链系统造成破坏。具体地,根据提交交易中的内容,可以选取不同的方式对提交交易进行校验,以 确定提交交易是否属于异常提交交易。
可选地,在提交交易包括用于标识智能合约的合约标识时,可以确定合约标识是否唯一。若合约标识不唯一,可以确定提交交易属于异常提交交易。
可选地,在提交交易包括权限节点信息时,可以通过确定权限节点信息是否符合预设条件,以确定提交交易是否属于异常提交交易。若确定权限节点信息不符合预设条件,可以确定提交交易是否属于异常提交交易。其中,预设条件可以根据不同的应用场景灵活设置。例如,预设条件可以包括权限节点的数目的取值范围。
可选地,在提交交易包括执行次数和/或执行时间间隔时,可以通过确定执行次数是否符合预设的执行次数的取值范围,和/或确定执行时间间隔是否符合预设的执行时间间隔的取值范围,以确定提交交易是否属于异常提交交易。其中,执行次数的取值范围、执行时间间隔的取值范围可以根据实际的应用场景预先设置。若确定执行次数不符合预设的执行次数的取值范围,和/或确定执行时间间隔不符合预设的执行时间间隔的取值范围,可以确定提交交易属于异常提交交易。
通过控制预设的执行次数和执行时间间隔,可以避免执行次数过多、执行时间间隔过短而影响其他智能合约的执行等问题。
步骤三,响应于确定提交交易不属于异常提交交易,发送提交交易至所在的区块链系统。
步骤四,与其它节点对智能合约对应的提交交易进行共识。
在本步骤中,通过区块链系统中的各节点对智能合约对应的提交交易的共识,可保证各个节点对智能合约的提交交易的执行顺序的一致性。换言之,可以保证各个节点都是在某个交易执行结束之后执行智能合约的提交交易。
步骤五,执行共识后的提交交易,以记录共识后的提交交易。应当可以理解,区块链系统中的各个节点针对智能合约的提交交易的执行也是一致的,因此,在上述执行主体执行提交交易的同时,其它节点也会执行提交交易,以记录共识后的提交交易。
通过智能合约的提交交易的执行,区块链系统中的各个节点都可 以记录有智能合约的一些包含在提交交易中的信息,以便于后续智能合约的执行。
例如,提交交易中可以包括合约标识。此时,各个节点通过记录合约标识可以区分不同的智能合约。
又例如,提交交易中可以包括智能合约的、预设的执行时刻、执行次数、执行时间间隔等。此时,各个节点通过记录智能合约的、预设的执行时刻、执行次数、执行时间间隔等,可以轮询确定是否到达智能合约的执行时刻,并根据预设的执行次数和执行时间间隔完成智能合约的有效执行。
又例如,提交交易中可以包括权限节点信息。此时,各个节点可以对发送提交交易的节点是否是权限节点进行验证。
可选地,本公开的上述实施例提供的方法由区块链系统中的节点在智能合约的执行时刻,若确定未接收到其他节点提交的智能合约的预执行交易,生成本节点对应的预执行交易并发送至所在的区块链系统,然后各节点针对智能合约的预执行交易进行共识,并根据共识后的预执行交易,完成智能合约的定时执行,从而实现区块链系统中的各个节点基于预执行交易自动完成智能合约的定时执行,避免了由于各个节点的时钟不一致,而各个节点分别按照自己的时钟执行智能合约所导致的智能合约的执行不同步的问题。
进一步参考图3,其示出了用于执行智能合约的方法的又一个实施例的流程300。该用于执行智能合约的方法的流程300,包括以下步骤:
步骤301,确定本节点是否属于智能合约的、预设的权限节点。
在本实施例中,上述执行主体可以预先在本地存储智能合约与其对应的预设的权限节点之间的对应关系。此时,可以通过确定智能合约对应的预设的权限节点中是否包括本节点来确定本节点是否属于智能合约的、预设的权限节点。
可选地,上述执行主体若预先执行过智能合约的、包括权节点信息的提交交易,则上述执行主体记录有智能合约对应的权限节点信息。 此时,上述执行主体可以基于预先记录的权限节点信息,确定本节点是否属于智能合约的、预设的权限节点。
其中,权限节点、权限节点信息的相关内容可参考图2对应实施例中的关于权限节点的相关说明,在此不再赘述。
步骤302,响应于确定本节点属于智能合约的、预设的权限节点,确定是否到达智能合约的、预设的执行时刻。
在本实施例中,智能合约的权限节点的本地可以预先存储有智能合约与其对应的执行时刻的对应关系。此时,上述执行主体可以按照预设的时间间隔轮询是否到达执智能合约的执行时刻。而非权限节点可以不用检测智能合约的执行时刻,以降低智能合约执行过程中的资源消耗。
步骤303,响应于确定到达执行智能合约的预设的执行时刻,确定是否已接收所在的区块链系统中的其他节点发送的、用于执行智能合约的预执行交易。
步骤304,响应于确定未接收到其他节点提交的预执行交易,生成本节点对应的预执行交易,以及发送所生成的预执行交易至区块链系统。
在本实施例中,发送所生成的预执行交易至区块链系统中的非权限节点,以使非权限节点执行如下步骤:
步骤一,确定发送预执行交易的节点是否属于智能合约的、预设的权限节点。
在本步骤中,上述执行主体可以在本地预先存储智能合约的权限节点的标识。此时,可以根据发送预执行交易的节点的标识,确定发送预执行交易的节点是否属于智能合约的、预设的权限节点。
可选地,预执行交易可以包括生成预执行交易的节点签名信息。同时,区块链系统中的各节点可以预先存储智能合约的权限节点的签名信息。此时,通过判断接收到的预执行交易包括的签名信息是否属于预先存储的智能合约的权限节点的签名信息,以确定发送预执行交易的节点是否属于智能合约的、预设的权限节点。
步骤二,响应于确定发送预执行交易的节点属于智能合约的、预 设的权限节点,确定是否已接收所在的区块链系统中的其他节点发送的预执行交易,和/或确定是否已与其它节点对智能合约的预执行交易完成共识。
若确已接收所在的区块链系统中的其他节点发送的预执行交易,和/或确定已与其它节点对智能合约的预执行交易完成共识,则可以表明其它节点已处理过智能合约的预执行交易,而该非权限节点对智能合约的执行与其它节点已经不同步。此时,该非权限节点就可以没有必要再执行智能合约的预执行交易,以避免智能合约的预执行交易的重复执行等情况。
步骤三,响应于确定未接收到其他节点提交的预执行交易,且/或确定未与其它节点对智能合约的预执行交易完成共识,发送接收到的预执行交易至所在的区块链系统。
步骤四,与其它节点对智能合约的预执行交易进行共识。由此,通过区块链系统中的各节点对智能合约对应的预执行交易的共识,保各个节点对智能合约的预执行交易的执行顺序的一致性。
步骤305,与其它节点对智能合约对应的预执行交易进行共识。
步骤306,根据共识后的预执行交易,获取并执行智能合约。
上述步骤305和306的具体的执行过程可参考图2对应实施例中的步骤203和204的相关说明,在此不再赘述。
本公开的上述实施例提供的方法通过控制让区块链系统中的权限节点在智能合约的执行时刻且未接收到其他节点提交的预执行交易,生成智能合约的预执行交易并发送至区块链系统,然后由区块链系统中的各节点对智能合约的预执行交易进行共识并执行,以完成智能合约的执行。由此,可以降低生成智能合约的预执行交易的节点的数目,从而降低区块链系统的网路通信压力,避免出现网络风暴等情况。
进一步参考图4,其示出了用于执行智能合约的方法的又一个实施例的流程400。该用于执行智能合约的方法的流程400,包括以下步骤:
步骤401,响应于确定到达执行智能合约的预设的执行时刻,确 定是否已接收所在的区块链系统中的其他节点发送的、用于执行智能合约的预执行交易。
在本步骤中,区块链系统中的节点在发送智能合约的预执行交易时,可以在预执行交易中添加自己的签名信息。之后,也可以基于签名信息验证预执行交易的来源,以保证预执行交易的正确性。
步骤402,响应于确定未接收到其他节点提交的预执行交易,生成本节点对应的预执行交易,以及发送所生成的预执行交易至区块链系统。
在本步骤中,上述执行主体在生成对应的预执行交易时,可以在预执行交易中添加本节点的签名信息。
步骤403,与其它节点对智能合约对应的预执行交易进行共识。
上述步骤401、402和403中除签名信息之外的内容的具体的执行过程可参考图2对应实施例中的步骤201、202和203的相关说明,在此不再赘述。
步骤404,删除共识后的预执行交易中的签名信息,以及执行删除了签名信息的、共识后的预执行交易,以记录删除了签名信息的、共识后的预执行交易。
对于区块链系统中的不同节点来说,由于生成共识的预执行交易的节点可能不同,因此,各个节点记录的共识后的预执行交易中的签名信息可能不同。基于此,如果直接执行包括签名信息的预执行交易,可能会导致各个节点记录的预执行交易不一致。
本实施例中的用于执行智能合约的方法通过在执行预执行交易之前,先删除预执行交易中的签名信息,可以保证各个节点针对预执行交易的执行的一致性,避免各个节点所记录的预执行交易不一致的情况。
进一步参考图5,作为对上述各图所示方法的实现,本公开提供了用于执行智能合约的装置的一个实施例,该装置实施例与图2所示的方法实施例相对应,该装置具体可以应用于各种电子设备中。
如图5所示,本实施例提供的用于执行智能合约的装置500包括确定单元501、生成单元502、共识单元503和执行单元504。其中,确定单元,被配置成响应于确定到达执行智能合约的预设的执行时刻,确定是否已接收所在的区块链系统中的其他节点发送的、用于执行智能合约的预执行交易;生成单元,被配置成响应于确定未接收到其他节点提交的预执行交易,生成本节点对应的预执行交易,以及发送所生成的预执行交易至区块链系统;共识单元,被配置成与其它节点对智能合约对应的预执行交易进行共识;执行单元,被配置成根据共识后的预执行交易,获取并执行智能合约。
在本实施例中,用于执行智能合约的装置500中:确定单元501、生成单元502、共识单元503和执行单元504的具体处理及其所带来的技术效果可分别参考图2对应实施例中的步骤201、步骤202、步骤203和步骤204的相关说明,在此不再赘述。
在本实施例的一些可选的实现方式中,确定单元501被配置成响应于确定到达执行智能合约的预设的执行时刻,确定是否已接收所在的区块链系统中的其他节点发送的、用于执行智能合约的预执行交易;生成单元502被配置成响应于确定未接收到其他节点提交的预执行交易,生成本节点对应的预执行交易,以及发送所生成的预执行交易至区块链系统;共识单元503被配置成与其它节点对智能合约对应的预执行交易进行共识;执行单元504被配置成根据共识后的预执行交易,获取并执行智能合约。
在本实施例的一些可选的实现方式中,上述确定单元501进一步被配置成确定本节点是否属于智能合约的、预设的权限节点;响应于确定本节点属于智能合约的、预设的权限节点,确定是否到达智能合约的、预设的执行时刻;响应于确定到达执行智能合约的预设的执行时刻,确定是否已接收所在的区块链系统中的其他节点发送的、用于执行智能合约的预执行交易。
在本实施例的一些可选的实现方式中,上述生成单元502进一步被配置成发送所生成的预执行交易至区块链系统中的非权限节点,以使非权限节点执行如下步骤:确定发送预执行交易的节点是否属于智 能合约的、预设的权限节点;响应于确定发送预执行交易的节点属于智能合约的、预设的权限节点,确定是否已接收所在的区块链系统中的其他节点发送的预执行交易,和/或确定是否已与其它节点对智能合约的预执行交易完成共识;响应于确定未接收到其他节点提交的预执行交易,且/或确定未与其它节点对智能合约的预执行交易完成共识,发送接收到的预执行交易至所在的区块链系统;与其它节点对智能合约的预执行交易进行共识。
在本实施例的一些可选的实现方式中,上述执行单元504进一步被配置成执行共识后的预执行交易,以记录共识后的预执行交易。
在本实施例的一些可选的实现方式中,预执行交易包括生成预执行交易的节点的签名信息;以及上述执行单元504进一步被配置成:删除共识后的预执行交易中的签名信息,以及执行删除了签名信息的、共识后的预执行交易,以记录删除了签名信息的、共识后的预执行交易。
在本实施例的一些可选的实现方式中,上述装置还包括:接收单元(图中未示出)被配置成接收用于提交智能合约的提交交易,其中,提交交易包括智能合约的、预设的执行时刻;上述确定单元501进一步被配置成确定提交交易是否属于异常提交交易;上述装置还包括:发送单元(图中未示出)被配置成响应于确定提交交易不属于异常提交交易,发送提交交易至所在的区块链系统;上述共识单元503进一步被配置成与其它节点对智能合约对应的提交交易进行共识;上述执行单元504进一步被配置成执行共识后的提交交易,以记录共识后的提交交易。
本公开的上述实施例提供的装置,通过确定单元响应于确定到达执行智能合约的预设的执行时刻,确定是否已接收所在的区块链系统中的其他节点发送的、用于执行智能合约的预执行交易;生成单元响应于确定未接收到其他节点提交的预执行交易,生成本节点对应的预执行交易,以及发送所生成的预执行交易至区块链系统;共识单元与其它节点对智能合约对应的预执行交易进行共识;执行单元根据共识后的预执行交易,获取并执行智能合约,由此可以由区块链系统中的 各个节点基于预执行交易完成智能合约的定时执行,同时也保证各个节点执行智能合约的同步性。
下面参考图6,其示出了适于用来实现本公开的实施例的电子设备(例如图1中的区块链系统105中的节点)600的结构示意图。图6示出的电子设备仅仅是一个示例,不应对本公开的实施例的功能和使用范围带来任何限制。
如图6所示,电子设备600可以包括处理装置(例如中央处理器、图形处理器等)601,其可以根据存储在只读存储器(ROM)602中的程序或者从存储装置608加载到随机访问存储器(RAM)603中的程序而执行各种适当的动作和处理。在RAM 603中,还存储有电子设备600操作所需的各种程序和数据。处理装置601、ROM 602以及RAM603通过总线604彼此相连。输入/输出(I/O)接口605也连接至总线604。
通常,以下装置可以连接至I/O接口605:包括例如触摸屏、触摸板、键盘、鼠标、摄像头、麦克风、加速度计、陀螺仪等的输入装置606;包括例如液晶显示器(LCD)、扬声器、振动器等的输出装置607;包括例如磁带、硬盘等的存储装置608;以及通信装置609。通信装置609可以允许电子设备600与其他设备进行无线或有线通信以交换数据。虽然图6示出了具有各种装置的电子设备600,但是应理解的是,并不要求实施或具备所有示出的装置。可以替代地实施或具备更多或更少的装置。图6中示出的每个方框可以代表一个装置,也可以根据需要代表多个装置。
特别地,根据本公开的实施例,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,本公开的实施例包括一种计算机程序产品,其包括承载在计算机可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信装置609从网络上被下载和安装,或者从存储装置608被安装,或者从ROM 602被安装。在该计算机程序被处理装置601执行时,执行本公开的实施例的方法中限定的上述功能。
需要说明的是,本公开的实施例所述的计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本公开的实施例中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。而在本公开的实施例中,计算机可读信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读信号介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:电线、光缆、RF(射频)等等,或者上述的任意合适的组合。
上述计算机可读介质可以是上述电子设备中所包含的;也可以是单独存在,而未装配入该电子设备中。上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被该电子设备执行时,使得该电子设备:响应于确定到达执行智能合约的预设的执行时刻,确定是否已接收所在的区块链系统中的其他节点发送的、用于执行智能合约的预执行交易;响应于确定未接收到其他节点提交的预执行交易,生成本节点对应的预执行交易,以及发送所生成的预执行交易至区块链系统;与其它节点对智能合约对应的预执行交易进行共识;根据共识后的预执行交易,获取并执行智能合约。
可以以一种或多种程序设计语言或其组合来编写用于执行本公开 的实施例的操作的计算机程序代码,所述程序设计语言包括面向对象的程序设计语言-诸如Java、Smalltalk、C++,还包括常规的过程式程序设计语言-诸如″C″语言或类似的程序设计语言。程序代码可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络——包括局域网(LAN)或广域网(WAN)——连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。
附图中的流程图和框图,图示了按照本公开各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,该模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。
描述于本公开的实施例中所涉及到的单元可以通过软件的方式实现,也可以通过硬件的方式来实现。所描述的单元也可以设置在处理器中,例如,可以描述为:一种处理器包括确定单元、生成单元、共识单元和执行单元。其中,这些单元的名称在某种情况下并不构成对该单元本身的限定,例如,确定单元还可以被描述为″响应于确定到达执行智能合约的预设的执行时刻,确定是否已接收所在的区块链系统中的其他节点发送的、用于执行智能合约的预执行交易的单元″。
以上描述仅为本公开的较佳实施例以及对所运用技术原理的说明。本领域技术人员应当理解,本公开的实施例中所涉及的发明范围,并不限于上述技术特征的特定组合而成的技术方案,同时也应涵盖在 不脱离上述发明构思的情况下,由上述技术特征或其等同特征进行任意组合而形成的其它技术方案。例如上述特征与本公开的实施例中公开的(但不限于)具有类似功能的技术特征进行互相替换而形成的技术方案。

Claims (16)

  1. 一种用于执行智能合约的方法,包括:
    响应于确定到达执行智能合约的预设的执行时刻,确定是否已接收所在的区块链系统中的其他节点发送的、用于执行所述智能合约的预执行交易;
    响应于确定未接收到其他节点提交的预执行交易,生成本节点对应的预执行交易,以及发送所生成的预执行交易至所述区块链系统;
    与其它节点对所述智能合约对应的预执行交易进行共识;
    根据共识后的预执行交易,获取并执行所述智能合约。
  2. 根据权利要求1所述的方法,其中,所述响应于确定到达执行智能合约的预设的执行时刻,确定是否已接收所在的区块链系统中的其他节点发送的、用于执行所述智能合约的预执行交易,包括:
    确定本节点是否属于所述智能合约的、预设的权限节点;
    响应于确定本节点属于所述智能合约的、预设的权限节点,确定是否到达智能合约的、预设的执行时刻;
    响应于确定到达执行智能合约的预设的执行时刻,确定是否已接收所在的区块链系统中的其他节点发送的、用于执行所述智能合约的预执行交易。
  3. 根据权利要求2所述的方法,其中,所述发送所生成的预执行交易至所在的区块链系统,包括:
    发送所生成的预执行交易至所述区块链系统中的非权限节点,以使非权限节点执行如下步骤:
    确定发送预执行交易的节点是否属于所述智能合约的、预设的权限节点;
    响应于确定发送预执行交易的节点属于所述智能合约的、预设的权限节点,确定是否已接收所在的区块链系统中的其他节点发送的预执行交易,和/或确定是否已与其它节点对所述智能合约的预执行交易 完成共识;
    响应于确定未接收到其他节点提交的预执行交易,且/或确定未与其它节点对所述智能合约的预执行交易完成共识,发送接收到的预执行交易至所在的区块链系统;
    与其它节点对所述智能合约的预执行交易进行共识。
  4. 根据权利要求1所述的方法,其中,所述方法还包括:
    执行共识后的预执行交易,以记录共识后的预执行交易。
  5. 根据权利要求4所述的方法,其中,预执行交易包括生成预执行交易的节点的签名信息;以及
    所述执行共识后的预执行交易,以记录共识后的预执行交易,包括:
    删除共识后的预执行交易中的签名信息,以及执行删除了签名信息的、共识后的预执行交易,以记录删除了签名信息的、共识后的预执行交易。
  6. 根据权利要求1所述的方法,其中,所述方法还包括:
    接收用于提交智能合约的提交交易,其中,所述提交交易包括所述智能合约的、预设的执行时刻;
    确定所述提交交易是否属于异常提交交易;
    响应于确定所述提交交易不属于异常提交交易,发送所述提交交易至所在的区块链系统;
    与其它节点对所述智能合约对应的提交交易进行共识;
    执行共识后的提交交易,以记录共识后的提交交易。
  7. 根据权利要求6所述的方法,其中,所述提交交易还包括以下至少一项:智能合约、用于标识智能合约的合约标识、预设的权限节点信息、预设的执行次数、预设的执行时间间隔。
  8. 一种用于执行智能合约的装置,包括:
    确定单元,被配置成响应于确定到达执行智能合约的预设的执行时刻,确定是否已接收所在的区块链系统中的其他节点发送的、用于执行所述智能合约的预执行交易;
    生成单元,被配置成响应于确定未接收到其他节点提交的预执行交易,生成本节点对应的预执行交易,以及发送所生成的预执行交易至所述区块链系统;
    共识单元,被配置成与其它节点对所述智能合约对应的预执行交易进行共识;
    执行单元,被配置成根据共识后的预执行交易,获取并执行所述智能合约。
  9. 根据权利要求8所述的装置,其中,确定单元进一步被配置成:
    确定本节点是否属于智能合约的、预设的权限节点;
    响应于确定本节点属于智能合约的、预设的权限节点,确定是否到达智能合约的、预设的执行时刻;
    响应于确定到达执行智能合约的预设的执行时刻,确定是否已接收所在的区块链系统中的其他节点发送的、用于执行智能合约的预执行交易。
  10. 根据权利要求9所述的装置,其中,所述生成单元进一步被配置成:
    发送所生成的预执行交易至区块链系统中的非权限节点,以使非权限节点执行如下步骤:
    确定发送预执行交易的节点是否属于智能合约的、预设的权限节点;
    响应于确定发送预执行交易的节点属于智能合约的、预设的权限节点,确定是否已接收所在的区块链系统中的其他节点发送的预执行交易,和/或确定是否已与其它节点对智能合约的预执行交易完成共识;
    响应于确定未接收到其他节点提交的预执行交易,且/或确定未与其它节点对智能合约的预执行交易完成共识,发送接收到的预执行交易至所在的区块链系统;
    与其它节点对智能合约的预执行交易进行共识。
  11. 根据权利要求8所述的装置,其中,所述执行单元进一步被配置成执行共识后的预执行交易,以记录共识后的预执行交易。
  12. 根据权利要求11所述的装置,其中,预执行交易包括生成预执行交易的节点的签名信息;以及
    所述执行单元进一步被配置成:删除共识后的预执行交易中的签名信息,以及执行删除了签名信息的、共识后的预执行交易,以记录删除了签名信息的、共识后的预执行交易。
  13. 根据权利要求8所述的装置,其中,所述装置还包括:接收单元,被配置成接收用于提交智能合约的提交交易,其中,提交交易包括智能合约的、预设的执行时刻;
    所述确定单元进一步被配置成:确定提交交易是否属于异常提交交易;
    所述装置还包括发送单元,被配置成响应于确定提交交易不属于异常提交交易,发送提交交易至所在的区块链系统;
    所述共识单元进一步被配置成与其它节点对智能合约对应的提交交易进行共识;
    所述执行单元进一步被配置成执行共识后的提交交易,以记录共识后的提交交易。
  14. 根据权利要求13所述的装置,其中,所述提交交易还包括以下至少一项:智能合约、用于标识智能合约的合约标识、预设的权限节点信息、预设的执行次数、预设的执行时间间隔。
  15. 一种电子设备,包括:
    一个或多个处理器;
    存储装置,其上存储有一个或多个程序;
    当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现如权利要求1-7中任一所述的方法。
  16. 一种计算机可读介质,其上存储有计算机程序,其中,该程序被处理器执行时实现如权利要求1-7中任一所述的方法。
PCT/CN2020/077569 2019-09-24 2020-03-03 用于执行智能合约的方法和装置 WO2021056968A1 (zh)

Priority Applications (3)

Application Number Priority Date Filing Date Title
JP2022504251A JP7339425B2 (ja) 2019-09-24 2020-03-03 スマートコントラクトを実行するための方法及び装置
US17/630,647 US12008556B2 (en) 2019-09-24 2020-03-03 Method and apparatus for executing smart contract
EP20868769.9A EP3989149A4 (en) 2019-09-24 2020-03-03 SMART CONTRACT EXECUTION METHOD AND APPARATUS

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910904191.7 2019-09-24
CN201910904191.7A CN110659907B (zh) 2019-09-24 2019-09-24 用于执行智能合约的方法和装置

Publications (1)

Publication Number Publication Date
WO2021056968A1 true WO2021056968A1 (zh) 2021-04-01

Family

ID=69038793

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/077569 WO2021056968A1 (zh) 2019-09-24 2020-03-03 用于执行智能合约的方法和装置

Country Status (5)

Country Link
US (1) US12008556B2 (zh)
EP (1) EP3989149A4 (zh)
JP (1) JP7339425B2 (zh)
CN (1) CN110659907B (zh)
WO (1) WO2021056968A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113157805A (zh) * 2021-04-16 2021-07-23 西安瓜大网络科技有限公司 一种事务定序共识方法和系统
CN113313592A (zh) * 2021-05-27 2021-08-27 中央财经大学 一种基于区块链的智能服务交易和监管系统

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110659907B (zh) 2019-09-24 2021-11-12 北京海益同展信息科技有限公司 用于执行智能合约的方法和装置
CN111312352B (zh) 2020-02-19 2023-07-21 百度在线网络技术(北京)有限公司 一种基于区块链的数据处理方法、装置、设备和介质
CN112037062B (zh) * 2020-08-31 2023-08-25 成都质数斯达克科技有限公司 交易共识方法、装置、电子设备及可读存储介质
CN112837157A (zh) * 2021-02-10 2021-05-25 中国人民银行数字货币研究所 区块链中定时智能合约的注册、执行方法、装置和系统
CN115150409A (zh) * 2022-06-29 2022-10-04 蚂蚁区块链科技(上海)有限公司 在区块链系统中执行交易的方法、区块链系统和节点

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106874087A (zh) * 2017-01-25 2017-06-20 上海钜真金融信息服务有限公司 一种区块链智能合约定时任务调度方法
CN108510251A (zh) * 2018-03-30 2018-09-07 上海分赋信息科技有限公司 基于外部数据构建多种触发机制以执行区块链网络中智能合约的方法及系统
CN109685502A (zh) * 2018-12-06 2019-04-26 成都佰纳瑞信息技术有限公司 一种适用于区块链网络的加速共识方法
CN110033244A (zh) * 2019-03-15 2019-07-19 阿里巴巴集团控股有限公司 基于区块链的智能合约执行方法及装置和电子设备
CN110659907A (zh) * 2019-09-24 2020-01-07 北京海益同展信息科技有限公司 用于执行智能合约的方法和装置

Family Cites Families (39)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE2311835C3 (de) 1973-03-09 1976-01-02 Siemens Ag, 1000 Berlin Und 8000 Muenchen Verfahren zum Herstellen eines rohrförmigen Leiters, insbesondere für supraleitende Kabel
US20190005469A1 (en) * 2015-07-14 2019-01-03 Fmr Llc Collateral Management With Blockchain and Smart Contracts Apparatuses, Methods and Systems
JP6931999B2 (ja) 2017-02-06 2021-09-08 株式会社日立製作所 信用度管理システムおよび信用度管理方法
US10102265B1 (en) * 2017-04-12 2018-10-16 Vijay K. Madisetti Method and system for tuning blockchain scalability for fast and low-cost payment and transaction processing
US10255342B2 (en) * 2017-04-12 2019-04-09 Vijay K. Madisetti Method and system for tuning blockchain scalability, decentralization, and security for fast and low-cost payment and transaction processing
CN108805562A (zh) * 2017-04-27 2018-11-13 中思博安科技(北京)有限公司 智能合约的执行方法和系统
CN107291862A (zh) * 2017-06-12 2017-10-24 腾讯科技(深圳)有限公司 业务数据存储方法、装置、存储介质及电子设备
US11055703B2 (en) 2017-06-19 2021-07-06 Hitachi, Ltd. Smart contract lifecycle management
CN108269185B (zh) * 2018-01-19 2020-12-15 创新先进技术有限公司 资金流转报表生成方法及装置和电子设备
CN108416675A (zh) * 2018-02-14 2018-08-17 阿里巴巴集团控股有限公司 资产管理方法及装置、电子设备
CN108335207B (zh) * 2018-02-14 2020-08-04 阿里巴巴集团控股有限公司 资产管理方法及装置、电子设备
CA2995177A1 (en) * 2018-02-14 2019-08-14 Beijing Tiande Technologies Limited A method of state synchronization for complex smart contracts based on stage buckets
CN108335206B (zh) * 2018-02-14 2020-12-22 创新先进技术有限公司 资产管理方法及装置、电子设备
CN108665953B (zh) * 2018-05-08 2020-12-25 北京金山云网络技术有限公司 一种处方执行方法、装置、设备和存储介质
CN108830606B (zh) * 2018-05-30 2021-12-28 创新先进技术有限公司 智能合约的部署、调用、执行方法和装置
CN109003078B (zh) * 2018-06-27 2021-08-24 创新先进技术有限公司 基于区块链的智能合约调用方法及装置、电子设备
CN113095822A (zh) * 2018-06-27 2021-07-09 创新先进技术有限公司 基于区块链的智能合约调用方法及装置、电子设备
CN109146679B (zh) * 2018-06-29 2023-11-10 创新先进技术有限公司 基于区块链的智能合约调用方法及装置、电子设备
JP6526299B1 (ja) 2018-07-31 2019-06-05 株式会社メルカリ 情報処理方法、情報処理装置、およびプログラム
US11196569B2 (en) * 2018-09-12 2021-12-07 Bitclave Pte. Ltd. Systems and methods for accuracy and attestation of validity of data shared in a secure distributed environment
US10250394B1 (en) * 2018-09-20 2019-04-02 Accenture Global Solutions Limited Cryptologic self-executing blockchain export commitment
CN109146490B (zh) * 2018-10-11 2023-04-07 北京京东尚科信息技术有限公司 区块生成方法、装置和系统
US11615882B2 (en) * 2018-11-07 2023-03-28 Ge Healthcare Limited Apparatus, non-transitory computer-readable storage medium, and computer-implemented method for distributed ledger management of nuclear medicine products
CN109615517A (zh) * 2018-12-07 2019-04-12 北京瑞卓喜投科技发展有限公司 一种智能合约执行方法及智能合约执行系统
CN109658249A (zh) * 2018-12-27 2019-04-19 链极智能科技(上海)有限公司 一种区块链性能优化方法
JP6856749B2 (ja) * 2018-12-29 2021-04-14 アドバンスド ニュー テクノロジーズ カンパニー リミテッド ブロックチェーン上のネイティブ契約を実施するためのシステムおよび方法
US10733152B2 (en) * 2018-12-29 2020-08-04 Alibaba Group Holding Limited System and method for implementing native contract on blockchain
CN109508915A (zh) * 2019-01-17 2019-03-22 苏州复谷网络科技有限公司 一种基于区块链的智能化智能合约
CN110264187B (zh) * 2019-01-23 2021-06-04 腾讯科技(深圳)有限公司 数据处理方法、装置、计算机设备及存储介质
CN110060155B (zh) * 2019-01-31 2021-03-23 创新先进技术有限公司 区块链的智能合约执行方法及装置和电子设备
CN112966311A (zh) * 2019-03-15 2021-06-15 创新先进技术有限公司 智能合约校验方法及装置和电子设备
US11763298B2 (en) * 2019-03-18 2023-09-19 Jio Platforms Limited Systems and methods for hybrid synchronization in virtual distributed ledger networks
EP3612930A4 (en) * 2019-03-26 2020-06-24 Alibaba Group Holding Limited SYSTEM AND METHOD FOR IMPLEMENTING VARIOUS TYPES OF BLOCKCHAIN CONTRACTS
CN110009498A (zh) * 2019-03-29 2019-07-12 阿里巴巴集团控股有限公司 基于区块链的资源分配方法和装置
US11372817B2 (en) * 2019-04-18 2022-06-28 International Business Machines Corporation Synchronization of peers
CN110096338B (zh) * 2019-05-10 2021-12-14 百度在线网络技术(北京)有限公司 智能合约执行方法、装置、设备及介质
WO2019170175A2 (en) * 2019-06-28 2019-09-12 Alibaba Group Holding Limited System and method for executing different types of blockchain contracts
US20220284011A1 (en) * 2019-08-06 2022-09-08 Zeu Technologies, Inc. Distributed blockchain transaction system
CN112631954A (zh) 2019-10-09 2021-04-09 联想企业解决方案(新加坡)有限公司 可扩展的双列直插式内存模块

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106874087A (zh) * 2017-01-25 2017-06-20 上海钜真金融信息服务有限公司 一种区块链智能合约定时任务调度方法
CN108510251A (zh) * 2018-03-30 2018-09-07 上海分赋信息科技有限公司 基于外部数据构建多种触发机制以执行区块链网络中智能合约的方法及系统
CN109685502A (zh) * 2018-12-06 2019-04-26 成都佰纳瑞信息技术有限公司 一种适用于区块链网络的加速共识方法
CN110033244A (zh) * 2019-03-15 2019-07-19 阿里巴巴集团控股有限公司 基于区块链的智能合约执行方法及装置和电子设备
CN110659907A (zh) * 2019-09-24 2020-01-07 北京海益同展信息科技有限公司 用于执行智能合约的方法和装置

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113157805A (zh) * 2021-04-16 2021-07-23 西安瓜大网络科技有限公司 一种事务定序共识方法和系统
CN113157805B (zh) * 2021-04-16 2024-05-03 西安瓜大网络科技有限公司 一种事务定序共识方法和系统
CN113313592A (zh) * 2021-05-27 2021-08-27 中央财经大学 一种基于区块链的智能服务交易和监管系统

Also Published As

Publication number Publication date
CN110659907A (zh) 2020-01-07
JP2022542258A (ja) 2022-09-30
EP3989149A1 (en) 2022-04-27
US20220261797A1 (en) 2022-08-18
JP7339425B2 (ja) 2023-09-05
CN110659907B (zh) 2021-11-12
US12008556B2 (en) 2024-06-11
EP3989149A4 (en) 2023-06-07

Similar Documents

Publication Publication Date Title
WO2021056968A1 (zh) 用于执行智能合约的方法和装置
US12001578B2 (en) Systems using secure permissions for secure enterprise-wide fine-grained role-based access control of organizational assets
WO2021036877A1 (zh) 一种信息处理方法、设备和计算机存储介质
WO2020216204A1 (zh) 信息获取方法和装置
WO2021042713A1 (zh) 用于处理数据请求的方法和装置
US20240121121A1 (en) Registration and Execution Methods, Apparatuses and System of Timed Smart Contract in Blockchain
WO2021115197A1 (zh) 用于生成设备标识的方法、电子设备和计算机可读介质
CN113505520A (zh) 用于支持异构联邦学习的方法、装置和系统
JP2022541929A (ja) スマートコントラクトを発行するための方法及び装置
EP4156072A1 (en) Transaction tracing method and apparatus based on blockchain
WO2021056970A1 (zh) 用于执行智能合约的方法和装置
EP4365808A1 (en) Data verification method and apparatus
CN110825815A (zh) 基于区块链的云笔记系统信息处理方法、设备及介质
KR102637173B1 (ko) 5g 모바일 에지 컴퓨팅 환경을 위한 블록체인 시스템, 장치 및 운영 방법
WO2022179470A1 (zh) 定时器处理方法、装置、电子设备和计算机可读存储介质
CN112565340B (zh) 分布式应用的服务调度方法、装置、计算机系统及介质
WO2021042715A1 (zh) 用于开发智能合约的系统、方法和装置
CN113610525A (zh) 基于区块链的金融数据的处理方法、装置、设备及介质
CN111598544A (zh) 用于处理信息的方法和装置
CN113760563B (zh) 基于开放平台的数据处理方法、装置以及数据处理系统
CN113626873B (zh) 鉴权方法、装置、电子设备和计算机可读介质
CN110011767B (zh) 用于tcp连接备份的方法和装置
WO2024120403A1 (zh) 应用程序的登录方法及装置、计算机设备、存储介质和芯片
US20220350877A1 (en) Multi-core account processing system support
CN115022053A (zh) 访问区块链网络的方法、装置和系统

Legal Events

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

Ref document number: 20868769

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2022504251

Country of ref document: JP

Kind code of ref document: A

Ref document number: 2020868769

Country of ref document: EP

Effective date: 20220119

NENP Non-entry into the national phase

Ref country code: DE