CN112015577B - Intelligent contract calling method and device - Google Patents

Intelligent contract calling method and device Download PDF

Info

Publication number
CN112015577B
CN112015577B CN202011128574.9A CN202011128574A CN112015577B CN 112015577 B CN112015577 B CN 112015577B CN 202011128574 A CN202011128574 A CN 202011128574A CN 112015577 B CN112015577 B CN 112015577B
Authority
CN
China
Prior art keywords
blockchain
transaction
intelligent contract
resources
virtual
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
CN202011128574.9A
Other languages
Chinese (zh)
Other versions
CN112015577A (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.)
Alipay Hangzhou Information Technology Co Ltd
Original Assignee
Alipay Hangzhou Information 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 Alipay Hangzhou Information Technology Co Ltd filed Critical Alipay Hangzhou Information Technology Co Ltd
Priority to CN202011128574.9A priority Critical patent/CN112015577B/en
Publication of CN112015577A publication Critical patent/CN112015577A/en
Application granted granted Critical
Publication of CN112015577B publication Critical patent/CN112015577B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/547Remote procedure calls [RPC]; Web services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/54Indexing scheme relating to G06F9/54
    • G06F2209/549Remote execution

Abstract

The specification provides a method and a device for calling an intelligent contract, which are applied to a management platform for executing management on node equipment of a blockchain, wherein system resources and virtual resources carried by the node equipment of the blockchain are value anchored; the method comprises the following steps: acquiring intelligent contract calling transaction triggered by a blockchain client, wherein the intelligent contract calling transaction comprises calling parameters of an intelligent contract; calculating a first amount of system resources of node devices of the blockchain consumed by processing the smart contract invocation transaction and determining a second amount of the virtual resources anchored with the first amount of system resource value such that the virtual resource account of the user is deducted from the second amount of virtual resources; and sending the intelligent contract invoking transaction to the blockchain so that node equipment of the blockchain executes the intelligent contract invoking transaction based on the invoking parameter.

Description

