CN111221904A - Intelligent contract deployment and execution method and device, electronic equipment and storage medium - Google Patents

Intelligent contract deployment and execution method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN111221904A
CN111221904A CN201911338351.2A CN201911338351A CN111221904A CN 111221904 A CN111221904 A CN 111221904A CN 201911338351 A CN201911338351 A CN 201911338351A CN 111221904 A CN111221904 A CN 111221904A
Authority
CN
China
Prior art keywords
contract
intelligent contract
deployment
intelligent
hash value
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
CN201911338351.2A
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.)
OneConnect Smart Technology Co Ltd
OneConnect Financial Technology Co Ltd Shanghai
Original Assignee
OneConnect Financial Technology Co Ltd Shanghai
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 OneConnect Financial Technology Co Ltd Shanghai filed Critical OneConnect Financial Technology Co Ltd Shanghai
Priority to CN201911338351.2A priority Critical patent/CN111221904A/en
Publication of CN111221904A publication Critical patent/CN111221904A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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
    • 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/06Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
    • H04L9/0643Hash functions, e.g. MD5, SHA, HMAC or f9 MAC

Abstract

The disclosure belongs to the technical field of block chain intelligent contracts, and relates to an intelligent contract deployment and execution method, an intelligent contract deployment and execution device, an electronic device and a computer-readable storage medium. The deployment method comprises the following steps: a user sends an intelligent contract deployment instruction to a blockchain network; the block chain network analyzes the deployment instruction; and establishing connection with the intelligent contract according to the type in the deployment instruction, and deploying and running the intelligent contract on the blockchain network. By the deployment method, not only can the intra-chain contract be deployed in the block chain network, but also the extra-chain contract with high privacy can be deployed. In addition, the execution method in the disclosure can audit the intelligent contract to prevent the out-of-chain contract from being modified, and improves the security of the intelligent contract.

Description

Intelligent contract deployment and execution method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of blockchain and intelligent contract technologies, and in particular, to a method for deploying and executing a blockchain intelligent contract, an intelligent contract management apparatus, an electronic device, and a computer-readable storage medium.
Background
The block chain is an internet database technology, and essentially adopts the distributed account book technology that a plurality of block chain link points participate together, and data cannot be tampered and results are disclosed and reliable in a multi-party storage and calculation mode. The development of the blockchain makes intelligent contracts possible, and the essence of the intelligent contracts is that a piece of computer code with the right and obligation of an intelligent terminal device according to signed contracts is issued to the blockchain, and the intelligent contracts are automatically executed on the blockchain without intermediation, so that the execution efficiency of the intelligent contracts is improved, and the irrevocable contract clauses are guaranteed.
The intelligent contracts in the block chain must be deployed and stored on each node of the block chain network, so that the execution states of the nodes are consistent on one hand, and the nodes have better credibility due to the publicity on the other hand. However, when the intelligent contracts involve the core algorithm, core logic and capital assets of the owner, no one is willing to deploy the contracts on nodes which are not controlled by the intelligent contracts. This exposes on the one hand its core competition capabilities and on the other hand also the attack brought about by the disclosure.
Disclosure of Invention
The invention provides an intelligent contract deployment and execution method, an intelligent contract management device, electronic equipment and a computer readable storage medium, which are used for solving the problem of privacy disclosure caused by deployment and storage of an intelligent contract in a public block chain network in the prior art.
In order to achieve the above object, a first aspect of the present invention provides an intelligent contract deployment method, including:
a user sends an intelligent contract deployment instruction to a blockchain network;
the block chain network analyzes the deployment instruction;
and establishing connection with the intelligent contract according to the type in the deployment instruction, and deploying and running the intelligent contract on the blockchain network.
Preferably, before sending an intelligent contract deployment instruction to a blockchain network, the user firstly logs in a contract management module through an account, and the contract management module establishes communication connection with the blockchain network;
if the intelligent contract is a contract in the chain, directly deploying and operating the intelligent contract in the block chain network;
if the intelligent contract is about an out-of-chain contract, the block chain network sends the deployment command to the contract management module, then the contract management module checks the deployment command and establishes communication connection with the intelligent contract, and finally the contract management module deploys and runs the intelligent contract on the block chain network.
Preferably, the contract management module verifying the deployment command includes: verification of the user identity and/or verification of the smart contract.
Preferably, the verification of the user identity means to verify whether the user is a contract owner, and the specific process includes: and the contract management module calculates the hash value of the user login account, compares the hash value with the hash value of the login account of the intelligent contract owner in the deployment command, if the hash value is the same as the hash value of the login account of the intelligent contract owner in the deployment command, the verification is passed, and if the hash value is different from the hash value of the login account of the intelligent contract owner in the deployment command, deployment is stopped, wherein the login account is the account of the user login to the contract management module.
Preferably, the verification of the intelligent contract means to verify whether the intelligent contract is modified, and the specific process is as follows: and the contract management module reads the intelligent contract file according to the address in the deployment instruction, calculates the hash value of the intelligent contract file according to the algorithm specified in the deployment instruction, compares the hash value with the hash value of the intelligent contract in the deployment instruction, if the hash value is the same as the hash value, the verification is passed, and if the hash value is different from the hash value, the deployment is terminated.
Preferably, the contract management module terminates contract deployment if the contract management module is not successfully established within a set time when establishing communication connection with the intelligent contract.
In order to achieve the above object, a second aspect of the present invention provides an intelligent contract execution method, including:
a user sends an intelligent contract execution instruction to a block chain network;
the block chain network analyzes the execution command, whether an intelligent contract in the execution command is deployed or not is checked, if the intelligent contract is not deployed, the execution is stopped, if the intelligent contract is deployed, the type of the intelligent contract is checked, if the intelligent contract is about an in-chain contract, the intelligent contract is executed, and if the intelligent contract is about an out-chain contract, the execution command is sent to a contract management module;
and the contract management module calculates the hash value of the intelligent contract in the execution instruction, compares the hash value with the hash value of the intelligent contract about deployment, terminates execution if the hash value is different from the hash value of the intelligent contract, and executes the intelligent contract if the hash value is the same as the hash value of the intelligent contract.
In order to achieve the above object, a third aspect of the present invention provides an intelligent contract management apparatus for deploying and/or executing an intelligent contract in a blockchain network, including:
the contract storage module is used for storing intelligent contracts outside the block chain network;
a contract management module comprising: a communication unit and a verification unit, wherein the communication unit is used for establishing communication connection between the contract management module and the intelligent contract and establishing communication connection between the contract management module and the blockchain network; the verification unit is used for verifying the deployment instruction and the execution instruction;
and the login module is used for a user to log in the contract management module.
In order to achieve the above object, a fourth aspect of the present invention provides an electronic apparatus comprising:
a memory, a processor, and a computer program stored in the memory and executable on the processor, the processor when executing the computer program implementing:
the steps of the intelligent contract deployment method as described above; or the steps of a smart contract execution method as described above.
In order to achieve the above object, a fifth aspect of the present invention provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements:
the steps of the intelligent contract deployment method as described above; or the steps of a smart contract execution method as described above.
According to the above description and practice, the intelligent contract deployment method can deploy the intelligent contract according to the actual requirement, and if the intelligent contract is a contract without secret relation, the intelligent contract can be directly stored in the block chain network and deployed and operated; if the intelligent contract is a contract related to secret, the intelligent contract can be stored outside the block chain network and deployed and operated on the block chain network. In addition, an auditing mechanism is added in the intelligent contract deployment method, so that the intelligent contracts stored outside the block chain network can be audited, whether the intelligent contracts are modified or not is judged, and the uniqueness of the intelligent contracts is ensured; meanwhile, identity verification is carried out on the personnel deploying the intelligent contract, whether the personnel deploying the intelligent contract is the owner of the intelligent contract or not is judged, and safety of the intelligent contract is improved.
Drawings
FIG. 1 is a flow diagram of an intelligent contract deployment method involved in one embodiment of the present invention;
FIG. 2 is a flow diagram of a method for intelligent contract execution in accordance with an embodiment of the present invention.
Detailed Description
Exemplary embodiments will now be described more fully with reference to the accompanying drawings. The exemplary embodiments, however, may be embodied in many different forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
Furthermore, the drawings are merely schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus their repetitive description will be omitted. Some of the block diagrams shown in the figures are functional entities and do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor devices and/or microcontroller devices.
In the present disclosure, the terms "include", "arrange", "disposed" and "disposed" are used to mean open-ended inclusion, and mean that there may be additional elements/components/etc. in addition to the listed elements/components/etc.; the terms "first," "second," and the like are used merely as labels, and are not limiting as to the number or order of their objects.
In an exemplary embodiment of the disclosure, an intelligent contract deployment method is provided, which is applied to an intelligent terminal device having a certain storage space, a connectable network and a participating blockchain. Specifically, the intelligent terminal device can be various electronic terminal devices such as a mobile phone, a tablet computer, a notebook computer, a PDA, an ore machine and the like, which have certain storage space, can be connected with a network and participate in a block chain.
Referring to fig. 1, the intelligent contract deployment method may mainly include the following steps:
and step S11, the user sends an intelligent contract deployment instruction to the blockchain network.
And step S12, the block chain network analyzes the deployment instruction.
And step S13, establishing connection with the intelligent contract according to the type in the deployment instruction, and deploying and running the intelligent contract on the blockchain network.
Specifically, a user sends a deployment command to a certain blockchain node in a blockchain network through the terminal device, the node analyzes the deployment command, establishes connection with an intelligent contract according to the type and address in the deployment command after analysis, deploys and operates in the node, and then transmits deployment transactions among all nodes in the blockchain through the network, so that all nodes execute the deployment transactions, and the intelligent contract information is guaranteed to be deployed at all nodes.
In this embodiment, the terminal device is a computer, a contract management module is installed on the computer, the contract management module includes a contract management program, the contract management program provides standard gRPC service, and can communicate and interact with the block link points, and the contract management module is configured to, via a grpcs: /$ host: and $ port/deployment executes the service of the deployment instruction, and through grpcs: /$ host: a service that executes instructions for the port/execute transaction; and meanwhile, the system can be communicated and interacted with the intelligent contract. In the embodiment, a random number UUID generated by a computer is used as a unique account number for logging in by the user, and the account number is saved in a memory after the contract management module is started. The UUID can ensure that any machine-generated identifier is unique at any time.
Specifically, the intelligent contract deployment instruction includes information such as the type, name, and address of the intelligent contract. For example, in this embodiment, a deployment instruction of an out-of-chain intelligent contract is: { "type": "remote", "condensed": "account/v 1", "randheash": "hash (uuid)", "lang": "JAVA", "url": "https: // 192.180.2.23: 9021 "," programhash ": "es 1 fsfgesldpspfmh", "path": jar, "/home/abu/pay," programhasalsgo ": "sha 256" }. In addition, in this embodiment, a deployment instruction of an intra-chain intelligent contract is: { "type": "local", "condensed": "account/v 1", "lang": "JAVA", "bytesload": bytes, "path": "/home/abu/pay. The type refers to the type of the intelligent contract, the value of remote represents the contract outside the chain, and the value of local represents the contract inside the chain; contract is the name of the contract; randhansh is a hash value of an account number of a contract owner logging in the contract management module; lang is the language type of the contract; url is the service address of the contract; the path is a storage path of the contract program; the programhash is the hash value of the contract program; programhashalgo is a designated hash algorithm; bytesload is the contract program bytecode.
The user sends the deployment instruction to the node in the blockchain through the contract management module, and of course, the deployment instruction may also be sent to the node in the blockchain directly through the terminal device, where the deployment instruction includes the type and address of the intelligent contract. If the intelligent contract is stored in the block chain node, namely the intelligent contract is an in-chain contract, the block chain node deploys and runs the intelligent contract in the node, and then the deployment transaction is propagated among all nodes through the internet, so that the intelligent contract is deployed and run on all nodes in the block chain network. If the intelligent contract is stored outside the block chain node, namely the intelligent contract is about an out-of-chain contract, the node sends the deployment command to a contract management module, the contract management module checks the deployment command and establishes communication connection with the intelligent contract, finally the contract management module deploys and runs the intelligent contract on the node of the block chain, and then the deployment transaction is propagated among the nodes through the Internet, so that the intelligent contract is deployed and run on all the nodes in the block chain network. If different nodes in the blockchain network send the same deployment instruction to the contract management module, the contract management module only performs contract deployment to one of the nodes, and then the node with the contract deployed propagates deployment transaction to other nodes without the contract deployed through the network.
Specifically, the contract management module includes a verification of the identity of the user who submitted the deployment instruction and/or a verification of the intelligent contract when verifying the deployment command. The verification of the user identity refers to verifying whether the user is an intelligent contract owner, and the specific process is as follows: calculating a hash value of an account number input when the user logs in the contract management module according to a hash algorithm prograhahalalogo specified in the deployment instruction, comparing the hash value with randhansh in the deployment instruction, if the hash value is the same as the randhansh, the user is an owner of the intelligent contract to be deployed, and if the hash value is different from the randhansh, the user is not the owner of the intelligent contract to be deployed, and then terminating the deployment of the intelligent contract.
The verification of the intelligent contract means that whether the intelligent contract is modified is verified, and the specific process is as follows: reading the intelligent contract file to be deployed according to url and path in the deployment instruction, then calculating the hash value of the intelligent contract file according to a hash algorithm prograhashogo specified in the deployment instruction, comparing the hash value with the prograhash of the intelligent contract in the deployment instruction, if the hash value is the same as the hash value, the verification is passed, namely the contract file is not modified, and if the hash value is different from the hash value, the deployment is terminated. In this embodiment, the intelligent contract is deployed only after the user identity and the intelligent contract verification pass.
And when in deployment, the contract management module establishes a communication channel with the intelligent contract by using the gRPC, starts an intelligent contract program under a path according to a language type specified by lang in the deployment instruction, such as Java, Java-jar. Further, if success is not established within a set time while the contract management module establishes a communication connection with the intelligent contract, the contract deployment is terminated to prevent unlimited processing. For example, if the set communication establishment time is 30 seconds, the contract management module does not establish a communication connection with the intelligent contract within 30 seconds, that is, the contract deployment is terminated.
In particular, an intra-chain contract is a contract stored in each node in a blockchain network, which is exposed externally, and the contents of which can be obtained by anyone who has access to the blockchain network, and therefore it is not private, but because it is public, the contract can be made clearly known once it is modified, and because of the characteristics of the blockchain, the intelligent contract stored in the blockchain network is also not easily modified. The external contract is an intelligent contract stored outside the blockchain network, the intelligent contract is connected with the blockchain network through the contract management module and is deployed and operated in the blockchain network, the external contract is a privacy contract which does not show external public, the privacy of a core algorithm, core logic, capital assets and the like of an owner can be effectively protected, meanwhile, in order to prevent the content of the intelligent contract from being modified, an auditing mechanism is added when the intelligent contract is deployed, whether the intelligent contract is modified or not can be audited, if the intelligent contract is modified, the deployment cannot be carried out, and therefore the uniqueness and the safety of the intelligent contract are guaranteed.
By the intelligent contract deployment method, not only can intra-chain contracts stored in the blockchain network be deployed in the blockchain network, but also extra-chain contracts stored outside the blockchain network can be deployed in the blockchain network, and the uniqueness and the safety of the intelligent contracts are ensured while the privacy of the intelligent contracts are protected.
In addition, in the exemplary embodiment of the disclosure, an intelligent contract execution method is further provided, which is applied to an intelligent terminal device with a certain storage space, a connectable network and a participating blockchain. Specifically, the intelligent terminal device can be various electronic terminal devices such as a mobile phone, a tablet computer, a notebook computer, a PDA, an ore machine and the like, which have certain storage space, can be connected with a network and participate in a block chain.
Referring to fig. 2, the intelligent contract execution method includes the following steps:
and step S21, the user sends an execution instruction to the blockchain network through the intelligent terminal equipment.
In this embodiment, the intelligent terminal device is a computer, a contract management module is installed on the computer, the contract management module includes a contract management program, the contract management program provides standard gRPC service, and can communicate and interact with block link nodes, and the contract management module is configured to, through a grpcs: /$ host: the $ port/deployment performs the service of deploying instructions, through grpcs: /$ host: the port/execute accepts the service of transaction execution; and meanwhile, the intelligent contract can be communicated and interacted with.
The execution instruction comprises the name of the intelligent contract to be executed, an execution method and the parameter of the execution method. One execution instruction in this embodiment, for example, is: { "constrained": "account/v 1", "invoke": [ "query", "zhangsan" ] }. The meaning is as follows: and executing the intelligent contract with the name of account/v1, wherein the executed method is invoke, and the parameter of the method is query/zhangsan.
Step S22, a certain node in the block chain network analyzes the execution instruction, and checks whether the intelligent contract in the execution instruction is deployed in the block chain network, if not, the execution instruction is terminated, if so, the type of the deployed intelligent contract is checked, if so, the intelligent contract is operated and processed in the node according to the execution instruction and the established logic of the intelligent contract; and if the intelligent contract is an out-of-chain contract, sending the execution instruction to a contract management module.
Step S23, after receiving the execution instruction, the contract management module finds a deployed intelligent contract according to the contract name in the execution instruction, and calculates a hash value of the intelligent contract, where the algorithm is a hash algorithm included in the instruction for deploying the intelligent contract when the intelligent contract is deployed, and then compares the hash value of the intelligent contract when the intelligent contract is deployed as a calculation result, and if the two are different, it means that the intelligent contract is modified after being deployed, the execution is terminated, and if the two are the same, the execution instruction and the predetermined logic of the intelligent contract are executed.
The execution instruction sent by the user to the block chain network firstly reaches a certain node in the block chain network, and after the node analyzes and verifies the execution command, the execution command is propagated to other nodes in the block chain through the Internet to execute the transaction.
By the contract execution method, not only can the intra-chain contract stored in the block chain network be executed in the block chain network, but also the out-of-chain contract stored outside the block chain network can be executed in the block chain network, so that the uniqueness and the safety of the intelligent contract are ensured while the privacy of the intelligent contract is protected.
In addition, in the exemplary embodiment of the disclosure, an intelligent contract management device is also provided, which is used for deploying and/or executing the intelligent contract in the block chain network. The intelligent contract management device comprises: the contract management system comprises a contract storage module, a contract management module and a login module. Wherein:
the contract storage module is configured to store intelligent contracts, the intelligent contracts belong to private contracts and do not indicate the private contracts, and the privacy disclosure problem caused by the public of the intelligent contracts is avoided. And the contract management module comprises a communication unit and a verification unit. The communication unit provides standard gRPC service, and can establish communication connection between the contract management module and the blockchain network, and also can establish communication connection between the contract management module and the intelligent contract. The verification unit is used for verifying the deployment instruction and the execution instruction, verifying the identity of a user submitting the deployment instruction when the deployment instruction is verified, verifying whether the user is an owner of the intelligent contract, and meanwhile verifying the intelligent contract pointed by the deployment instruction and verifying whether the intelligent contract pointed by the deployment instruction is modified; when the execution instruction is verified, the intelligent contract pointed by the execution instruction is checked, and whether the intelligent contract pointed by the deployment instruction is modified or not is verified. And the logging module is configured for allowing users to log in the contract management module by using account numbers, the account number of each user is unique, and the account number of the user can be cached in the logging module after logging in for subsequent verification.
It should be noted that although several modules or units of the intelligent contract management apparatus are mentioned in the above detailed description, such partitioning is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit, according to embodiments of the present disclosure. Conversely, the features and functions of one module or unit described above may be further divided into embodiments by a plurality of modules or units.
In addition, in an exemplary embodiment of the present disclosure, an electronic device capable of implementing the above method is also provided. The electronic device is only an example and should not bring any limitation to the function and the scope of use of the embodiments of the present invention. The electronic device is in the form of a general purpose computing device. Components of the electronic device may include, but are not limited to: at least one processing unit, at least one memory unit, a bus connecting different system components (including the memory unit and the processing unit), and a display unit.
Wherein the storage unit stores program code executable by the processing unit to cause the processing unit to perform steps according to various exemplary embodiments of the present invention described in the above section "exemplary methods" of the present specification.
The memory unit may include a readable medium in the form of a volatile memory unit, such as a random access memory unit (RAM) and/or a cache memory unit, and may further include a read only memory unit (ROM).
The storage unit may also include a program/utility having a set (at least one) of program modules including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment.
The bus may be any of several types of bus structures including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
The electronic device may also communicate with one or more external devices (e.g., keyboard, pointing device, bluetooth device, etc.), with one or more devices that enable a user to interact with the electronic device, and/or with any devices (e.g., router, modem, etc.) that enable the electronic device to communicate with one or more other computing devices. Such communication may be through an input/output (I/O) interface. Also, the electronic device may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the internet) via a network adapter. The network adapter communicates with other modules of the electronic device over the bus. It should be understood that other hardware and/or software modules may be used in conjunction with the electronic device, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which may be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.
Further, in an exemplary embodiment of the present disclosure, there is also provided a computer-readable storage medium having stored thereon a program product capable of implementing the above-described method of the present specification. In some possible embodiments, aspects of the invention may also be implemented in the form of a program product comprising program code means for causing a terminal device to carry out the steps according to various exemplary embodiments of the invention described in the above-mentioned "exemplary methods" section of the description, when said program product is run on the terminal device.
The program product for implementing the above method in the present invention may employ a portable compact disc read only memory (CD-ROM) and include program codes, and may be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited thereto, and in this document, a 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.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A 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 (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, 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.
A computer readable signal medium may include a propagated data signal with 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 readable signal medium may also be any readable medium that is not a 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 readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.

Claims (10)

1. An intelligent contract deployment method, comprising:
a user sends an intelligent contract deployment instruction to a blockchain network;
the block chain network analyzes the deployment instruction;
and establishing connection with the intelligent contract according to the type in the deployment instruction, and deploying and running the intelligent contract on the blockchain network.
2. The intelligent contract deployment method of claim 1, wherein the user firstly logs in a contract management module through an account number before sending an intelligent contract deployment instruction to a blockchain network, and the contract management module establishes communication connection with the blockchain network;
if the intelligent contract is an intra-chain contract, directly deploying and operating the intelligent contract in the block chain network;
if the intelligent contract is about an out-of-chain contract, the block chain network sends the deployment command to the contract management module, then the contract management module checks the deployment command and establishes communication connection with the intelligent contract, and finally the contract management module deploys and runs the intelligent contract on the block chain network.
3. The intelligent contract deployment method of claim 2 wherein the contract management module verifying the deployment command comprises: verification of the user identity and/or verification of the smart contract.
4. The intelligent contract deployment method according to claim 3, wherein the verification of the user identity is to verify whether the user is a contract owner by the specific process of: and the contract management module calculates the hash value of the user login account, compares the hash value with the hash value of the login account of the intelligent contract owner in the deployment command, if the hash value is the same as the hash value of the login account of the intelligent contract owner in the deployment command, the verification is passed, and if the hash value is different from the hash value of the login account of the intelligent contract owner in the deployment command, deployment is stopped, wherein the login account is the account of the user login to the contract management module.
5. The intelligent contract deployment method of claim 3, wherein the verification of the intelligent contract is to verify whether the intelligent contract is modified by: and the contract management module reads the intelligent contract file according to the address in the deployment instruction, calculates the hash value of the intelligent contract file according to the algorithm specified in the deployment instruction, compares the hash value with the hash value of the intelligent contract in the deployment instruction, if the hash value is the same as the hash value, the verification is passed, and if the hash value is different from the hash value, the deployment is terminated.
6. An intelligent contract deployment method according to claim 2, wherein the contract management module terminates contract deployment if the establishment is not successful within a set time when establishing a communication connection with the intelligent contract.
7. An intelligent contract execution method, comprising:
a user sends an intelligent contract execution instruction to a block chain network;
the block chain network analyzes the execution command, whether the intelligent contract in the execution command is deployed or not is checked, if the intelligent contract is not deployed, the execution is stopped, if the intelligent contract is deployed, the type of the intelligent contract is checked, if the intelligent contract is about the contract in the chain, the intelligent contract is executed, and if the intelligent contract is about the contract out of the chain, the execution command is sent to a contract management module;
and the contract management module calculates the hash value of the intelligent contract in the execution instruction, compares the hash value with the hash value of the intelligent contract about deployment, terminates execution if the hash value is different from the hash value, and executes the intelligent contract if the hash value is the same as the hash value.
8. An intelligent contract management apparatus for deploying and/or executing intelligent contracts in a blockchain network, comprising:
the contract storage module is used for storing intelligent contracts outside the block chain network;
a contract management module comprising: a communication unit and a verification unit, wherein the communication unit is used for establishing communication connection between the contract management module and the intelligent contract and establishing communication connection between the contract management module and the blockchain network; the verification unit is used for verifying the deployment instruction and the execution instruction;
and the login module is used for a user to log in the contract management module.
9. An electronic device, comprising:
a memory, a processor, and a computer program stored in the memory and executable on the processor, the processor when executing the computer program implementing:
an intelligent contract deployment method as claimed in any one of claims 1-6; or
A smart contract execution method according to claim 7.
10. A computer-readable storage medium, having a computer program stored thereon, the computer program, when executed by a processor, implementing:
an intelligent contract deployment method as claimed in any one of claims 1-6; or
A smart contract execution method according to claim 7.
CN201911338351.2A 2019-12-23 2019-12-23 Intelligent contract deployment and execution method and device, electronic equipment and storage medium Pending CN111221904A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911338351.2A CN111221904A (en) 2019-12-23 2019-12-23 Intelligent contract deployment and execution method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911338351.2A CN111221904A (en) 2019-12-23 2019-12-23 Intelligent contract deployment and execution method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN111221904A true CN111221904A (en) 2020-06-02

Family

ID=70829551

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911338351.2A Pending CN111221904A (en) 2019-12-23 2019-12-23 Intelligent contract deployment and execution method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111221904A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112651741A (en) * 2021-01-04 2021-04-13 北京京东乾石科技有限公司 Data processing method and device based on block chain
CN112819634A (en) * 2021-02-25 2021-05-18 成都质数斯达克科技有限公司 Transaction processing method and device, electronic equipment and readable storage medium
CN112965729A (en) * 2021-03-23 2021-06-15 工银科技有限公司 Method, device, electronic equipment and medium for deploying intelligent contract of block chain by one key

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108665953A (en) * 2018-05-08 2018-10-16 北京金山云网络技术有限公司 A kind of prescription executes method, apparatus, equipment and storage medium
CN108848058A (en) * 2018-05-07 2018-11-20 众安信息技术服务有限公司 Intelligent contract processing method and block catenary system
CN108960830A (en) * 2018-07-16 2018-12-07 百度在线网络技术(北京)有限公司 Dispositions method, device, equipment and the storage medium of intelligent contract
CN109493203A (en) * 2018-09-30 2019-03-19 咪咕文化科技有限公司 A kind of data calculate method, apparatus and storage medium
CN109547488A (en) * 2018-12-29 2019-03-29 杭州趣链科技有限公司 A kind of trust data calculating and exchange system based on alliance's block chain
CN109840429A (en) * 2019-01-08 2019-06-04 北京众享比特科技有限公司 Intelligent contract deployment, call method and device
CN110009362A (en) * 2019-04-02 2019-07-12 北京众享比特科技有限公司 Block chain intelligence contract amending method, device and computer readable storage medium
CN110032568A (en) * 2018-12-20 2019-07-19 阿里巴巴集团控股有限公司 The reading of data structure and update method, device, electronic equipment
CN110221837A (en) * 2019-05-21 2019-09-10 深圳壹账通智能科技有限公司 Intelligent contract call method, device, equipment and storage medium
CN110516417A (en) * 2019-08-09 2019-11-29 中国银联股份有限公司 A kind of method for verifying authority and device of intelligence contract
CN110602227A (en) * 2019-09-19 2019-12-20 腾讯科技(深圳)有限公司 Intelligent contract management method and related device
CN110599190A (en) * 2019-09-27 2019-12-20 支付宝(杭州)信息技术有限公司 Identity authentication method and device based on block chain

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108848058A (en) * 2018-05-07 2018-11-20 众安信息技术服务有限公司 Intelligent contract processing method and block catenary system
CN108665953A (en) * 2018-05-08 2018-10-16 北京金山云网络技术有限公司 A kind of prescription executes method, apparatus, equipment and storage medium
CN108960830A (en) * 2018-07-16 2018-12-07 百度在线网络技术(北京)有限公司 Dispositions method, device, equipment and the storage medium of intelligent contract
CN109493203A (en) * 2018-09-30 2019-03-19 咪咕文化科技有限公司 A kind of data calculate method, apparatus and storage medium
CN110032568A (en) * 2018-12-20 2019-07-19 阿里巴巴集团控股有限公司 The reading of data structure and update method, device, electronic equipment
CN109547488A (en) * 2018-12-29 2019-03-29 杭州趣链科技有限公司 A kind of trust data calculating and exchange system based on alliance's block chain
CN109840429A (en) * 2019-01-08 2019-06-04 北京众享比特科技有限公司 Intelligent contract deployment, call method and device
CN110009362A (en) * 2019-04-02 2019-07-12 北京众享比特科技有限公司 Block chain intelligence contract amending method, device and computer readable storage medium
CN110221837A (en) * 2019-05-21 2019-09-10 深圳壹账通智能科技有限公司 Intelligent contract call method, device, equipment and storage medium
CN110516417A (en) * 2019-08-09 2019-11-29 中国银联股份有限公司 A kind of method for verifying authority and device of intelligence contract
CN110602227A (en) * 2019-09-19 2019-12-20 腾讯科技(深圳)有限公司 Intelligent contract management method and related device
CN110599190A (en) * 2019-09-27 2019-12-20 支付宝(杭州)信息技术有限公司 Identity authentication method and device based on block chain

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112651741A (en) * 2021-01-04 2021-04-13 北京京东乾石科技有限公司 Data processing method and device based on block chain
WO2022143298A1 (en) * 2021-01-04 2022-07-07 北京京东乾石科技有限公司 Blockchain-based data processing method and apparatus
CN112819634A (en) * 2021-02-25 2021-05-18 成都质数斯达克科技有限公司 Transaction processing method and device, electronic equipment and readable storage medium
CN112819634B (en) * 2021-02-25 2023-06-02 成都质数斯达克科技有限公司 Transaction processing method, device, electronic equipment and readable storage medium
CN112965729A (en) * 2021-03-23 2021-06-15 工银科技有限公司 Method, device, electronic equipment and medium for deploying intelligent contract of block chain by one key

Similar Documents

Publication Publication Date Title
CN110879903B (en) Evidence storage method, evidence verification method, evidence storage device, evidence verification equipment and evidence verification medium
CN109194673B (en) Authentication method, system, equipment and storage medium based on user authorization information
CN110096857B (en) Authority management method, device, equipment and medium for block chain system
CN108960830B (en) Intelligent contract deployment method, device, equipment and storage medium
CN110310205B (en) Block chain data monitoring method, device, equipment and medium
CN108804906B (en) System and method for application login
CN111433797B (en) Block chain equipment control system and method based on composite key
CN109995523B (en) Activation code management method and device and activation code generation method and device
JP6979966B2 (en) Account linking and service processing Providing methods and devices
CN111221904A (en) Intelligent contract deployment and execution method and device, electronic equipment and storage medium
US9894053B2 (en) Method and system for authenticating service
US20220086131A1 (en) Multi-factor authentication for non-internet applications
CN104199654A (en) Open platform calling method and device
US20190058693A1 (en) Systems and Methods for Securely Transferring Selective Datasets Between Terminals
CN111242462B (en) Data processing method and device, computer storage medium and electronic equipment
CN113360217A (en) Rule engine SDK calling method and device and storage medium
CN110070360B (en) Transaction request processing method, device, equipment and storage medium
KR20090095940A (en) System and Method for Non-faced Financial Transaction by Using Verification of Transaction Step and Program Recording Medium
CN108600259B (en) Authentication and binding method of equipment, computer storage medium and server
CN101807237B (en) Signature method and device
CN110968899B (en) Data blocking confirmation method, device, equipment and medium based on block chain
US8904508B2 (en) System and method for real time secure image based key generation using partial polygons assembled into a master composite image
CN114723449B (en) Block chain piece payment method and electronic equipment
CN114186253A (en) Authority management method and device based on double verification and electronic equipment
CN112732676B (en) Block chain-based data migration method, device, equipment and storage 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