CN112819464A - Intelligent contract processing method, processing device, terminal equipment and storage medium - Google Patents

Intelligent contract processing method, processing device, terminal equipment and storage medium Download PDF

Info

Publication number
CN112819464A
CN112819464A CN202110076962.5A CN202110076962A CN112819464A CN 112819464 A CN112819464 A CN 112819464A CN 202110076962 A CN202110076962 A CN 202110076962A CN 112819464 A CN112819464 A CN 112819464A
Authority
CN
China
Prior art keywords
contract
executed
block chain
execution
blockchain
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
CN202110076962.5A
Other languages
Chinese (zh)
Other versions
CN112819464B (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.)
Shenzhen Tianqi Xuda Technology Co ltd
Original Assignee
Shenzhen Tianqi Xuda Technology 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 Shenzhen Tianqi Xuda Technology Co ltd filed Critical Shenzhen Tianqi Xuda Technology Co ltd
Priority to CN202110076962.5A priority Critical patent/CN112819464B/en
Publication of CN112819464A publication Critical patent/CN112819464A/en
Application granted granted Critical
Publication of CN112819464B publication Critical patent/CN112819464B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/381Currency conversion
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/04Payment circuits
    • G06Q20/06Private payment circuits, e.g. involving electronic currency used among participants of a common payment scheme
    • G06Q20/065Private payment circuits, e.g. involving electronic currency used among participants of a common payment scheme using e-cash
    • G06Q20/0655Private payment circuits, e.g. involving electronic currency used among participants of a common payment scheme using e-cash e-cash managed centrally

