CN112583585B - Transaction execution method, apparatus and storage medium - Google Patents

Transaction execution method, apparatus and storage medium Download PDF

Info

Publication number
CN112583585B
CN112583585B CN202011425291.0A CN202011425291A CN112583585B CN 112583585 B CN112583585 B CN 112583585B CN 202011425291 A CN202011425291 A CN 202011425291A CN 112583585 B CN112583585 B CN 112583585B
Authority
CN
China
Prior art keywords
intelligent contract
transaction
module
chain
link
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.)
Active
Application number
CN202011425291.0A
Other languages
Chinese (zh)
Other versions
CN112583585A (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.)
Nanjing Benchain Information Technology Co ltd
Hangzhou Fuzamei Technology Co Ltd
Original Assignee
Nanjing Benchain Information Technology Co ltd
Hangzhou Fuzamei 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 Nanjing Benchain Information Technology Co ltd, Hangzhou Fuzamei Technology Co Ltd filed Critical Nanjing Benchain Information Technology Co ltd
Priority to CN202011425291.0A priority Critical patent/CN112583585B/en
Publication of CN112583585A publication Critical patent/CN112583585A/en
Priority to PCT/CN2021/111853 priority patent/WO2022121347A1/en
Application granted granted Critical
Publication of CN112583585B publication Critical patent/CN112583585B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0816Key establishment, i.e. cryptographic processes or cryptographic protocols whereby a shared secret becomes available to two or more parties, for subsequent use
    • H04L9/0819Key transport or distribution, i.e. key establishment techniques where one party creates or otherwise obtains a secret value, and securely transfers it to the other(s)
    • 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/382Payment protocols; Details thereof insuring higher security of transaction
    • 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/40Authorisation, e.g. identification of payer or payee, verification of customer or shop credentials; Review and approval of payers, e.g. check credit lines or negative lists
    • G06Q20/401Transaction verification
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/30Public key, i.e. encryption algorithm being computationally infeasible to invert or user's encryption keys not requiring secrecy

Abstract

The invention provides a transaction execution method, equipment and a storage medium, wherein the method comprises the following steps: when the block chain module judges that a first intelligent contract which is required to be called for executing the first transaction is not deployed on the alliance chain, the block chain module sends the first transaction to the intelligent contract adapter module; when the intelligent contract adapter module successfully finds out a first off-link intelligent contract for executing a first transaction on the equipment, first notification information is sent to the first off-link intelligent contract; the first off-chain intelligent contract obtains a first data set required by executing the first transaction from the alliance chain through the alliance chain data read-write interface, and executes the first transaction according to the first data set to obtain a first execution result; the intelligent contract adapter module acquires a first execution result and sends the first execution result to the block chain module; the blockchain module records the first execution result onto the federation chain. The application facilitates federation chain development.

Description

