CN113592646A - Intelligent contract execution method, device and system - Google Patents

Intelligent contract execution method, device and system Download PDF

Info

Publication number
CN113592646A
CN113592646A CN202110753272.9A CN202110753272A CN113592646A CN 113592646 A CN113592646 A CN 113592646A CN 202110753272 A CN202110753272 A CN 202110753272A CN 113592646 A CN113592646 A CN 113592646A
Authority
CN
China
Prior art keywords
intelligent contract
execution
contract
condition
service
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN202110753272.9A
Other languages
Chinese (zh)
Inventor
穆长春
狄刚
钱友才
杜金钊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Digital Currency Institute of the Peoples Bank of China
Original Assignee
Digital Currency Institute of the Peoples Bank of China
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 Digital Currency Institute of the Peoples Bank of China filed Critical Digital Currency Institute of the Peoples Bank of China
Priority to CN202110753272.9A priority Critical patent/CN113592646A/en
Publication of CN113592646A publication Critical patent/CN113592646A/en
Pending legal-status Critical Current

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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • G06F21/6245Protecting personal data, e.g. for financial or medical purposes
    • 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

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)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Strategic Management (AREA)
  • Bioethics (AREA)
  • General Business, Economics & Management (AREA)
  • Marketing (AREA)
  • Technology Law (AREA)
  • Economics (AREA)
  • Development Economics (AREA)
  • Medical Informatics (AREA)
  • Databases & Information Systems (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses an execution method, device and system of an intelligent contract, and relates to the technical field of computers. One embodiment of the method comprises: the service receiving module receives an intelligent contract service request sent by a user, wherein the service request comprises an intelligent contract identifier; the registration execution module registers an execution condition for the intelligent contract according to the intelligent contract identifier, executes the intelligent contract according to the execution condition and acquires an execution result of the intelligent contract; and the result verification module verifies the execution result and signs the execution result after the verification is passed so as to complete the execution of the intelligent contract. The implementation mode can set the execution condition of the intelligent contract, drive the intelligent contract to be forcibly executed under the condition that the condition is met, verify and sign the execution result, and confirm that the contract execution code is not tampered through a signature verification mechanism, so that the execution of the contract is in accordance with the intention of each participant of the intelligent contract.

Description

Intelligent contract execution method, device and system
Technical Field
The invention relates to the technical field of computers, in particular to an execution method, device and system of an intelligent contract.
Background
A contract refers to an agreement commitment that the transaction participants have agreed to each other. In 1996, nike-sabo proposed the concept of an intelligent contract: an intelligent contract is a set of commitments, specified in numerical form, that contains an agreement on how two parties fulfill the commitments. Smart contracts are currently generally considered to be a computer protocol intended to propagate, verify or execute contracts in an informational manner. Smart contracts allow trusted transactions to be conducted without third parties, which transactions are traceable and irreversible. The basic properties that an intelligent contract contains include: consistency, customizability, observability, verifiability, enforcement, privacy protection. Observability refers to the ability of principals to observe contract performance or demonstrate themselves to other principals; verifiability refers to the ability of a principal to prove contract performance or a breach to an arbitrator, or the arbitrator's ability to ascertain this by other means; privacy refers to the contract content and control of the contract should be distributed only within the scope of participants necessary for contract performance; reputation, intrinsic incentives, "self-enforcement" protocol, and verifiability all play an important role in implementing enforceability.
Currently, intelligent contracts are mainly realized in block chain products, such as: bitcoin, etherhouse, cordia, Libra, etc., each product implements a smart contract in its own unique way. For example, Libra writes a transaction script and smart contracts in the Move language, and calls one or more smart contracts through the transaction script to update the global state of the Libra blockchain. However, in the field of digital currency, the execution mechanism of smart contracts is not perfect.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method, an apparatus, and a system for executing an intelligent contract, which can set an execution condition of the intelligent contract, drive the intelligent contract to be forcibly executed when the condition is satisfied, verify and sign an execution result, and confirm that a contract execution code is not tampered with through a signature verification mechanism, so that execution of the contract is in accordance with the will of each participant of the intelligent contract.
To achieve the above object, according to an aspect of the embodiments of the present invention, there is provided a method for executing an intelligent contract.
An execution method of an intelligent contract, comprising:
the service receiving module receives an intelligent contract service request sent by a user, wherein the service request comprises an intelligent contract identifier;
the registration execution module registers an execution condition for the intelligent contract according to the intelligent contract identifier, executes the intelligent contract according to the execution condition and acquires an execution result of the intelligent contract;
and the result verification module verifies the execution result and signs the execution result after the verification is passed so as to complete the execution of the intelligent contract.
Optionally, the service request is used for performing a signing operation of an intelligent contract;
after the service receiving module receives the intelligent contract service request sent by the user, the method further comprises the following steps:
and the contract selection module acquires an intelligent contract list from the intelligent contract library and displays the intelligent contract list to the user so that the user can select the intelligent contract to sign.
Optionally, the service request is used for performing a starting operation of an intelligent contract;
after the service receiving module receives the intelligent contract service request sent by the user, the method further comprises the following steps:
and the contract selection module acquires the intelligent contract from the intelligent contract library according to the intelligent contract identification, or calls back the merchant service node to acquire the intelligent contract so as to start the intelligent contract.
Optionally, executing the smart contract according to the execution condition includes:
and acquiring service data, judging whether the execution condition is met according to the service data, and executing the intelligent contract under the condition that the execution condition is met.
Optionally, the executing condition includes a service condition and a monitoring frequency, and executing the intelligent contract according to the executing condition includes:
and acquiring service data at regular time according to the monitoring frequency, judging whether the service condition is met or not according to the service data, and executing the intelligent contract under the condition that the service condition is met.
Optionally, the verifying the execution result by the result verifying module includes:
and the result verification module verifies the execution result according to the intelligent contract, the execution condition and the service data.
Optionally, the method further comprises:
in the execution process of the intelligent contract, if the digital currency processing is involved, the signature verification module completes the actual processing of the digital currency by the digital currency system after the digital currency signature verification is carried out.
Optionally, in the execution process of the smart contract, if digital currency processing is involved, the verifying the execution result by the result verification module includes:
and the result verification module verifies the execution result according to the intelligent contract, the execution condition, the intelligent contract corresponding to the digital currency processing operation and the service data.
Optionally, the service data includes external data obtained from an external data source through a data source plug-in.
According to another aspect of the embodiment of the invention, an executing device of the intelligent contract is provided.
An execution device of an intelligent contract, comprising:
the service receiving module is used for receiving an intelligent contract service request sent by a user, and the service request comprises an intelligent contract identifier;
the registration execution module is used for registering an execution condition for the intelligent contract according to the intelligent contract identifier, executing the intelligent contract according to the execution condition and acquiring an execution result of the intelligent contract;
and the result verification module is used for verifying the execution result and signing the execution result after the verification is passed so as to complete the execution of the intelligent contract.
According to another aspect of the embodiment of the invention, an execution system of an intelligent contract is provided.
An execution system of an intelligent contract, comprising:
the intelligent contract execution unit is used for receiving an intelligent contract service request sent by a user, and the service request comprises an intelligent contract identifier; registering an execution condition for the intelligent contract according to the intelligent contract identifier, executing the intelligent contract according to the execution condition, and acquiring an execution result of the intelligent contract; sending the execution result to an intelligent contract verification unit;
and the intelligent contract verification unit is used for verifying the execution result and signing the execution result after the verification is passed.
Optionally, the method further comprises:
the intelligent contract library is used for caching intelligent contracts;
the fund processing unit is used for performing digital currency signature verification if digital currency processing is involved in the execution process of the intelligent contract and sending the digital currency after signature verification to the digital currency system so as to perform actual processing on the digital currency;
and the intelligent contract verification unit is further configured to:
and verifying the execution result according to the intelligent contract, the execution condition, the intelligent contract corresponding to the digital currency processing operation and the service data.
According to yet another aspect of an embodiment of the present invention, there is provided an electronic device for executing an intelligent contract.
An electronic device for executing smart contracts, comprising: one or more processors; the storage device is used for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors realize the execution method of the intelligent contract provided by the embodiment of the invention.
According to yet another aspect of embodiments of the present invention, a computer-readable medium is provided.
A computer-readable medium, on which a computer program is stored, which, when executed by a processor, implements a method for executing an intelligent contract provided by an embodiment of the present invention.
One embodiment of the above invention has the following advantages or benefits: receiving an intelligent contract service request sent by a user through a service receiving module, wherein the service request comprises an intelligent contract identifier; the registration execution module registers an execution condition for the intelligent contract according to the intelligent contract identifier, executes the intelligent contract according to the execution condition and acquires an execution result of the intelligent contract; the result verification module verifies the execution result and signs the execution result after the verification is passed so as to complete the execution of the intelligent contract, namely, the intelligent contract execution can be carried out based on the execution and verification model, so that the load pressure of an operation mechanism is reduced; the execution conditions of the intelligent contract are set, the intelligent contract is driven to be forcibly executed under the condition that the conditions are met, the execution result is verified and signed, and the contract execution code is confirmed to be not tampered through a signature verification mechanism, so that the execution of the contract is in accordance with the intention of each participant of the intelligent contract.
Further effects of the above-mentioned non-conventional alternatives will be described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
FIG. 1 is a schematic diagram of the main steps of a method for executing an intelligent contract according to an embodiment of the invention;
FIG. 2 is a schematic diagram of an implementation of an intelligent contract execution system according to one embodiment of the invention;
FIG. 3 is a schematic diagram of the main modules of an execution apparatus of an intelligent contract according to an embodiment of the present invention;
FIG. 4 is an exemplary system architecture diagram in which embodiments of the present invention may be employed;
fig. 5 is a schematic block diagram of a computer system suitable for use in implementing a terminal device or server of an embodiment of the invention.
Detailed Description
Exemplary embodiments of the present invention are described below with reference to the accompanying drawings, in which various details of embodiments of the invention are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
In order to solve the technical problems in the prior art, the invention provides an execution method, device and system of an intelligent contract, so as to meet the characteristic requirements of realizing the consistency, the compulsory property, the verifiability and the like of the intelligent contract of digital currency. Wherein the content of the first and second substances,
1. verifiability: the validity of the contract record can be checked. In order to realize the verifiability of the intelligent contract, a signing mechanism is added in the whole process of executing the intelligent contract, and the execution code of the contract is confirmed to be not tampered through the signing mechanism, so that the execution of the contract is in accordance with the will of each party participating in the contract;
2. self-enforcement: intelligent contracts can prevent and punish default behavior without relying on legal forces. In order to realize the self-enforcement of the intelligent contract, the invention drives the intelligent contract to be enforced under the condition of meeting by setting the execution condition of the intelligent contract.
Fig. 1 is a schematic diagram of main steps of an execution method of an intelligent contract according to an embodiment of the present invention. As shown in fig. 1, the method for executing an intelligent contract according to the embodiment of the present invention mainly includes steps S101 to S103.
Step S101: the service receiving module receives an intelligent contract service request sent by a user, wherein the service request comprises an intelligent contract identifier. Wherein, the user sends an intelligent contract service request through a merchant service (APP);
step S102: the registration execution module registers an execution condition for the intelligent contract according to the intelligent contract identifier, executes the intelligent contract according to the execution condition and acquires an execution result of the intelligent contract;
step S103: and the result verification module verifies the execution result and signs the execution result after the verification is passed so as to complete the execution of the intelligent contract.
According to the steps S101 to S103, the intelligent contract execution can be performed based on the execution + verification model, so that the load pressure of the operating institution is reduced; the execution conditions of the intelligent contract are set, the intelligent contract is driven to be forcibly executed under the condition that the conditions are met, the execution result is verified and signed, and the contract execution code is confirmed to be not tampered through a signature verification mechanism, so that the execution of the contract is in accordance with the intention of each participant of the intelligent contract.
According to one embodiment of the invention, the service request is used for performing a signing operation of the smart contract. And after the service receiving module receives the intelligent contract service request sent by the user, the contract selection module can also acquire an intelligent contract list from the intelligent contract library and display the intelligent contract list to the user so that the user can select the intelligent contract to sign.
According to another embodiment of the invention, the service request is used for performing a start-up operation of the intelligent contract. And after the service receiving module receives the intelligent contract service request sent by the user, the contract selecting module may further obtain the intelligent contract from the intelligent contract library according to the intelligent contract identifier, or call back the merchant service node to obtain the intelligent contract, so as to perform the starting operation of the intelligent contract.
After the corresponding intelligent contract is obtained, the execution condition is registered for the intelligent contract. According to still another embodiment of the present invention, executing the smart contract according to the execution condition includes: and acquiring the service data, judging whether the execution conditions are met according to the service data, and executing the intelligent contract under the condition that the execution conditions are met. The service data refers to service interaction between the participants of the intelligent contract or external data required in the intelligent contract, that is, the service data includes external data acquired from an external data source through a data source plug-in.
According to another embodiment of the present invention, the execution condition includes a traffic condition and a monitoring frequency, and executing the smart contract according to the execution condition may include: and acquiring service data at regular time according to the monitoring frequency, judging whether the service conditions are met or not according to the service data, and executing the intelligent contract under the condition that the service conditions are met.
According to another embodiment of the present invention, the verifying the execution result by the result verifying module specifically includes: and the result verification module verifies the execution result according to the intelligent contract, the execution condition and the service data.
According to another embodiment of the present invention, the method for executing the intelligent contract further comprises: in the execution process of the intelligent contract, if the digital currency processing is involved, the signature verification module completes the actual processing of the digital currency by the digital currency system after the digital currency signature verification is carried out. According to the technical scheme of the embodiment, the coverage of the fund processing logic can be enlarged. Funds processing is handled in a unified intelligent contract, and whatever differences in business logic of each business system handling itself, the processing at the fund layer will follow the unified funds processing logic.
According to another embodiment of the present invention, in the execution process of the intelligent contract, if the digital currency processing is involved, the verifying the execution result by the result verifying module specifically includes: and the result verification module verifies the execution result according to the intelligent contract, the execution condition, the intelligent contract corresponding to the digital currency processing operation and the service data.
The following describes the implementation principle of the intelligent contract execution system according to the present invention with reference to a specific embodiment. The intelligent contract execution system mainly comprises an intelligent contract execution unit and an intelligent contract verification unit, wherein the intelligent contract execution unit is used for receiving an intelligent contract service request sent by a user, and the service request comprises an intelligent contract identifier; registering an execution condition for the intelligent contract according to the intelligent contract identifier, executing the intelligent contract according to the execution condition, and acquiring an execution result of the intelligent contract; sending the execution result to an intelligent contract verification unit; and the intelligent contract verification unit is used for verifying the execution result and signing the execution result after the verification is passed.
According to an embodiment of the present invention, the intelligent contract execution system may further include: the intelligent contract library is used for caching intelligent contracts; and the fund processing unit is used for performing digital currency signature verification if digital currency processing is involved in the execution process of the intelligent contract, and sending the digital currency after signature verification to the digital currency system so as to perform actual processing on the digital currency. And, the intelligent contract verification unit may be further operable to: and verifying the execution result according to the intelligent contract, the execution condition, the intelligent contract corresponding to the digital currency processing operation and the service data.
Fig. 2 is a schematic diagram of an implementation principle of the intelligent contract execution system according to an embodiment of the present invention. As shown in fig. 2, the intelligent contract execution system may mainly include a user interaction layer, an intelligent contract execution layer and an intelligent contract verification layer according to different implementation of execution subjects and functions.
(1) The user interaction layer has the main functions:
1) the user interaction layer completes a UI interaction process that a user signs and executes with an intelligent contract through a merchant service APP in the using process;
2) a user acquires an available intelligent contract list through a merchant service APP, and selects an intelligent contract to sign a contract with a merchant or starts contract service provided by the merchant from the displayed intelligent contract list so as to initiate the signing operation of the intelligent contract or start the operation of the intelligent contract;
3) the user can also directly initiate an intelligent contract service request to the intelligent contract execution unit, and the intelligent contract execution unit calls back the merchant service APP node to start the corresponding intelligent contract service. Therefore, the execution of the contract does not depend on the unilateral intention of the merchant, and can be executed according to the intention of the user, so that the execution mode of the contract is more flexible;
4) the user can sign the digital currency involved when the fund processing is involved in the execution process of the intelligent contract, the fund processing unit provides digital currency signature verification, and then the digital currency system completes the actual processing of the digital currency.
(2) The intelligent contract execution layer has the main functions:
1) the execution of the intelligent contract is calculated and executed at an intelligent contract execution unit, namely the intelligent contract execution unit is responsible for executing the contract according to the contract parameters;
2) the execution process of the contract is roughly: the intelligent contract of the user interaction layer is responsible for collecting service data, constructing a data packet which accords with the intelligent contract of the intelligent contract execution layer, and then loading the intelligent contract for execution; the business data comprises business data generated by interaction between a user and a merchant or third-party business data acquired through an external system, and the business data comprises data associated with an intelligent contract;
3) in the execution process of contracts, if the intelligent contracts cannot be found from the local cache, pulling from the intelligent contract library, and similarly, when the execution result of the intelligent contracts is verified subsequently, acquiring the intelligent contracts from the intelligent contract library;
4) the intelligent contract execution layer calls an API of the fund processing unit by a contract code to start fund processing when the fund processing is involved in the execution process of the intelligent contract, and after a user signs a digital currency by using a private key, the fund processing unit performs signature verification and then the digital currency system completes the fund processing. According to the intelligent contract execution method, the capability of converting expected services into digital assets can be provided. The execution of the intelligent contract has clear rules, expected clear transactions can be generated, the data of the fund level of the transactions can be used for constructing a user and merchant wind control mechanism, and the intelligent contract further has the capability of converting the transaction expectation under the intelligent contract into transferable digital assets.
(3) The intelligent contract verification layer has the main functions:
1) after the intelligent contract execution unit finishes the execution process of the intelligent contract, the contract execution result data is packaged and sent to the intelligent contract verification unit for verifying the contract execution result, so that a notarization (verification) signature is given to the execution result of the intelligent contract to ensure the accuracy of the intelligent contract execution result;
2) the intelligent contract verification unit executes the intelligent contract according to the contract requirements and the contract parameters to verify the contract and signs after the verification is passed. After verification, the contract data and the signature are stored in the intelligent contract verification unit for the user to check, and the verification signature is returned to the intelligent contract execution unit, so that the intelligent contract execution unit stores the contract transaction data and the verification signature, thereby completing the execution process of the intelligent contract. Namely: after the verification of the intelligent contract execution result is completed, the intelligent contract execution unit and the intelligent contract verification unit store the same transaction data copy for the execution of the intelligent contract. Thus, the credibility of the capital data can be improved. And the fund transaction data is stored in a warehouse and is stored in multiple points, so that the fund transaction data is difficult to change. The data credibility comes from the realization endorsement of a technical layer (endorsement refers to the behavior that a ticket holder transfers ticket rights to other people or grants certain ticket rights to other people to exercise, records related matters on the back of a ticket or a sticky note and signs a signature), and is irrelevant to the intention of a commercial institution; meanwhile, after the intelligent contract is executed, source tracing and checking can be carried out afterwards according to data reserved by the execution unit and the verification unit;
3) the intelligent contract registers timing requirements or contract execution conditions in the contract trigger unit at the time of signing if timing or conditional execution is involved. And starting an intelligent contract execution process by the contract triggering unit according to the timing condition or the service condition.
In addition, in the embodiment of the present invention, the contract triggering unit may be a timing task for timing triggering execution of the intelligent contract; or an execution condition judgment task for triggering the execution of the intelligent contract according to whether the execution condition is satisfied. The merchant and the user can register the contract triggering unit, and after the intelligent contract execution unit passes the approval, the contract triggering unit can trigger the execution of the intelligent contract at regular time or according to the execution condition. In addition to executing intelligent contracts periodically or conditionally, the contract trigger unit may also be used to ensure the enforcement of intelligent contracts. If the situation that the merchant side refuses to execute the intelligent contract (for example, the user sends a refund transaction to the merchant, and the merchant abandons the transaction not to execute) occurs, the intelligent contract is forcibly executed at the intelligent contract execution unit end.
The intelligent contract registers a service monitoring condition with a contract triggering unit during execution of the contract if the contract execution triggered by the service condition is involved. And the contract triggering unit is used for setting the service condition and the monitoring frequency according to the service monitoring condition. And monitoring whether the service condition meets the execution condition of the contract or not according to the set monitoring frequency, and if so, triggering the contract to be executed on the intelligent contract execution unit by the contract triggering unit.
The data source plug-in is a bridge for the intelligent contract to obtain information from an external data source. During execution of a task triggered by a contract trigger unit, it may be necessary to retrieve data from an external data source. For example, the business of an intelligent contract is aviation delay insurance, and when an airplane fails to take off on time, the client is automatically compensated. At this time, the intelligent contract needs to obtain delay information of the airplane from the airline company. An airplane delay information inquiry interface provided by an airline company can be registered as a data source plug-in.
Fig. 3 is a schematic diagram of main blocks of an execution apparatus of an intelligent contract according to an embodiment of the present invention. As shown in fig. 3, the execution apparatus 300 of the intelligent contract according to the embodiment of the present invention mainly includes a service receiving module 301, a registration execution module 302, and a result verification module 303.
A service receiving module 301, configured to receive an intelligent contract service request sent by a user, where the service request includes an intelligent contract identifier;
a registration execution module 302, configured to register an execution condition for the intelligent contract according to the intelligent contract identifier, and execute the intelligent contract according to the execution condition to obtain an execution result of the intelligent contract;
and the result verification module 303 is configured to verify the execution result, and sign the execution result after the verification is passed to complete intelligent contract execution.
According to one embodiment of the invention, the service request is used for performing a signing operation of the intelligent contract. The execution apparatus 300 of the intelligent contract further includes a contract selection module (not shown in the figure) for:
after receiving an intelligent contract service request sent by a user, acquiring an intelligent contract list from an intelligent contract library and displaying the intelligent contract list to the user so that the user can select an intelligent contract to sign.
According to another embodiment of the invention, the service request is used for performing a start-up operation of the intelligent contract. The execution apparatus 300 of the intelligent contract further includes a contract obtaining module (not shown in the figure) for:
after receiving an intelligent contract service request sent by a user, acquiring an intelligent contract from an intelligent contract library according to the intelligent contract identification, or calling back a merchant service node to acquire the intelligent contract so as to perform the starting operation of the intelligent contract.
According to another embodiment of the present invention, the registration execution module 302 may be further configured to:
and acquiring service data, judging whether the execution condition is met according to the service data, and executing the intelligent contract under the condition that the execution condition is met.
According to another embodiment of the present invention, the execution condition includes a service condition and a monitoring frequency, and the registration execution module 302 is further configured to:
and acquiring service data at regular time according to the monitoring frequency, judging whether the service condition is met or not according to the service data, and executing the intelligent contract under the condition that the service condition is met.
According to yet another embodiment of the invention, the result verification module 303 may be further configured to:
and verifying the execution result according to the intelligent contract, the execution condition and the service data.
According to another embodiment of the present invention, the executing apparatus 300 of the smart contract further includes a signature verification module (not shown in the figure) for:
in the execution process of the intelligent contract, if the digital currency processing is involved, after the digital currency signature verification is carried out, the actual processing of the digital currency is completed by the digital currency system.
According to another embodiment of the present invention, during execution of the smart contract, if digital currency processing is involved, the result verification module 303 may be further configured to:
and verifying the execution result according to the intelligent contract, the execution condition, the intelligent contract corresponding to the digital currency processing operation and the service data.
According to a further embodiment of the invention, the service data comprises external data obtained from an external data source by a data source plug-in.
According to the technical scheme of the embodiment of the invention, an intelligent contract service request sent by a user is received through a service receiving module, and the service request comprises an intelligent contract identifier; the registration execution module registers an execution condition for the intelligent contract according to the intelligent contract identifier, executes the intelligent contract according to the execution condition and acquires an execution result of the intelligent contract; the result verification module verifies the execution result and signs the execution result after the verification is passed so as to complete the execution of the intelligent contract, namely, the intelligent contract execution can be carried out based on the execution and verification model, so that the load pressure of an operation mechanism is reduced; the execution conditions of the intelligent contract are set, the intelligent contract is driven to be forcibly executed under the condition that the conditions are met, the execution result is verified and signed, and the contract execution code is confirmed to be not tampered through a signature verification mechanism, so that the execution of the contract is in accordance with the intention of each participant of the intelligent contract.
Fig. 4 illustrates an exemplary system architecture 400 of an execution method of an intelligent contract or an execution apparatus of an intelligent contract to which an embodiment of the present invention may be applied.
As shown in fig. 4, the system architecture 400 may include terminal devices 401, 402, 403, a network 404, and a server 405. The network 404 serves as a medium for providing communication links between the terminal devices 401, 402, 403 and the server 405. Network 404 may include various types of connections, such as wire, wireless communication links, or fiber optic cables, to name a few.
A user may use terminal devices 401, 402, 403 to interact with a server 405 over a network 404 to receive or send messages or the like. The terminal devices 401, 402, 403 may have installed thereon various communication client applications, such as shopping-like applications, digital currency-like applications, banking-like applications, mailbox clients, social platform software, etc. (by way of example only).
The terminal devices 401, 402, 403 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The server 405 may be a server providing various services, such as a background management server (for example only) providing support for intelligent contract service requests issued by users using the terminal devices 401, 402, 403. The background management server can register an execution condition for the intelligent contract according to the intelligent contract identification on the received data such as the intelligent contract service request and the like, execute the intelligent contract according to the execution condition and acquire an execution result of the intelligent contract; and verifying the execution result, signing the execution result after the verification is passed so as to complete the intelligent contract execution and other processing, and feeding back the processing result (such as the intelligent contract execution result-just an example) to the terminal equipment.
It should be noted that the execution method of the intelligent contract provided by the embodiment of the present invention is generally executed by the server 405, and accordingly, the execution device of the intelligent contract is generally disposed in the server 405.
It should be understood that the number of terminal devices, networks, and servers in fig. 4 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 5, a block diagram of a computer system 500 suitable for use with a terminal device or server implementing an embodiment of the invention is shown. The terminal device or the server shown in fig. 5 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 5, the computer system 500 includes a Central Processing Unit (CPU)501 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)502 or a program loaded from a storage section 508 into a Random Access Memory (RAM) 503. In the RAM 503, various programs and data necessary for the operation of the system 500 are also stored. The CPU 501, ROM 502, and RAM 503 are connected to each other via a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
The following components are connected to the I/O interface 505: an input portion 506 including a keyboard, a mouse, and the like; an output portion 507 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage portion 508 including a hard disk and the like; and a communication section 509 including a network interface card such as a LAN card, a modem, or the like. The communication section 509 performs communication processing via a network such as the internet. The driver 510 is also connected to the I/O interface 505 as necessary. A removable medium 511 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 510 as necessary, so that a computer program read out therefrom is mounted into the storage section 508 as necessary.
In particular, according to the embodiments of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 509, and/or installed from the removable medium 511. The computer program performs the above-described functions defined in the system of the present invention when executed by the Central Processing Unit (CPU) 501.
It should be noted that the computer readable medium shown in the present invention can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present invention, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units or modules described in the embodiments of the present invention may be implemented by software, or may be implemented by hardware. The described units or modules may also be provided in a processor, and may be described as: a processor includes a service reception module, a registration execution module, and a result verification module. The names of these units or modules do not in some cases constitute a definition of the units or modules themselves, for example, the service receiving module may also be described as a "module for receiving an intelligent contract service request from a user".
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be separate and not incorporated into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to comprise: the service receiving module receives an intelligent contract service request sent by a user, wherein the service request comprises an intelligent contract identifier; the registration execution module registers an execution condition for the intelligent contract according to the intelligent contract identifier, executes the intelligent contract according to the execution condition and acquires an execution result of the intelligent contract; and the result verification module verifies the execution result and signs the execution result after the verification is passed so as to complete the execution of the intelligent contract.
According to the technical scheme of the embodiment of the invention, an intelligent contract service request sent by a user is received through a service receiving module, and the service request comprises an intelligent contract identifier; the registration execution module registers an execution condition for the intelligent contract according to the intelligent contract identifier, executes the intelligent contract according to the execution condition and acquires an execution result of the intelligent contract; the result verification module verifies the execution result and signs the execution result after the verification is passed so as to complete the execution of the intelligent contract, namely, the intelligent contract execution can be carried out based on the execution and verification model, so that the load pressure of an operation mechanism is reduced; the execution conditions of the intelligent contract are set, the intelligent contract is driven to be forcibly executed under the condition that the conditions are met, the execution result is verified and signed, and the contract execution code is confirmed to be not tampered through a signature verification mechanism, so that the execution of the contract is in accordance with the intention of each participant of the intelligent contract.
The above-described embodiments should not be construed as limiting the scope of the invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions can occur, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (14)

