CN112487092A - Intelligent contract calling method and device based on block chain - Google Patents

Intelligent contract calling method and device based on block chain Download PDF

Info

Publication number
CN112487092A
CN112487092A CN202011404300.8A CN202011404300A CN112487092A CN 112487092 A CN112487092 A CN 112487092A CN 202011404300 A CN202011404300 A CN 202011404300A CN 112487092 A CN112487092 A CN 112487092A
Authority
CN
China
Prior art keywords
calling
intelligent contract
virtual machine
contract
asynchronous
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.)
Granted
Application number
CN202011404300.8A
Other languages
Chinese (zh)
Other versions
CN112487092B (en
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.)
WeBank Co Ltd
Original Assignee
WeBank 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 WeBank Co Ltd filed Critical WeBank Co Ltd
Priority to CN202011404300.8A priority Critical patent/CN112487092B/en
Publication of CN112487092A publication Critical patent/CN112487092A/en
Application granted granted Critical
Publication of CN112487092B publication Critical patent/CN112487092B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • 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)
  • General Physics & Mathematics (AREA)
  • Business, Economics & Management (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Development Economics (AREA)
  • General Business, Economics & Management (AREA)
  • Technology Law (AREA)
  • Strategic Management (AREA)
  • Marketing (AREA)
  • Computing Systems (AREA)
  • Economics (AREA)
  • Data Mining & Analysis (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The embodiment of the invention provides a block chain-based intelligent contract calling method and a block chain-based intelligent contract calling device. The host machine can immediately send the calling response to the first virtual machine when receiving the asynchronous intelligent contract calling request sent by the first virtual machine, so that the first virtual machine can continuously execute the subsequent steps of the first intelligent contract without waiting for the execution result of the asynchronous intelligent contract calling request, the execution efficiency of external intelligent contract calling can be improved, and the execution cost of the external intelligent contract calling can be saved.

Description

Intelligent contract calling method and device based on block chain
Technical Field
The embodiment of the invention relates to the field of financial technology (Fintech), in particular to an intelligent contract calling method and device based on a block chain.
Background
With the development of computer technology, more and more technologies are applied in the financial field, and the traditional financial industry is gradually changing to financial technology, but due to the requirements of the financial industry on safety and real-time performance, higher requirements are also put forward on the technologies.
At present, the external intelligent contract calling is mainly to execute the calling of the external intelligent contract in a synchronous calling mode. That is, when the caller contract needs to call the external intelligent contract, the caller contract initiates an external intelligent contract call request to the host environment, so that the host environment creates a new virtual machine based on the external intelligent contract request, and executes the called contract based on the virtual machine. At this time, the caller contract needs to wait for the called contract to finish executing and obtain the return value of the called contract before executing the subsequent steps. However, since the external smart contract invocation itself involves the host environment communication, the virtual machine creation, and the execution overhead of the external smart contract itself, executing the external smart contract in a synchronous invocation manner may result in a large execution cost of the external smart contract and a low execution efficiency of the external smart contract.
In summary, there is a need for a block chain-based intelligent contract calling method for improving the execution efficiency of external intelligent contract calling.
Disclosure of Invention
The embodiment of the invention provides a block chain-based intelligent contract calling method and device, which are used for improving the execution efficiency of external intelligent contract calling.
In a first aspect, an embodiment of the present invention provides an intelligent contract invoking method based on a block chain, including:
the host machine receives an asynchronous intelligent contract calling request sent by a first virtual machine and sends a calling response to the first virtual machine; the asynchronous intelligent contract calling request is generated by the first virtual machine executing a first calling statement with an asynchronous calling identifier in a first intelligent contract; the first calling statement is used for calling a second intelligent contract; the call response is used for instructing the first virtual machine to continue executing the first intelligent contract;
the host machine creates a second virtual machine used for executing the asynchronous intelligent contract calling request;
and the host machine stores a first execution result obtained by the second virtual machine executing the asynchronous intelligent contract calling request into the first virtual machine.
In the technical scheme, an asynchronous intelligent contract calling request sent by a first virtual machine is received, and a calling response is sent to the first virtual machine; the asynchronous intelligent contract calling request is generated by a first virtual machine executing a first calling statement with an asynchronous calling identifier in a first intelligent contract; the first calling statement is used for calling a second intelligent contract; the call response is to instruct the first virtual machine to continue executing the first smart contract. And then creating a second virtual machine for executing the asynchronous intelligent contract calling request, and storing a first execution result obtained by the second virtual machine executing the asynchronous intelligent contract calling request into the first virtual machine. The host machine can immediately send the calling response to the first virtual machine when receiving the asynchronous intelligent contract calling request sent by the first virtual machine, so that the first virtual machine can continuously execute the subsequent steps of the first intelligent contract without waiting for the execution result of the asynchronous intelligent contract calling request, the execution efficiency of external intelligent contract calling can be improved, the execution cost of the external intelligent contract calling can be saved, and the problems that the execution cost of the intelligent contract is higher and the execution efficiency of the external intelligent contract calling is low due to the fact that the external intelligent contract is executed in a synchronous calling mode in the prior art can be solved.
Optionally, the method further comprises:
the host machine receives a synchronous intelligent contract calling request sent by the first virtual machine; the synchronous intelligent contract calling request is generated by the first virtual machine executing a second calling statement with a synchronous calling identifier in the first intelligent contract, and the second calling statement is used for calling a third intelligent contract;
the host machine creates a third virtual machine for executing the synchronous intelligent contract calling request;
and the host machine sends a second execution result obtained by the third virtual machine executing the synchronous intelligent contract calling request to the first virtual machine as the calling response.
In the above technical solution, when executing a synchronous intelligent contract invocation request generated by a second invocation statement having a synchronous invocation identifier in a first intelligent contract, some steps located after the second invocation statement in the first intelligent contract may need to rely on an execution result of the synchronous intelligent contract invocation request, but some subsequent steps unrelated to the execution result of the synchronous intelligent contract invocation request may be executed in advance for some steps located after the second invocation statement in the first intelligent contract that do not need to rely on the execution result of the synchronous intelligent contract invocation request, so that the execution efficiency of external intelligent contract invocation may be improved.
Optionally, the asynchronous smart contract invocation request includes instrumentation identification;
before the host machine creates a second virtual machine for executing the asynchronous intelligent contract calling request, the method further comprises the following steps:
the host machine records that the state of the pile inserting identification is unfinished;
after the host machine stores a first execution result obtained by the second virtual machine executing the asynchronous intelligent contract calling request into the first virtual machine, the method further includes:
and the host machine records the state of the instrumentation mark as completed.
In the technical scheme, before the second virtual machine is created, the state of the instrumentation mark in the asynchronous intelligent contract calling request is set and recorded as unfinished, and after a first execution result obtained by executing the asynchronous intelligent contract calling request is stored in the first virtual machine, the state of the instrumentation mark in the asynchronous intelligent contract calling request is set and recorded as finished, so that a host can conveniently and accurately know the execution state of the asynchronous intelligent contract calling request in time, and support can be provided for a subsequent host to quickly and accurately check whether the first virtual machine is in a dormant state.
Optionally, after sending the call response to the first virtual machine, the method further includes:
when the first virtual machine executes the program statement with the waiting calling result identification in the first intelligent contract, generating a waiting calling instruction; the call waiting instruction is used for searching the state of the instrumentation mark corresponding to the program statement in the host machine;
and the first virtual machine enters a dormant state when the state of the instrumentation mark is determined to be incomplete.
In the technical scheme, the state of the instrumentation marks corresponding to the program statements in the host machine is searched based on the waiting call instruction, and whether the first virtual machine needs to be in the dormant state or not can be quickly and accurately determined according to the state of the instrumentation marks.
Optionally, after the host machine stores a first execution result obtained by the second virtual machine executing the asynchronous intelligent contract invoking request into the first virtual machine, the method further includes:
and the host machine determines that the first virtual machine is in a dormant state, and then awakens the first virtual machine.
In the above technical solution, when the host determines that the first virtual machine is in the dormant state, the host may wake up the first virtual machine in time based on the execution result of the asynchronous intelligent contract invocation request.
Optionally, the asynchronous call identifier is obtained by:
for any contract method in the first intelligent contract, if the j program statement in the contract method contains the calling statement of the intelligent contract and a temporary storage variable used for storing the execution result of the calling statement exists, marking the asynchronous calling identifier and the instrumentation identifier j for the j program statement; recording the temporary storage variable; j is an integer greater than or equal to 1;
if the temporary storage variable is determined to be used in the mth program statement, marking a waiting call result identifier and a pile insertion identifier j on the mth program statement; the mth program statement is a program statement located after the jth program statement in the contract method.
In the above technical solution, for any contract method in the first intelligent contract, if it is determined that the jth program statement in the contract method includes the call statement of the intelligent contract and a temporary storage variable for storing the execution result of the call statement exists, the jth program statement may be timely and accurately labeled with the asynchronous call identifier and the instrumentation identifier, so that it is convenient for the subsequent accurate execution of the corresponding call statement based on the asynchronous call identifier.
Optionally, the synchronization call identifier is obtained by:
and for any contract method in the first intelligent contract, if the k program statement in the contract method contains the calling statement of the intelligent contract and a temporary storage variable used for storing the execution result of the calling statement does not exist, marking the synchronous calling identifier for the k program statement.
In the above technical solution, for any contract method in the first intelligent contract, if it is determined that the kth program statement in the contract method includes the call statement of the intelligent contract and there is no temporary storage variable for storing the execution result of the call statement, the kth program statement may be timely and accurately marked with the synchronous call identifier, so that it is convenient for the subsequent accurate execution of the corresponding call statement based on the synchronous call identifier.
In a second aspect, an embodiment of the present invention further provides an intelligent contract invoking apparatus based on a block chain, including:
the receiving unit is used for receiving an asynchronous intelligent contract calling request sent by a first virtual machine and sending a calling response to the first virtual machine; the asynchronous intelligent contract calling request is generated by the first virtual machine executing a first calling statement with an asynchronous calling identifier in a first intelligent contract; the first calling statement is used for calling a second intelligent contract; the call response is used for instructing the first virtual machine to continue executing the first intelligent contract;
the processing unit is used for creating a second virtual machine used for executing the asynchronous intelligent contract calling request; and storing a first execution result obtained by the second virtual machine executing the asynchronous intelligent contract calling request into the first virtual machine.
Optionally, the processing unit is further configured to:
receiving a synchronous intelligent contract calling request sent by the first virtual machine; the synchronous intelligent contract calling request is generated by the first virtual machine executing a second calling statement with a synchronous calling identifier in the first intelligent contract, and the second calling statement is used for calling a third intelligent contract;
creating a third virtual machine for executing the synchronous intelligent contract invocation request;
and sending a second execution result obtained by the third virtual machine executing the synchronous intelligent contract calling request to the first virtual machine as the calling response.
Optionally, the asynchronous smart contract invocation request includes instrumentation identification;
the processing unit is further to:
the host machine records that the state of the pile inserting identification is unfinished;
the processing unit is further to:
and the host machine records the state of the instrumentation mark as completed.
Optionally, the receiving unit is further configured to:
generating a call waiting instruction when executing a program statement with a call waiting result identifier in the first intelligent contract; the call waiting instruction is used for searching the state of the instrumentation mark corresponding to the program statement in the host machine;
and entering a dormant state when the state of the inserting mark is determined to be incomplete.
Optionally, the processing unit is further configured to:
and if the first virtual machine is determined to be in the dormant state, waking up the first virtual machine.
Optionally, the processing unit is specifically configured to:
for any contract method in the first intelligent contract, if the j program statement in the contract method contains the calling statement of the intelligent contract and a temporary storage variable used for storing the execution result of the calling statement exists, marking the asynchronous calling identifier and the instrumentation identifier j for the j program statement; recording the temporary storage variable; j is an integer greater than or equal to 1;
if the temporary storage variable is determined to be used in the mth program statement, marking a waiting call result identifier and a pile insertion identifier j on the mth program statement; the mth program statement is a program statement located after the jth program statement in the contract method.
Optionally, the processing unit is specifically configured to:
and for any contract method in the first intelligent contract, if the k program statement in the contract method contains the calling statement of the intelligent contract and a temporary storage variable used for storing the execution result of the calling statement does not exist, marking the synchronous calling identifier for the k program statement.
In a third aspect, an embodiment of the present invention provides a computing device, including:
a memory for storing a computer program;
and the processor is used for calling the computer program stored in the memory and executing the intelligent contract calling method based on the block chain according to the obtained program.
In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium storing a computer-executable program for causing a computer to execute a blockchain-based intelligent contract calling method.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic diagram of a system architecture according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of an intelligent contract invoking method based on a blockchain according to an embodiment of the present invention;
FIG. 3 is a schematic illustration of a process for pile insertion according to an embodiment of the present invention;
FIG. 4 is a flowchart illustrating pile compilation according to an embodiment of the present invention;
FIG. 5 is a flowchart illustrating an exemplary process for executing an asynchronous external contract call instruction according to an embodiment of the present invention;
FIG. 6 is a flowchart illustrating a process of executing a wait for result call instruction according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of an intelligent contract invoking apparatus based on a block chain according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the present invention will be described in further detail with reference to the accompanying drawings, and it is apparent that the described embodiments are only a part of the embodiments of the present invention, not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In the following, some terms related to the embodiments of the present invention are first explained to facilitate understanding by those skilled in the art.
(1) Intelligent contract: an intelligent contract is a collection of code and data that runs on top of a blockchain system, where the code is responsible for implementing the functionality of the intelligent contract and the data is responsible for storing the state of the intelligent contract, which can receive and send information.
(2) Trading: in blockchains, any operation (deploying a contract, invoking a contract interface, etc.) is done by sending a transaction. The transaction is initiated by the user and sent to the blockchain node through the client. After receiving the transaction, the blockchain node packs the transaction into blocks and executes the blocks.
(3) Virtual machine: in architecture in computer science, it is referred to a special software which can simulate a complete computer system with complete hardware system functions, running in a completely isolated environment, can provide the functions of a physical computer, and is designed to execute a computer program in a platform-independent environment. In the field of blockchains, virtual machines are used to establish an execution environment for intelligent contracts.
(4) The host environment: a virtual machine, as software, must run on real hardware. Software running a virtual machine on real hardware is called a host environment. The host environment is mainly responsible for the creation and scheduling of the virtual machine and provides an interface for the virtual machine to access the external environment.
(5) Contract address: in a block chain, after each intelligent contract is deployed on the chain, a corresponding address is generated to mark the intelligent contract. When the interface of the intelligent contract is called through transaction, a contract address needs to be provided.
(6) External contract invocation: on the block chain, some functions can not be completed through one intelligent contract usually, at this time, the functions required to be used are split into a plurality of intelligent contracts and are respectively deployed on the block chain, when a certain function needs to be called, the intelligent contract corresponding to the function is directly called, and at this time, the calling is called as external contract calling.
(7) Byte code: generally refers to intermediate code that has been compiled, but, regardless of the particular machine code, requires translation by an interpreter to become machine code. Bytecode is typically not readable like source code, but rather a sequence of encoded numerical constants, references, instructions, etc. The bytecode is mainly intended to implement a specific software operation and software environment, independent of the hardware environment. The implementation of the bytecode is through a compiler and a virtual machine. A compiler compiles source code into bytecode, and a virtual machine on a particular platform translates the bytecode into instructions that can be directly run.
(8) Code pile inserting: on the basis of ensuring the original logic integrity of the program, lexical analysis and syntactic analysis are carried out on the source code of the program, and some codes are injected into the source code at certain special positions, so that specific functions are automatically realized for the program. In colloquial, instrumentation is the insertion of a piece of code into another piece of code, or the replacement of another piece of code, by some policy. The code can be divided into source code and bytecode, and the instrumentation referred to by us generally refers to bytecode instrumentation.
As described above, some terms related to the embodiments of the present invention are described, and the technical features related to the embodiments of the present invention are described below.
To facilitate understanding of the embodiment of the present invention, first, the system architecture shown in fig. 1 is taken as an example to describe an intelligent contract invoking system architecture suitable for the embodiment of the present invention. The intelligent contract calling system architecture can be applied to calling among intelligent contracts of a block chain and the like, and in an actual application scene, the invention is not limited to the above. As shown in fig. 1, the system architecture may be a server 100 including a processor 110, a communication interface 120, and a memory 130.
The communication interface 120 is used for communicating with a terminal device, and transceiving information transmitted by the terminal device to implement communication.
The processor 110 is a control center of the server 100, connects various parts of the entire server 100 using various interfaces and lines, performs various functions of the server 100 and processes data by running or executing software programs and/or modules stored in the memory 130 and calling data stored in the memory 130. Alternatively, processor 110 may include one or more processing units.
The memory 130 may be used to store software programs and modules, and the processor 110 executes various functional applications and data processing by operating the software programs and modules stored in the memory 130. The memory 130 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function, and the like; the storage data area may store data created according to a business process, and the like. Further, the memory 130 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
It should be noted that the structure shown in fig. 1 is only an example, and the embodiment of the present invention is not limited thereto.
Based on the above description, fig. 2 exemplarily illustrates a flow of a blockchain-based intelligent contract invoking method according to an embodiment of the present invention, where the flow may be performed by a blockchain-based intelligent contract invoking apparatus.
As shown in fig. 2, the process specifically includes:
step 201, a host machine receives an asynchronous intelligent contract calling request sent by a first virtual machine, and sends a calling response to the first virtual machine.
Step 202, the host machine creates a second virtual machine for executing the asynchronous intelligent contract calling request.
Step 203, the host machine stores a first execution result obtained by the second virtual machine executing the asynchronous intelligent contract calling request into the first virtual machine.
In step 201, the first virtual machine generates an asynchronous intelligent contract calling request when executing a first calling statement having an asynchronous calling identifier in the first intelligent contract, where the first calling statement is used to call a second intelligent contract. And sending the asynchronous intelligent contract calling request to a host machine, and simultaneously sending a calling response to the first virtual machine immediately when the host machine receives the asynchronous intelligent contract calling request sent by the first virtual machine so that the first virtual machine can continuously execute the first intelligent contract. Therefore, the first virtual machine can continue to execute the subsequent steps of the first intelligent contract without waiting for the execution result of the asynchronous intelligent contract calling request, so that the execution efficiency of external intelligent contract calling can be improved, and the execution cost of the external intelligent contract calling can be saved. The asynchronous call identifier can be generated in the following way: for any contract method in the first intelligent contract, if the j-th program statement in the contract method contains the calling statement of the intelligent contract and a temporary storage variable for storing the execution result of the calling statement exists, the j-th program statement is marked with an asynchronous calling identifier and a stub identifier j, and the temporary storage variable is recorded, so that the corresponding calling statement can be accurately executed based on the asynchronous calling identifier in the follow-up process. If the temporary storage variable is used in the mth program statement, the mth program statement is marked with the waiting call result identifier and the instrumentation identifier j, so that the corresponding call statement can be accurately executed based on the waiting call result identifier. Wherein j is an integer greater than or equal to 1; the m program statement is a program statement positioned after the j program statement in the contract method.
In step 202, before the host creates the second virtual machine for executing the asynchronous intelligent contract calling request, the host may set and record the state of the instrumentation mark in the asynchronous intelligent contract calling request as unfinished, and after storing the first execution result obtained by the second virtual machine executing the asynchronous intelligent contract calling request into the first virtual machine, set and record the state of the instrumentation mark in the asynchronous intelligent contract calling request as finished. Therefore, the host machine can conveniently and accurately know the execution state of the asynchronous intelligent contract calling request in time, and can quickly and accurately check whether the first virtual machine is in the dormant state or not for the subsequent host machine.
In step 203, the host acquires the external contract bytecode from the corresponding external intelligent contract according to the external contract address in the asynchronous external intelligent contract calling request, executes the external contract bytecode based on the second virtual machine, and stores the first execution result of the asynchronous external intelligent contract calling request in the first virtual machine after the execution is completed.
It should be noted that the first virtual machine generates a synchronous intelligent contract calling request when executing a second calling statement having a synchronous calling identifier in the first intelligent contract, where the second calling statement is used for calling a third intelligent contract. And sending the synchronous intelligent contract calling request to the host machine so that the host machine creates a third virtual machine for executing the synchronous intelligent contract calling request based on the synchronous intelligent contract calling request. And the host machine acquires the external contract byte codes from the corresponding external intelligent contracts according to the external contract addresses in the synchronous intelligent contract calling requests, executes the external contract byte codes based on the second virtual machine, and stores the second execution results of the synchronous intelligent contract calling requests into the first virtual machine after the execution is finished. When the synchronous intelligent contract calling request generated by the second calling statement with the synchronous calling identification in the first intelligent contract is executed, some steps in the first intelligent contract after the second calling statement may need to depend on the execution result of the synchronous intelligent contract calling request, but some subsequent steps which are not related to the execution result of the synchronous intelligent contract calling request can be executed in advance aiming at some steps in the first intelligent contract after the second calling statement without depending on the execution result of the synchronous intelligent contract calling request, so that the execution efficiency of the external intelligent contract calling can be improved.
The synchronous calling identifier can be generated in the following way: for any contract method in the first intelligent contract, if the k-th program statement in the contract method contains the calling statement of the intelligent contract and a temporary storage variable used for storing the execution result of the calling statement does not exist, the k-th program statement is marked with a synchronous calling identifier, so that the corresponding calling statement can be accurately executed based on the synchronous calling identifier subsequently. Wherein k is an integer of 1 or more.
In the prior art, a synchronous mode is adopted when an external contract is called, that is, when a caller contract calls the external contract, the caller contract must wait for the called contract to finish executing and obtain a return value of the called contract before continuing to execute downwards. In this way, when waiting for the execution result of the called contract for the caller contract, some calculations that do not depend on the execution result cannot be executed in advance. For example, the following logic exists in a caller contract: a. and calling the external contract X, acquiring a specific hash value, and storing the result into the variable X. b. A hash value of the variable y is calculated. c. The magnitude of x is compared to y. It can be seen that the calculation of the step b does not depend on the result in the step a, and therefore, the calculation should be executed in advance while waiting for the result of the step a, but the synchronous external contract calling mode causes the execution of the step b to have to wait for the completion of the execution of the step a first, which may reduce the efficiency of the execution of the external contract calling. Furthermore, it should be noted that, when there are multiple external contract calls in the caller contract that are not dependent on each other continuously, all the external contract calls will be performed in a completely serial manner, and since the external contract calls themselves involve the host environment communication, the virtual machine creation, and the execution overhead of the external contract itself, the execution cost of the synchronized external contract call is large, and the execution efficiency of the synchronized external contract call is low.
Based on the above, the embodiment of the invention provides an intelligent contract calling method based on a block chain. When the intelligent contract execution process needs to call an external contract, the caller contract can be continuously executed downwards without waiting for the called contract to be executed, but logic irrelevant to the external contract execution result can be executed in advance while waiting for the called contract to be executed to be finished, so that the overall execution efficiency of the contract can be improved.
Specifically, the embodiment of the invention designs two additional instructions for the virtual machine executing the intelligent contract, namely an asynchronous external contract calling instruction CALL _ ASYNC < ID > and a waiting result calling instruction AWAIT < ID >. Wherein, ID is an integer identifier used for representing a certain external contract calling; CALL _ ASYNC < ID > represents an external contract CALL with asynchronous execution code number ID; AWAIT the result of an external contract call with the ID code. It should be noted that the CALL _ ASYNC < ID > instruction executes in a manner similar to the CALL instruction. In contrast, when the host environment receives an asynchronous external contract CALL request generated by a virtual machine of a caller contract executing a CALL _ ASYNC < ID > instruction in an intelligent contract, the execution right is immediately returned to the virtual machine executing the caller contract, and an additional thread is started to create a new virtual machine to execute the external contract. Since the CALL _ ASYNC < ID > instruction will return immediately, the caller contract may continue to execute down until the external contract invocation result must be relied upon, and the execute AWAIT < ID > instruction suspends itself, waiting for the host environment to return the external contract execution result. When the external contract is completely executed and the execution result is returned to the host environment, the host environment writes the execution result into the designated storage area and wakes up the virtual machine executing the caller contract, so that the caller contract can continue to execute downwards.
In addition, the embodiment of the invention also designs an automatic pile inserting method of the intelligent contract compiler. In the process of compiling the intelligent contract into byte codes, program statements in the method are traversed by taking the method in the contract as a unit. If the program statement comprises an external contract calling statement, whether the external contract calling result needs to be used immediately is judged according to whether the external contract calling result is temporarily stored in a certain temporary storage variable. If the external contract calling result needs to be used immediately, a stub representing synchronous calling is inserted before the program statement, otherwise, a stub representing asynchronous calling is inserted before the program statement. When the external contract can be asynchronously called, the name of the temporary storage variable is recorded, the subsequent program statement is traversed, and if the temporary storage variable with the same name is used in a certain program statement for the first time, a pile representing a 'waiting calling result' is inserted in front of the program statement. When the intelligent contract compiler compiles the contract, if a synchronous CALL pile is encountered, compiling to generate a CALL instruction; if an 'asynchronous CALL' stub is encountered, compiling to generate a CALL _ ASYNC < ID > instruction; if a "wait for call results" stub is encountered, the compile generates an AWAIT < ID > instruction. The automatic instrumentation method can ensure that the asynchronous external contract calling mode is completely transparent to the user, and the user does not need to change the original code completely.
In view of this, the following describes an implementation procedure of intelligent contract invocation in the embodiment of the present invention.
Step 1: and (6) inserting the pile.
Referring to fig. 3, fig. 3 is a schematic flow chart of pile insertion according to an embodiment of the present invention. By automatically analyzing the intelligent contract written by the user and inserting a corresponding stub into a program statement, the intelligent contract compiler is guided to compile the external contract call in the intelligent contract into an asynchronous form. Wherein, the concrete process of stake interpolation does:
(1) and reading the intelligent contract written by the user.
(2) And sequentially reading contract methods in the intelligent contracts.
(3) The initialization variable I is 1.
(4) It is checked whether I is greater than the total number of contract methods. If yes, jumping to (20); otherwise, jumping to (5).
(5) And reading program statements in the I-th contract method in sequence.
(6) The initialization variable J is 1.
(7) It is checked whether J is greater than the total number of program statements in the current method. If yes, jumping to (19); otherwise, jump to (8).
(8) Check if the J-th program statement contains an external contract invocation statement. If yes, jumping to (9); otherwise, jump to (18).
(9) It is checked whether the result of the external contract invocation is temporarily stored in a certain temporary storage variable. If yes, jumping to (11); otherwise jump to (10).
(10) And inserting a 'synchronous call' stub before the J program statement, and jumping to (18).
(11) And inserting an 'asynchronous call' stub before the J-th program statement, wherein the stub comprises an ID field and the value of the ID field is J.
(12) And recording a temporary storage variable name for temporarily storing the external contract calling result.
(13) The initialization variable K is J + 1.
(14) It is checked whether K is greater than the total number of program statements in the current method. If yes, jumping to (18); otherwise jump to (15).
(15) Check if the K program statement uses the same name temporary variable. If yes, jumping to (16); otherwise jump to (17).
(16) Before the K program statement, a 'waiting for calling result' stub is inserted, wherein the stub comprises an ID field, and the value of the ID field is J.
(17) K +1, jump to (14).
(18) J +1, jump to (7).
(19) I +1, jump to (4).
(20) And (6) ending.
Step 2: and (6) compiling the piles.
Referring to fig. 4, fig. 4 is a flowchart illustrating pile compiling according to an embodiment of the present invention. The intelligent contract compiler compiles the external contract calls in the intelligent contract into an asynchronous form by based on the stub inserted in the program statement. Wherein, the concrete process of pile compiling is as follows:
(1) and reading the intelligent contract code after the stake insertion.
(2) All program statements in the intelligent contract code are read in sequence.
(3) The initialization variable I is equal to 1.
(4) It is checked whether I is greater than the number of program statements in the intelligent contract code. If yes, jumping to (14); otherwise, jumping to (5).
(5) Check if the program statement I is a "synchronous call" stub. If yes, jumping to (6); otherwise, jump to (7).
(6) And generating a CALL instruction and jumping to (13).
(7) Check if the program statement I is an "asynchronous call" stub. If yes, jumping to (8); otherwise jump to (10).
(8) The ID field in the stub is taken out.
(9) A CALL _ ASYNC < ID > instruction is generated, jumping to (13).
(10) Check if the program statement I is the "wait for Call result" stub. If yes, jumping to (1); otherwise, jump to (13).
(11) The ID field in the stub is taken out.
(12) An AWAIT < ID > instruction is generated.
(13) I +1, jump to (4).
(14) And (6) ending.
Step 3: an asynchronous external contract CALL instruction CALL ASYNC < ID > is executed.
Referring to fig. 5, fig. 5 is a schematic flowchart illustrating an exemplary process for executing an asynchronous external contract call instruction according to an embodiment of the present invention. The virtual machine of the caller contract generates an asynchronous external contract calling request when executing an asynchronous external contract calling instruction in the intelligent contract, and sends the asynchronous external contract calling request to the host environment so that the host environment can process the asynchronous external contract calling request. The specific process for executing the asynchronous external contract calling instruction is as follows:
(1) the virtual machine of the caller contract encodes and stores the call parameters in a certain position in the memory of the virtual machine.
(2) The virtual machine of the caller contract allocates a memory area for storing the return value of the external contract.
(3) And the virtual machine of the caller contract initiates an asynchronous external contract calling request to the host environment, wherein the asynchronous external contract calling request comprises an ID (identity), an external contract address, a memory initial address where the coded calling parameter is located, the length of the coded calling parameter and a memory initial address for storing a return value.
(4) The host environment receives an asynchronous external contract invocation request.
(5) The host environment resolves the ID, the external contract address, the memory start address of the coded calling parameter, the length of the coded calling parameter and the memory start address for storing the return value from the asynchronous external contract calling request.
(6) The hosting environment creates a commitment with an identifier of ID and sets its status to "not completed".
(7) The host environment returns execution rights to the virtual machine that originated the asynchronous external contract invocation request.
(8) The host environment calls external contract bytecode according to the external contract address.
(9) The host environment starts a new thread, creates a virtual machine and executes external contract bytecode.
(10) And after the called contract is executed, returning an execution result to the host environment.
(11) The host environment closes the virtual machine executing the external contract.
(12) The host environment writes the execution result to the virtual machine executing the caller contract.
(13) The hosting environment sets the status of commitment with identifier ID to "completed".
(14) The hosting environment checks whether the virtual machine executing the caller contract is in a dormant state. If yes, jumping to (15); otherwise jump to (16).
(15) The hosting environment wakes up a virtual machine executing a caller contract.
(16) And (6) ending.
Step 4: the wait result call instruction AWAIT < ID > is executed.
Referring to fig. 6, fig. 6 is a flowchart illustrating execution of a wait for result call instruction according to an embodiment of the present invention. When the virtual machine of the caller contract executes a program statement which must depend on the external contract calling result, the virtual machine executes an AWAIT < ID > instruction to suspend the virtual machine and waits for the host environment to return the external contract execution result. And when the external contract is completely executed and the execution result is returned to the host environment, awakening the virtual machine executing the caller contract, so that the caller contract can continue to be executed downwards. The specific process of executing the waiting result calling instruction is as follows:
(1) the virtual machine of the caller contract checks whether the status of the commitment in the hosting environment, identified as ID, is "completed". If yes, jumping to (4); otherwise, jumping to (2).
(2) The virtual machine of the caller contract enables the virtual machine to enter a dormant state and wait to be awakened by the host environment.
(3) The virtual machine of the caller contract is awakened by the host environment and jumps to (1).
(4) And (6) ending.
It should be noted that, when the virtual machine of the caller contract executes the synchronous external contract CALL instruction, a synchronous intelligent contract CALL request is generated and sent to the host environment, so that the host environment processes the synchronous intelligent contract CALL request. The specific process for executing the synchronous external contract calling instruction is as follows:
a. the caller contract firstly encodes the calling parameter, stores the encoded calling parameter at a certain position in the memory, and then appoints a memory area for storing the return value of the external contract later. Then, the caller contract executes a CALL instruction through the virtual machine, and initiates a synchronous external contract calling request to the host environment, wherein the synchronous external contract calling request comprises an external contract address, a memory starting address where the coded calling parameter is located, the length of the coded calling parameter and the memory starting address for storing a return value.
b. After receiving the synchronous external contract calling request, the host environment creates a new virtual machine. And searching byte codes of the called contract according to the external contract address in the synchronous external contract calling request and loading the byte codes. The host environment then transfers the encoded call parameters passed by the caller contract into the new virtual machine, which begins executing the bytecode of the called contract.
c. And after the called contract is executed, the called contract returns the memory address and the length of the return value to the host environment, the host environment acquires the return value transmitted by the called contract according to the memory address and the length of the return value, and writes the return value into a memory area which is specified in the synchronous external contract calling request and used for storing the return value. And then the host environment closes the virtual machine executing the called contract and returns the execution right to the virtual machine where the caller contract is located, and at the moment, the external contract calling flow is ended.
The embodiment shows that the asynchronous intelligent contract calling request sent by the first virtual machine is received, and the calling response is sent to the first virtual machine; the asynchronous intelligent contract calling request is generated by a first virtual machine executing a first calling statement with an asynchronous calling identifier in a first intelligent contract; the first calling statement is used for calling a second intelligent contract; the call response is to instruct the first virtual machine to continue executing the first smart contract. And then creating a second virtual machine for executing the asynchronous intelligent contract calling request, and storing a first execution result obtained by the second virtual machine executing the asynchronous intelligent contract calling request into the first virtual machine. The host machine can immediately send the calling response to the first virtual machine when receiving the asynchronous intelligent contract calling request sent by the first virtual machine, so that the first virtual machine can continuously execute the subsequent steps of the first intelligent contract without waiting for the execution result of the asynchronous intelligent contract calling request, the execution efficiency of external intelligent contract calling can be improved, the execution cost of the external intelligent contract calling can be saved, and the problems that the execution cost of the intelligent contract is higher and the execution efficiency of the external intelligent contract calling is low due to the fact that the external intelligent contract is executed in a synchronous calling mode in the prior art can be solved.
Based on the same technical concept, fig. 7 exemplarily shows a block chain-based intelligent contract invoking apparatus, which may execute a flow of the block chain-based intelligent contract invoking method according to an embodiment of the present invention.
As shown in fig. 7, the apparatus includes:
a receiving unit 701, configured to receive an asynchronous intelligent contract invocation request sent by a first virtual machine, and send an invocation response to the first virtual machine; the asynchronous intelligent contract calling request is generated by the first virtual machine executing a first calling statement with an asynchronous calling identifier in a first intelligent contract; the first calling statement is used for calling a second intelligent contract; the call response is used for instructing the first virtual machine to continue executing the first intelligent contract;
a processing unit 702, configured to create a second virtual machine for executing the asynchronous smart contract invocation request; and storing a first execution result obtained by the second virtual machine executing the asynchronous intelligent contract calling request into the first virtual machine.
Optionally, the processing unit 702 is further configured to:
receiving a synchronous intelligent contract calling request sent by the first virtual machine; the synchronous intelligent contract calling request is generated by the first virtual machine executing a second calling statement with a synchronous calling identifier in the first intelligent contract, and the second calling statement is used for calling a third intelligent contract;
creating a third virtual machine for executing the synchronous intelligent contract invocation request;
and sending a second execution result obtained by the third virtual machine executing the synchronous intelligent contract calling request to the first virtual machine as the calling response.
Optionally, the asynchronous smart contract invocation request includes instrumentation identification;
the processing unit 702 is further configured to:
the host machine records that the state of the pile inserting identification is unfinished;
the processing unit 702 is further configured to:
and the host machine records the state of the instrumentation mark as completed.
Optionally, the receiving unit 701 is further configured to:
generating a call waiting instruction when executing a program statement with a call waiting result identifier in the first intelligent contract; the call waiting instruction is used for searching the state of the instrumentation mark corresponding to the program statement in the host machine;
and entering a dormant state when the state of the inserting mark is determined to be incomplete.
Optionally, the processing unit 702 is further configured to:
and if the first virtual machine is determined to be in the dormant state, waking up the first virtual machine.
Optionally, the processing unit 702 is specifically configured to:
for any contract method in the first intelligent contract, if the j program statement in the contract method contains the calling statement of the intelligent contract and a temporary storage variable used for storing the execution result of the calling statement exists, marking the asynchronous calling identifier and the instrumentation identifier j for the j program statement; recording the temporary storage variable; j is an integer greater than or equal to 1;
if the temporary storage variable is determined to be used in the mth program statement, marking a waiting call result identifier and a pile insertion identifier j on the mth program statement; the mth program statement is a program statement located after the jth program statement in the contract method.
Optionally, the processing unit 702 is specifically configured to:
and for any contract method in the first intelligent contract, if the k program statement in the contract method contains the calling statement of the intelligent contract and a temporary storage variable used for storing the execution result of the calling statement does not exist, marking the synchronous calling identifier for the k program statement.
Based on the same technical concept, an embodiment of the present invention provides a computing device, including:
a memory for storing a computer program;
and the processor is used for calling the computer program stored in the memory and executing the intelligent contract calling method based on the block chain according to the obtained program.
Based on the same technical concept, an embodiment of the present invention provides a computer-readable storage medium storing a computer-executable program for causing a computer to execute a blockchain-based intelligent contract calling method.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROK, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present application and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (10)

1. An intelligent contract calling method based on a block chain is characterized by comprising the following steps:
the host machine receives an asynchronous intelligent contract calling request sent by a first virtual machine and sends a calling response to the first virtual machine; the asynchronous intelligent contract calling request is generated by the first virtual machine executing a first calling statement with an asynchronous calling identifier in a first intelligent contract; the first calling statement is used for calling a second intelligent contract; the call response is used for instructing the first virtual machine to continue executing the first intelligent contract;
the host machine creates a second virtual machine used for executing the asynchronous intelligent contract calling request;
and the host machine stores a first execution result obtained by the second virtual machine executing the asynchronous intelligent contract calling request into the first virtual machine.
2. The method of claim 1, wherein the method further comprises:
the host machine receives a synchronous intelligent contract calling request sent by the first virtual machine; the synchronous intelligent contract calling request is generated by the first virtual machine executing a second calling statement with a synchronous calling identifier in the first intelligent contract, and the second calling statement is used for calling a third intelligent contract;
the host machine creates a third virtual machine for executing the synchronous intelligent contract calling request;
and the host machine sends a second execution result obtained by the third virtual machine executing the synchronous intelligent contract calling request to the first virtual machine as the calling response.
3. The method of claim 1, wherein the asynchronous smart contract invocation request includes an instrumentation identification;
before the host machine creates a second virtual machine for executing the asynchronous intelligent contract calling request, the method further comprises the following steps:
the host machine records that the state of the pile inserting identification is unfinished;
after the host machine stores a first execution result obtained by the second virtual machine executing the asynchronous intelligent contract calling request into the first virtual machine, the method further includes:
and the host machine records the state of the instrumentation mark as completed.
4. The method of claim 1, wherein after sending the call response to the first virtual machine, further comprising:
when the first virtual machine executes the program statement with the waiting calling result identification in the first intelligent contract, generating a waiting calling instruction; the call waiting instruction is used for searching the state of the instrumentation mark corresponding to the program statement in the host machine;
and the first virtual machine enters a dormant state when the state of the instrumentation mark is determined to be incomplete.
5. The method of claim 1, wherein after the host machine stores a first execution result obtained by the second virtual machine executing the asynchronous smart contract invocation request into the first virtual machine, the method further comprises:
and the host machine determines that the first virtual machine is in a dormant state, and then awakens the first virtual machine.
6. The method of any of claims 1 to 5, wherein the asynchronous call identification is obtained by:
for any contract method in the first intelligent contract, if the j program statement in the contract method contains the calling statement of the intelligent contract and a temporary storage variable used for storing the execution result of the calling statement exists, marking the asynchronous calling identifier and the instrumentation identifier j for the j program statement; recording the temporary storage variable; j is an integer greater than or equal to 1;
if the temporary storage variable is determined to be used in the mth program statement, marking a waiting call result identifier and a pile insertion identifier j on the mth program statement; the mth program statement is a program statement located after the jth program statement in the contract method.
7. The method of claim 6, wherein the synchronous call identification is obtained by:
and for any contract method in the first intelligent contract, if the k program statement in the contract method contains the calling statement of the intelligent contract and a temporary storage variable used for storing the execution result of the calling statement does not exist, marking the synchronous calling identifier for the k program statement.
8. An intelligent contract calling device based on a block chain, comprising:
the receiving unit is used for receiving an asynchronous intelligent contract calling request sent by a first virtual machine and sending a calling response to the first virtual machine; the asynchronous intelligent contract calling request is generated by the first virtual machine executing a first calling statement with an asynchronous calling identifier in a first intelligent contract; the first calling statement is used for calling a second intelligent contract; the call response is used for instructing the first virtual machine to continue executing the first intelligent contract;
the processing unit is used for creating a second virtual machine used for executing the asynchronous intelligent contract calling request; and storing a first execution result obtained by the second virtual machine executing the asynchronous intelligent contract calling request into the first virtual machine.
9. A computing device, comprising:
a memory for storing a computer program;
a processor for calling a computer program stored in said memory, for executing the method of any one of claims 1 to 7 in accordance with the obtained program.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer-executable program for causing a computer to execute the method of any one of claims 1 to 7.
CN202011404300.8A 2020-12-03 2020-12-03 Intelligent contract calling method and device based on blockchain Active CN112487092B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011404300.8A CN112487092B (en) 2020-12-03 2020-12-03 Intelligent contract calling method and device based on blockchain

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011404300.8A CN112487092B (en) 2020-12-03 2020-12-03 Intelligent contract calling method and device based on blockchain

Publications (2)

Publication Number Publication Date
CN112487092A true CN112487092A (en) 2021-03-12
CN112487092B CN112487092B (en) 2024-06-18

Family

ID=74939282

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011404300.8A Active CN112487092B (en) 2020-12-03 2020-12-03 Intelligent contract calling method and device based on blockchain

Country Status (1)

Country Link
CN (1) CN112487092B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113378240A (en) * 2021-06-23 2021-09-10 浪潮云信息技术股份公司 Synchronous calling user identity authentication method based on block chain
CN114547191A (en) * 2022-01-28 2022-05-27 上海树图区块链研究院 Method and system for asynchronously executing intelligent contracts by block chain virtual machine and P2P network
CN114979165A (en) * 2022-05-18 2022-08-30 杭州顶天网络有限公司 Contract interaction method based on block chain

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109146679A (en) * 2018-06-29 2019-01-04 阿里巴巴集团控股有限公司 Intelligent contract call method and device, electronic equipment based on block chain
CN110263536A (en) * 2019-06-21 2019-09-20 深圳前海微众银行股份有限公司 The monitoring method and device of intelligent contract in a kind of block chain
US20200004737A1 (en) * 2018-06-27 2020-01-02 Alibaba Group Holding Limited Blockchain-based smart contract invocation method and apparatus, and electronic device
CN111176791A (en) * 2019-12-31 2020-05-19 杭州趣链科技有限公司 Cross-virtual machine calling method based on multi-virtual machine blockchain platform
CN111736954A (en) * 2020-06-24 2020-10-02 陈鹏 Multi-intelligent contract virtual machine implementation method, multi-intelligent contract virtual machine and system
US20200342449A1 (en) * 2019-04-29 2020-10-29 Salesforce.Com, Inc. Systems, methods, and apparatuses for implementing an api gateway to authorize and charge a fee for a transaction between cloud computing customers using distributed ledger technologies (dlt)

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200004737A1 (en) * 2018-06-27 2020-01-02 Alibaba Group Holding Limited Blockchain-based smart contract invocation method and apparatus, and electronic device
CN109146679A (en) * 2018-06-29 2019-01-04 阿里巴巴集团控股有限公司 Intelligent contract call method and device, electronic equipment based on block chain
US20200342449A1 (en) * 2019-04-29 2020-10-29 Salesforce.Com, Inc. Systems, methods, and apparatuses for implementing an api gateway to authorize and charge a fee for a transaction between cloud computing customers using distributed ledger technologies (dlt)
CN110263536A (en) * 2019-06-21 2019-09-20 深圳前海微众银行股份有限公司 The monitoring method and device of intelligent contract in a kind of block chain
CN111176791A (en) * 2019-12-31 2020-05-19 杭州趣链科技有限公司 Cross-virtual machine calling method based on multi-virtual machine blockchain platform
CN111736954A (en) * 2020-06-24 2020-10-02 陈鹏 Multi-intelligent contract virtual machine implementation method, multi-intelligent contract virtual machine and system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
朱岩;王静;郭倩;刘国伟;: "基于区块链的智能合约技术研究进展", 网络空间安全, no. 09, 16 September 2020 (2020-09-16), pages 23 - 28 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113378240A (en) * 2021-06-23 2021-09-10 浪潮云信息技术股份公司 Synchronous calling user identity authentication method based on block chain
CN114547191A (en) * 2022-01-28 2022-05-27 上海树图区块链研究院 Method and system for asynchronously executing intelligent contracts by block chain virtual machine and P2P network
CN114979165A (en) * 2022-05-18 2022-08-30 杭州顶天网络有限公司 Contract interaction method based on block chain
CN114979165B (en) * 2022-05-18 2024-05-07 杭州顶天网络有限公司 Contract interaction method based on blockchain

Also Published As

Publication number Publication date
CN112487092B (en) 2024-06-18

Similar Documents

Publication Publication Date Title
CN112487092B (en) Intelligent contract calling method and device based on blockchain
CN111770113B (en) Method for executing intelligent contract, block chain node and node equipment
CN101421711B (en) Virtual execution system for resource-constrained devices
CN109766124A (en) Business development method, apparatus, computer equipment and storage medium
CN111768183B (en) Method for executing intelligent contract, block chain node and storage medium
CN110399184B (en) Method and device for executing intelligent contracts in block chain
CN111770202B (en) Method for executing intelligent contract, block chain node and storage medium
CN109614325A (en) A kind of method and device, electronic equipment and the storage medium of determining control property
CN111625225A (en) Program specified data output method and device
US7228527B1 (en) Method and system for structuring a procedure
CN113220326A (en) Intelligent contract upgrading method and block chain system
CN112711462A (en) Cloud platform virtual CPU hot binding method and device and computer readable storage medium
CN114610516B (en) Application program repairing method and device, computer equipment and storage medium
CN113220327B (en) Intelligent contract upgrading method and block chain system
US9898268B2 (en) Enhanced local commoning
CN107728785A (en) Robot interactive method and its system
CN110874214B (en) Function calling method and device, electronic equipment and storage medium
CN114416031A (en) Operating system for supporting RISC-V processor facing AIoT scene
CN106055322A (en) Flow scheduling method and device
CN113360184B (en) Multi-ecological software migration method and device, computer equipment and storage medium
CN115794260B (en) Simple dynamic loading method for DSP software library
CN113760379B (en) Method and device for adding parameters in published program
CN118509159A (en) Intelligent contract acceleration execution method and device based on just-in-time compiling
KR100703285B1 (en) Method for dynamic service using management execution control information repository in exchange system
CN115618239A (en) Management method, system, terminal and medium for deep learning framework training

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
GR01 Patent grant
GR01 Patent grant