Intelligent contract calling method and device
Technical Field
One or more embodiments of the present disclosure relate to the field of blockchain technologies, and in particular, to a method and apparatus for invoking an intelligent contract.
Background
Blockchain technology, also known as distributed ledger technology, is an emerging technology that is commonly engaged in "accounting" by several computing devices, together maintaining a complete distributed database. The blockchain technology has the characteristics of decentralization, disclosure transparency, capability of participating in database recording by each computing device and capability of rapidly performing data synchronization among the computing devices, so that the blockchain technology is widely applied in a plurality of fields.
Disclosure of Invention
In view of this, one or more embodiments of the present specification provide a method, apparatus, and computer device for invoking an intelligent contract.
In order to achieve the above object, one or more embodiments of the present disclosure provide the following technical solutions:
according to a first aspect of one or more embodiments of the present disclosure, a method for invoking an intelligent contract is provided, which is applied to a management platform for performing management on a node device of a blockchain, where a system resource and a virtual resource carried by the node device of the blockchain are value anchored; the method comprises the following steps:
acquiring intelligent contract calling transaction triggered by a blockchain client, wherein the intelligent contract calling transaction comprises calling parameters of an intelligent contract;
Calculating a first amount of system resources of node devices of the blockchain consumed by processing the smart contract invocation transaction and determining a second amount of the virtual resources that is value anchored to the first amount of system resources;
after the virtual resource account of the user is deducted from the second amount of virtual resources, sending the intelligent contract invoking transaction to the blockchain to enable node devices of the blockchain to execute the intelligent contract invoking transaction based on the invoking parameters, and storing execution results of the intelligent contract invoking transaction in the blockchain.
According to a second aspect of one or more embodiments of the present disclosure, a method for invoking an intelligent contract is provided, which is applied to a management platform for performing management on a node device of a blockchain, where a system resource and a virtual resource carried by the node device of the blockchain are value anchored; the method comprises the following steps:
acquiring intelligent contract calling transaction triggered by a blockchain client, wherein the intelligent contract calling transaction comprises calling parameters of an intelligent contract;
transmitting the intelligent contract invoking transaction to the blockchain, so that node equipment of the blockchain executes the intelligent contract invoking transaction based on the invoking parameter, and storing an executing result of the intelligent contract invoking transaction in the blockchain;
Calculating a first amount of system resources of node devices of the blockchain consumed by processing the smart contract invocation transaction, determining a second amount of the virtual resources anchored with the first amount of system resource value, such that a virtual resource account of the user is deducted from the second amount of virtual resources.
According to a third aspect of one or more embodiments of the present disclosure, a calling device of an intelligent contract is provided, which is applied to a management platform for performing management on node devices of a blockchain, where system resources and virtual resources carried by the node devices of the blockchain are value anchored; the device comprises:
the system comprises an acquisition unit, a control unit and a control unit, wherein the acquisition unit acquires an intelligent contract calling transaction triggered by a blockchain client, and the intelligent contract calling transaction comprises calling parameters of an intelligent contract;
a calculation unit configured to calculate a first amount of system resources of a node device of the blockchain consumed for processing the smart contract invocation transaction, and determine a second amount of the virtual resources anchored with the first amount of system resource values;
and the sending unit is used for sending the intelligent contract calling transaction to the blockchain after the virtual resource account of the user is deducted from the second number of virtual resources, so that the node equipment of the blockchain executes the intelligent contract calling transaction based on the calling parameter, and the execution result of the intelligent contract calling transaction is stored in the blockchain.
According to a fourth aspect of one or more embodiments of the present specification, a platform is provided, where system resources and virtual resources carried by node devices of the blockchain are value anchored; the device comprises:
the system comprises an acquisition unit, a control unit and a control unit, wherein the acquisition unit acquires an intelligent contract calling transaction triggered by a blockchain client, and the intelligent contract calling transaction comprises calling parameters of an intelligent contract;
the sending unit is used for sending the intelligent contract calling transaction to the blockchain so as to enable node equipment of the blockchain to execute the intelligent contract calling transaction based on the calling parameter, and the execution result of the intelligent contract calling transaction is stored in the blockchain;
and a calculating unit for calculating a first amount of system resources of the node device of the blockchain consumed by the intelligent contract call transaction after the node device executes the intelligent contract call transaction based on the call parameter, and determining a second amount of virtual resources anchored with the first amount of system resource values, so that the virtual resource account of the user is deducted from the second amount of virtual resources.
According to a fifth aspect of one or more embodiments of the present specification, there is provided a computer device comprising: a memory and a processor; the memory has stored thereon a computer program executable by the processor; and when the processor runs the computer program, executing the method for calling the intelligent contract executed by the management platform according to the embodiment corresponding to the first aspect.
According to a sixth aspect of one or more embodiments of the present specification, there is provided a computer device comprising: a memory and a processor; the memory has stored thereon a computer program executable by the processor; and when the processor runs the computer program, executing the calling method of the intelligent contract executed by the management platform according to the embodiment corresponding to the second aspect.
Based on the method, the device, the computer equipment and the computer readable storage medium for invoking the intelligent contract according to one or more embodiments, the system resources carried by the node equipment of the blockchain can be value anchored with the virtual resources, so that the second number of virtual resources can be anchored based on the first number of system resources of the node equipment of the blockchain consumed by the node equipment for processing the intelligent contract invoking transaction, and the second number of virtual resources are deducted from the virtual resource account of the user.
Drawings
FIG. 1 is a schematic diagram of creating a smart contract provided by an exemplary embodiment;
FIG. 2 is a schematic diagram of a call to a smart contract provided by an exemplary embodiment;
FIG. 3 is a schematic diagram of creating a smart contract and invoking a smart contract provided by an exemplary embodiment;
FIG. 4 is a flow diagram of a method of invoking a smart contract provided by an exemplary embodiment;
FIG. 5 is a schematic diagram of a calling device applied to a smart contract on the management platform side according to an exemplary embodiment;
FIG. 6 is a schematic diagram of a calling device applied to a smart contract on the management platform side provided by yet another exemplary embodiment;
FIG. 7 is a hardware block diagram of an embodiment of a calling device running the smart contract provided herein.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with one or more embodiments of the present specification. Rather, they are merely examples of apparatus and methods consistent with aspects of one or more embodiments of the present description as detailed in the accompanying claims.
It should be noted that: in other embodiments, the steps of the corresponding method are not necessarily performed in the order shown and described in this specification. In some other embodiments, the method may include more or fewer steps than described in this specification. Furthermore, individual steps described in this specification, in other embodiments, may be described as being split into multiple steps; while various steps described in this specification may be combined into a single step in other embodiments.
The blockchain or blockchain network in one or more embodiments of the present disclosure may specifically refer to a P2P network system with a distributed data storage structure, where each node device is implemented by a consensus mechanism, and account data in the blockchain is distributed in a plurality of "blocks" that are temporally connected, where a later block may include a data summary of a previous block, and according to a specific consensus mechanism (such as POW, POS, DPOS or PBFT, etc.), a full data backup of all or part of nodes is implemented.
Blockchains are generally divided into three types: public chains (Public Blockchain), private chains (Private Blockchain) and federated chains (Consortium Blockchain). In addition, there may be combinations of the above types, such as private chain+federation chain, federation chain+public chain, and the like.
Among them, the highest degree of decentralization is the public chain. Participants joining the public chain (which may also be referred to as nodes in the blockchain) may read data records on the chain, participate in transactions, and compete for billing rights for new blocks, etc. Moreover, each node can freely join or leave the network and perform relevant operations.
The private chain is the opposite, the write rights of the network are controlled by an organization or organization, and the data read rights are specified by the organization. In short, the private chain may be a weakly centralized system with strict restrictions on the nodes and a small number of nodes. This type of blockchain is more suitable for use within a particular organization.
The alliance chain is a block chain between public and private chains, and can realize 'partial decentralization'. Each node in the federation chain typically has an entity organization or organization corresponding thereto; nodes join the network by authorization and form a benefit-related federation, which collectively maintains blockchain operation.
It is contemplated that the embodiments provided herein can be implemented in any suitable type of blockchain network.
The computing device may construct the data into a standard transaction (transaction) format supported by the blockchain, then issue to the blockchain, consensus the received transaction by a node device in the blockchain, and after consensus, package the transaction into a block by a node device in the blockchain that acts as an accounting node, and persist in the blockchain.
Whichever consensus algorithm is employed by the blockchain, the billing node may package the received transaction to generate the latest block and send the generated latest block to other node devices for consensus verification. If the other node equipment receives the latest block and is verified to have no problem, the latest block can be added to the tail end of the original block chain, so that the accounting process of the block chain is completed. Other nodes may also execute transactions contained in the new block sent from the accounting node during the verification of that block.
It should be noted that, each time the blockchain generates a latest block, after the transaction in the latest block is executed, the corresponding states of the executed transactions in the blockchain will change accordingly, for example, the account states of external accounts or smart contract accounts in the blockchain constructed by the account model will also generally change accordingly with the execution of the transaction.
For example, when a "transfer transaction" in a block is completed, the balances of the transfer account and the transfer account associated with the "transfer transaction" (i.e., the field values of the Balance fields of these accounts) will typically change.
For another example, the "intelligent contract invoking transaction" in the block is used to invoke the intelligent contract deployed on the blockchain, invoke the intelligent contract in the EVM corresponding to the node device to execute the "intelligent contract invoking transaction", and update the account status of the intelligent contract account in the account of the intelligent contract after executing the intelligent contract invoking transaction.
In practical applications, whether public, private or federated, it is possible to provide Smart contract (Smart contract) functionality. Intelligent contracts on a blockchain are contracts on a blockchain that can be executed by a transaction trigger. The smart contracts may be defined in the form of codes.
Taking the ethernet as an example, a user is supported to create and invoke some complex logic in the ethernet network. The ethernet is used as a programmable blockchain, and the core of the ethernet is an Ethernet Virtual Machine (EVM), and each ethernet node can run the EVM. EVM is a graphics-based virtual machine through which various complex logic can be implemented. The user's issuing and invoking of the smart contract in the ethernet is running on the EVM. In fact, the EVM runs directly on virtual machine code (virtual machine bytecode, hereinafter "bytecode"), so the smart contract deployed on the blockchain may be bytecode.
As shown in fig. 1, bob sends a Transaction (Transaction) containing information to create a smart contract to the ethernet network, and each node may execute the Transaction in the EVM. The From field of the transaction is used for recording an address of an account initiating creation of the intelligent contract, the contract code stored by the field value of the Data field of the transaction can be a byte code, and the field value of the To field of the transaction is an account null. After agreement is reached between nodes through the consensus mechanism, the intelligent contract is successfully created, and the subsequent user can call the intelligent contract.
After the intelligent contract is created, a contract account corresponding to the intelligent contract appears on the blockchain and has a specific address; for example, "0x68e12cf284 …" in each node in FIG. 1 represents the address of this contract account created; the contract Code (Code) and the account store (Storage) will be saved in the account store of the contract account. The behavior of the smart contract is controlled by the contract code, and the account store of the smart contract maintains the state of the contract. In other words, the smart contract causes a virtual account to be generated on the blockchain that includes the contract code and account store.
The foregoing mentions that the Data field containing the transaction that created the smart contract holds may be the bytecode of the smart contract. Bytecode consists of a series of bytes, each of which can identify an operation. Based on various aspects of development efficiency, readability and the like, a developer can select a high-level language to write intelligent contract codes instead of directly writing byte codes. For example, a high-level language such as Solidity, serpent, LLL language may be employed. For smart contract code written in a high-level language, it may be compiled by a compiler to generate bytecodes that may be deployed onto a blockchain.
Taking the Solidity language as an example, the contract code written by the method is similar to the Class (Class) in the object-oriented programming language, and various members including state variables, functions, function modifiers, events and the like can be declared in one contract. The state variable is a value permanently stored in an account store (Storage) field of the smart contract for saving the state of the contract.
Still taking the ethernet as an example, as shown in fig. 2, bob sends a transaction containing the call intelligent contract information to the ethernet network, and each node can execute the transaction in the EVM. The From field of the transaction is used for recording the address of an account initiating the calling of the intelligent contract, the To field is used for recording the address of the called intelligent contract, and the Data field of the transaction is used for recording the method and parameters for calling the intelligent contract. After invoking the smart contract, the account status of the contract account may change. Subsequently, a client may view an account state of the contract account through the accessed blockchain node, for example, the account state may be stored in a Storage tree of the smart contract in a Key-Value pair form. The execution result of the transaction invoking the smart contract may be stored in the MPT receipt tree in the form of a transaction receipt (receipt).
The intelligent contract can be independently executed at each node in the blockchain network in a specified mode, all execution records and data are stored on the blockchain, so that when the transaction is executed, transaction credentials which cannot be tampered and cannot be lost are stored on the blockchain.
A schematic diagram of creating a smart contract and invoking a smart contract is shown in fig. 3. To create an intelligent contract in the ethernet, the intelligent contract needs to be written, changed into byte codes, deployed to a blockchain and the like. The intelligent contract is called in the Ethernet, a transaction pointing to the intelligent contract address is initiated, EVM of each node can execute the transaction respectively, and intelligent contract codes are distributed and run in the virtual machine of each node in the Ethernet network.
For accounts in a blockchain, the account status of the account is typically maintained by a structure. When a transaction in a block is executed, the status of the account in the blockchain associated with the transaction will typically change.
Taking ethernet as an example, the structure of an account typically includes fields such as Balance, nonce, code, and Storage. Wherein:
a Balance field for maintaining a current account Balance of the account;
A Nonce field for maintaining a number of transactions for the account; the counter is used for guaranteeing that each transaction can be processed only once, and effectively avoiding replay attack;
a Code field for maintaining a contract Code for the account; in practical applications, only the hash value of the contract Code is usually maintained in the Code field; thus, the Code field is also commonly referred to as a Codehash field.
A Storage field for maintaining the stored contents of the account (default field value is null); for a contract account, a separate storage space is generally allocated to store the storage content of the contract account; this separate storage space is commonly referred to as the account store for the contract account. The storage content of the contract account is usually stored in the independent storage space in a data structure constructed as a MPT (Merkle Patricia Trie) tree; among them, the MPT tree constructed based on the stored contents of the contract account is also commonly referred to as Storage tree. Whereas the Storage field typically only maintains the root node of the Storage tree; thus, the Storage field is also commonly referred to as a Storage root field.
For the external account, the field values of the Code field and the Storage field shown above are null values.
For most blockchain models, merkle trees are typically used; alternatively, data is stored and maintained based on the data structure of the Merkle tree. Taking the ethernet as an example, the ethernet uses an MPT tree (a Merkle tree variant) as a data organization form, which is used to organize and manage important data such as account status, transaction information, and the like.
The ethernet house designs three MPT trees, an MPT status tree, an MPT transaction tree, and an MPT receipt tree, respectively, for the data in the blockchain that needs to be stored and maintained. In addition to the above three MPT trees, there is actually one Storage tree built based on the stored contents of the contract account.
An MPT state tree, which is an MPT tree organized by account state data for all accounts in the blockchain; MPT transaction trees, which are MPT trees organized from transaction (transaction) data in a blockchain; the MPT receipt tree is an MPT tree organized by a transaction (receipt) receipt corresponding to each transaction generated after the transaction in the block is executed. The hash values of the root nodes of the MPT status tree, MPT transaction tree, and MPT receipt tree shown above are eventually added to the block header of the corresponding block.
Wherein, the MPT transaction tree and the MPT receipt tree correspond to blocks, i.e. each block has its own MPT transaction tree and MPT receipt tree. For the organized MPT transaction tree, MPT receipt tree and MPT status tree, the data is finally stored in a Key-Value type database (such as a LevelDB) adopting a multi-level data storage structure.
In the public chain field, the miner nodes are stimulated to carry out block chain block discharging in the modes of gas, token and the like, and the miner nodes can choose transactions with higher handling fees of gas, token and the like to pack the transactions into blocks preferentially so as to increase the income of the miner nodes; for non-mineworker nodes, although contributing to storage and consensus resources, no corresponding benefit is obtained. In token-free blockchain models, such as federated chains, and in particular in an open federated chain environment, how to count blockchain resources provided by node devices and cover the corresponding node costs, maintaining good operation of the federated chain network is also a challenge. There is currently no method for managing and charging resources for blockchain users based on the usage or occupancy of blockchain resources.
In view of the above, one or more embodiments of the present specification provide various ways of charging resources in a blockchain system. It is contemplated that the embodiments provided herein can be implemented in a blockchain network of a suitable type, such as public chains, federated chains, private chains, and the like.
The management platform according to one or more embodiments provided in the present specification may include a platform disposed in or connected to each node device of the blockchain to perform management on each node device of the blockchain. Optionally, the management platform includes a cloud computing management platform, and correspondingly, the node device of the blockchain includes a virtual machine created on a physical host managed by the cloud computing management platform.
The blockchain client in one or more embodiments provided in the present specification may be connected to a node device of a blockchain through the management platform, so as to send a transaction to a blockchain network or obtain a transaction execution result in the blockchain network based on communication with the management platform.
In the blockchain provided in the present specification, the management platform performs value anchoring on system resources and virtual resources carried by node devices of the blockchain.
The virtual resources may include digitized versions of real assets circulated under the blockchain, such as versions of money, real estate, stocks, bonds, loan contracts, notes, accounts receivable, and the like. In yet another illustrated embodiment, the virtual resources published on the blockchain may include blockchain assets having a value anchoring relationship with off-chain real assets held by the user, by freezing real world real assets (including in the form of money, real property, stock, loan contracts, notes, accounts receivable, etc., assets), and then publishing on the chain virtual resources anchored to the frozen real assets and capable of circulation on the chain.
When the method is realized, the user client can carry out an asset freezing exchange process with the management platform, freeze a certain amount of real assets by the user client, and send a freezing certificate to the management platform; after receiving the freezing certificate, the management platform can instruct the node equipment to add virtual resources corresponding to the frozen real asset amount value in the blockchain account balance of the user based on the freezing certificate.
The adding of virtual resources corresponding to the frozen real asset amount value into the blockchain account balance of the user based on the freezing certificate can be further realized by the interaction of the user and the intelligent contract: triggering a virtual resource exchange transaction sent to a blockchain network by the management platform, wherein the virtual resource exchange transaction comprises the asset freezing certificate; and in response to the virtual resource exchange transaction, the node equipment of the blockchain invokes a virtual resource exchange contract deployed on the blockchain, executes the resource exchange logic declared by the intelligent contract, and adds virtual resources corresponding to the real asset amount value frozen by the asset freezing certificate into the account balance of the blockchain of the user.
Based on the above manner, the user can obtain virtual resources which can be anchored with the value of the real assets in the blockchain network based on the real assets held by the user, and the virtual resources can be expressed as account balances on the chain of the user.
In the blockchain network system, the node equipment of the blockchain provides system resources for the blockchain service and can be used for value anchoring with the virtual resources. For example, the storage resources provided by the node device for the data on the blockchain can be value anchored with the virtual resources, and the corresponding virtual resources can be obtained for each storage unit capacity blockchain data; for another example, the node device may perform value anchoring with the virtual resource by using a CPU computing resource provided for executing any transaction on the blockchain, and may acquire the virtual resource corresponding to the CPU computing resource per CPU instruction set of the execution unit number; for another example, the node device may perform value anchoring with the virtual resource provided by broadcasting and consensus of any transaction on the blockchain, and may acquire the corresponding virtual resource based on network traffic consumed by the broadcasting or consensus process of the uplink transaction.
The blockchain developer or management platform may quantify the system resources in the form of storage resources, computing resources, network resources, etc. as described above, and price a corresponding number of virtual resources per unit of storage resources, computing resources, network resources, or other forms of system resources in the blockchain network. For a coalition chain, coalition members are relatively fixed, and the pricing of system resources obtained by anchoring can be kept fixed for a long time; for the public chain system, the node frequently enters or exits the blockchain network, and after the blockchain developer performs unit pricing on the system resources in various forms, the blockchain developer performs real-time virtual resource transfer based on the blockchain scale when the user uses the blockchain, or performs periodic virtual resource transfer according to a shorter period. Those skilled in the art may also deduct virtual resources from users for the blockchain services provided by the blockchain point device based on any form of system resources having a value anchoring relationship with the virtual resources from actual cost requirements, which is not limited in this specification.
As shown in fig. 4, the method for calling the intelligent contract according to an exemplary embodiment of the present disclosure, executed by the management platform, may include:
Step 402, obtaining an intelligent contract invoking transaction triggered by a blockchain client, wherein the intelligent contract invoking transaction comprises invoking parameters of an intelligent contract.
The calling parameters of the intelligent contract can comprise information such as interface names or input parameters of the intelligent contract to be called. The present embodiment is not limited to the above-described builder identity of the smart contract invocation transaction. In an embodiment, the intelligent contract invoking transaction may be constructed by the blockchain client, and after the constructing, the intelligent contract invoking transaction is sent to the management platform based on a triggering operation of a user at the client, so that the management platform may forward the transaction to the blockchain network after acquiring the intelligent contract invoking transaction.
In yet another illustrated embodiment, the blockchain client may send the invocation parameters of the smart contract to a management platform to trigger the management platform to construct a smart contract invocation transaction based on the invocation parameters of the smart contract, and send the constructed smart contract invocation transaction to a blockchain network.
Step 404, calculating a first amount of system resources of a node device of the blockchain consumed to process the smart contract invocation transaction and determining a second amount of the virtual resources that is value anchored to the first amount of system resources.
The processing of the intelligent contract invoking transaction by the node device of the blockchain may include receiving, forwarding (broadcasting) the intelligent contract invoking transaction, performing a consensus verification on the intelligent contract invoking transaction, executing the intelligent contract invoking transaction based on the invoking parameters, storing the invoking execution result of the intelligent contract to a state database of the blockchain, and recording the intelligent contract invoking transaction in one or more of a new-generation blockchain and the like. Because the system resources carried by the node equipment and the virtual resources are value anchored, the node equipment of the blockchain provides own system resources in the whole process of processing the intelligent contract call transaction, and therefore, the management platform can calculate and determine a second quantity of virtual resources which are value anchored with the first quantity of system resources based on the first quantity of system resources consumed or provided by the node equipment in the process of processing the intelligent contract call transaction.
Specifically, the system resources of the node device consumed by the processing of the smart contract invocation transaction described above may include one or more combinations of the following:
processing computing resources of the node device consumed by the intelligent contract invoking transaction, wherein the computing resources can comprise instruction numbers in a CPU instruction set consumed by the node device for executing the intelligent contract invoking transaction based on the invoking parameters;
Processing network resources of node devices consumed by the intelligent contract invoking transaction, wherein the network resources can comprise blockchain network bandwidth consumed in the process of transmitting the intelligent contract invoking transaction in broadcasting, consensus and the like, and the network resources are positively related to the number of nodes of the blockchain;
and processing the storage resources of the node equipment consumed by the intelligent contract calling transaction, wherein the storage resources can comprise the storage space required by the node equipment for storing the intelligent contract calling transaction or the storage space newly occupied by the intelligent contract after executing the intelligent contract calling transaction based on the calling parameters.
In this embodiment, the form of the system resource is not particularly limited, and the management platform may collect virtual resources anchored to the system resource of the form based on other system resources of the block link point device consumed in the intelligent contract invoking process, in addition to the computing resource, the network resource, and the storage resource.
In an embodiment, a calculation model may be deployed in the management platform or in the underlying protocol of the blockchain, to calculate the amount of virtual resources anchored by the system resource value of the node device consumed for processing the smart contract invocation transaction, and after the management platform obtains the smart contract invocation transaction triggered by the blockchain client, the management platform may calculate the second amount of virtual resources corresponding to the consumed system resources required for processing the smart contract invocation transaction based on invoking the calculation model.
Alternatively, the blockchain may further be deployed with an intelligent contract (hereinafter referred to as a resource computation contract) for computing virtual resource consumption for the intelligent contract call transaction, where execution logic corresponding to a contract code of the resource computation contract includes resource computation logic for computing an amount of virtual resources worth anchoring to system resources of the node device consumed for processing the intelligent contract call transaction;
accordingly, the above management platform calculates a first amount of system resources of the node device consumed for processing the smart contract invocation transaction, and determines a second amount of the virtual resources anchored with the first amount of system resource value, including:
invoking the resource computation contract, executing the billing logic, computing a first amount of system resources of the node device consumed by executing the smart contract invocation transaction, and determining a second amount of the virtual resources that is value anchored with the first amount of system resources.
Notably, the management platform, upon invoking the resource-computing smart contract to execute the resource-computing logic, may, in response to the smart contract creation transaction, construct a local transaction (LocalTransaction or localall), locally invoke the resource-computing smart contract deployed on the blockchain to determine a first quantity of the virtual resource anchored by the system resource value of the node device consumed to execute the smart contract creation transaction. At this time, the management platform may obtain the call execution result of the resource computation contract locally without consensus the call execution result of the resource computation contract on the blockchain.
Specifically, when the node device of the blockchain processes the computing resource, the network resource and the storage resource consumed by the smart contract invoking transaction into the computing process of the system resource consumption, the computing model or the resource computing logic deployed by the resource computing contract includes a first amount of computing the system resource of the node device consumed by the smart contract invoking transaction, and determines a second amount of content of the virtual resource anchored with the first amount of system resource value, which may include:
calculating a third amount of computing resources of the node device consumed to process the smart contract invocation transaction and determining a fourth amount of the virtual resources that is value anchored with the third amount of computing resources; the computing resource may include an instruction number in a CPU instruction set consumed by the node device in executing the smart contract invocation transaction based on the invocation parameter. For example, the blockchain system may price computing resources provided by the node devices: m (virtual resource unit)/instruction, the management platform may first calculate the number N of instructions in the CPU instruction set consumed for executing the above-mentioned smart contract creation transaction, and then calculate the number of virtual resources corresponding to the above-mentioned N instructions and anchored with the computing resource value of the node device consumed for processing the above-mentioned smart contract creation transaction: m×n (virtual resource units).
Calculating a fifth amount of network resources of the node device consumed to process the smart contract invocation transaction and determining a sixth amount of the virtual resources that is value anchored with the fifth amount of network resources; the network resources may include blockchain network traffic consumed in transmitting the transaction in a broadcast, consensus, etc., which is positively correlated with the number of nodes of the blockchain. For example, the blockchain system may price network resources provided by the node devices: m (virtual resource units)/megaflow, the management platform may first calculate a total network flow N megaflow consumed by executing the above-mentioned smart contract creation transaction, and then calculate an amount of virtual resources corresponding to the above-mentioned N megaflow and anchored with a network resource value of a node device consumed by processing the above-mentioned smart contract creation transaction: m×n (virtual resource units).
Calculating a seventh amount of storage resources of the node device consumed in processing the smart contract invocation transaction and determining an eighth amount of the virtual resource that is value anchored with the seventh amount of storage resources; the storage resources may include storage space required for storing the intelligent contract call transaction, or storage resources of node devices newly occupied by the intelligent contract account after the intelligent contract call transaction is executed based on the call parameters. For example, the blockchain system may price storage resources provided by the node devices: m (virtual resource unit)/Gb, wherein after the node device executes the smart contract call transaction based on the call parameter, the smart contract account adds the storage resource NGb (th) of the node device occupied by the node device, and the management platform may calculate an eighth amount of virtual resources anchored with the storage resource value of the node device consumed for processing the smart contract creation transaction, including: m×n (virtual resource units).
Based on the fourth, sixth, and eighth amounts, a sum of virtual resources anchored to a system resource value of the node device consumed in processing the smart contract creation transaction may be determined as a sum of the fourth, sixth, and eighth amounts.
Step 406, obtaining a message that the user's virtual resource account is deducted from the second number of virtual resources.
The virtual resource account of the user is an account storing resources of the same type as the virtual resource; when the virtual resource is an out-of-chain real asset, the virtual resource account may include a currency account (such as a bank account), or a virtual coin or virtual point account established by the user on the management platform using currency exchange; when the virtual resource is a virtual resource published on a blockchain, the virtual resource account may include a blockchain account of the user.
When the virtual resource account of the user is a money account, the entity performing deduction of the second amount of virtual resources from the virtual resource account of the user may be a financial institution such as a bank, and the deducted second amount of virtual resources may be transferred to the money account corresponding to the management platform; when the virtual resource account of the user is a virtual point account established on the management platform, the virtual point in the virtual point account is exchanged by the user by using currency, and the entity for deducting the second amount of virtual resources from the virtual resource account of the user can be the management platform; when the virtual resource account of the user is a blockchain account, the entity performing deduction of the second number of virtual resources from the virtual resource account of the user may be node equipment of the blockchain, and the deducted second number of virtual resources may be transferred to the blockchain account corresponding to the management platform.
The embodiment does not limit the execution subject, the deduction opportunity and the specific manner of deducting the second amount of virtual resources from the virtual resource account of the user.
Step 408, sending the intelligent contract invoking transaction to the blockchain, so that the node device of the blockchain executes the intelligent contract invoking transaction based on the invoking parameter, and storing the executing result of the intelligent contract invoking transaction in the blockchain.
The management platform sends the intelligent contract call transaction to the blockchain, so that the intelligent contract call transaction can be broadcasted in the blockchain network, can be authenticated in a consensus way, and can be executed by node equipment of the blockchain based on the call parameters after the authentication is passed, so that the execution result of the intelligent contract call transaction is stored in the blockchain.
As previously described, the structure of the smart contract account may generally include fields for Basance, nonce, code, and Storage. A Balance field for maintaining a current account Balance of the account; a Nonce field for maintaining a number of transactions for the account; the counter is used for guaranteeing that each transaction can be processed only once, and effectively avoiding replay attack; a Code field for maintaining a contract Code for the account; in practical applications, only the hash value of the contract Code is usually maintained in the Code field (the Code of the smart contract is stored in the block that records the smart contract call transaction).
A Storage field for maintaining the stored contents of the account (default field value is null); for a contract account, a separate storage space is generally allocated to store the storage content of the contract account; this separate storage space is commonly referred to as the account store for the contract account. The storage content of the contract account is usually stored in the independent storage space in a data structure constructed as a MPT (Merkle Patricia Trie) tree; among them, the MPT tree constructed based on the stored contents of the contract account is also commonly referred to as Storage tree. Whereas the Storage field typically only maintains the root node of the Storage tree; thus, the Storage field is also commonly referred to as a Storage root field.
The node device of the blockchain executes the intelligent contract call transaction in the virtual machine based on the call parameter, and stores the execution result of the intelligent contract call transaction in the blockchain, for example, the node device may record a transaction receipt (receipt) including the execution result of the intelligent contract call transaction in an MPT receipt tree of the blockchain, or store the state result value of each parameter variable in the intelligent contract in a Storage tree of an intelligent contract account after the intelligent contract call transaction is executed, so that the management platform may send a blockchain client sending the intelligent contract call transaction, return the execution result of the intelligent contract call transaction or prompt of execution success based on the state result of each parameter variable included in the transaction receipt or the intelligent contract account.
Based on the method for invoking the intelligent contract according to one or more embodiments, the management platform performs value anchoring on the system resources carried by the node device of the blockchain and the virtual resources issued on the blockchain, so that a second number of virtual resources can be anchored based on a first number of system resources of the node device consumed by the node device for processing the intelligent contract invoking transaction, so as to collect the second number of virtual resources from the user on behalf of the node device of the blockchain; the above-described one or more embodiments of the present disclosure reduce the waste of blockchain system resources, as the user may invoke the intelligent contract at will in the no charge mode easily resulting in a waste of blockchain system resources.
It should be noted that the above embodiment does not limit the execution sequence of the steps 404, 406 and 408.
In an illustrated embodiment, after obtaining a blockchain client-triggered smart contract invocation transaction, a management platform calculates a first amount of system resources of node devices of the blockchain consumed by processing the smart contract invocation transaction, and determines a second amount of virtual resources anchored with the first amount of system resource values; after obtaining the message that the virtual resource account of the user is deducted by the second amount of virtual resources, sending the intelligent contract invoking transaction to the blockchain, so that node equipment of the blockchain executes the intelligent contract invoking transaction based on the invoking parameter, and storing an executing result of the intelligent contract invoking transaction in the blockchain.
After calculating a first amount of system resources of the node device of the blockchain consumed by the intelligent contract invoking transaction and determining a second amount of virtual resources to be transferred by the user, the management platform may send a payment instruction of the second amount of virtual resources to the user client, for example, push a cash currency payment page on a user interface of the client, so that in response to payment verification information (such as a digital password and biological identification information) input by the user at the client, a financial institution corresponding to a cash currency account of the user completes deduction of the second amount of virtual resources from the cash currency account of the user. For another example, pushing the virtual point payment page circulated on the management platform on the user interface of the client, where the virtual point is obtained by exchanging currency cash on the management platform by the user, and storing the virtual point account opened on the management platform by the user, so that the management platform deducts the second amount of virtual resources from the virtual point account of the management platform by the user in response to payment verification information (such as a digital password and biological identification information) input by the user on the client.
When the virtual resource is a virtual resource issued on a blockchain, the payment instruction of the second number of virtual resources sent by the management platform to the client may construct a page for a transfer transaction pushed on a user interface of the client on the blockchain, so that the blockchain client may further send the transfer transaction to the blockchain through the management platform, so that after the transfer transaction is authenticated by the blockchain, the second number of virtual resources is deducted from the blockchain account of the user by the node device of the blockchain, or the second number of virtual resources is deducted from the blockchain account of the user and transferred to the blockchain account corresponding to the management platform. The management platform then obtains a message from the node device as to whether the transfer transaction was successfully performed.
If the number of virtual resources held by the virtual resource account of the user is smaller than the second number, the deduction process fails, or the management platform does not acquire a message that the virtual resource account of the client user is deducted by the second number within a preset time limit, and the management platform can return a prompt of failure of executing the intelligent contract calling transaction to the blockchain client.
It should be noted that, since the system resources consumed by the node device for executing the smart contract invoking transaction include various forms of computing resources, network resources, storage resources, and the like, some resource forms may be calculated based on the code of the smart contract invoking transaction before the smart contract invoking transaction is executed, and some resource forms may be accurately known only after the smart contract invoking transaction is executed. Thus, when the deducted second amount of virtual resources described in step 406 in this embodiment is estimated based on the system resources that may need to be consumed to perform the smart contract invocation transaction; the management platform may further monitor actual system resource consumption of the statistical node device in the process of processing the intelligent contract call transaction after the intelligent contract call transaction is successfully executed, so as to check whether the storage resources (such as storage resources) consumed by the intelligent contract after the call are obviously inconsistent with the estimated system resources, so as to perform corresponding virtual resource supplementing or returning operation, which is not limited in the specification.
In a further illustrated embodiment, after obtaining an intelligent contract invoking transaction triggered by a blockchain client, the management platform sends the intelligent contract invoking transaction to the blockchain, so that node equipment of the blockchain executes the intelligent contract invoking transaction based on the invoking parameter, and an execution result of the intelligent contract invoking transaction is stored in the blockchain; and calculating a first quantity of system resources of node equipment of the blockchain consumed by processing the intelligent contract call transaction, and determining a second quantity of virtual resources anchored with the first quantity of system resource values so that the virtual resource account of the user is deducted from the second quantity of virtual resources.
The process of calculating the first amount of system resources of the node device of the blockchain consumed by the intelligent contract invoking transaction and determining the second amount of virtual resources to be transferred by the user may be based on the system resources actually consumed by the node device of the blockchain for processing the intelligent contract invoking transaction, which are monitored by the management platform or are known by the node device in communication, to perform statistical calculation.
When the virtual resource is an entity asset outside the blockchain or the management platform issues a circulating point or token anchored to the entity asset, the management platform may send a payment instruction of a second amount of virtual resource to the client after knowing that the node device temporarily stores a transaction receipt (receipt) corresponding to the smart contract call transaction in the memory, for example, pushing a cash currency payment page on a user interface of the client, and the management platform issues a circulating virtual point payment page, so that in response to payment verification information (such as a digital password and biological identification information) input by a user at the client, a financial institution corresponding to the cash currency account of the user performs deduction of the second amount of virtual resource from the cash currency account of the user or from the virtual point account of the user at the management platform by the management platform. When the virtual resource is currency cash, the second amount of virtual resource may be transferred to a currency cash account corresponding to the management platform.
If the second number of virtual resources is successfully deducted from the user's cash monetary account, or from virtual resources held by the user in a virtual points account of the management platform, the node device may save a transaction receipt (receipt) generated after executing the smart contract invocation transaction in a MPT receipt tree of a blockchain; at this time, the management platform may return the prompt for completing the execution of the above-mentioned intelligent contract call transaction to the blockchain client, or return the execution result of the intelligent contract call transaction included in the transaction receipt;
if the number of the cash currency accounts of the users or the virtual resources held by the users in the virtual point accounts of the management platform is smaller than the second number or the second number of the virtual resources are not successfully deducted within a preset payment period, the management platform can instruct the node equipment to delete a transaction receipt (receipt) corresponding to the intelligent contract calling transaction from the memory; at this point, the management platform may return a prompt to the blockchain client that the intelligent contract call transaction execution failed.
When the virtual resource is a virtual resource published on a blockchain, the smart contract invocation transaction may further include an account identification of the blockchain account of the user. The account identifier is an account identifier of a user account for which the intelligent contract call transaction pays the second number of virtual resources; the account identification may include an account identification of the smart contract invoking transaction issuer, or may include an account identification of other users specified by the smart contract invoking transaction issuer.
In this embodiment, after the node device temporarily stores in the memory the account status of the smart contract after executing the smart contract invoking transaction and the transaction receipt (receipt) corresponding to the smart contract invoking transaction, the second number of virtual resources may be deducted from the blockchain account specified by the account identifier of the smart contract invoking transaction, or the second number of virtual resources may be deducted from the blockchain account specified by the account identifier of the smart contract invoking transaction, and the second number of virtual resources may be added to the blockchain account corresponding to the management platform.
If the second number of virtual resources are successfully deducted from the virtual resources held by the corresponding blockchain account of the account identifier, the node device can update the account state of the intelligent contract in the blockchain, and store a transaction receipt (receiver) generated after executing the intelligent contract call transaction in an MPT receipt tree of the blockchain; at this time, the management platform may return a prompt to the blockchain client that the execution of the above-mentioned intelligent contract call transaction is completed or that the execution result of the above-mentioned intelligent contract call transaction is obtained;
if the number of virtual resources held by the blockchain account corresponding to the account identifier is smaller than the second number, the node device cannot deduct the second number of virtual resources from the blockchain account corresponding to the account identifier, and at this time, the node device can delete the account state of the intelligent contract stored in the memory and a transaction receipt (receipt) corresponding to the transaction for calling the intelligent contract; at this point, the management platform may return a prompt to the blockchain client that the smart contract created the transaction execution failed.
Or when the number of virtual resources held by the virtual resource account is smaller than the second number, and the second number of virtual resources cannot be deducted in a sufficient amount, the management platform can instruct the node device to temporarily store the transaction receipt and the account state, send a balance supplement prompt to the blockchain client by the management platform, execute the deduction operation of the second number of virtual resources after the blockchain client completes balance supplement to the user account, update the account state of the intelligent contract in the blockchain after deduction is successful, and store the transaction receipt (receipt) in an MPT receipt tree of the blockchain, so that the management platform returns a prompt for completing transaction calling to the blockchain client.
In still another embodiment, when the virtual resource is a virtual resource published on a blockchain, after the call transaction of the smart contract is sent to the blockchain by the management platform, broadcasting, consensus verification, and execution in the blockchain may specifically include:
after receiving the intelligent contract call transaction, the node equipment can broadcast and transmit the intelligent contract call transaction in a blockchain network;
After receiving the intelligent contract calling transaction, the identification node in the block chain can carry out identification verification on the intelligent contract calling transaction;
if the common identification of the intelligent contract call transaction passes, deducting a second amount of virtual resources from a user account corresponding to a user identity based on the second amount of virtual resources anchored with the value of the system resources of the node device of the blockchain consumed in processing the intelligent contract call transaction; and executing the calling logic of the intelligent contract based on the calling parameter, and storing the execution result of the intelligent contract calling transaction in the blockchain.
In this embodiment, in order to reduce the system resource waste of the node device caused by failure of the intelligent contract call due to insufficient balance of virtual resources in the blockchain account corresponding to the user identifier to pay for the second amount of virtual resources transferred required for processing the intelligent contract call transaction, the consensus verification process performed by the consensus node of the blockchain may include: and verifying whether the number of virtual resources held by the blockchain user account corresponding to the identifier contained in the intelligent contract calling transaction is not less than a preset threshold.
The predetermined threshold may be a fixed virtual resource threshold set by the blockchain developer for transactions of the smart contract invocation type, e.g., may be set based on a minimum system resource consumption or an average number of virtual resources anchored by the system resource consumption executing transactions of the smart contract invocation type; under the condition, in order to enable the intelligent contract to be successfully called and executed, the user identifier is required to hold the number of virtual resources meeting the preset threshold value in the corresponding blockchain account, so that when the number of virtual resources in the user account is smaller than the preset threshold value, a prompt that the common identification verification is not passed is directly returned, and further consumption of system resources due to processing of the intelligent contract call transaction after the common identification verification stage of the node equipment is avoided.
In some embodiments, the smart contract invoking transaction is passed through the consensus verification including that the balance of the user account is not less than the preset threshold, but the transaction execution may fail due to excessive storage resources required for the smart contract invoking transaction or excessively complex logic for invoking the smart contract execution, so that the second number of virtual resources determined by the calculation is greater than the balance of the user account.
Optionally, the above-mentioned consensus verification may further include the process of calculating the first amount of system resources of the node device consumed by processing the smart contract call transaction and determining the second amount of virtual resources anchored with the first amount of system resources, for example, when the bottom layer protocol of the blockchain deploys a calculation model for calculating the amount of virtual resources anchored with the system resources of the node device consumed by processing the smart contract call transaction, the consensus node may obtain the second amount of virtual resources anchored by the node device for processing the smart contract, which is determined by calculating the bottom layer protocol of the blockchain, and at this time, the preset threshold may be the second amount of virtual resources determined by the calculation process, so that the consensus node of the blockchain performs the consensus verification that is sufficient for payment, based directly on the second amount of virtual resources required for processing the smart contract call transaction, thereby providing a more accurate consensus verification and improving the success rate verification that the smart contract call transaction is executed.
In one or more embodiments, after the second number of virtual resources is successfully deducted from the virtual resource account of the user, the management platform may hold the second number of virtual resources collected from the virtual resource account of the user, based on a preset period (including real-time or periodically) of allocation to the virtual resource account of the user or the entity of the mechanism corresponding to the node device of the blockchain, so as to complete allocation of virtual resources to the user or the entity of the mechanism providing the system resources in the blockchain system.
The present embodiment is not limited to the specific manner in which the virtual resources are allocated. For example, the management platform may distribute the received currency cash, or currency cash corresponding to the deducted virtual credit, to a currency cash account of a user or an entity of an organization corresponding to the node device of the blockchain, or the management platform may distribute virtual resources published on a chain received in the blockchain account to a blockchain account of the user or entity of the organization corresponding to the node device of the blockchain, and thereafter, in response to a redemption request of the user or organization, redeem the virtual resources distributed to the blockchain account thereof for physical assets outside the chain, and perform a cancellation process on the virtual resources on the redeemed chain.
The specification does not specifically limit the rule that the management platform allocates the second number of virtual resources to the blockchain accounts corresponding to each node device in the blockchain. For example, the management platform may hold the subtracted second number of virtual resources on average, where the virtual resource accounts are respectively allocated to the user or the entity corresponding to each node device of the blockchain.
Or based on the storage medium performance attribute of the account storage resources allocated by each node device of the blockchain for the intelligent contract, the management platform respectively holds the virtual resource accounts allocated from the second number of virtual resources to the user or the mechanism entity corresponding to each node device of the blockchain. For example, because the storage medium configurations of the respective node devices are different, the management platform may rate the storage medium of each node device based on the storage medium performance attribute (e.g., the hard disk performance attribute such as hdd, ssd, nvm) of each node device obtained by monitoring the respective node device, so as to allocate a higher proportion of virtual resources for the node device providing the high-level storage medium and allocate a lower proportion of virtual resources for the node device providing the low-level storage medium.
In yet another illustrated embodiment, the smart contract creator provides blockchain services to the smart contract caller based on the created smart contract being invoked by the smart contract caller, and thus, the creator of the smart contract or the smart contract itself may also obtain virtual resources based on the system resources it provides—based on the invocation parameters invoking the corresponding logical computing services executing the smart contract. Specifically, the execution logic corresponding to the contract code of the smart contract may include virtual resource transfer logic; the virtual machine of each node device executes the intelligent contract calling transaction, and the method further comprises the following steps: executing the virtual resource transfer logic, determining a ninth number of virtual resources corresponding to the call parameter, and transferring the ninth number of virtual resources from the virtual resources held by the user account to the smart contract account or other user accounts specified by the smart contract (such as developer accounts of the smart contract).
In the present embodiment, a manner of determining the ninth number of virtual resources is not limited, and the ninth number of virtual resources may be a fixed value of the number of virtual resources corresponding to the type of the interface function included in the call parameter; or the ninth number of virtual resources may be calculated based on the interface function type and the input parameter value included in the call parameter when the intelligent contract call transaction is executed. The intelligent contract developer can develop various calculation and acquisition methods of virtual resources corresponding to the calling parameters from specific business services provided by the intelligent contract, and all the calculation and acquisition methods are within the scope of the embodiment.
Based on the method for calling the intelligent contract according to one or more embodiments, the system resources carried by the node device of the blockchain can be value anchored with the virtual resources, so that the second number of virtual resources can be anchored based on the first number of system resources of the node device of the blockchain consumed by the node device for processing the intelligent contract call transaction, and the second number of virtual resources are collected by a management platform for executing management on the node device of the blockchain, thereby optimizing the utilization of the blockchain resources and effectively preventing the waste of the system resources on the blockchain.
The management platform can allocate the virtual resources received by the node users of the blockchain to the node users of the blockchain in real time or periodically based on preset allocation rules, so that each node user providing system resources for the blockchain can obtain corresponding benefits. Thus, each node device in the blockchain is encouraged to contribute corresponding system resources in a more fair manner of virtual resource allocation than in the existing mode where only mineworker nodes collect transaction charges.
Corresponding to the above-described flow implementation, the embodiments of the present disclosure also provide the invoking means 50, 60 of the smart contract. The apparatus 50, 60 may be implemented in software, or may be implemented in hardware or a combination of hardware and software. Taking software implementation as an example, the device in a logic sense is formed by reading corresponding computer program instructions into a memory through a CPU (Central Process Unit, central processing unit) of the device. In addition to the CPU, the memory, and the storage shown in fig. 7, the device in which the above apparatus is located generally includes other hardware such as a chip for performing wireless signal transmission and reception, and/or other hardware such as a board card for implementing a network communication function.
As shown in fig. 5, the present disclosure further provides a calling device 50 of an intelligent contract, which is applied to a management platform for performing management on a node device of a blockchain, where a system resource and a virtual resource carried by the node device of the blockchain are value anchored; the apparatus 50 includes:
an obtaining unit 502, configured to obtain an intelligent contract call transaction triggered by a blockchain client, where the intelligent contract call transaction includes a call parameter of an intelligent contract;
a calculation unit 504 configured to calculate a first amount of system resources of a node device of the blockchain consumed for processing the smart contract invocation transaction, and determine a second amount of the virtual resources anchored with the first amount of system resource values;
and a sending unit 506, configured to send the smart contract invoking transaction to the blockchain after the virtual resource account of the user is deducted from the second number of virtual resources, so that the node device of the blockchain executes the smart contract invoking transaction based on the invoking parameter, and store an execution result of the smart contract invoking transaction in the blockchain.
In a further illustrated embodiment, the apparatus 50 further comprises:
And the allocation unit 508 allocates the second number of virtual resources to the user account corresponding to the node equipment of the blockchain for holding.
In a further illustrated embodiment, the dispensing unit 508 is further configured to:
the second number of virtual resources are evenly distributed to user accounts corresponding to node equipment of the blockchain for holding;
or, based on the storage medium attribute of the account storage resources allocated by each node device of the blockchain for the intelligent contract, allocating the second number of virtual resources to the user account corresponding to the node device of the blockchain for holding.
In yet another illustrated embodiment, processing the system resources of the blockchain node device consumed by the smart contract invocation transaction includes a combination of one or more of the following:
processing computing resources of node devices of the blockchain actually consumed by the intelligent contract call transaction;
processing network resources of node equipment of the blockchain actually consumed by the intelligent contract calling transaction;
processing the intelligent contract invokes storage resources of node devices of the blockchain that are actually consumed by the transaction.
In yet another illustrated embodiment, the blockchain deploys a resource computation contract, the execution logic corresponding to the contract code of the resource computation contract including resource computation logic;
the computing unit 504 is further configured to:
invoking the resource computation contract, executing the resource computation logic, computing a first amount of system resources of the node device of the blockchain consumed by processing the smart contract invocation transaction, and determining a second amount of the virtual resources anchored with the second amount of system resource value.
In a further illustrated embodiment, the apparatus 50 further comprises a return unit 510:
before the intelligent contract invoking transaction is sent to the blockchain, if the virtual resource account of the user is not successfully deducted from the second number of virtual resources within a preset time limit, a prompt of failure in executing the intelligent contract invoking transaction is returned to the blockchain client.
In yet another illustrated embodiment, the management platform comprises a cloud computing management platform; the node devices of the blockchain include virtual machines created on physical hosts managed by a cloud computing management platform.
The implementation process of the functions and roles of each unit in the above-mentioned device 50 is specifically shown in the implementation process of the corresponding steps in the calling method of the intelligent contract executed by the above-mentioned management platform, and the relevant points only need to be referred to in the part of the description of the method embodiment, and are not repeated here.
As shown in fig. 6, the present disclosure further provides a calling device 60 of an intelligent contract, which is applied to a management platform for performing management on a node device of a blockchain, where a system resource and a virtual resource carried by the node device of the blockchain are value anchored; the apparatus 60 includes:
an obtaining unit 602, configured to obtain an intelligent contract invoking transaction triggered by the blockchain client, where the intelligent contract invoking transaction includes an invoking parameter of an intelligent contract;
a transmitting unit 604, configured to transmit the smart contract call transaction to the blockchain, so that a node device of the blockchain executes the smart contract call transaction based on the call parameter, and store an execution result of the smart contract call transaction in the blockchain;
a calculating unit 606 configured to calculate a first amount of system resources of a node device of the blockchain consumed for processing the smart contract invocation transaction, determine a second amount of virtual resources anchored to the first amount of system resource value, and cause a virtual resource account of the user to be deducted from the second amount of virtual resources.
In a further illustrated embodiment, the apparatus 60 further comprises:
and the allocation unit 608 allocates the second number of virtual resources to the user account corresponding to the node equipment of the blockchain for holding.
In a further illustrated embodiment, the allocation unit 608 is further configured to:
the second number of virtual resources are evenly distributed to user accounts corresponding to node equipment of the blockchain for holding;
or, based on the storage medium attribute of the account storage resources allocated by each node device of the blockchain for the intelligent contract, allocating the second number of virtual resources to the user account corresponding to the node device of the blockchain for holding.
In yet another illustrated embodiment, processing the system resources of the blockchain node device consumed by the smart contract invocation transaction includes a combination of one or more of the following:
processing computing resources of node devices of the blockchain actually consumed by the intelligent contract call transaction;
processing network resources of node equipment of the blockchain actually consumed by the intelligent contract calling transaction;
processing the intelligent contract invokes storage resources of node devices of the blockchain that are actually consumed by the transaction.
In yet another illustrated embodiment, the blockchain deploys a resource computation contract, the execution logic corresponding to the contract code of the resource computation contract including resource computation logic;
the computing unit 606 is further configured to:
invoking the resource computation contract, executing the resource computation logic, computing a first amount of system resources of the node device of the blockchain consumed by processing the smart contract invocation transaction, and determining a second amount of the virtual resources anchored with the second amount of system resource value.
In yet another illustrated embodiment, the virtual resource is a blockchain asset published on a blockchain with off-chain assets held by users as value anchors;
the intelligent contract invoking transaction further includes an account identification of the user account;
the virtual resource account of the user includes a blockchain user account corresponding to the account identification.
In a further illustrated embodiment, the apparatus 60 further comprises a return unit 610,
if the virtual resource account of the user is successfully deducted from the second quantity of virtual resources, saving the generated transaction receipt of the intelligent contract invoking transaction to a blockchain, and returning an execution result of the intelligent contract invoking transaction to the blockchain client based on the transaction receipt;
And if the number of virtual resources held by the virtual resource account of the user is smaller than the second number, deleting the generated transaction receipt of the intelligent contract calling transaction, and returning a prompt of failure of intelligent contract calling to the blockchain client.
In yet another illustrated embodiment, the management platform comprises a cloud computing management platform; the node devices of the blockchain include virtual machines created on physical hosts managed by a cloud computing management platform.
The implementation process of the functions and roles of each unit in the above-mentioned device 60 is specifically shown in the implementation process of the corresponding steps in the calling method of the intelligent contract executed by the above-mentioned management platform, and the relevant points only need to be referred to in the part of the description of the method embodiment, and are not repeated here.
The apparatus embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical modules, i.e., may be located in one place, or may be distributed over a plurality of network modules. Some or all of the units or modules may be selected according to actual needs to achieve the purposes of the present description. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
The apparatus, units, modules illustrated in the above embodiments may be implemented in particular by a computer chip or entity or by a product having a certain function. A typical implementation device is a computer, which may be in the form of a personal computer, laptop computer, cellular telephone, camera phone, smart phone, personal digital assistant, media player, navigation device, email device, game console, tablet computer, wearable device, or a combination of any of these devices.
Corresponding to the above method embodiments, embodiments of the present disclosure also provide a computer device, as shown in fig. 7, which includes a memory and a processor. Wherein the memory has stored thereon a computer program executable by the processor; the processor, when executing the stored computer program, performs the steps of the method of invoking the smart contract performed by the management platform in the embodiment of sending the smart contract invocation transaction into the blockchain after the second number of virtual resources is deducted from the user's virtual resource account. For a detailed description of the steps of the intelligent contract invoking method performed by the node device, please refer to the previous contents, and will not be repeated.
Corresponding to the above method embodiments, embodiments of the present disclosure also provide a computer device, as shown in fig. 7, which includes a memory and a processor. Wherein the memory has stored thereon a computer program executable by the processor; the processor, when running the stored computer program, performs the steps of the method for invoking the intelligent contract performed by the management platform according to the embodiment of calculating the second number of virtual resources such that the second number of virtual resources is deducted after sending the intelligent contract invoking transaction to the blockchain. For a detailed description of the steps of the intelligent contract invoking method performed by the node device, please refer to the previous contents, and will not be repeated.
The foregoing description of the preferred embodiments is provided for the purpose of illustration only, and is not intended to limit the scope of the disclosure, since any modifications, equivalents, improvements, etc. that fall within the spirit and principles of the disclosure are intended to be included within the scope of the disclosure.
In one typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of computer-readable media.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data.
Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises the element.
It will be appreciated by those skilled in the art that embodiments of the present description may be provided as a method, system, or computer program product. Accordingly, embodiments of the present specification may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Moreover, embodiments of the present description may take the form of a computer program product on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.

Claims (30)

1. The calling method of the intelligent contract is applied to a management platform for executing management on node equipment of a blockchain, and the management platform is connected with each node equipment of the blockchain; the system resources and virtual resources carried by the node equipment of the block chain are value anchored; the virtual resource has a value anchoring relationship with real assets outside the chain; the blockchain is provided with a resource calculation contract, and execution logic corresponding to contract codes of the resource calculation contract comprises resource calculation logic;
the method comprises the following steps:
acquiring intelligent contract calling transaction triggered by a blockchain client, wherein the intelligent contract calling transaction comprises calling parameters of an intelligent contract;
Locally invoking the resource computation contract, executing the resource computation logic, computing a first amount of system resources of node devices of the blockchain consumed by processing the smart contract invocation transaction, and determining a second amount of the virtual resources anchored with the first amount of system resource value;
after the virtual resource account of the user is deducted from the second number of virtual resources, the intelligent contract invoking transaction is sent to the blockchain, so that node equipment of the blockchain executes the intelligent contract invoking transaction based on the invoking parameter, and an executing result of the intelligent contract invoking transaction is stored in the blockchain.
2. The method of claim 1, further comprising:
and distributing the second number of virtual resources to virtual resource accounts corresponding to the node equipment of the blockchain for holding.
3. The method of claim 2, the allocating the second number of virtual resources to the user account corresponding to the node device of the blockchain for holding, comprising:
the second number of virtual resources are evenly distributed to virtual resource accounts corresponding to the node equipment of the blockchain for holding;
Or, based on the storage medium performance attribute of the storage resource of the account allocated by each node device of the blockchain for the intelligent contract, allocating the second number of virtual resources to the virtual resource account corresponding to the node device of the blockchain for holding.
4. The method of claim 1, processing system resources of node devices of the blockchain consumed by the smart contract invocation transaction, comprising a combination of one or more of the following:
processing computing resources of node devices of the blockchain consumed by the smart contract invocation transaction;
processing network resources of node devices of the blockchain consumed by the intelligent contract invocation transaction;
processing the smart contract invokes storage resources of node devices of the blockchain consumed by the transaction.
5. The method of claim 1, the virtual resource is a blockchain asset published on a blockchain with off-chain assets held by users as value anchors.
6. The method of claim 1 or 5, further comprising:
before the intelligent contract invoking transaction is sent to the blockchain, if the virtual resource account of the user is not successfully deducted from the second number of virtual resources within a preset time limit, a prompt of failure in executing the intelligent contract invoking transaction is returned to the blockchain client.
7. The method of claim 1, the management platform comprising a cloud computing management platform; the node devices of the blockchain include virtual machines created on physical hosts managed by a cloud computing management platform.
8. The calling method of the intelligent contract is applied to a management platform for executing management on node equipment of a blockchain, and the management platform is connected with each node equipment of the blockchain; the system resources and virtual resources carried by the node equipment of the block chain are value anchored; the virtual resource has a value anchoring relationship with real assets outside the chain; the blockchain is provided with a resource calculation contract, and execution logic corresponding to contract codes of the resource calculation contract comprises resource calculation logic; the method comprises the following steps:
acquiring intelligent contract calling transaction triggered by a blockchain client, wherein the intelligent contract calling transaction comprises calling parameters of an intelligent contract;
transmitting the intelligent contract invoking transaction to the blockchain, so that node equipment of the blockchain executes the intelligent contract invoking transaction based on the invoking parameter, and storing an executing result of the intelligent contract invoking transaction in the blockchain;
And locally invoking the resource computation contract, executing the resource computation logic, computing and processing a first quantity of system resources of node equipment of the blockchain consumed by the intelligent contract invocation transaction, and determining a second quantity of the virtual resources anchored with the first quantity of system resource values so that a virtual resource account of a user is deducted from the second quantity of virtual resources.
9. The method of claim 8, further comprising:
and distributing the second number of virtual resources to virtual resource accounts corresponding to the node equipment of the blockchain for holding.
10. The method of claim 9, the allocating the second number of virtual resources to the user account corresponding to the node device of the blockchain for holding, comprising:
the second number of virtual resources are evenly distributed to virtual resource accounts corresponding to the node equipment of the blockchain for holding;
or based on the storage medium attribute of the account storage resources allocated by each node device of the blockchain for the intelligent contract, allocating the second number of virtual resources to the virtual resource account corresponding to the node device of the blockchain for holding.
11. The method of claim 8, processing system resources of node devices of the blockchain consumed by the smart contract invocation transaction, comprising a combination of one or more of the following:
processing computing resources of node devices of the blockchain actually consumed by the intelligent contract call transaction;
processing network resources of node equipment of the blockchain actually consumed by the intelligent contract calling transaction;
processing the intelligent contract invokes storage resources of node devices of the blockchain that are actually consumed by the transaction.
12. The method of claim 8, the virtual resource being a blockchain asset published on a blockchain with off-chain assets held by users as value anchors;
the intelligent contract invoking transaction further includes an account identification of the user account;
the virtual resource account of the user includes a blockchain user account corresponding to the account identification.
13. The method of claim 8 or 12, instructing a node device to save a generated transaction receipt of the smart contract invoking transaction to a blockchain if the virtual resource account of the user is successfully deducted from the second amount of virtual resources, and returning an execution result of the smart contract invoking transaction to the blockchain client based on the transaction receipt;
And if the number of virtual resources held by the virtual resource account of the user is smaller than the second number, indicating node equipment to delete the generated transaction receipt of the intelligent contract call transaction, and returning a prompt of failure of the intelligent contract call to the blockchain client.
14. The method of claim 12, prior to a node device executing the smart contract creation transaction, the method further comprising:
the node device broadcasts the intelligent contract creation transaction to a blockchain network to perform consensus verification on the intelligent contract creation transaction; wherein the consensus verification comprises: verifying whether the number of virtual resources held by the user account is not less than a preset threshold;
if the common identification of the intelligent contract creation transaction is verified, the node device executes the intelligent contract creation transaction.
15. The method of claim 8, the management platform comprising a cloud computing management platform; the node devices of the blockchain include virtual machines created on physical hosts managed by a cloud computing management platform.
16. The calling device of the intelligent contract is applied to a management platform for executing management on node equipment of a blockchain, and the management platform is connected with each node equipment of the blockchain; the system resources and virtual resources carried by the node equipment of the block chain are value anchored; the virtual resource has a value anchoring relationship with real assets outside the chain; the blockchain is provided with a resource calculation contract, and execution logic corresponding to contract codes of the resource calculation contract comprises resource calculation logic; the device comprises:
The system comprises an acquisition unit, a control unit and a control unit, wherein the acquisition unit acquires an intelligent contract calling transaction triggered by a blockchain client, and the intelligent contract calling transaction comprises calling parameters of an intelligent contract;
a computing unit that invokes the resource computation contract locally, executes the resource computation logic, computes a first amount of system resources of the node device of the blockchain that are consumed by processing the smart contract invocation transaction, and determines a second amount of the virtual resources that are value anchored with the first amount of system resources;
and the sending unit is used for sending the intelligent contract calling transaction to the blockchain after the virtual resource account of the user is deducted from the second number of virtual resources, so that the node equipment of the blockchain executes the intelligent contract calling transaction based on the calling parameter, and the execution result of the intelligent contract calling transaction is stored in the blockchain.
17. The apparatus of claim 16, further comprising:
and the allocation unit allocates the second number of virtual resources to the virtual resource account corresponding to the node equipment of the blockchain for holding.
18. The apparatus of claim 17, the distribution unit further to:
The second number of virtual resources are evenly distributed to virtual resource accounts corresponding to the node equipment of the blockchain for holding;
or based on the storage medium attribute of the account storage resources allocated by each node device of the blockchain for the intelligent contract, allocating the second number of virtual resources to the virtual resource account corresponding to the node device of the blockchain for holding.
19. The apparatus of claim 16, processing system resources of node devices of the blockchain consumed by the smart contract invocation transaction, comprising a combination of one or more of:
processing computing resources of node devices of the blockchain actually consumed by the intelligent contract call transaction;
processing network resources of node equipment of the blockchain actually consumed by the intelligent contract calling transaction;
processing the intelligent contract invokes storage resources of node devices of the blockchain that are actually consumed by the transaction.
20. The apparatus of claim 16, further comprising a return unit:
before the intelligent contract invoking transaction is sent to the blockchain, if the virtual resource account of the user is not successfully deducted from the second number of virtual resources within a preset time limit, a prompt of failure in executing the intelligent contract invoking transaction is returned to the blockchain client.
21. The apparatus of claim 16, the management platform comprising a cloud computing management platform; the node devices of the blockchain include virtual machines created on physical hosts managed by a cloud computing management platform.
22. The calling device of the intelligent contract is applied to a management platform for executing management on node equipment of a blockchain, and the management platform is connected with each node equipment of the blockchain; the system resources and virtual resources carried by the node equipment of the block chain are value anchored; the virtual resource has a value anchoring relationship with real assets outside the chain; the blockchain is provided with a resource calculation contract, and execution logic corresponding to contract codes of the resource calculation contract comprises resource calculation logic; the device comprises:
the system comprises an acquisition unit, a control unit and a control unit, wherein the acquisition unit acquires an intelligent contract calling transaction triggered by a blockchain client, and the intelligent contract calling transaction comprises calling parameters of an intelligent contract;
the sending unit is used for sending the intelligent contract calling transaction to the blockchain so as to enable node equipment of the blockchain to execute the intelligent contract calling transaction based on the calling parameter, and the execution result of the intelligent contract calling transaction is stored in the blockchain;
And the calculating unit is used for locally calling the resource calculation contract after the node equipment executes the intelligent contract calling transaction based on the calling parameter, executing the resource calculation logic, calculating and processing the first quantity of the system resources of the node equipment of the blockchain consumed by the intelligent contract calling transaction, and determining the second quantity of the virtual resources anchored with the first quantity of the system resource value so that the virtual resource account of the user is deducted by the second quantity of the virtual resources.
23. The apparatus of claim 22, further comprising:
and the allocation unit allocates the second number of virtual resources to the virtual resource account corresponding to the node equipment of the blockchain for holding.
24. The apparatus of claim 23, the distribution unit further to:
the second number of virtual resources are evenly distributed to virtual resource accounts corresponding to the node equipment of the blockchain for holding;
or based on the storage medium attribute of the account storage resources allocated by each node device of the blockchain for the intelligent contract, allocating the second number of virtual resources to the virtual resource account corresponding to the node device of the blockchain for holding.
25. The apparatus of claim 22, processing system resources of node devices of the blockchain consumed by the smart contract invocation transaction, comprising a combination of one or more of:
processing computing resources of node devices of the blockchain actually consumed by the intelligent contract call transaction;
processing network resources of node equipment of the blockchain actually consumed by the intelligent contract calling transaction;
processing the intelligent contract invokes storage resources of node devices of the blockchain that are actually consumed by the transaction.
26. The apparatus of claim 22, the virtual resource is a blockchain asset published on a blockchain with off-chain assets held by users as value anchors;
the intelligent contract invoking transaction further includes an account identification of the user account;
the virtual resource account of the user includes a blockchain user account corresponding to the account identification.
27. The apparatus of claim 22 or 26, further comprising a return unit,
if the virtual resource account of the user is successfully deducted from the second quantity of virtual resources, indicating node equipment to save the generated transaction receipt of the intelligent contract invoking transaction to a blockchain, and returning an execution result of the intelligent contract invoking transaction to the blockchain client based on the transaction receipt;
And if the number of virtual resources held by the virtual resource account of the user is smaller than the second number, indicating node equipment to delete the generated transaction receipt of the intelligent contract call transaction, and returning a prompt of failure of the intelligent contract call to the blockchain client.
28. The apparatus of claim 22, the management platform comprising a cloud computing management platform; the node devices of the blockchain include virtual machines created on physical hosts managed by a cloud computing management platform.
29. A computer device, comprising: a memory and a processor; the memory has stored thereon a computer program executable by the processor; the processor, when running the computer program, performs the method of any one of claims 1 to 7.
30. A computer device, comprising: a memory and a processor; the memory has stored thereon a computer program executable by the processor; the processor, when running the computer program, performs the method of any one of claims 8 to 15.
CN202011128574.9A 2020-10-20 2020-10-20 Intelligent contract calling method and device Active CN112015577B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011128574.9A CN112015577B (en) 2020-10-20 2020-10-20 Intelligent contract calling method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011128574.9A CN112015577B (en) 2020-10-20 2020-10-20 Intelligent contract calling method and device