1. An execution method of an intelligent contract, comprising:
the service receiving module receives an intelligent contract service request sent by a user, wherein the service request comprises an intelligent contract identifier;
the registration execution module registers an execution condition for the intelligent contract according to the intelligent contract identifier, executes the intelligent contract according to the execution condition and acquires an execution result of the intelligent contract;
and the result verification module verifies the execution result and signs the execution result after the verification is passed so as to complete the execution of the intelligent contract.
2. The method of claim 1, wherein the service request is for performing a sign-up operation for an intelligent contract;
after the service receiving module receives the intelligent contract service request sent by the user, the method further comprises the following steps:
and the contract selection module acquires an intelligent contract list from the intelligent contract library and displays the intelligent contract list to the user so that the user can select the intelligent contract to sign.
3. The method of claim 1, wherein the service request is used to perform a startup operation of an intelligent contract;
after the service receiving module receives the intelligent contract service request sent by the user, the method further comprises the following steps:
and the contract selection module acquires the intelligent contract from the intelligent contract library according to the intelligent contract identification, or calls back the merchant service node to acquire the intelligent contract so as to start the intelligent contract.
4. The method of claim 1, wherein executing the smart contract according to the execution condition comprises:
and acquiring service data, judging whether the execution condition is met according to the service data, and executing the intelligent contract under the condition that the execution condition is met.
5. The method of claim 1, wherein the execution conditions include traffic conditions and monitoring frequency, and wherein executing the smart contract according to the execution conditions comprises:
and acquiring service data at regular time according to the monitoring frequency, judging whether the service condition is met or not according to the service data, and executing the intelligent contract under the condition that the service condition is met.
6. The method of claim 1, wherein verifying the execution result by a result verification module comprises:
and the result verification module verifies the execution result according to the intelligent contract, the execution condition and the service data.
7. The method of claim 1, further comprising:
in the execution process of the intelligent contract, if the digital currency processing is involved, the signature verification module completes the actual processing of the digital currency by the digital currency system after the digital currency signature verification is carried out.
8. The method of claim 1, wherein verifying the execution result by the result verification module during execution of the smart contract if digital currency processing is involved comprises:
and the result verification module verifies the execution result according to the intelligent contract, the execution condition, the intelligent contract corresponding to the digital currency processing operation and the service data.
9. The method according to any of claims 4-6 and 8, wherein the service data comprises external data obtained from an external data source via a data source plug-in.
10. An execution apparatus of an intelligent contract, comprising:
the service receiving module is used for receiving an intelligent contract service request sent by a user, and the service request comprises an intelligent contract identifier;
the registration execution module is used for registering an execution condition for the intelligent contract according to the intelligent contract identifier, executing the intelligent contract according to the execution condition and acquiring an execution result of the intelligent contract;
and the result verification module is used for verifying the execution result and signing the execution result after the verification is passed so as to complete the execution of the intelligent contract.
11. An execution system of an intelligent contract, comprising:
the intelligent contract execution unit is used for receiving an intelligent contract service request sent by a user, and the service request comprises an intelligent contract identifier; registering an execution condition for the intelligent contract according to the intelligent contract identifier, executing the intelligent contract according to the execution condition, and acquiring an execution result of the intelligent contract; sending the execution result to an intelligent contract verification unit;
and the intelligent contract verification unit is used for verifying the execution result and signing the execution result after the verification is passed.
12. The system of claim 11, further comprising:
the intelligent contract library is used for caching intelligent contracts;
the fund processing unit is used for performing digital currency signature verification if digital currency processing is involved in the execution process of the intelligent contract and sending the digital currency after signature verification to the digital currency system so as to perform actual processing on the digital currency;
and the intelligent contract verification unit is further configured to:
and verifying the execution result according to the intelligent contract, the execution condition, the intelligent contract corresponding to the digital currency processing operation and the service data.
13. An electronic device for executing an intelligent contract, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-9.
14. A computer-readable medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1-9.
CN202110753272.9A 2021-07-02 2021-07-02 Intelligent contract execution method, device and system Pending CN113592646A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110753272.9A CN113592646A (en) 2021-07-02 2021-07-02 Intelligent contract execution method, device and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110753272.9A CN113592646A (en) 2021-07-02 2021-07-02 Intelligent contract execution method, device and system