Landscapes

  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Strategic Management (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The application is applicable to the technical field of block chains, and provides an intelligent contract processing method, a processing device, terminal equipment and a storage medium, wherein the method comprises the following steps: receiving an execution contract request sent by a node of a first block chain, wherein the execution contract request comprises target information of a contract to be executed and a first preset number of first digital assets, the first digital assets are legal assets of the first block chain, and the contract to be executed is located on a second block chain; exchanging the first digital assets of the first preset quantity into second digital assets through a target gateway of the second block chain, wherein the second digital assets are legal assets of the second block chain; and executing the contract to be executed according to the target information of the contract to be executed and the second digital asset to obtain an execution result of the contract to be executed. The method and the device can solve the problems of centralization and low transaction efficiency in the cross-chain technology to a certain extent.

Description

Intelligent contract processing method, processing device, terminal equipment and storage medium
Technical Field
The application belongs to the field of block chains, and particularly relates to an intelligent contract processing method, a processing device, a terminal device and a storage medium.
Background
Smart contracts are a computerized protocol for propagating, validating or executing contracts in an informational manner that allows trusted transactions to be conducted without a third party and that are not traceable and at the same time are irreversible.
The block chain has the characteristics of centralization, non-tampering and the like. Thus, intelligent contracts are typically implemented through blockchains. For example, intelligent contracts are implemented through etherhouses.
Corresponding currency is needed when the intelligent contract is executed. For example, when smart contracts are deployed on an ethernet house, the ethernet house currency is required to drive the execution of the smart contracts. When the user is not in the same chain with the intelligent contract, the user needs to exchange the currency of the user into the currency corresponding to the block chain where the intelligent contract is located through a chain crossing technology, and then the user drives the execution of the intelligent contract.
For example, the block chain where the user is located is an a chain, and the block chain where the intelligent contract is located is a B chain, the user needs to exchange the a coin (the currency type corresponding to the a chain) into the C coin (the currency type corresponding to the C chain, at this time, the C chain is an intermediate node) through the gateway of the C chain, then the C coin is exchanged into the B coin through the gateway of the C chain, and finally the B coin is used to execute the intelligent contract.
However, the intermediate node is a centralized blockchain, and the credibility thereof is not guaranteed. In addition, the exchange of currency is performed twice, and the exchange of the currency of the intermediate node into the currency corresponding to the intelligent contract always has delay, so that the time for executing the intelligent contract is long, and the transaction efficiency is low.
Disclosure of Invention
The embodiment of the application provides an intelligent contract processing method, a processing device, a terminal device and a storage medium, and can solve the problems of centralization and low transaction efficiency in a cross-chain technology to a certain extent.
In a first aspect, an embodiment of the present application provides an intelligent contract processing method, which is applied to a node of a second blockchain, and includes:
receiving an execution contract request sent by a node of a first block chain, wherein the execution contract request comprises target information of a contract to be executed and a first preset number of first digital assets, the first digital assets are legal assets of the first block chain, and the contract to be executed is located on a second block chain;
exchanging the first digital assets of the first preset quantity into second digital assets through the target gateways of the second block chain, wherein the second digital assets are legal assets of the second block chain;
and executing the contract to be executed according to the target information of the contract to be executed and the second digital asset to obtain an execution result of the contract to be executed.
In a second aspect, an embodiment of the present application provides an intelligent contract processing apparatus, which is applied to a node of a second blockchain, and includes:
a request receiving module, configured to receive a contract execution request sent by a node of a first block chain, where the contract execution request includes target information of a contract to be executed and a first preset number of first digital assets, where the first digital assets are legal assets of the first block chain, and the contract to be executed is located on a second block chain;
the asset exchange module is used for exchanging the first digital assets of the first preset quantity into second digital assets through a target gateway of a second block chain, and the second digital assets are legal assets of the second block chain;
and the contract execution module is used for executing the contract to be executed according to the target information of the contract to be executed and the second digital asset to obtain the execution result of the contract to be executed.
In a third aspect, an embodiment of the present application provides a terminal device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the steps of the method according to the first aspect when executing the computer program.
In a fourth aspect, the present application provides a computer-readable storage medium, which stores a computer program, and the computer program implements the steps of the method according to the first aspect when executed by a processor.
In a fifth aspect, an embodiment of the present application provides a computer program product, which, when running on a terminal device, causes the terminal device to execute the intelligent contract processing method according to any one of the first aspect.
It is understood that the beneficial effects of the second aspect to the fifth aspect can be referred to the related description of the first aspect, and are not described herein again.
Compared with the prior art, the embodiment of the application has the advantages that:
the application provides an intelligent contract processing method, which comprises the steps of firstly, receiving a contract execution request sent by a node of a first block chain, wherein the contract execution request comprises target information of a contract to be executed and a first preset number of first digital assets, the first digital assets are legal assets of the first block chain, and the contract to be executed is positioned on a second block chain. And then the first digital assets with the first preset quantity are converted into second digital assets through the target gateways of the second block chain, and the second digital assets are legal assets of the second block chain. And finally, executing the contract to be executed according to the target information of the contract to be executed and the second digital asset to obtain an execution result of the contract to be executed. Because the target gateway and the contract to be executed are both arranged on the second block chain, only one-time asset exchange is needed, and the second-time asset exchange does not exist, the contract execution time is reduced, and the transaction efficiency is improved. And, at this moment, the second blockchain is the blockchain that the intelligent contract belongs to, and is not the intermediate node, thereby the problem of centralization has been solved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
FIG. 1 is a schematic flow chart diagram illustrating an intelligent contract processing method according to an embodiment of the present application;
fig. 2 is a schematic structural diagram of an intelligent contract processing apparatus according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of a terminal device according to an embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It should also be understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
As used in this specification and the appended claims, the term "if" may be interpreted contextually as "when", "upon" or "in response to" determining "or" in response to detecting ". Similarly, the phrase "if it is determined" or "if a [ described condition or event ] is detected" may be interpreted contextually to mean "upon determining" or "in response to determining" or "upon detecting [ described condition or event ]" or "in response to detecting [ described condition or event ]".
Furthermore, in the description of the present application and the appended claims, the terms "first," "second," "third," and the like are used for distinguishing between descriptions and not necessarily for describing or implying relative importance.
Reference throughout this specification to "one embodiment" or "some embodiments," or the like, means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the present application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," or the like, in various places throughout this specification are not necessarily all referring to the same embodiment, but rather "one or more but not all embodiments" unless specifically stated otherwise. The terms "comprising," "including," "having," and variations thereof mean "including, but not limited to," unless expressly specified otherwise.
In order to explain the technical solution described in the present application, the following description will be given by way of specific examples.
Example one
In the following, an intelligent contract processing method provided in an embodiment of the present application is described, where the method is applied to a node of a second blockchain, and please refer to fig. 1, where the method includes:
step S101, receiving a contract execution request sent by a node of a first block chain, wherein the contract execution request comprises target information of a contract to be executed and a first preset number of first digital assets, the first digital assets are legal assets of the first block chain, and the contract to be executed is located on a second block chain.
In step S101, the node of the first blockchain and the node of the second blockchain refer to the terminal devices of the contracting parties. For example, a node of the first blockchain refers to a computer of the contracting party a, and a node of the second blockchain refers to a computer of the contracting party B. The target information refers to relevant information of the contract to be executed, such as the name, number and execution parameters of the contract to be executed.
When a contract to be executed needs to be executed, a node of the first blockchain sends an execution contract request to a node of the second blockchain, and the node of the second blockchain receives the execution contract request.
And step S102, converting the first digital assets of the first preset quantity into second digital assets through the target gateways of the second block chain, wherein the second digital assets are legal assets of the second block chain.
In step S102, since the statutory asset of the first blockchain is the first digital asset, the close to be executed is on the second blockchain. Therefore, when a node of the second blockchain receives a contract execution request, the node of the second blockchain needs to convert the first digital assets of the first preset quantity into the second digital assets through the target gateway of the second blockchain, and then the second digital assets can be used for driving the execution of the contract to be executed.
And step S103, executing the contract to be executed according to the target information of the contract to be executed and the second digital asset to obtain an execution result of the contract to be executed.
In step S103, when the first digital assets of the first preset number are exchanged into the second digital assets, the nodes of the second block chain execute the contract to be executed according to the target information of the contract to be executed and the second digital assets, so as to obtain the execution result of the contract to be executed.
In some possible implementation manners, the target information of the contract to be executed comprises a target identification of the contract to be executed and an execution parameter of the contract to be executed; correspondingly, executing the contract to be executed on the second block chain according to the target information of the contract to be executed and the second digital asset to obtain an execution result of the contract to be executed, wherein the execution result comprises: searching a storage address corresponding to a target identifier of a contract to be executed in a second block chain; sending the storage address, the execution parameters of the contract to be executed and the second digital assets to a virtual machine of a second block chain to indicate the virtual machine of the second block chain to search for the contract state of the contract to be executed according to the storage address, and executing the contract to be executed according to the execution parameters of the contract to be executed, the contract state and the second digital assets to obtain the execution result of the contract to be executed; and receiving an execution result sent by the virtual machine of the second blockchain.
In this implementation manner, the target information of the contract to be executed includes a target identifier of the contract to be executed and an execution parameter of the contract to be executed. And after the first digital assets with the first preset quantity are converted into the second digital assets by the nodes of the second block chain, searching a storage address corresponding to a target identifier of a contract to be executed in the second block chain. And then the node of the second block chain sends the storage address, the execution parameter of the contract to be executed and the second digital asset to the virtual machine of the second block chain. And the virtual machine of the second block chain searches the contract state of the contract to be executed according to the storage address, executes the contract to be executed according to the execution parameter of the contract to be executed, the contract state and the second digital asset to obtain the execution result of the contract to be executed, and sends the execution result to the node of the second block chain. The nodes of the second blockchain thus receive the execution results.
In some embodiments, the execution result includes a new contract state; after receiving the execution result sent by the virtual machine of the second blockchain, the method further comprises the following steps: and storing the storage address of the new contract state in the execution result and the target identification in association in the second block chain.
In this embodiment, the execution result includes the new contract status after the contract to be executed is executed. And after obtaining the execution result of the contract to be executed, the virtual machine of the second block chain stores the new contract state in the execution result, and the storage address of the new contract and the execution result are sent to the node of the second block chain. And after the node of the second block chain receives the result, the storage address of the new contract state in the execution result and the target identification are stored in the second block chain in an associated manner. It should be understood that the execution contract request may also be stored in the second blockchain.
In some embodiments, before receiving the execution contract request sent by the node of the first blockchain, the method further includes: receiving a contract deployment request, wherein the contract deployment request comprises byte codes of a contract to be executed and a second preset number of second digital assets; the bytecode for the contract to be executed is deployed on a second blockchain, and a second preset amount of second digital assets is paid out.
In this embodiment, the deployment contract request includes bytecode of the contract to be executed and a second preset number of second digital assets. The nodes of the second blockchain first receive a deployment contract request. The bytecode of the contract to be executed is then deployed on a second blockchain and a second preset amount of second digital assets is paid for. It should be noted that, in order to facilitate maintenance of the contract to be executed on the second blockchain, the synchronization method used by the nodes of the second blockchain in the process of deploying the bytecode of the contract to be executed on the second blockchain is a sequential synchronization and full synchronization method, that is, the bytecode of the contract to be executed on the nodes of the second blockchain is synchronized to other nodes of the second blockchain by using the sequential synchronization and full synchronization method.
In some possible implementations, the method further includes: and generating a target identification of the contract to be executed. Accordingly, deploying bytecode of the contract to be executed on the second blockchain and paying for the second digital asset includes: sending the byte codes of the contracts to be executed and the second digital assets to the virtual machine of the second block chain to indicate the virtual machine of the second block chain to run the byte codes of the contracts to be executed to obtain contract states, and storing the contract states to obtain storage addresses of the contract states; a memory address of the contract state is received and stored in the second blockchain in association with the target identification.
In this implementation, the virtual machine of the second block chain runs the bytecode of the contract to be executed, and the contract state is obtained. The contract state comprises participant variables of the contract to be executed, a function entry address table, a global variable table, a static variable table and the like. And then, the virtual machine of the second block chain stores the contract state to obtain a storage address of the contract state, and sends the storage address of the contract state to the node of the second block chain. And after receiving the storage address of the contract state, the node of the second block chain stores the storage address of the contract state and the target identification in the second block chain in an associated manner.
A specific application scenario of the present application is described below.
The first block chain is a bit coin block chain, the second block chain is a Raymond coin block chain, the third block chain is an Ethernet workshop, a contract to be executed is on the Ethernet workshop, and the block chain where the user A is located is the first block chain. Conventionally, when the user a wants to drive the execution of a contract to be executed, it is necessary to exchange the bitcoin for the rem coin, the rem coin for the ethernet coin, and finally, the ethernet coin is used to drive the execution of the contract to be executed. At this point, the second blockchain is the central node and there are two asset redemptions. In the present application, the contract to be executed is bound to the second block chain, and when the user a wants to drive the execution of the contract to be executed, a contract request to be executed is sent through the node of the first block chain. And then the node of the second block chain exchanges the bit coins into the Rebo coins, and finally the contract to be executed can be executed according to the contract to be executed request and the Rebo coins.
In summary, the present application provides an intelligent contract processing method, which includes receiving a contract execution request sent by a node of a first block chain, where the contract execution request includes target information of a contract to be executed and a first preset number of first digital assets, the first digital assets are legal assets of the first block chain, and the contract to be executed is located on a second block chain. And then the first digital assets with the first preset quantity are converted into second digital assets through the target gateways of the second block chain, and the second digital assets are legal assets of the second block chain. And finally, executing the contract to be executed according to the target information of the contract to be executed and the second digital asset to obtain an execution result of the contract to be executed. Because the target gateway and the contract to be executed are both arranged on the second block chain, only one-time asset exchange is needed, and the second-time asset exchange does not exist, the contract execution time is reduced, and the transaction efficiency is improved. And, at this moment, the second blockchain is the blockchain that the intelligent contract belongs to, and is not the intermediate node, thereby the problem of centralization has been solved.
Moreover, the current contracts to be executed are all deployed on the third block chain, and when a plurality of contract execution requests are received, the contracts to be executed can only be executed in sequence, so that the execution time is long, and the efficiency is low. In the application, each second block chain for deploying each contract to be executed can be linked, so that each contract to be executed can be executed simultaneously, the execution time of the contract to be executed is further reduced, and the transaction efficiency is improved.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
Example two
Fig. 2 shows an example of an intelligent contract processing apparatus, which is applied to a node of the second blockchain, and only a part related to the embodiment of the present application is shown for convenience of explanation. The apparatus 200 comprises:
the contract execution module 201 is configured to receive a contract execution request sent by a node of a first blockchain, where the contract execution request includes target information of a contract to be executed and a first preset number of first digital assets, the first digital assets are legal assets of the first blockchain, and the contract to be executed is located on a second blockchain.
And the asset exchange module 202 is configured to exchange the first digital assets of the first preset number into second digital assets through the target gateways of the second blockchain, where the second digital assets are legal assets of the second blockchain.
And the contract execution module 203 is configured to execute the contract to be executed according to the target information of the contract to be executed and the second digital asset, so as to obtain an execution result of the contract to be executed.
Optionally, the target information of the contract to be executed includes a target identifier of the contract to be executed and an execution parameter of the contract to be executed.
Accordingly, the contract execution module 203 is specifically configured to execute:
searching a storage address corresponding to a target identifier of a contract to be executed in a second block chain;
sending the storage address, the execution parameters of the contract to be executed and the second digital assets to a virtual machine of a second block chain to indicate the virtual machine of the second block chain to search for the contract state of the contract to be executed according to the storage address, and executing the contract to be executed according to the execution parameters of the contract to be executed, the contract state and the second digital assets to obtain the execution result of the contract to be executed;
and receiving an execution result sent by the virtual machine of the second blockchain.
Optionally, the execution result includes a new contract state.
Accordingly, the intelligent contract processing apparatus 200 further includes:
and the storage module is used for storing the storage address of the new contract state in the execution result and the target identification in the second block chain in an associated manner.
It should be noted that, for the information interaction, execution process, and other contents between the above-mentioned devices/units, the specific functions and technical effects thereof are based on the same concept as those of the method embodiment of the present application, and specific reference may be made to a part of the method embodiment, which is not described herein again.
EXAMPLE III
Fig. 3 is a schematic diagram of a terminal device provided in the third embodiment of the present application. As shown in fig. 3, the terminal device 300 of this embodiment includes: a processor 301, a memory 302, and a computer program 303 stored in the memory 302 and operable on the processor 301. The processor 301 implements the steps of the above-described method embodiments when executing the computer program 303. Alternatively, the processor 301 implements the functions of the modules/units in the device embodiments when executing the computer program 303.
Illustratively, the computer program 303 may be divided into one or more modules/units, which are stored in the memory 302 and executed by the processor 301 to complete the present application. The one or more modules/units may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution process of the computer program 303 in the terminal device 300. For example, the computer program 303 may be divided into a request receiving module, an asset conversion module, and a contract execution module, and each module has the following specific functions:
receiving an execution contract request sent by a node of a first block chain, wherein the execution contract request comprises target information of a contract to be executed and a first preset number of first digital assets, the first digital assets are legal assets of the first block chain, and the contract to be executed is located on a second block chain;
exchanging the first digital assets of the first preset quantity into second digital assets through a target gateway of the second block chain, wherein the second digital assets are legal assets of the second block chain;
and executing the contract to be executed according to the target information of the contract to be executed and the second digital asset to obtain an execution result of the contract to be executed.
The terminal device may include, but is not limited to, a processor 301 and a memory 302. Those skilled in the art will appreciate that fig. 3 is merely an example of the terminal device 300 and does not constitute a limitation of the terminal device 300 and may include more or less components than those shown, or combine certain components, or different components, for example, the terminal device may further include input and output devices, network access devices, buses, etc.
The Processor 301 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware card, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The storage 302 may be an internal storage unit of the terminal device 300, such as a hard disk or a memory of the terminal device 300. The memory 302 may also be an external storage device of the terminal device 300, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the terminal device 300. Further, the memory 302 may include both an internal storage unit and an external storage device of the terminal device 300. The memory 302 is used for storing the computer programs and other programs and data required by the terminal device. The memory 302 may also be used to temporarily store data that has been output or is to be output.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned functions may be distributed as different functional units and modules according to needs, that is, the internal structure of the apparatus may be divided into different functional units or modules to implement all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus/terminal device and method may be implemented in other ways. For example, the above-described embodiments of the apparatus/terminal device are merely illustrative, and for example, the division of the above modules or units is only one logical function division, and there may be other division manners in actual implementation, for example, a plurality of units or plug-ins may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated modules/units described above, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. Based on such understanding, all or part of the processes in the above method embodiments may be implemented by a computer program, which may be stored in a computer readable storage medium and executed by a processor, so as to implement the steps of the above method embodiments. The computer program includes computer program code, and the computer program code may be in a source code form, an object code form, an executable file or some intermediate form. The computer readable medium may include: any entity or device capable of carrying the above-mentioned computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signal, telecommunication signal, software distribution medium, etc. It should be noted that the computer readable medium described above may include content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media that does not include electrical carrier signals and telecommunications signals in accordance with legislation and patent practice.
The above embodiments are only used for illustrating the technical solutions 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 by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present application and are intended to be included within the scope of the present application.

Claims (10)

1. An intelligent contract processing method applied to a node of a second blockchain comprises the following steps:
receiving an execution contract request sent by a node of a first block chain, wherein the execution contract request comprises target information of a contract to be executed and a first preset number of first digital assets, the first digital assets are legal assets of the first block chain, and the contract to be executed is located on a second block chain;
exchanging the first digital assets of the first preset quantity into second digital assets through a target gateway of the second block chain, wherein the second digital assets are legal assets of the second block chain;
and executing the contract to be executed according to the target information of the contract to be executed and the second digital asset to obtain an execution result of the contract to be executed.
2. The intelligent contract processing method according to claim 1, wherein the target information of the contract to be executed includes a target identification of the contract to be executed and an execution parameter of the contract to be executed;
correspondingly, executing the to-be-executed contract on the second blockchain according to the target information of the to-be-executed contract and the second digital asset to obtain an execution result of the to-be-executed contract, including:
searching a storage address corresponding to the target identifier of the contract to be executed in the second block chain;
sending the storage address, the execution parameter of the contract to be executed and the second digital asset to a virtual machine of the second block chain to indicate the virtual machine of the second block chain to search for a contract state of the contract to be executed according to the storage address, and executing the contract to be executed according to the execution parameter of the contract to be executed, the contract state and the second digital asset to obtain an execution result of the contract to be executed;
and receiving the execution result sent by the virtual machine of the second blockchain.
3. The intelligent contract processing method of claim 2 wherein the execution results include new contract status;
after the receiving the execution result sent by the virtual machine of the second blockchain, further comprising:
and storing the storage address of the new contract state in the execution result and the target identification in the second block chain in an associated mode.
4. The intelligent contract processing method according to claim 1, wherein before said receiving an execution contract request sent by a node of the first blockchain, comprising:
receiving a deployment contract request, wherein the deployment contract request comprises byte codes of the contract to be executed and a second preset number of second digital assets;
deploying the bytecode of the contract to be executed on the second blockchain, and paying the second preset number of second digital assets.
5. The intelligent contract processing method of claim 4, further comprising:
generating a target identification of the contract to be executed;
accordingly, the deploying bytecode of the contract to be executed on the second blockchain and paying the second digital asset includes:
sending the bytecode of the contract to be executed and the second digital asset to the virtual machine of the second block chain to indicate the virtual machine of the second block chain to run the bytecode of the contract to be executed to obtain the contract state, and storing the contract state to obtain a storage address of the contract state;
and receiving the storage address of the contract state, and storing the storage address of the contract state and the target identification association in the second block chain.
6. An intelligent contract processing apparatus, applied to a node of a second blockchain, comprising:
a request receiving module, configured to receive a contract execution request sent by a node of a first blockchain, where the contract execution request includes target information of a contract to be executed and a first preset number of first digital assets, where the first digital assets are legal assets of the first blockchain, and the contract to be executed is located on a second blockchain;
the asset exchange module is used for exchanging the first digital assets of the first preset quantity into second digital assets through a target gateway of a second block chain, wherein the second digital assets are legal assets of the second block chain;
and the contract execution module is used for executing the contract to be executed according to the target information of the contract to be executed and the second digital asset to obtain the execution result of the contract to be executed.
7. The intelligent contract processing apparatus of claim 6, wherein the target information of the contract to be executed comprises a target identification of the contract to be executed and an execution parameter of the contract to be executed;
correspondingly, the contract execution module is specifically configured to execute:
searching a storage address corresponding to the target identifier of the contract to be executed in the second block chain;
sending the storage address, the execution parameter of the contract to be executed and the second digital asset to a virtual machine of the second block chain to indicate the virtual machine of the second block chain to search for a contract state of the contract to be executed according to the storage address, and executing the contract to be executed according to the execution parameter of the contract to be executed, the contract state and the second digital asset to obtain an execution result of the contract to be executed;
and receiving the execution result sent by the virtual machine of the second blockchain.
8. The intelligent contract processing apparatus of claim 7 wherein the execution results include new contract status;
correspondingly, the intelligent contract processing device further comprises:
and the storage module is used for storing the storage address of the new contract state in the execution result and the target identification in the second block chain in an associated manner.
9. A terminal device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the method according to any of claims 1-5 when executing the computer program.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1-5.
CN202110076962.5A 2021-01-20 2021-01-20 Intelligent contract processing method, processing device, terminal equipment and storage medium Active CN112819464B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110076962.5A CN112819464B (en) 2021-01-20 2021-01-20 Intelligent contract processing method, processing device, terminal equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110076962.5A CN112819464B (en) 2021-01-20 2021-01-20 Intelligent contract processing method, processing device, terminal equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112819464A true CN112819464A (en) 2021-05-18
CN112819464B CN112819464B (en) 2023-11-21

Family

ID=75858804

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110076962.5A Active CN112819464B (en) 2021-01-20 2021-01-20 Intelligent contract processing method, processing device, terminal equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112819464B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115617918A (en) * 2022-12-19 2023-01-17 深圳百纳维科技有限公司 Method, device and system for operating piece-wise intelligent contract and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106960388A (en) * 2017-03-01 2017-07-18 中钞信用卡产业发展有限公司北京智能卡技术研究院 The method and apparatus of the digital asset circulation of transregional piece of chain
CN108665249A (en) * 2018-05-18 2018-10-16 北京三六五八网络科技有限公司 Digital asset processing method and processing device
CN109146448A (en) * 2018-07-13 2019-01-04 杭州复杂美科技有限公司 Across chain assets transfer method, equipment and storage medium
US10298585B1 (en) * 2018-01-26 2019-05-21 Accenture Global Solutions Limited Blockchain interoperability
CN111213168A (en) * 2019-09-11 2020-05-29 阿里巴巴集团控股有限公司 System and method for digital asset transfer

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106960388A (en) * 2017-03-01 2017-07-18 中钞信用卡产业发展有限公司北京智能卡技术研究院 The method and apparatus of the digital asset circulation of transregional piece of chain
US10298585B1 (en) * 2018-01-26 2019-05-21 Accenture Global Solutions Limited Blockchain interoperability
CN108665249A (en) * 2018-05-18 2018-10-16 北京三六五八网络科技有限公司 Digital asset processing method and processing device
CN109146448A (en) * 2018-07-13 2019-01-04 杭州复杂美科技有限公司 Across chain assets transfer method, equipment and storage medium
CN111213168A (en) * 2019-09-11 2020-05-29 阿里巴巴集团控股有限公司 System and method for digital asset transfer

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115617918A (en) * 2022-12-19 2023-01-17 深圳百纳维科技有限公司 Method, device and system for operating piece-wise intelligent contract and storage medium

Also Published As

Publication number Publication date
CN112819464B (en) 2023-11-21

Similar Documents

Publication Publication Date Title
CN110288345B (en) Cross-link communication method, device, main chain node and storage medium
CN109064334B (en) Intelligent contract accounting method, computer device and readable storage medium
CN112862612B (en) Method and device for transmitting resources across chains
CN108846659B (en) Block chain-based transfer method and device and storage medium
CN110601880B (en) Cloud platform, service processing method, command interface and computer equipment
CN110517145B (en) Data transaction method based on multi-block chain and related equipment
CN112765268A (en) Block chain-based data privacy protection method, device and equipment
CN110930152B (en) Data processing method based on block chain and related equipment
CN110659905B (en) Transaction verification method, device, terminal equipment and storage medium
CN112087502A (en) Method, device and equipment for processing request and storage medium
CN112733206A (en) Resource allocation method, device, server and medium
CN112819464A (en) Intelligent contract processing method, processing device, terminal equipment and storage medium
CN112632619A (en) Cross-link certificate storage method and device, terminal equipment and storage medium
WO2021218345A1 (en) Blockchain-based data processing method and apparatus, and terminal and storage medium
CN112269915B (en) Service processing method, device, equipment and storage medium
CN115619395A (en) Data processing method based on block chain and related equipment
CN111210345B (en) Signature method and device based on block chain network transaction and terminal equipment
CN116029825B (en) Block chain transaction method, device and system, electronic equipment and storage medium
CN112740250A (en) Block chain-based digital currency transaction method, device and system
CN115085909A (en) Random number generation method, device, computer equipment and medium
CN113760909A (en) Method and system for cross-chain transaction and verification based on UTXO
CN113781043A (en) Block chain-based currency transaction method and device and electronic equipment
JP2021149506A (en) Information processor, information processing method and program
CN110458701A (en) A kind of data processing method, device, block chain node device and medium
CN111275549A (en) Block chain-based digital currency transaction method and related 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
GR01 Patent grant
GR01 Patent grant