Transaction execution method, apparatus and storage medium
Technical Field
The present application relates to the field of blockchain technologies, and in particular, to a transaction execution method, device, and storage medium.
Background
The intelligent contract language only supports partial languages, such as Solidity and WASM, and has the problems of learning threshold and high entrance difficulty; if a blockchain developer wants to add a new intelligent contract language to the chain, the developer needs to develop corresponding interpreted execution, such as JVM, which is difficult and costly.
Disclosure of Invention
In view of the above-described deficiencies or inadequacies in the prior art, it would be desirable to provide a transaction execution method, apparatus, and storage medium that facilitates developing a federation chain.
In a first aspect, the present invention provides a transaction execution method for devices running alliance link nodes, where each alliance link node is deployed with an intelligent contract adapter module, each device running alliance link nodes is configured with a plurality of identical off-link intelligent contracts outside a block link program, and an off-link intelligent contract is an intelligent contract written in an off-link language, where the method includes:
when the block chain module judges that a first intelligent contract which is required to be called for executing the first transaction is not deployed on the alliance chain, the block chain module sends the first transaction to the intelligent contract adapter module;
when the intelligent contract adapter module successfully finds out a first off-link intelligent contract for executing a first transaction on the equipment, first notification information is sent to the first off-link intelligent contract;
After receiving the first notification information, the first out-of-chain intelligent contract obtains a first data set required by executing the first transaction from the alliance chain through the alliance chain data read-write interface, and executes the first transaction according to the first data set to obtain a first execution result; the first data set comprises current balance information of an account of a transaction sender of the first transaction and current balance information of an account of a transaction receiver of the first transaction;
the intelligent contract adapter module acquires a first execution result and sends the first execution result to the block chain module;
the blockchain module records the first execution result onto the federation chain.
In a second aspect, the present invention provides a transaction execution method for a device running a federation link node, where each federation link node is deployed with an intelligent contract adapter module and a variable executor module, and each device running the federation link node is configured with a plurality of identical off-link intelligent contracts outside a block link program, where the off-link intelligent contracts are intelligent contracts written in an off-link language, and the method is applicable to the device running the federation link node, and includes:
when the block chain module judges that a first intelligent contract which needs to be called for executing the first transaction is not deployed on the alliance chain, the block chain module sends the first transaction to the intelligent contract adapter module;
When the intelligent contract adapter module successfully finds out a first off-link intelligent contract for executing a first transaction on the equipment, first notification information is sent to the first off-link intelligent contract;
after the first out-of-chain intelligent contract receives the first notification information, executing a first transaction to obtain a first execution variable;
the intelligent contract adapter module acquires a first execution variable and sends the first execution variable to the variable executor module;
the variable executor module obtains a first execution result according to the first execution variable and sends the first execution result to the block chain module;
the blockchain module records the first execution result onto the federation chain.
In a third aspect, the present invention also provides an apparatus comprising one or more processors and a memory, wherein the memory contains instructions executable by the one or more processors to cause the one or more processors to perform a transaction execution method provided in accordance with embodiments of the present invention.
In a fourth aspect, the present invention also provides a storage medium storing a computer program that causes a computer to execute a transaction execution method provided according to embodiments of the present invention.
According to the transaction execution method, the device and the storage medium provided by the embodiments of the invention, when the first intelligent contract called for executing the first transaction is judged not to be deployed on the alliance chain through the block chain module, the first transaction is sent to the intelligent contract adapter module; when the intelligent contract adapter module successfully finds out a first off-link intelligent contract for executing a first transaction on the equipment, first notification information is sent to the first off-link intelligent contract; the first off-chain intelligent contract obtains a first data set required by executing the first transaction from the alliance chain through the alliance chain data read-write interface, and executes the first transaction according to the first data set to obtain a first execution result; the intelligent contract adapter module acquires a first execution result and sends the first execution result to the block chain module; and the blockchain module records the first execution result to a method on the alliance chain, so that the alliance chain development is more convenient.
Drawings
Other features, objects and advantages of the present application will become more apparent upon reading of the following detailed description of non-limiting embodiments thereof, made with reference to the accompanying drawings in which:
fig. 1 is a flowchart of a transaction execution method according to an embodiment of the present invention.
Fig. 2 is a flowchart of another transaction execution method according to an embodiment of the present invention.
Fig. 3 is a schematic structural diagram of an apparatus according to an embodiment of the present invention.
Detailed Description
The present application will be described in further detail with reference to the following drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the relevant invention and not restrictive of the invention. It should be noted that, for convenience of description, only the portions related to the present invention are shown in the drawings.
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
Fig. 1 is a flowchart of a transaction execution method according to an embodiment of the present invention. As shown in fig. 1, in this embodiment, the present invention provides a transaction execution method suitable for a device running federation link nodes, where each federation link node is deployed with an intelligent contract adapter module, each device running federation link nodes is configured with a plurality of identical off-link intelligent contracts outside a block link program, and an off-link intelligent contract is an intelligent contract written in an off-link language, where the method includes:
S11: when the block chain module judges that a first intelligent contract which is required to be called for executing the first transaction is not deployed on the alliance chain, the block chain module sends the first transaction to the intelligent contract adapter module;
s13: when the intelligent contract adapter module successfully finds out a first off-link intelligent contract for executing a first transaction on the equipment, first notification information is sent to the first off-link intelligent contract;
s15: after receiving the first notification information, the first off-chain intelligent contract obtains a first data set required by executing the first transaction from the alliance chain through the alliance chain data read-write interface, and executes the first transaction according to the first data set to obtain a first execution result; the first data set comprises current balance information of an account of a transaction sender of the first transaction and current balance information of an account of a transaction receiver of the first transaction;
s17: the intelligent contract adapter module acquires a first execution result and sends the first execution result to the block chain module;
s19: the blockchain module records the first execution result onto the federation chain.
Specifically, take the example that the first notification information includes the first transaction; assuming that equipment for operating the alliance chain nodes is N1-N10, and alliance chain nodes N1-N10 are operated on the equipment respectively; the n 1-n 10 are provided with intelligent contracts C1_ L1-C10 _ L1 written by using a language L1; in addition to the blockchain program, the N1-N10 are respectively configured with C1_ L2-C10 _ L2 written by a language L2, C1_ L3-C10 _ L3 written by a language L3 and C1_ L4-C10 _ L4 written by a language L4; n 1-n 10 respectively receive tx1, tx2 and tx3 in sequence, the intelligent contract required to be called for executing tx1 is C1_ L1, and the intelligent contract required to be called for executing tx2 is C20_ L4; the smart contract called required to perform tx3 is C2_ L4;
For tx 1:
the block chain module of n 1-n 10 calls C1_ L1 to execute tx1 to obtain an execution result of tx1, and records the execution result of tx1 to the federation chain.
For tx 2:
the block chain module of n 1-n 10 executes the step S11 because the C20_ L4 is not deployed on the alliance chain, and transmits tx2 to the intelligent contract adapter module;
if the intelligent contract adapter module of n 1-n 10 inquires that no C20_ L4 exists on the equipment, the tx2 is deleted; it should be noted that, the current step may also be configured according to actual requirements, for example, the current step is configured to put tx2 into the delay processing queue, and execute tx2 again at regular intervals, and if it cannot be executed all the time, delete tx2 after the preconfigured first time, so that the same technical effect may be achieved.
For tx 3:
the block chain module of n 1-n 10 executes the step S11 because the C2_ L4 is not deployed on the alliance chain, and transmits tx3 to the intelligent contract adapter module;
if the intelligent contract adapter module of n 1-n 10 inquires that the equipment is provided with C2_ L4, executing a step S13, and sending tx3 to C2_ L4; in further embodiments, the first notification information may also be configured according to actual requirements, for example, configured as simple notification information, and after receiving the notification information, the C2_ L4 pulls tx3 from the intelligent contract adapter module, which may achieve the same technical effect;
C2_ L4 on N1-N10 receives tx3 and then executes step S15, assuming that tx3 is { from addr (a), toaddr (b), and 10 coin }, then current balance information (assumed to be 100) of addr (b)) of a data set (addr (a)) required for executing tx3 is obtained from the federation chain through the federation chain data read-write interface, and current balance information (assumed to be 50)) of addr (b)), and executes tx3 according to the data set to obtain an execution result { addr (a):90, addr (b):60 };
the intelligent contract adapter module of n 1-n 10 executes step S17 to obtain the execution results { addr (a):90, addr (b):60}, and sends the execution results to the blockchain module; it should be noted that the intelligent contract adapter module may actively acquire the execution result from C2_ L4, or may wait for C2_ L4 to push the execution result to the execution result;
the blockchain modules of n 1-n 10 execute step S19, and record the execution results { addr (a):90, addr (b):60} in the federation chain.
In further embodiments, the first notification information may also be configured according to actual requirements, for example, the first notification information includes that the first transaction includes first encryption information, and the first encryption information is generated by encrypting the first transaction according to a public key of the first out-of-link smart contract; correspondingly, after the first out-of-link intelligent contract obtains the first notification information, the first out-of-link intelligent contract decrypts the first notification information through the held private key to obtain a first transaction, obtains a first data set required by executing the first transaction from the alliance link through the alliance link data read-write interface, and executes the first transaction according to the first data set to obtain a first execution result, so that the same technical effect can be achieved.
The above-described embodiments enable developers to conveniently write intelligent contracts using traditional programming languages, making federation chain development more convenient. And the intelligent contracts written using conventional programming languages may also be used in different chains.
Preferably, the method further includes a queue module, and when the intelligent contract adapter module successfully finds a first off-chain intelligent contract executing the first transaction on the device on which the intelligent contract adapter module is located, sending first notification information to the first off-chain intelligent contract includes:
when the intelligent contract adapter module successfully finds out a first out-of-chain intelligent contract for executing a first transaction on the equipment, the intelligent contract adapter module sends the first transaction to the queue module;
the queue module sends first notification information to the first out-of-chain intelligent contract;
the intelligent contract adapter module acquires a first execution result and sends the first execution result to the block chain module, and the intelligent contract adapter module comprises:
the queue module acquires a first execution result and sends second notification information to the intelligent contract adapter module;
after receiving the second notification information, the intelligent contract adapter module acquires a first execution result from the queue module;
the queue module deletes the first transaction from the queue module after sensing that the first execution result is obtained;
The intelligent contract adapter module sends the first execution result to the blockchain module.
The queue module ensures the execution sequence of the transaction, so that the division of labor of the alliance chain system is more detailed.
Preferably, the first notification message includes the first transaction.
The transaction execution principle of the above embodiment can refer to the method shown in fig. 1, and is not described herein again.
Preferably, the first notification message includes first encryption information, and the first encryption information is generated by encrypting the first transaction according to a public key of the first out-of-link smart contract;
after the first out-of-chain intelligent contract receives the first notification information, acquiring a first data set required by executing the first transaction from the alliance chain through an alliance chain data read-write interface, and executing the first transaction according to the first data set to obtain a first execution result, wherein the first execution result comprises:
after the first out-of-chain intelligent contract receives the first notification information, the first notification information is decrypted through the held private key to obtain a first transaction;
the first off-chain intelligent contract obtains a first data set required by executing the first transaction from the alliance chain through the alliance chain data read-write interface, and executes the first transaction according to the first data set to obtain a first execution result.
The transaction execution principle of the above embodiment can refer to the method shown in fig. 1, and is not described herein again.
Fig. 2 is a flowchart of another transaction execution method according to an embodiment of the invention. As shown in fig. 2, in this embodiment, the present invention provides a transaction execution method suitable for a device running a federation link node, where each federation link node is deployed with an intelligent contract adapter module and a variable executor module, and each device running a federation link node is configured with a plurality of identical off-link intelligent contracts outside a block link program, where the off-link intelligent contracts are intelligent contracts written in an off-link language, and the method is suitable for a device running a federation link node, and the method includes:
s21: when the block chain module judges that a first intelligent contract which needs to be called for executing the first transaction is not deployed on the alliance chain, the block chain module sends the first transaction to the intelligent contract adapter module;
s22: when the intelligent contract adapter module successfully finds out a first off-link intelligent contract for executing a first transaction on the equipment, first notification information is sent to the first off-link intelligent contract;
s23: after the first out-of-chain intelligent contract receives the first notification information, executing a first transaction to obtain a first execution variable;
s24: the intelligent contract adapter module acquires a first execution variable and sends the first execution variable to the variable executor module;
S25: the variable executor module obtains a first execution result according to the first execution variable and sends the first execution result to the block chain module;
s26: the blockchain module records the first execution result onto the federation chain.
Specifically, take the example that the first notification information includes the first transaction; assuming that equipment for operating the alliance chain nodes is N1-N10, and alliance chain nodes N1-N10 are operated on the equipment respectively; the n 1-n 10 are provided with intelligent contracts C1_ L1-C10 _ L1 written by using a language L1; in addition to the blockchain program, the N1-N10 are respectively configured with C1_ L2-C10 _ L2 written by a language L2, C1_ L3-C10 _ L3 written by a language L3 and C1_ L4-C10 _ L4 written by a language L4; n 1-n 10 respectively receive tx1, tx2 and tx3 in sequence, the intelligent contract required to be called for executing tx1 is C1_ L1, and the intelligent contract required to be called for executing tx2 is C20_ L4; the smart contract called required to perform tx3 is C2_ L4;
for tx 1:
the blockchain module of n 1-n 10 calls C1_ L1 to execute tx1 to obtain an execution result of tx1, and records the execution result of tx1 to the federation chain.
For tx 2:
the block chain module of n 1-n 10 executes the step S21 because the C20_ L4 is not deployed on the alliance chain, and transmits tx2 to the intelligent contract adapter module;
If the intelligent contract adapter module of n 1-n 10 inquires that no C20_ L4 exists on the equipment, the tx2 is deleted; it should be noted that, the current step may also be configured according to actual requirements, for example, the current step is configured to put tx2 into the delay processing queue, and execute tx2 again at regular intervals, and if it cannot be executed all the time, delete tx2 after the preconfigured first time, so that the same technical effect may be achieved.
For tx 3:
the block chain module of n 1-n 10 executes the step S21 because the C2_ L4 is not deployed on the alliance chain, and transmits tx3 to the intelligent contract adapter module;
if the intelligent contract adapter module of n 1-n 10 inquires that the equipment is provided with C2_ L4, executing a step S22, and sending tx3 to C2_ L4; in further embodiments, the first notification information may also be configured according to actual requirements, for example, configured as simple notification information, and after receiving the notification information, the C2_ L4 pulls tx3 from the intelligent contract adapter module, which may achieve the same technical effect;
after C2_ L4 of N1-N10 receives tx3, step S23 is executed, and if tx3 is { fromdr (a), toaddr (b), and 10 coin }, tx3 is executed to obtain an execution variable { addr (a): 10, addr (b): +10 };
the intelligent contract adapter module of n 1-n 10 executes step S24 to obtain the execution variables { addr (a): 10, addr (b): 10}, and send the execution variables to the variable executor module; it should be noted that the intelligent contract adapter module may actively acquire the execution variable from C2_ L4, or may wait for C2_ L4 to push the execution variable to the execution variable;
Executing step S25 by the variable executor modules of n1 to n10, wherein the variable executor modules themselves can obtain current balance information (assumed as 100) of addr (a) and current balance information (assumed as 50) of addr (b)) of a data set (addr (a)) required for executing tx3 from the alliance chain, obtain execution results { addr (a):90, addr (b):60} of tx3 according to the execution variables { addr (a): 10, addr (b): 10}, and send the execution results to the block chain module;
the blockchain modules of n 1-n 10 execute step S19, and record the execution results { addr (a):90, addr (b):60} in the federation chain.
In further embodiments, the first notification information may also be configured according to actual requirements, for example, the first notification information includes that the first transaction includes first encryption information, and the first encryption information is generated by encrypting the first transaction according to a public key of the first out-of-link smart contract; correspondingly, the intelligent contract adapter module acquires the first execution variable and sends the first execution variable to the variable executor module, and the method comprises the following steps: the queue module acquires a first execution variable and sends second notification information to the intelligent contract adapter module; after receiving the second notification information, the intelligent contract adapter module acquires a first execution variable from the queue module; the queue module deletes the first transaction from the queue module after sensing that the first execution variable is acquired; the intelligent contract adapter module sends the first execution variable to the variable executor module, and the same technical effect can be achieved.
The above-described embodiments enable developers to conveniently write intelligent contracts using traditional programming languages, making federation chain development more convenient. And the intelligent contracts written using conventional programming languages may also be used in different chains.
The difference between the above embodiment and the method shown in fig. 1 is that, in the above embodiment, the intelligent contract outside the chain cannot directly acquire data on the federation chain, and it is ensured that the data of the federation chain does not flow out, so as to prevent the data of the federation chain from being attacked.
Preferably, the method further includes a queue module, and when the intelligent contract adapter module successfully finds a first off-chain intelligent contract for executing the first transaction on the device on which the intelligent contract adapter module is located, sending first notification information to the first off-chain intelligent contract includes:
when the intelligent contract adapter module successfully finds out a first out-of-chain intelligent contract for executing a first transaction on the equipment, the first transaction is sent to the queue module;
the queue module sends first notification information to the first out-of-link intelligent contract;
the intelligent contract adapter module acquires a first execution variable and sends the first execution variable to the variable executor module, and the intelligent contract adapter module comprises:
the queue module acquires a first execution variable and sends second notification information to the intelligent contract adapter module;
After the intelligent contract adapter module receives the second notification information, acquiring a first execution variable from the queue module;
the queue module deletes the first transaction from the queue module after sensing that the first execution variable is acquired;
the intelligent contract adapter module sends the first execution variable to the variable executor module.
The queue module ensures the execution sequence of the transaction, so that the division of labor of the alliance chain system is more detailed.
Preferably, the first notification message includes the first transaction.
The transaction execution principle of the above embodiment can refer to the method shown in fig. 2, and is not described herein again.
Preferably, the first notification message includes first encryption information, and the first encryption information is generated by encrypting the first transaction according to a public key of the first out-of-link smart contract;
after the first out-of-chain intelligent contract receives the first notification message, executing the first transaction to obtain a first execution variable comprises:
after the first out-of-chain intelligent contract receives the first notification information, the first notification information is decrypted through the held private key to obtain a first transaction, and the first transaction is executed to obtain a first execution variable.
The transaction execution principle of the above embodiment can refer to the method shown in fig. 2, and is not described herein again.
Fig. 3 is a schematic structural diagram of an apparatus according to an embodiment of the present invention.
As shown in fig. 3, as another aspect, the present application also provides an apparatus including one or more Central Processing Units (CPUs) 301 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 302 or a program loaded from a storage section 308 into a Random Access Memory (RAM) 303. In the RAM303, various programs and data necessary for the operation of the apparatus 300 are also stored. The CPU301, ROM302, and RAM303 are connected to each other via a bus 304. An input/output (I/O) interface 305 is also connected to bus 304.
The following components are connected to the I/O interface 305: an input portion 306 including a keyboard, a mouse, and the like; an output section 307 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 308 including a hard disk and the like; and a communication section 309 including a network interface card such as a LAN card, a modem, or the like. The communication section 309 performs communication processing via a network such as the internet. A drive 310 is also connected to the I/O interface 305 as needed. A removable medium 311 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 310 as necessary, so that a computer program read out therefrom is mounted into the storage section 308 as necessary.
In particular, according to an embodiment of the present disclosure, the method described in any of the above embodiments may be implemented as a computer software program. For example, embodiments of the present disclosure include a computer program product comprising a computer program tangibly embodied on a machine-readable medium, the computer program comprising program code for performing any of the methods described above. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 309, and/or installed from the removable medium 311.
As yet another aspect, the present application also provides a computer-readable storage medium, which may be the computer-readable storage medium included in the apparatus of the above-described embodiment; or it may be a separate computer readable storage medium not incorporated into the device. The computer readable storage medium stores one or more programs for use by one or more processors in performing the methods described in the present application.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units or modules described in the embodiments of the present application may be implemented by software or hardware. The described units or modules may also be provided in a processor, for example, each of the described units may be a software program provided in a computer or a mobile intelligent device, or may be a separately configured hardware device. Wherein the designation of such a unit or module does not in some way constitute a limitation on the unit or module itself.
The foregoing description is only exemplary of the preferred embodiments of the application and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the invention herein disclosed is not limited to the particular combination of features described above, but also encompasses other arrangements formed by any combination of the above features or their equivalents without departing from the spirit of the present application. For example, the above features may be replaced with (but not limited to) features having similar functions disclosed in the present application.