Publications (1)

Publication Number Publication Date
CN113592646A true CN113592646A (en) 2021-11-02

Family

ID=78245797

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110753272.9A Pending CN113592646A (en) 2021-07-02 2021-07-02 Intelligent contract execution method, device and system

Country Status (1)

Country Link
CN (1) CN113592646A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115456227A (en) * 2022-09-22 2022-12-09 中航信移动科技有限公司 Digital currency system for civil aviation event

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109064334A (en) * 2018-08-27 2018-12-21 深圳前海益链网络科技有限公司 A kind of intelligence contract bookkeeping methods, computer installation and readable storage medium storing program for executing
CN109146679A (en) * 2018-06-29 2019-01-04 阿里巴巴集团控股有限公司 Intelligent contract call method and device, electronic equipment based on block chain
CN110175842A (en) * 2019-03-27 2019-08-27 阿里巴巴集团控股有限公司 Transfer account method, system, calculating equipment and storage medium based on block chain
CN110659887A (en) * 2019-08-05 2020-01-07 孟江华 Automatic transaction processing system and method based on block chain
CN110992178A (en) * 2019-10-30 2020-04-10 链农(深圳)信息科技有限公司 Verification method and device for block chain node, computer equipment and storage medium
CN111445239A (en) * 2020-02-11 2020-07-24 江苏荣泽信息科技股份有限公司 Signature verification method based on block chain
CN112907243A (en) * 2021-02-09 2021-06-04 工银科技有限公司 Block chain transaction auditing method and device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109146679A (en) * 2018-06-29 2019-01-04 阿里巴巴集团控股有限公司 Intelligent contract call method and device, electronic equipment based on block chain
CN109064334A (en) * 2018-08-27 2018-12-21 深圳前海益链网络科技有限公司 A kind of intelligence contract bookkeeping methods, computer installation and readable storage medium storing program for executing
CN110175842A (en) * 2019-03-27 2019-08-27 阿里巴巴集团控股有限公司 Transfer account method, system, calculating equipment and storage medium based on block chain
CN110659887A (en) * 2019-08-05 2020-01-07 孟江华 Automatic transaction processing system and method based on block chain
CN110992178A (en) * 2019-10-30 2020-04-10 链农(深圳)信息科技有限公司 Verification method and device for block chain node, computer equipment and storage medium
CN111445239A (en) * 2020-02-11 2020-07-24 江苏荣泽信息科技股份有限公司 Signature verification method based on block chain
CN112907243A (en) * 2021-02-09 2021-06-04 工银科技有限公司 Block chain transaction auditing method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
王迎帅: "《区块链金融》", vol. 1, 中国铁道出版社有限公司, pages: 33 - 39 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115456227A (en) * 2022-09-22 2022-12-09 中航信移动科技有限公司 Digital currency system for civil aviation event