Publications (2)

Publication Number Publication Date
CN112015577A CN112015577A (en) 2020-12-01
CN112015577B true CN112015577B (en) 2024-04-16

Family

ID=73527645

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011128574.9A Active CN112015577B (en) 2020-10-20 2020-10-20 Intelligent contract calling method and device

Country Status (1)

Country Link
CN (1) CN112015577B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115865365A (en) * 2022-11-24 2023-03-28 蚂蚁区块链科技(上海)有限公司 Block chain based branch account processing method, device and system
CN116739593B (en) * 2023-08-15 2024-01-19 腾讯科技(深圳)有限公司 Transaction resource processing method, device, equipment and medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108712487A (en) * 2018-05-11 2018-10-26 北京奇虎科技有限公司 Logical card distribution method, device and equipment based on block chain
CN109510713A (en) * 2018-12-29 2019-03-22 杭州趣链科技有限公司 A kind of shared motivational techniques of the flow based on block chain
CN109784883A (en) * 2018-12-20 2019-05-21 众安信息技术服务有限公司 A kind of charging method, block catenary system and storage medium based on the logical card of block chain
CN110333948A (en) * 2019-06-11 2019-10-15 阿里巴巴集团控股有限公司 Virtual resource allocation method and apparatus based on block chain
CN110458702A (en) * 2019-07-15 2019-11-15 阿里巴巴集团控股有限公司 Based on the virtual resource allocation method and device of block chain, electronic equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108712487A (en) * 2018-05-11 2018-10-26 北京奇虎科技有限公司 Logical card distribution method, device and equipment based on block chain
CN109784883A (en) * 2018-12-20 2019-05-21 众安信息技术服务有限公司 A kind of charging method, block catenary system and storage medium based on the logical card of block chain
CN109510713A (en) * 2018-12-29 2019-03-22 杭州趣链科技有限公司 A kind of shared motivational techniques of the flow based on block chain
CN110333948A (en) * 2019-06-11 2019-10-15 阿里巴巴集团控股有限公司 Virtual resource allocation method and apparatus based on block chain
CN110458702A (en) * 2019-07-15 2019-11-15 阿里巴巴集团控股有限公司 Based on the virtual resource allocation method and device of block chain, electronic equipment

Also Published As

Publication number Publication date
CN112015577A (en) 2020-12-01

Similar Documents

Publication Publication Date Title
WO2021008122A1 (en) Virtual resource allocation method and device employing blockchain, and electronic apparatus
US11032215B2 (en) Allocating virtual resource based on block chain
CN107679857B (en) Block chain cross-chain transaction method and storage medium
CN112200571B (en) Resource distribution method and device based on block chain and electronic equipment
CN110458631B (en) Bill number distribution method and device based on block chain and electronic equipment
CN112015823B (en) Block chain data deleting method and device
CN111966538B (en) Block chain data recovery method and device
CN111966757B (en) Method and device for managing storage space of intelligent contract account
CN110599323B (en) Resource processing method and processing equipment
CN112015822B (en) Block chain data deleting method and device
CN111967995A (en) Intelligent contract creating method and device
CN112200567B (en) Resource management method and device based on block chain and electronic equipment
CN111966503B (en) Method and device for managing storage space of intelligent contract account
CN112015576A (en) Calling method and device of intelligent contract
CN112200568B (en) Block chain based account creation method and device and electronic equipment
CN112015577B (en) Intelligent contract calling method and device
CN112766854B (en) Block chain-based digital commodity transaction method and device
CN112015596A (en) Block chain data recovery method and device
CN112200572A (en) Resource distribution method and device based on block chain and electronic equipment
CN110443612B (en) Block chain-based reimbursement expense segmentation method and device and electronic equipment
CN113762940A (en) Asset management method and device based on block chain and electronic equipment
CN111967994B (en) Intelligent contract creating method and device
CN112200570A (en) Resource distribution method and device based on block chain and electronic equipment
CN112365353A (en) Block chain-based content propagation method and device
CN111523052A (en) Block chain-based user recommendation method and device and electronic equipment

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
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40041512

Country of ref document: HK

GR01 Patent grant
GR01 Patent grant