Claims (10)

1. A transaction execution method, wherein each alliance-link node is deployed with an intelligent contract adapter module, each device running the alliance-link node is configured with a plurality of identical out-of-link intelligent contracts outside a block-link program, and the out-of-link intelligent contracts are intelligent contracts written in an out-of-link language, the method is suitable for the device running the alliance-link node, and the method comprises:
When judging that a first intelligent contract which is required to be called for executing a first transaction is not deployed on the alliance chain, the block chain module sends the first transaction to the intelligent contract adapter module;
when the intelligent contract adapter module successfully finds a first off-link intelligent contract for executing the first transaction on the equipment, first notification information is sent to the first off-link intelligent contract;
after the first out-of-chain intelligent contract receives the first notification information, a first data set required by executing the first transaction is obtained from a alliance chain through an alliance chain data read-write interface, and the first transaction is executed according to the first data set to obtain a first execution result; wherein the first set of data includes current balance information for an account of a transaction sender of the first transaction, current balance information for an account of a transaction receiver of the first transaction;
the intelligent contract adapter module acquires the first execution result and sends the first execution result to the block chain module;
the blockchain module records the first execution result onto a federation chain.
2. The method of claim 1, further comprising a queue module, wherein when the intelligent contract adapter module successfully finds a first off-link intelligent contract executing the first transaction on the device on which the intelligent contract adapter module is located, sending a first notification message to the first off-link intelligent contract comprises:
When the intelligent contract adapter module successfully finds out a first out-of-chain intelligent contract for executing the first transaction on the equipment, the first transaction is sent to a queue module;
the queue module sends first notification information to the first out-of-chain intelligent contract;
the intelligent contract adapter module obtaining the first execution result and sending the first execution result to the block chain module comprises:
the queue module acquires the first execution result and sends second notification information to the intelligent contract adapter module;
after receiving the second notification information, the intelligent contract adapter module acquires the first execution result from the queue module;
the queue module deletes the first transaction from the queue module after sensing that the first execution result is obtained;
the intelligent contract adapter module sends the first execution result to the blockchain module.
3. The method of claim 1 or 2, wherein the first notification message comprises the first transaction.
4. The method according to claim 1 or 2, wherein the first notification message comprises first encryption information generated by encrypting the first transaction according to a public key of the first off-link smart contract;
After the first out-of-chain intelligent contract receives the first notification information, acquiring a first data set required for executing the first transaction from a alliance chain through an alliance chain data read-write interface, and executing the first transaction according to the first data set to obtain a first execution result, wherein the first execution result comprises:
after the first out-of-chain intelligent contract receives the first notification information, the first notification information is decrypted through the held private key to obtain the first transaction;
the first off-chain intelligent contract obtains a first data set required by executing the first transaction from a alliance chain through an alliance chain data read-write interface, and executes the first transaction according to the first data set to obtain a first execution result.
5. A transaction execution method, wherein each alliance link node is deployed with an intelligent contract adapter module and a variable executor module, each device running the alliance link node is configured with a plurality of identical out-of-link intelligent contracts outside a block link program, and the out-of-link intelligent contracts are intelligent contracts written in an out-of-link language, the method is suitable for running the alliance link node device, and the method comprises:
When judging that a first intelligent contract which is required to be called for executing a first transaction is not deployed on the alliance chain, the block chain module sends the first transaction to the intelligent contract adapter module;
when the intelligent contract adapter module successfully finds a first off-link intelligent contract for executing the first transaction on the equipment, first notification information is sent to the first off-link intelligent contract;
after the first out-of-chain intelligent contract receives the first notification information, executing the first transaction to obtain a first execution variable;
the intelligent contract adapter module acquires the first execution variable and sends the first execution variable to a variable executor module;
the variable executor module obtains a first execution result according to the first execution variable and sends the first execution result to the block chain module;
the blockchain module records the first execution result onto a federation chain.
6. The method of claim 5, further comprising a queue module, wherein when the intelligent contract adapter module successfully finds a first off-link intelligent contract executing the first transaction on the device on which the intelligent contract adapter module is located, sending a first notification message to the first off-link intelligent contract comprises:
When the intelligent contract adapter module successfully finds out a first out-of-chain intelligent contract for executing the first transaction on the equipment, the first transaction is sent to a queue module;
the queue module sends first notification information to the first out-of-chain intelligent contract;
the intelligent contract adapter module acquires the first execution variable and sends the first execution variable to the variable executor module, and the intelligent contract adapter module comprises:
the queue module acquires the first execution variable and sends second notification information to the intelligent contract adapter module;
after receiving the second notification information, the intelligent contract adapter module acquires the first execution variable from the queue module;
the queue module deletes the first transaction from the queue module after sensing that the first execution variable is acquired;
the intelligent contract adapter module sends the first execution variable to a variable executor module.
7. The method of claim 5 or 6, wherein the first notification message comprises the first transaction.
8. The method according to claim 5 or 6, wherein the first notification message comprises first encryption information generated by encrypting the first transaction according to a public key of the first off-link smart contract;
After the first out-of-chain intelligent contract receives the first notification message, the executing the first transaction to obtain a first execution variable comprises:
and after the first out-of-chain intelligent contract receives the first notification information, decrypting the first notification information through the held private key to obtain the first transaction, and executing the first transaction to obtain a first execution variable.
9. A computer device, the device comprising:
one or more processors;
a memory for storing one or more programs,
the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the method recited in any of claims 1-8.
10. A storage medium storing a computer program, characterized in that the program, when executed by a processor, implements the method according to any one of claims 1-8.
CN202011425291.0A 2020-12-09 2020-12-09 Transaction execution method, apparatus and storage medium Active CN112583585B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202011425291.0A CN112583585B (en) 2020-12-09 2020-12-09 Transaction execution method, apparatus and storage medium
PCT/CN2021/111853 WO2022121347A1 (en) 2020-12-09 2021-08-10 Transaction execution method, and device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011425291.0A CN112583585B (en) 2020-12-09 2020-12-09 Transaction execution method, apparatus and storage medium