Similar Documents

Publication Publication Date Title
CN110569057A (en) gray scale distribution method and device, electronic equipment and computer readable medium
CN112329049A (en) Business data management method, device, electronic equipment and medium
CN110704833A (en) Data permission configuration method, device, electronic device and storage medium
CN112381453A (en) Information processing method, information processing apparatus, electronic device, and medium
CN112991027A (en) Bidding information processing method, device, equipment and medium based on block chain
CN110223179B (en) Data processing method, device, system and medium for fund
CN112233265A (en) Electronic sign-in method and related device
CN108959102B (en) Method and device for generating test data and testing application to be tested
CN112817562A (en) Service processing method and device
CN113592646A (en) Intelligent contract execution method, device and system
CN110580624B (en) Chain code upgrading method and device
CN116302271A (en) Page display method and device and electronic equipment
CN113095911B (en) Order processing method, order processing device, electronic equipment and computer readable medium
CN112182400B (en) Message processing method, message processing device, electronic equipment and storage medium
CN113850685A (en) Method, apparatus, server and medium for real-time tally
CN114741446A (en) Data uplink method, device, terminal and storage medium
CN114386951A (en) Process approval method and device, electronic equipment and storage medium
CN110083283B (en) Method, device and system for managing information
CN113850573A (en) Intelligent contract execution method and device
CN113296829A (en) Method, device, equipment and computer readable medium for processing service
CN115442420A (en) Block chain cross-chain service management method and device
CN111831566A (en) Test method, test device, electronic equipment and computer readable storage medium
CN113283891A (en) Information processing method and device and electronic equipment
CN111367590A (en) Interrupt event processing method and device
CN112685075A (en) Gray scale distribution method and device, electronic equipment and computer readable medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination