CN117349873A - Intelligent contract operation method and device and related equipment - Google Patents

Intelligent contract operation method and device and related equipment Download PDF

Info

Publication number
CN117349873A
CN117349873A CN202210749157.9A CN202210749157A CN117349873A CN 117349873 A CN117349873 A CN 117349873A CN 202210749157 A CN202210749157 A CN 202210749157A CN 117349873 A CN117349873 A CN 117349873A
Authority
CN
China
Prior art keywords
data
target
contract
intelligent contract
transaction data
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
CN202210749157.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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202210749157.9A priority Critical patent/CN117349873A/en
Publication of CN117349873A publication Critical patent/CN117349873A/en
Pending legal-status Critical Current

Links

Classifications

    • 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/6227Protecting 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 where protection concerns the structure of data, e.g. records, types, queries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/38Creation or generation of source code for implementing user interfaces
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Finance (AREA)
  • Accounting & Taxation (AREA)
  • Bioethics (AREA)
  • Development Economics (AREA)
  • Computer Security & Cryptography (AREA)
  • Human Computer Interaction (AREA)
  • Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Databases & Information Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • Technology Law (AREA)
  • General Business, Economics & Management (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The embodiment of the application provides an intelligent contract operation method, an intelligent contract operation device and related equipment, wherein the method comprises the following steps: acquiring a data acquisition request submitted by first terminal equipment, wherein the data acquisition request comprises identification information of a target intelligent contract; acquiring transaction data of the target intelligent contract from a blockchain based on the identification information of the target intelligent contract, wherein the transaction data comprises the target intelligent contract and operation code data of the target intelligent contract; transmitting response data of the data acquisition request to the first terminal equipment; the response data comprise the transaction data, so that the first terminal device generates an operation interface of the target intelligent contract based on the operation code data of the target intelligent contract, which are included in the transaction data, and the security and convenience in operation of the intelligent contract can be effectively improved, so that the lasting availability of the service is ensured.

Description

Intelligent contract operation method and device and related equipment
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to an operation method and apparatus of an intelligent contract, and related devices.
Background
In the current blockchain application architecture, when a user operates an intelligent contract, the user first accesses a web service of a web page and then accesses a blockchain network through the web service, so that interaction with the intelligent contract is realized. Web services, however, are typically provided by blockchain application operators and have no decentralized nature, and are a single point of problem under this architecture. For example, a digital collection web service is in an unavailable state, and even if the bottom layer uses an intelligent contract on a blockchain, the user cannot use and transfer the digital collection, which brings a lot of inconvenience to the user. In addition, web services are often not secure and reliable, for example, the official network of a digital collection is held, leading to a malicious intelligent contract, which can easily lead to theft of the user's asset.
It can be seen that how to improve the security and convenience in operating intelligent contracts has become a problem to be solved.
Disclosure of Invention
The embodiment of the application provides an intelligent contract operation method, an intelligent contract operation device and related equipment, which can effectively improve the safety and convenience in the operation of the intelligent contract, thereby ensuring the durable availability of business.
In a first aspect, an embodiment of the present application provides a method for operating an intelligent contract, where the method includes:
and acquiring a data acquisition request submitted by the first terminal equipment, wherein the data acquisition request comprises identification information of the target intelligent contract.
Transaction data of the target smart contract is obtained from a blockchain based on the identification information of the target smart contract, wherein the transaction data comprises the target smart contract and operation code data of the target smart contract.
Transmitting response data of the data acquisition request to the first terminal equipment; wherein the response data includes the transaction data such that the first terminal device generates an operation interface of the target smart contract based on operation code data of the target smart contract included in the transaction data.
In a second aspect, embodiments of the present application provide a method for operating a smart contract, where the method includes:
in response to a validation operation of a target object for a target smart contract, sending a data acquisition request to a first node of a blockchain network, the data acquisition request including identification information of the target smart contract, the data acquisition request being used to instruct the first node to acquire transaction data of the target smart contract from a blockchain, the transaction data including the target smart contract and operation code data of the target smart contract.
And receiving response data sent by the first node in response to the data acquisition request, wherein the response data comprises the transaction data.
And generating an operation interface of the target intelligent contract based on the operation code data of the target intelligent contract included in the transaction data, and displaying the operation interface, wherein the operation interface is used for operating the target intelligent contract by the target object.
In a third aspect, an embodiment of the present application provides an operating device of an intelligent contract, where the device includes:
the acquisition module is used for acquiring a data acquisition request submitted by the first terminal equipment, wherein the data acquisition request comprises identification information of the target intelligent contract.
The acquisition module is further configured to acquire transaction data of the target smart contract from a blockchain based on identification information of the target smart contract, where the transaction data includes the target smart contract and operation code data of the target smart contract.
A sending module, configured to send response data of the data acquisition request to the first terminal device; wherein the response data includes the transaction data such that the first terminal device generates an operation interface of the target smart contract based on operation code data of the target smart contract included in the transaction data.
In a fourth aspect, embodiments of the present application provide an operating device of an intelligent contract, the device including:
and the sending module is used for responding to the confirmation operation of the target object for the target intelligent contract and sending a data acquisition request to a first node of the blockchain network, wherein the data acquisition request comprises identification information of the target intelligent contract, the data acquisition request is used for indicating the first node to acquire transaction data of the target intelligent contract from the blockchain, and the transaction data comprises the target intelligent contract and operation code data of the target intelligent contract.
And the receiving module is used for receiving response data sent by the first node in response to the data acquisition request, wherein the response data comprises the transaction data.
And the processing module is used for generating an operation interface of the target intelligent contract based on the operation code data of the target intelligent contract included in the transaction data.
The display module is used for displaying the operation interface, and the operation interface is used for the target object to operate the target intelligent contract.
In a fifth aspect, an embodiment of the present application provides a computer device, where the computer device includes a processor, a network interface, and a storage device, where the processor, the network interface, and the storage device are connected to each other, where the network interface is controlled by the processor to send and receive data, and the storage device is used to store a computer program, where the computer program includes program instructions, and the processor is configured to invoke the program instructions to execute the method of operating the smart contract according to the first aspect.
In a fifth aspect, an embodiment of the present application provides a terminal device, where the computer device includes a processor, a network interface, a storage device, and a display device, where the processor, the network interface, and the storage device are connected to each other, the network interface is controlled by the processor to send and receive data, the display device is used to display an interface, and the storage device is used to store a computer program, where the computer program includes program instructions, and the processor is configured to invoke the program instructions to execute the operation method of the intelligent contract in the second aspect.
In a seventh aspect, embodiments of the present application provide a computer storage medium having stored therein program instructions that, when executed, are configured to implement the method of operating a smart contract according to the first or second aspects.
In an eighth aspect, embodiments of the present application provide a computer program product comprising a computer program for implementing the method of operation of the smart contract of the first or second aspect when the computer program is executed by a computer processor.
In the embodiment of the present application, a node of a blockchain network may acquire a data acquisition request submitted by a first terminal device, where the data acquisition request includes identification information of a target intelligent contract; the node obtains transaction data of the target intelligent contract from the blockchain based on the identification information of the target intelligent contract, wherein the transaction data comprises the target intelligent contract (namely source code data of the target intelligent contract) and operation code data of the target intelligent contract; the node sends response data to the first terminal equipment, the response data comprises transaction data of the target intelligent contract, so that the first terminal equipment can locally generate an operation interface of the target intelligent contract based on operation code data of the target intelligent contract included in the transaction data, and it is seen that core operation codes of the intelligent contract can be stored on a blockchain together by expanding the category of the intelligent contract, a user can directly acquire real and reliable operation code data from a blockchain network, and the operation interface of the intelligent contract is locally generated based on the operation code data, so that the operation of the intelligent contract by the user is safe and convenient, the operation of the intelligent contract is not dependent on an intermediate server (such as a web service), the decentralization during the operation of the intelligent contract is realized, the problem that service is unavailable due to the occurrence of faults of the intermediate server such as the web service is avoided, and the lasting availability of the service is ensured.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1a is a schematic diagram of a data processing system according to an embodiment of the present application;
FIG. 1b is a block chain architecture diagram according to one embodiment of the present application;
FIG. 1c is a schematic diagram of a process for generating a new block according to an embodiment of the present application;
FIG. 2 is a flow chart of a method of operating a smart contract provided in an embodiment of the present application;
FIG. 3 is a flow chart of a method of operation of another smart contract provided by an embodiment of the present application;
FIG. 4 is a schematic diagram of an operation interface of a smart contract provided by an embodiment of the present application;
FIG. 5 is a flow chart of a method of operation of yet another smart contract provided by an embodiment of the present application;
FIG. 6 is a schematic diagram of an operating device of a smart contract according to an embodiment of the present application;
FIG. 7 is a schematic diagram of an operating device of another smart contract provided by an embodiment of the present application;
FIG. 8 is a schematic structural diagram of a computer device according to an embodiment of the present application;
fig. 9 is a schematic structural diagram of a terminal device according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all, of the embodiments of the present application. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments herein without making any inventive effort, are intended to be within the scope of the present application.
Referring to fig. 1a, a schematic architecture diagram of a data processing system according to an embodiment of the present application is provided, where the data processing system includes a blockchain network 10, a first terminal device 11, and a second terminal device 12, and the method includes:
the blockchain network 10 refers to a network for sharing data between nodes, and may include a plurality of nodes 101. Each node may receive input information while operating normally and maintain shared data (i.e., blockchains) within the blockchain network based on the received input information. In order To ensure information intercommunication in the blockchain network, information connection can exist between every two nodes, point-To-point (P2P) communication can be realized between any two nodes, and particularly P2P communication can be performed through a wired communication link or a wireless communication link. For example, when any node in the blockchain network receives input information, other nodes acquire the input information according to a consensus algorithm, and store the input information as data in shared data, so that the data stored on all nodes in the blockchain network are consistent. Node 101 of blockchain network 10 may store different intelligent contracts, specifically may store source code data of intelligent contracts, and may also store operation code data of intelligent contracts, each of which may correspond to an asset, such as an intelligent contract for digital collections, an intelligent contract for blockchain electronic invoices, an intelligent contract for blockchain-based supply chain finance, an intelligent contract for blockchain services (Blockchain as a Service, baaS), and so forth, through which corresponding assets may be conveniently manipulated on the blockchain, such as for use, transfer, purchase, sale, viewing, and so forth, of the asset.
The first terminal device 11 and the second terminal device 12 may access the blockchain network 10 and may communicate with a node in the blockchain network, for example, the second terminal device 12 is a terminal device of a contract operator, and the contract operator may submit a deployment transaction of the intelligent contract to the node 101 of the blockchain network through the second terminal device 12, so as to write source code data and operation code data of the intelligent contract into the blockchain; the first terminal device 11 is a terminal device of a user, and the user can acquire deployment transaction of the intelligent contract from the node 101 of the blockchain network through the first terminal device 11, so that operation code data of the intelligent contract is downloaded to the local, and an operation interface of the intelligent contract can be generated based on the operation code data of the intelligent contract, so that the user can efficiently and conveniently operate the asset associated with the intelligent contract through the operation interface. The first terminal device 11 and the second terminal device 12 may be specifically a smart phone, a tablet computer, a notebook computer, a desktop computer, an on-vehicle smart terminal, etc., which is not limited in this embodiment.
It should be noted that the number of nodes 101 shown in fig. 1a is merely illustrative, and any number of nodes may be deployed according to actual needs.
Each node in the blockchain network has a node identifier corresponding to the node identifier, and each node in the blockchain network can store the node identifiers of other nodes in the blockchain network, so that the generated blocks can be broadcast to other nodes in the blockchain network according to the node identifiers of the other nodes. Each node can maintain a node identification list shown in the following table, and the node names and the node identifications are correspondingly stored in the node identification list. The node identifier may be an internet protocol (Internet Protocol, IP) address, or any other information that can be used to identify the node, and the table is described only by way of example as an IP address.
Node name Node identification
Node 1 111.222.333.444
Node 2 111.222.333.555
Node N 111.222.333.999
Wherein each node in the blockchain network stores one and the same blockchain. The blockchain is composed of a plurality of blocks, see fig. 1b, the blockchain is composed of a plurality of blocks, the starting block comprises a block head and a block body, the block head stores an input information characteristic value, a version number, a time stamp and a difficulty value, and the block body stores input information; the next block of the starting block takes the starting block as a father block, the next block also comprises a block head and a block body, the block head stores the input information characteristic value of the current block, the block head characteristic value of the father block, the version number, the timestamp and the difficulty value, and the like, so that the block data stored in each block in the block chain are associated with the block data stored in the father block, and the safety of the input information in the block is ensured.
When each block in the blockchain is generated, referring to fig. 1c, when the node where the blockchain is located receives input information, checking the input information, after the checking is completed, storing the input information into a memory pool, and updating a hash tree used for recording the input information; then, updating the update time stamp to the time of receiving the input information, trying different random numbers, and calculating the characteristic value for a plurality of times, so that the calculated characteristic value can meet the following formula:
SHA256(SHA256(version+prev_hash+merkle_root+ntime+nbits+x))<TARGET
wherein SHA256 is a eigenvalue algorithm used to calculate eigenvalues; version (version number) is version information of the related block protocol in the block chain; the prev_hash is the block header characteristic value of the parent block of the current block; the merkle_root is a characteristic value of input information; ntime is the update time of the update timestamp; the nbits is the current difficulty, is a fixed value in a period of time, and is determined again after exceeding a fixed period of time; x is a random number; TARGET is a eigenvalue threshold that can be determined from nbits.
Thus, when the random number meeting the formula is calculated, the information can be correspondingly stored to generate the block head and the block body, and the current block is obtained. And then, the node where the blockchain is located sends the newly generated blocks to other nodes in the blockchain network where the newly generated blocks are located according to the node identifications of other nodes in the blockchain network, the other nodes verify the newly generated blocks, and the newly generated blocks are added into the blockchain stored in the newly generated blocks after the verification is completed.
The intelligent contract is a code implementation for executing when meeting certain conditions, can be defined by programming language, is issued to the blockchain (intelligent contract registration), calls a key or other event to trigger execution according to the logic of contract clauses, completes the contract logic, and also provides functions of upgrading and logging off the intelligent contract.
In some possible embodiments, a node 101 in the blockchain network may acquire a data acquisition request submitted by the first terminal device 11, where the data acquisition request includes identification information of the target smart contract; node 101 obtains transaction data for the target smart contract from the blockchain based on the identification information of the target smart contract, the transaction data including the target smart contract itself (i.e., source code data for the target smart contract) and the operation code data for the target smart contract; the node 101 sends response data to the first terminal device 11, where the response data includes transaction data of the target smart contract, and the first terminal device 11 can locally generate an operation interface of the target smart contract based on operation code data of the target smart contract included in the transaction data, so that by expanding the scope of the smart contract, the embodiment of the application can also store core operation codes of the smart contract on a blockchain, a user can directly obtain real and reliable operation code data from the blockchain network, and generate the operation interface of the smart contract locally based on the operation code data, which is safe and convenient, so that the operation of the user on the smart contract is not dependent on an intermediate service provider (such as web service), and the decentralization during the operation of the smart contract is realized, and the problem that service is unavailable due to the occurrence of faults of the intermediate service provider such as web service is avoided, thereby ensuring the durable availability of the service.
It will be appreciated that in the specific embodiments of the present application, data such as identification information, source code, operation code, and operation data of an object related to an intelligent contract, when the above embodiments of the present application are applied to specific products or technologies, permission or consent of the object needs to be obtained, and collection, use, and processing of related data need to comply with related laws and regulations and standards of related countries and regions.
The implementation details of the technical solutions of the embodiments of the present application are described in detail below:
referring now to FIG. 2, a flowchart illustrating an operation method of a smart contract provided by a data processing system according to an embodiment of the present application based on the data processing system shown in FIG. 1a, where the operation method of the smart contract may be applied to a node 101 in FIG. 1a, for example, a first node, and may specifically include the following steps:
201. and acquiring a data acquisition request submitted by the first terminal equipment, wherein the data acquisition request comprises identification information of the target intelligent contract.
Wherein the first node may be any one of the various nodes comprised by the blockchain network.
Specifically, when a target object (such as a target user) needs to manage its own asset by operating an intelligent contract, a data acquisition request may be submitted through a first terminal device, and the data acquisition request carries identification information of the target intelligent contract corresponding to the asset to be managed, where the first node receives the data acquisition request sent by the first terminal device.
202. Transaction data of the target smart contract is obtained from a blockchain based on the identification information of the target smart contract, wherein the transaction data comprises the target smart contract and operation code data of the target smart contract.
The related data of at least one intelligent contract is stored in the blockchain, and the related data can also comprise operation codes of the intelligent contract besides source codes of the intelligent contract, wherein the operation codes can be used for performing various operations on the intelligent contract, namely, the operation codes of the intelligent contract can be used as a part of the intelligent contract and written into the blockchain together with the source codes of the intelligent contract.
Specifically, the first node may query the blockchain for transaction data of the target smart contract based on the identification information of the target smart contract, the transaction data including the target smart contract itself (e.g., the source code of the target smart contract) and the operation code data of the target smart contract. The transaction data of the target intelligent contract may be a deployment transaction submitted by a contract operator to the blockchain network, and specifically may be a deployment transaction submitted by the contract operator to the target intelligent contract, where the contract operator may package the source code of the target intelligent contract and the operation code data of the target intelligent contract together in the deployment transaction.
203. Transmitting response data of the data acquisition request to the first terminal equipment; wherein the response data includes the transaction data such that the first terminal device generates an operation interface of the target smart contract based on operation code data of the target smart contract included in the transaction data.
Specifically, after the first node obtains the transaction data of the target intelligent contract, the transaction data may be sent to the first terminal device, so that the first terminal device generates an operation interface of the target intelligent contract locally based on the operation code data of the target intelligent contract included in the transaction data, and a user can safely and conveniently operate the target intelligent contract through the operation interface.
In some possible embodiments, the contract operator may deploy the target smart contract and the operation code data of the target smart contract in the blockchain through the second terminal device, and the specific implementation may include:
the first node acquires a contract deployment request submitted by the second terminal equipment, wherein the contract deployment request comprises transaction data of a target intelligent contract, and the transaction data comprises the target intelligent contract and operation code data of the target intelligent contract; the first node performs consensus verification on transaction data of the target intelligent contract with other nodes in the blockchain network, and if the consensus verification is passed, the first node can write the transaction data of the target intelligent contract into the blockchain, so that the source code of the target intelligent contract and the operation code data of the target intelligent contract are both deployed on the blockchain.
Optionally, the contract deployment request further includes signature information of the contract operator, for example, a digital signature generated based on a private key of the contract operator, and the first node may acquire verification information of the contract operator, where the verification information may be a public key of the contract operator, verify the signature information based on the verification information, and perform consensus verification on transaction data of the target intelligent contract when the verification passes, so that authenticity of the transaction data may be verified before the transaction data is written into the blockchain, and reliability of the transaction data of the target intelligent contract may be ensured by signing the operation code.
In some possible implementations, the blockchain network may also provide the user with proof data of the transaction data in order to secure when the user obtains the transaction data of the target smart contract from the blockchain. Specifically, after the first node writes the transaction data of the target intelligent contract into the blockchain, the first node can determine that the target intelligent contract and the operation code thereof are truly and credible, and can acquire a target block in the blockchain for storing the transaction data of the target intelligent contract; generating first attestation data of the transaction data based on the target chunk, the first attestation data may include a merck root of the target chunk; the first node may then add the first proof data to the response data, and send the response data to the first terminal device together with the transaction data of the target smart contract, where the first proof data is used for verifying the transaction data of the target smart contract by the first terminal device, so that merck proof ensures that the smart contract operation code is authenticated and safe by the deployer, and is unlikely to be held by an attacker, ensures that the first terminal device can obtain the operation code data of the real and reliable target smart contract, and ensures that the corresponding relationship between the operation code data and the target smart contract, that is, ensures that the operation code data obtained by the first terminal device can be used for operating the target smart contract.
In some possible embodiments, when receiving an operation of the user on the target smart contract in the operation interface of the first terminal device, the first node may execute the corresponding operation in time, thereby implementing efficient execution of the smart contract. In a specific implementation, a first node may acquire a contract operation request submitted by a first terminal device, where the contract operation request includes identification information of a target intelligent contract and second operation data, where the second operation data is obtained by processing first operation data input through an operation interface; the first node responds to the contract operation request, calls the target intelligent contract to process the second operation data based on the identification information of the target intelligent contract to obtain first result data, and then sends the first result data to the first terminal equipment, so that the first terminal equipment displays the first result data through an operation interface, and therefore efficient execution of the intelligent contract and timely feedback of an execution result can be achieved based on direct communication between the first terminal equipment and the blockchain network.
In the embodiment of the present application, a node of a blockchain network may acquire a data acquisition request submitted by a first terminal device, where the data acquisition request includes identification information of a target intelligent contract; the node obtains transaction data of the target intelligent contract from the blockchain based on the identification information of the target intelligent contract, wherein the transaction data comprises the target intelligent contract (namely source code data of the target intelligent contract) and operation code data of the target intelligent contract; the node sends response data to the first terminal equipment, the response data comprises transaction data of the target intelligent contract, so that the first terminal equipment can locally generate an operation interface of the target intelligent contract based on operation code data of the target intelligent contract included in the transaction data, and it is seen that core operation codes of the intelligent contract can be stored on a blockchain together by expanding the category of the intelligent contract, a user can directly acquire real and reliable operation code data from a blockchain network, and the operation interface of the intelligent contract is locally generated based on the operation code data, so that the operation of the intelligent contract by the user is safe and convenient, the operation of the intelligent contract is not dependent on an intermediate server (such as a web service), the decentralization during the operation of the intelligent contract is realized, the problem that service is unavailable due to the occurrence of faults of the intermediate server such as the web service is avoided, and the lasting availability of the service is ensured.
Referring to fig. 3, a flowchart of another operation method of a smart contract provided by the data processing system shown in fig. 1a according to an embodiment of the present application may be applied to the first terminal device 11 in fig. 1a, and specifically may include the following steps:
301. in response to a validation operation of a target object for a target smart contract, sending a data acquisition request to a first node of a blockchain network, the data acquisition request including identification information of the target smart contract, the data acquisition request being used to instruct the first node to acquire transaction data of the target smart contract from a blockchain, the transaction data including the target smart contract and operation code data of the target smart contract.
Specifically, when the target object determines that the operation needs to be performed on the target intelligent contract, the first terminal device may send a data acquisition request to the first node of the blockchain network, and the data acquisition request carries identification information of the target intelligent contract.
In some possible embodiments, the first terminal device may send a contract acquisition request to the first node; the contract acquisition request may include identification information of the target object, which may be, for example, a blockchain address; the first node can query the intelligent contracts available to the target object, namely the intelligent contracts with the use permission of the target object or the intelligent contracts corresponding to the assets owned by the target object; the first terminal equipment receives identification information of at least one intelligent contract sent by a first node in response to a contract acquisition request; wherein the at least one smart contract comprises the target smart contracts described above, each smart contract for operating a corresponding asset; the first terminal device can display the identification information of the at least one intelligent contract, so that a user can select a target intelligent contract which needs to be operated at this time from the identification information, and the first terminal device obtains the confirmation operation of the target object aiming at the target intelligent contract in the at least one intelligent contract, thereby determining that the target object needs to operate the target intelligent contract.
302. And receiving response data sent by the first node in response to the data acquisition request, wherein the response data comprises the transaction data.
303. And generating an operation interface of the target intelligent contract based on the operation code data of the target intelligent contract included in the transaction data, and displaying the operation interface, wherein the operation interface is used for operating the target intelligent contract by the target object.
In a specific implementation, after receiving transaction data of a target intelligent contract sent by a first node, a first terminal device may render an operation interface of the target intelligent contract according to operation code data of the target intelligent contract and display the operation interface to a target object, where the target object may operate the target intelligent contract through the operation interface.
In some possible embodiments, for example, the operation interface may include various operation options such as "use", "transfer", "sell", and the like, as shown in fig. 4, and may further include a parameter input area, where the target object may efficiently operate the digital collection, for example, after inputting a transfer share and a target address (such as a blockchain address of another user), and clicking the "transfer" option may transfer the digital collection to the blockchain address of the other user by clicking the "transfer" option.
In some possible embodiments, the specific implementation manner of generating the operation interface of the target intelligent contract by the first terminal device based on the operation code data of the target intelligent contract provided by the blockchain network may include:
the first terminal equipment analyzes the operation code data of the target intelligent contract included in the transaction data and determines each operation interface of the target intelligent contract; determining an operation control corresponding to each operation interface based on the function of each operation interface, wherein the operation control is used for inputting operation instructions or operation data, the operation instructions can comprise 'use', 'transfer', 'sell', and the operation data can comprise input related parameters; the first terminal equipment can generate the operation interface of the target intelligent contract based on the operation control corresponding to each operation interface, and the operation interface is displayed through rendering, so that the operation interface of the intelligent contract can be accurately and rapidly displayed to a user under the condition of not depending on an intermediate service provider (such as a web service).
In some possible embodiments, in order to ensure the authenticity of the transaction data received by the terminal device and the reliability of the correspondence between the operation code data and the intelligent contract, the response data further includes first proof data of the transaction data, where the first proof data includes a merck root of a target block storing the transaction data; the first terminal equipment can verify the transaction data of the target intelligent contract based on the first proof data; and if the verification is passed, generating an operation interface of the target intelligent contract based on the operation code data of the target intelligent contract.
In some possible embodiments, in order to verify the authenticity of the transaction data received by the terminal device and the reliability of the correspondence between the operation code data and the intelligent contract, the first terminal device may also send a certification acquisition request to a second node of the blockchain network, where the certification acquisition request includes identification information of the target intelligent contract, and the second node includes at least one node in the blockchain network other than the first node; the first terminal equipment receives second proving data of transaction data of the target intelligent contract sent by the second node response proving acquisition request; verifying the transaction data of the target smart contract based on the second attestation data; if the verification is passed, the first terminal device generates an operation interface of the target intelligent contract based on the operation code data of the target intelligent contract, so that other nodes in the combined blockchain network verify the authenticity of the transaction data, and the credibility of the verification result can be improved.
In some possible embodiments, the first terminal device may locally invoke the operation code data to perform format conversion on parameters input by a user or a result sent by the received blockchain network, and may specifically include:
The method comprises the steps that first terminal equipment obtains first operation data input by a target object for a target intelligent contract through an operation interface; invoking the operation code data of the target intelligent contract to perform format conversion processing on the first operation data to obtain second operation data, for example, format conversion can be performed on transfer units of parameters input by a user; the first terminal equipment transmits a contract operation request to the first node, wherein the contract operation request comprises identification information of a target intelligent contract and second operation data obtained through format conversion, and the contract operation request is used for indicating the first node to call the target intelligent contract to process the second operation data so as to obtain first result data.
After the first terminal device receives the first result data sent by the first node, the first result data can be displayed in the operation interface, so that the contract operation result is timely fed back to the user.
In some possible embodiments, a specific implementation manner of the first terminal device displaying the first result data in the operation interface may include:
the first terminal equipment calls the operation code data of the target intelligent contract to perform format conversion processing on the first result data to obtain second result data, for example, the first result data is adapted to a format recognizable by the UI; and then, the second result data is displayed in the operation interface, so that the operation interface provided by the embodiment of the application is friendly to the user operation, the user does not need to understand the interface of the intelligent contract, such as the coded field, the return parameters related to the password and the like, and the operation experience of the user on the intelligent contract is improved.
In this embodiment of the present application, the first terminal device may send, to the first node of the blockchain network, a data acquisition request in response to a confirmation operation of the target object for the target smart contract, where the data acquisition request is used to instruct the first node to acquire transaction data of the target smart contract from the blockchain, and the transaction data includes the target smart contract and operation code data of the target smart contract; the first terminal equipment receives response data sent by the first node, wherein the response data comprises transaction data; the first terminal equipment generates an operation interface of the target intelligent contract based on the operation code data of the target intelligent contract included in the transaction data, and displays the operation interface, and the target object can operate the target intelligent contract through the operation interface.
Referring to FIG. 5, a flowchart of another method of operating a smart contract provided by an embodiment of the present application based on the data processing system shown in FIG. 1a may specifically include two stages: smart contract deployment and smart contract triggering.
Wherein the intelligent contract deployment phase comprises the following steps:
501. the intelligent contract operator writes intelligent contracts.
502. The smart contract operator writes the operation code of the smart contract.
503. The smart contract operator constructs and signs a deployment transaction containing the smart contract and its operation code.
504. The intelligent contract operator submits an intelligent contract deployment transaction to the blockchain.
505. The blockchain informs the intelligent contract operator that the transaction is completed, and the deployment of the intelligent contract is completed.
Wherein the intelligent contract triggering phase comprises the following steps:
506. the user determines a target smart contract.
507. The user requests a deployment transaction of the synchronization target smart contract and its merck proof from the blockchain.
508. The blockchain returns the deployment transaction and its merck proof to the user.
509. The user verifies the authenticity of the deployment transaction based on the returned merck proof.
Wherein verifying the authenticity of the deployment transaction corresponds to validating the authenticity of the operation code and its binding relationship with the smart contract.
510. The user renders a user interface UI based on the native operation code.
511. The user operates the UI to input the related parameters.
The relevant parameters may include, for example, a transfer person and a transfer amount.
512. The user invokes the native opcode to execute the relevant code logic for the user's operation.
Wherein adapting the input parameters to the format of the smart contract may be included.
513. The user invokes the native opcode to submit an intelligent contract invocation transaction to the blockchain.
514. The blockchain performs smart contract transactions.
515. The blockchain returns the smart contract results to the user.
516. The user invokes the native opcode to execute the relevant code logic against the results returned by the blockchain.
Among other things, adapting the format that returns results that are recognizable to the UI may be included.
517. The user invokes the local operation code to update the UI and notifies the operation result.
Wherein the user may correspond to the first terminal device described above, the smart contract operator may correspond to the second terminal device described above, and the blockchain may correspond to the first node in the blockchain network described above.
It should be noted that, the specific implementation manner of the steps 501 to 517 may refer to the related description of the above method embodiments, which is not repeated here.
Referring to fig. 6, a schematic structural diagram of an operating device of an intelligent contract according to an embodiment of the present application includes:
the acquiring module 601 is configured to acquire a data acquisition request submitted by a first terminal device, where the data acquisition request includes identification information of a target smart contract.
The obtaining module 601 is further configured to obtain transaction data of the target smart contract from a blockchain based on identification information of the target smart contract, where the transaction data includes the target smart contract and operation code data of the target smart contract.
A sending module 602, configured to send response data of the data acquisition request to the first terminal device; wherein the response data includes the transaction data such that the first terminal device generates an operation interface of the target smart contract based on operation code data of the target smart contract included in the transaction data.
Optionally, the apparatus further comprises a processing module 603, wherein:
the obtaining module 601 is further configured to obtain a contract deployment request submitted by a second terminal device, where the contract deployment request includes transaction data of the target smart contract, and the transaction data includes the target smart contract and operation code data of the target smart contract.
The processing module 603 is configured to perform consensus verification on transaction data of the target smart contract.
The processing module 603 is further configured to write transaction data of the target smart contract into a blockchain if the common identification verification passes.
Optionally, the response data further includes first proof data of the transaction data, and the obtaining module 601 is further configured to obtain a target block in the blockchain that stores the transaction data of the target smart contract.
The processing module 603 is further configured to generate first attestation data of the transaction data based on the target chunk, where the first attestation data includes a merck root of the target chunk.
The first proving data are used for verifying the transaction data of the target intelligent contract by the first terminal device.
Optionally, the obtaining module 601 is further configured to obtain a contract operation request submitted by the first terminal device, where the contract operation request includes identification information of the target smart contract and second operation data, and the second operation data is obtained by processing the first operation data input through the operation interface.
The processing module 603 is further configured to respond to the contract operation request, invoke the target smart contract based on the identification information of the target smart contract, and process the second operation data to obtain first result data.
The sending module 602 is further configured to send the first result data to the first terminal device, so that the first terminal device displays the first result data through the operation interface.
Optionally, the contract deployment request further includes signature information of a contract operator, and the obtaining module 601 is further configured to obtain verification information of the contract operator, where the verification information includes a public key of the contract operator.
The processing module 603 is further configured to verify the signature information based on the verification information, and perform consensus verification on the transaction data of the target smart contract when the verification passes.
It should be noted that, the functions of each functional module of the operation device of the intelligent contract according to the embodiment of the present application may be specifically implemented according to the method in the embodiment of the method, and the specific implementation process may refer to the related description of the embodiment of the method, which is not repeated herein.
Referring to fig. 7, a schematic structural diagram of an operating device of another smart contract according to an embodiment of the present application includes:
a sending module 701, configured to send, to a first node of a blockchain network, a data acquisition request in response to a confirmation operation of a target object for a target smart contract, where the data acquisition request includes identification information of the target smart contract, and the data acquisition request is configured to instruct the first node to acquire transaction data of the target smart contract from a blockchain, where the transaction data includes the target smart contract and operation code data of the target smart contract.
A receiving module 702, configured to receive response data sent by the first node in response to the data acquisition request, where the response data includes the transaction data.
A processing module 703, configured to generate an operation interface of the target smart contract based on operation code data of the target smart contract included in the transaction data.
And the display module 704 is configured to display the operation interface, where the operation interface is used for the target object to operate the target smart contract.
Optionally, the apparatus further comprises an acquisition module 705, wherein:
the obtaining module 705 is configured to obtain first operation data input by the target object for the target smart contract through the operation interface.
The processing module 703 is further configured to call the operation code data of the target smart contract to perform format conversion processing on the first operation data, so as to obtain second operation data.
The sending module 701 is further configured to send a contract operation request to the first node, where the contract operation request includes identification information of the target smart contract and the second operation data, and the contract operation request is used to instruct the first node to invoke the target smart contract to process the second operation data, so as to obtain first result data.
The receiving module 702 is further configured to receive the first result data sent by the first node, and display the first result data in the operation interface.
Optionally, the display module 704 is specifically configured to:
and calling the operation code data of the target intelligent contract to perform format conversion processing on the first result data to obtain second result data.
And displaying the second result data in the operation interface.
Optionally, the response data further includes first attestation data of the transaction data, the first attestation data including a merck root of a target chunk storing the transaction data; the processing module 703 is further configured to verify transaction data of the target smart contract based on the first proof data; and if the verification is passed, generating an operation interface of the target intelligent contract based on the operation code data of the target intelligent contract included in the transaction data.
Optionally, the sending module 701 is further configured to send a certification acquisition request to a second node of the blockchain network, where the certification acquisition request includes identification information of the target smart contract, and the second node includes at least one node in the blockchain network other than the first node.
The receiving module 702 is further configured to receive second attestation data of transaction data of the target smart contract sent by the second node in response to the attestation acquisition request.
The processing module 703 is further configured to verify transaction data of the target smart contract based on the second proof data; and if the verification is passed, generating an operation interface of the target intelligent contract based on the operation code data of the target intelligent contract included in the transaction data.
Optionally, the sending module 701 is further configured to send a contract acquisition request to the first node.
The receiving module 702 is further configured to receive identification information of at least one intelligent contract sent by the first node in response to the contract obtaining request; wherein the at least one smart contract includes the target smart contracts, each smart contract for operating a corresponding asset.
The display module 704 is further configured to display identification information of the at least one smart contract.
The obtaining module 705 is further configured to obtain a confirmation operation of the target object for a target smart contract in the at least one smart contract.
Optionally, the processing module 703 is specifically configured to:
And analyzing the operation code data of the target intelligent contract included in the transaction data to determine each operation interface of the target intelligent contract.
And determining an operation control corresponding to each operation interface based on the function of each operation interface, wherein the operation control is used for inputting an operation instruction or operation data.
And generating an operation interface of the target intelligent contract based on the operation control corresponding to each operation interface.
It should be noted that, the functions of each functional module of the operation device of the intelligent contract according to the embodiment of the present application may be specifically implemented according to the method in the embodiment of the method, and the specific implementation process may refer to the related description of the embodiment of the method, which is not repeated herein.
Referring to fig. 8, a schematic structural diagram of a computer device according to an embodiment of the present application includes a power supply module and other structures, and includes a processor 801, a storage device 802, and a network interface 803. Data may be interacted between the processor 801, the storage 802, and the network interface 803.
The storage device 802 may include volatile memory (RAM), such as random-access memory (RAM); the storage device 802 may also include a non-volatile memory (non-volatile memory), such as a flash memory (flash memory), a Solid State Drive (SSD), etc.; the storage device 802 may also include a combination of the types of memory described above.
The processor 801 may be a central processing unit 801 (central processing unit, CPU). In one embodiment, the processor 801 may also be a graphics processor 801 (Graphics Processing Unit, GPU). The processor 801 may also be a combination of a CPU and a GPU. In one embodiment, the storage device 802 is configured to store program instructions. The processor 801 may call the program instructions to perform the following operations:
and acquiring a data acquisition request submitted by the first terminal equipment, wherein the data acquisition request comprises identification information of the target intelligent contract.
Transaction data of the target smart contract is obtained from a blockchain based on the identification information of the target smart contract, wherein the transaction data comprises the target smart contract and operation code data of the target smart contract.
Invoking a network interface 803 to send response data of the data acquisition request to the first terminal device; wherein the response data includes the transaction data such that the first terminal device generates an operation interface of the target smart contract based on operation code data of the target smart contract included in the transaction data.
Optionally, the processor 801 is further configured to:
and acquiring a contract deployment request submitted by a second terminal device, wherein the contract deployment request comprises transaction data of the target intelligent contract, and the transaction data comprises the target intelligent contract and operation code data of the target intelligent contract.
And carrying out consensus verification on the transaction data of the target intelligent contract.
And if the consensus verification is passed, writing the transaction data of the target intelligent contract into a blockchain.
Optionally, the response data further includes first proof data of the transaction data, and the processor 801 is further configured to:
and acquiring a target block in the blockchain, which stores transaction data of the target intelligent contract.
First attestation data of the transaction data is generated based on the target tile, the first attestation data including a merck root of the target tile.
The first proving data are used for verifying the transaction data of the target intelligent contract by the first terminal device.
Optionally, the processor 801 is further configured to:
and acquiring a contract operation request submitted by the first terminal equipment, wherein the contract operation request comprises identification information of the target intelligent contract and second operation data, and the second operation data is obtained by processing the first operation data input through the operation interface.
And responding to the contract operation request, calling the target intelligent contract to process the second operation data based on the identification information of the target intelligent contract, and obtaining first result data.
And sending the first result data to the first terminal equipment so that the first terminal equipment displays the first result data through the operation interface.
Optionally, the contract deployment request further includes signature information of a contract operator, and the processor 801 is further configured to:
and acquiring verification information of the contract operator, wherein the verification information comprises a public key of the contract operator.
And verifying the signature information based on the verification information, and performing consensus verification on the transaction data of the target intelligent contract when verification passes.
In particular, the processor 801, the storage device 802, and the network interface 803 described in the embodiments of the present application may perform the implementation described in the related embodiments of the method of operating an intelligent contract provided in fig. 2 of the embodiments of the present application, and may also perform the implementation described in the related embodiments of the apparatus of operating an intelligent contract provided in fig. 6 of the embodiments of the present application, which are not described herein again.
Referring to fig. 9, a schematic structural diagram of a terminal device according to an embodiment of the present application includes a power supply module and other structures, and includes a processor 901, a storage device 902, a network interface 903, and a display device 904. Data may be interacted between the processor 901, the storage device 902, the network interface 903, and the display device 904.
The storage 902 may include volatile memory (RAM), such as random-access memory (RAM); the storage 902 may also include a non-volatile memory (non-volatile memory), such as a flash memory (flash memory), a Solid State Drive (SSD), etc.; the storage 902 may also include a combination of the types of memory described above. The display device 904 may include a display or a touch screen with touch function.
The processor 901 may be a central processor 901 (central processing unit, CPU). In one embodiment, the processor 901 may also be a graphics processor 901 (Graphics Processing Unit, GPU). The processor 901 may also be a combination of a CPU and a GPU. In one embodiment, the storage 902 is configured to store program instructions. The processor 901 may call the program instructions to perform the following operations:
In response to a validation operation of a target object for a target smart contract, sending a data acquisition request to a first node of a blockchain network, the data acquisition request including identification information of the target smart contract, the data acquisition request being used to instruct the first node to acquire transaction data of the target smart contract from a blockchain, the transaction data including the target smart contract and operation code data of the target smart contract.
And receiving response data sent by the first node in response to the data acquisition request, wherein the response data comprises the transaction data.
And generating an operation interface of the target intelligent contract based on the operation code data of the target intelligent contract included in the transaction data.
The call display device 904 displays the operation interface, where the operation interface is used for the target object to operate the target smart contract.
Optionally, the processor 901 is further configured to:
and acquiring first operation data input by the target object for the target intelligent contract through the operation interface.
And calling the operation code data of the target intelligent contract to perform format conversion processing on the first operation data to obtain second operation data.
And sending a contract operation request to the first node, wherein the contract operation request comprises identification information of the target intelligent contract and the second operation data, and the contract operation request is used for indicating the first node to call the target intelligent contract to process the second operation data so as to obtain first result data.
And receiving the first result data sent by the first node, and displaying the first result data in the operation interface.
Optionally, the processor 901 is specifically configured to:
and calling the operation code data of the target intelligent contract to perform format conversion processing on the first result data to obtain second result data.
And displaying the second result data in the operation interface.
Optionally, the response data further includes first attestation data of the transaction data, the first attestation data including a merck root of a target chunk storing the transaction data; the processor 901 is further configured to:
verifying transaction data of the target smart contract based on the first attestation data; and if the verification is passed, generating an operation interface of the target intelligent contract based on the operation code data of the target intelligent contract included in the transaction data.
Optionally, the processor 901 is further configured to:
a certification acquisition request is sent to a second node of the blockchain network, the certification acquisition request including identification information of the target smart contract, the second node including at least one node in the blockchain network other than the first node.
And receiving second proving data of the transaction data of the target intelligent contract, which is sent by the second node in response to the proving acquisition request.
Verifying transaction data of the target smart contract based on the second attestation data; and if the verification is passed, generating an operation interface of the target intelligent contract based on the operation code data of the target intelligent contract included in the transaction data.
Optionally, the processor 901 is further configured to:
a contract acquisition request is sent to the first node.
Receiving identification information of at least one intelligent contract sent by the first node in response to the contract acquisition request; wherein the at least one smart contract includes the target smart contracts, each smart contract for operating a corresponding asset.
And displaying the identification information of the at least one intelligent contract.
And acquiring a confirmation operation of the target object aiming at a target intelligent contract in the at least one intelligent contract.
Optionally, the processor 901 is specifically configured to:
and analyzing the operation code data of the target intelligent contract included in the transaction data to determine each operation interface of the target intelligent contract.
And determining an operation control corresponding to each operation interface based on the function of each operation interface, wherein the operation control is used for inputting an operation instruction or operation data.
And generating an operation interface of the target intelligent contract based on the operation control corresponding to each operation interface.
In specific implementation, the processor 901, the storage device 902, the network interface 903, and the display device 904 described in the embodiments of the present application may perform the implementation described in the related embodiments of the method of operating an intelligent contract provided in fig. 3 of the embodiments of the present application, and may also perform the implementation described in the related embodiments of the apparatus of operating an intelligent contract provided in fig. 7 of the embodiments of the present application, which are not described herein again.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and for parts of one embodiment that are not described in detail, reference may be made to related descriptions of other embodiments. The technical solution of the present application may be embodied in essence or a part contributing to the prior art or all or part of the technical solution, in the form of a software product stored in a storage medium, including several instructions for causing a computer device (which may be a computer, a server, or a network device, or may be a processor in a computer device in particular) to perform all or part of the steps of the methods described in the embodiments of the present application. Wherein the aforementioned storage medium may comprise: a U-disk, a removable hard disk, a magnetic disk, an optical disk, a Read-Only Memory (abbreviated as ROM), a random access Memory (abbreviated as Random Access Memory, RAM), or the like.
The above embodiments are merely for illustrating the technical solution of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the corresponding technical solutions.

Claims (18)

1. A method of operating a smart contract, the method comprising:
acquiring a data acquisition request submitted by first terminal equipment, wherein the data acquisition request comprises identification information of a target intelligent contract;
acquiring transaction data of the target intelligent contract from a blockchain based on the identification information of the target intelligent contract, wherein the transaction data comprises the target intelligent contract and operation code data of the target intelligent contract;
transmitting response data of the data acquisition request to the first terminal equipment; wherein the response data includes the transaction data such that the first terminal device generates an operation interface of the target smart contract based on operation code data of the target smart contract included in the transaction data.
2. The method according to claim 1, wherein the method further comprises:
acquiring a contract deployment request submitted by second terminal equipment, wherein the contract deployment request comprises transaction data of the target intelligent contract, and the transaction data comprises the target intelligent contract and operation code data of the target intelligent contract;
performing consensus verification on transaction data of the target intelligent contract;
and if the consensus verification is passed, writing the transaction data of the target intelligent contract into a blockchain.
3. The method of claim 1 or 2, wherein the response data further comprises first attestation data of the transaction data, the method further comprising:
acquiring a target block in the blockchain for storing transaction data of the target intelligent contract;
generating first attestation data of the transaction data based on the target tile, the first attestation data including a merck root of the target tile;
the first proving data are used for verifying the transaction data of the target intelligent contract by the first terminal device.
4. The method according to claim 1 or 2, characterized in that the method further comprises:
Acquiring a contract operation request submitted by the first terminal equipment, wherein the contract operation request comprises identification information of the target intelligent contract and second operation data, and the second operation data is obtained by processing first operation data input through the operation interface;
responding to the contract operation request, and calling the target intelligent contract to process the second operation data based on the identification information of the target intelligent contract to obtain first result data;
and sending the first result data to the first terminal equipment so that the first terminal equipment displays the first result data through the operation interface.
5. The method of claim 2, wherein the contract deployment request further includes signature information of a contract operator, the method further comprising:
acquiring verification information of the contract operator, wherein the verification information comprises a public key of the contract operator;
and verifying the signature information based on the verification information, and executing the step of carrying out consensus verification on the transaction data of the target intelligent contract when verification passes.
6. A method of operating a smart contract, the method comprising:
In response to a validation operation of a target object for a target smart contract, transmitting a data acquisition request to a first node of a blockchain network, wherein the data acquisition request comprises identification information of the target smart contract, and the data acquisition request is used for instructing the first node to acquire transaction data of the target smart contract from a blockchain, and the transaction data comprises the target smart contract and operation code data of the target smart contract;
receiving response data sent by the first node in response to the data acquisition request, wherein the response data comprises the transaction data;
and generating an operation interface of the target intelligent contract based on the operation code data of the target intelligent contract included in the transaction data, and displaying the operation interface, wherein the operation interface is used for operating the target intelligent contract by the target object.
7. The method of claim 6, wherein the method further comprises:
acquiring first operation data input by the target object for the target intelligent contract through the operation interface;
invoking the operation code data of the target intelligent contract to perform format conversion processing on the first operation data to obtain second operation data;
Sending a contract operation request to the first node, wherein the contract operation request comprises identification information of the target intelligent contract and the second operation data, and the contract operation request is used for indicating the first node to call the target intelligent contract to process the second operation data so as to obtain first result data;
and receiving the first result data sent by the first node, and displaying the first result data in the operation interface.
8. The method of claim 7, wherein the presenting the first result data in the operator interface comprises:
invoking the operation code data of the target intelligent contract to perform format conversion processing on the first result data to obtain second result data;
and displaying the second result data in the operation interface.
9. The method of any one of claims 6-8, wherein the response data further comprises first attestation data of the transaction data, the first attestation data comprising a merck root of a target tile storing the transaction data; before the generating the operation interface of the target smart contract based on the operation code data of the target smart contract included in the transaction data, the method further includes:
Verifying transaction data of the target smart contract based on the first attestation data;
and if the verification is passed, executing the step of generating an operation interface of the target intelligent contract based on the operation code data of the target intelligent contract included in the transaction data.
10. The method of any of claims 6-8, wherein prior to the generating the operating interface of the target smart contract based on the operating code data of the target smart contract included in the transaction data, the method further comprises:
sending a certification acquisition request to a second node of the blockchain network, the certification acquisition request including identification information of the target smart contract, the second node including at least one node in the blockchain network other than the first node;
receiving second proving data of transaction data of the target intelligent contract, which is sent by the second node in response to the proving acquisition request;
verifying transaction data of the target smart contract based on the second attestation data;
and if the verification is passed, executing the step of generating an operation interface of the target intelligent contract based on the operation code data of the target intelligent contract included in the transaction data.
11. The method according to any one of claims 6 to 8, further comprising:
sending a contract acquisition request to the first node;
receiving identification information of at least one intelligent contract sent by the first node in response to the contract acquisition request; wherein the at least one smart contract includes the target smart contracts, each smart contract for operating a corresponding asset;
displaying the identification information of the at least one intelligent contract;
and acquiring a confirmation operation of the target object aiming at a target intelligent contract in the at least one intelligent contract.
12. The method of claim 6, wherein the generating the operating interface of the target smart contract based on the operating code data of the target smart contract included in the transaction data comprises:
analyzing the operation code data of the target intelligent contract included in the transaction data, and determining each operation interface of the target intelligent contract;
determining an operation control corresponding to each operation interface based on the function of each operation interface, wherein the operation control is used for inputting an operation instruction or operation data;
And generating an operation interface of the target intelligent contract based on the operation control corresponding to each operation interface.
13. An operating device for a smart contract, the device comprising:
the acquisition module is used for acquiring a data acquisition request submitted by the first terminal equipment, wherein the data acquisition request comprises identification information of a target intelligent contract;
the acquisition module is further used for acquiring transaction data of the target intelligent contract from a blockchain based on the identification information of the target intelligent contract, wherein the transaction data comprises the target intelligent contract and operation code data of the target intelligent contract;
a sending module, configured to send response data of the data acquisition request to the first terminal device; wherein the response data includes the transaction data such that the first terminal device generates an operation interface of the target smart contract based on operation code data of the target smart contract included in the transaction data.
14. An operating device for a smart contract, the device comprising:
a sending module, configured to send, to a first node of a blockchain network, a data acquisition request in response to a confirmation operation of a target object for a target smart contract, where the data acquisition request includes identification information of the target smart contract, and the data acquisition request is configured to instruct the first node to acquire transaction data of the target smart contract from a blockchain, where the transaction data includes the target smart contract and operation code data of the target smart contract;
The receiving module is used for receiving response data sent by the first node in response to the data acquisition request, wherein the response data comprises the transaction data;
the processing module is used for generating an operation interface of the target intelligent contract based on the operation code data of the target intelligent contract included in the transaction data;
the display module is used for displaying the operation interface, and the operation interface is used for the target object to operate the target intelligent contract.
15. A computer device, characterized in that it comprises a processor, a network interface and storage means, said processor, said network interface and said storage means being connected to each other, wherein said network interface is controlled by said processor for transceiving data, said storage means being arranged for storing a computer program comprising program instructions, said processor being arranged for invoking said program instructions for executing the method of operation of the smart contract according to any of claims 1-5.
16. A terminal device, characterized in that the computer device comprises a processor, a network interface, a storage means and a display means, the processor, the network interface and the storage means being connected to each other, wherein the network interface is controlled by the processor for transceiving data, the display means is for presenting an interface, the storage means is for storing a computer program comprising program instructions, the processor is configured to invoke the program instructions for executing the method of operation of the smart contract according to any of claims 6-12.
17. A computer readable storage medium, characterized in that the computer readable storage medium stores a computer program comprising program instructions for execution by a processor to perform the method of operating a smart contract according to any one of claims 1 to 5 or the method of operating a smart contract according to any one of claims 6 to 12.
18. A computer program product comprising a computer program, characterized in that the computer program, when executed by a computer processor, implements the method of operating a smart contract according to any one of claims 1 to 5 or the method of operating a smart contract according to any one of claims 6 to 12.
CN202210749157.9A 2022-06-29 2022-06-29 Intelligent contract operation method and device and related equipment Pending CN117349873A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210749157.9A CN117349873A (en) 2022-06-29 2022-06-29 Intelligent contract operation method and device and related equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210749157.9A CN117349873A (en) 2022-06-29 2022-06-29 Intelligent contract operation method and device and related equipment

Publications (1)

Publication Number Publication Date
CN117349873A true CN117349873A (en) 2024-01-05

Family

ID=89358123

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210749157.9A Pending CN117349873A (en) 2022-06-29 2022-06-29 Intelligent contract operation method and device and related equipment

Country Status (1)

Country Link
CN (1) CN117349873A (en)

Similar Documents

Publication Publication Date Title
US10871953B2 (en) Application update method and apparatus
CN108492183B (en) Block chain account transaction method, system and computer readable storage medium
CN110933163B (en) Block chain contract deployment method, device, equipment and storage medium
US10127057B2 (en) Method and apparatus for dynamically implementing application function
JP6061364B2 (en) Cloud-assisted methods and services for application security verification
US10387856B2 (en) Online payment method, system, and apparatus
CN110601896B (en) Data processing method and equipment based on block chain nodes
CN102830992A (en) Plug-in loading method and system
CN110400217B (en) Rule change processing method and device for intelligent contract
CN111224952B (en) Network resource acquisition method and device for directional flow and storage medium
CN104580112A (en) Service authentication method and system, and server
CN109818957B (en) Intelligent contract calling method, device and system based on visual interface
CN111488372A (en) Data processing method, device and storage medium
CN111460410A (en) Server login method, device and system and computer readable storage medium
CN112199622A (en) Page jump method, system and storage medium
CN111597567A (en) Data processing method, data processing device, node equipment and storage medium
US20230261882A1 (en) Image Management Method and Apparatus
CN113434254B (en) Client deployment method, client deployment apparatus, computer device, and storage medium
CN111597537B (en) Block chain network-based certificate issuing method, related equipment and medium
CN112925589B (en) Calling method and device of expansion interface
CN112732676B (en) Block chain-based data migration method, device, equipment and storage medium
CN117349873A (en) Intelligent contract operation method and device and related equipment
CN104158812A (en) Method and system of safety control of terminal application
CN111932326B (en) Data processing method based on block chain network and related equipment
CN113326506A (en) Applet monitoring method and device

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