Publications (2)

Publication Number Publication Date
CN112583585A CN112583585A (en) 2021-03-30
CN112583585B true CN112583585B (en) 2022-06-28

Family

ID=75127769

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011425291.0A Active CN112583585B (en) 2020-12-09 2020-12-09 Transaction execution method, apparatus and storage medium

Country Status (2)

Country Link
CN (1) CN112583585B (en)
WO (1) WO2022121347A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112583585B (en) * 2020-12-09 2022-06-28 杭州复杂美科技有限公司 Transaction execution method, apparatus and storage medium
CN113590611B (en) * 2021-06-29 2023-11-24 杭州复杂美科技有限公司 Block execution method, computer device, and storage medium
CN113379550B (en) * 2021-06-29 2023-04-14 杭州复杂美科技有限公司 Block execution method, computer device and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10554406B1 (en) * 2019-06-04 2020-02-04 Capital One Services, Llc Authorized data sharing using smart contracts
CN110930157A (en) * 2019-11-14 2020-03-27 杭州复杂美科技有限公司 Delayed transaction processing method, device and storage medium
CN111768200A (en) * 2020-08-31 2020-10-13 支付宝(杭州)信息技术有限公司 Method for deploying intelligent contract, block chain node and storage medium

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107507005B (en) * 2017-08-01 2020-09-11 众安信息技术服务有限公司 Off-link data access method and system based on alliance chain
US11182787B2 (en) * 2017-11-07 2021-11-23 Liquidchain Ag System and method for scaling blockchain networks with secure off-chain payment hubs
CN113095822A (en) * 2018-06-27 2021-07-09 创新先进技术有限公司 Intelligent contract calling method and device based on block chain and electronic equipment
RU2729700C1 (en) * 2018-12-13 2020-08-11 Алибаба Груп Холдинг Лимитед Service of smart contract outside chain based on trusted execution environment
CN109727131A (en) * 2018-12-28 2019-05-07 苏州鸿链信息科技有限公司 Method of commerce and system are executed under a kind of chain based on block chain contract layer
CN109523242A (en) * 2019-01-18 2019-03-26 大象慧云信息技术有限公司 A kind of electronic invoice Life cycle supervisory systems and method based on alliance's chain
CN112583585B (en) * 2020-12-09 2022-06-28 杭州复杂美科技有限公司 Transaction execution method, apparatus and storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10554406B1 (en) * 2019-06-04 2020-02-04 Capital One Services, Llc Authorized data sharing using smart contracts
CN110930157A (en) * 2019-11-14 2020-03-27 杭州复杂美科技有限公司 Delayed transaction processing method, device and storage medium
CN111768200A (en) * 2020-08-31 2020-10-13 支付宝(杭州)信息技术有限公司 Method for deploying intelligent contract, block chain node and storage medium

Also Published As

Publication number Publication date
WO2022121347A1 (en) 2022-06-16
CN112583585A (en) 2021-03-30

Similar Documents

Publication Publication Date Title
CN112583585B (en) Transaction execution method, apparatus and storage medium
EP2656248B1 (en) Bulk initial download of mobile databases
US20100162225A1 (en) Cross-product refactoring apparatus and method
CN108846753B (en) Method and apparatus for processing data
CN111798316B (en) Parallel chain consensus method, apparatus and storage medium
US10592312B2 (en) Message oriented middleware with integrated rules engine
CN110377440B (en) Information processing method and device
CN104205109A (en) Persistent and resilient worker processes
US11934287B2 (en) Method, electronic device and computer program product for processing data
CN111191225B (en) Method, device, medium and electronic equipment for switching isolated objects
CN109218338B (en) Information processing system, method and device
CN116521317A (en) Mirror image management method and device, electronic equipment and computer readable storage medium
CN112115738A (en) Image identification method and device applied to browser end
CN109756948B (en) Method and device for connecting wireless access point through application in user equipment
CN106843994B (en) Client software running method based on dynamic compilation
US20210234686A1 (en) Information processing device, information processing method, and storage medium
CN105512544B (en) A kind of method and device obtaining mobile terminal superuser right
CN110941683B (en) Method, device, medium and electronic equipment for acquiring object attribute information in space
CN113590611B (en) Block execution method, computer device, and storage medium
CN113379550B (en) Block execution method, computer device and storage medium
CN111858772A (en) Parallel chain transaction group execution method, device and storage medium
CN113704079A (en) Interface testing method and device based on Protobuf
CN108288135B (en) System compatibility method and device, computer readable storage medium and electronic equipment
CN110908886A (en) Data sending method and device, electronic equipment and storage medium
CN116452208B (en) Method, device, equipment and medium for determining change transaction code

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