[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN112926964B - Asset management method based on blockchain, electronic equipment and readable storage medium - Google Patents

Asset management method based on blockchain, electronic equipment and readable storage medium Download PDF

Info

Publication number
CN112926964B
CN112926964B CN202110221051.7A CN202110221051A CN112926964B CN 112926964 B CN112926964 B CN 112926964B CN 202110221051 A CN202110221051 A CN 202110221051A CN 112926964 B CN112926964 B CN 112926964B
Authority
CN
China
Prior art keywords
order
asset
transaction
contract
payment
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
CN202110221051.7A
Other languages
Chinese (zh)
Other versions
CN112926964A (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.)
Chengdu Quality Starker Technology Co Ltd
Original Assignee
Chengdu Quality Starker 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 Chengdu Quality Starker Technology Co Ltd filed Critical Chengdu Quality Starker Technology Co Ltd
Priority to CN202110221051.7A priority Critical patent/CN112926964B/en
Publication of CN112926964A publication Critical patent/CN112926964A/en
Application granted granted Critical
Publication of CN112926964B publication Critical patent/CN112926964B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/08Payment architectures
    • G06Q20/10Payment architectures specially adapted for electronic funds transfer [EFT] systems; specially adapted for home banking systems
    • G06Q20/102Bill distribution or payments
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3825Use of electronic signatures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/40Authorisation, e.g. identification of payer or payee, verification of customer or shop credentials; Review and approval of payers, e.g. check credit lines or negative lists
    • G06Q20/401Transaction verification
    • G06Q20/4014Identity check for transactions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/40Authorisation, e.g. identification of payer or payee, verification of customer or shop credentials; Review and approval of payers, e.g. check credit lines or negative lists
    • G06Q20/405Establishing or using transaction specific rules
    • 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
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • G06Q30/0601Electronic shopping [e-shopping]
    • G06Q30/0633Lists, e.g. purchase orders, compilation or processing
    • G06Q30/0635Processing of requisition or of purchase orders
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange

Landscapes

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

Abstract

The embodiment of the invention provides an asset management method based on a blockchain, electronic equipment and a readable storage medium, aiming at improving the reliability of assets on a chain during asset exchange. The method is applied to node equipment of a blockchain network, wherein an asset contract is deployed in the blockchain network, a selling account and a seller account are recorded in the asset contract, and the selling account is used for hosting selling assets of a seller; the method comprises the following steps: responding to the asset reservation transaction of the buyer, creating an order according to the information carried by the asset reservation transaction, wherein the order is used for reserving the selling assets in the selling account, and the current order state of the order is an asset reservation state; updating the order status of the corresponding order to an in-chain payment status in response to the payment registration transaction of the buyer; in response to an asset rollback transaction for a seller, determining whether to rollback a sold asset of the sales account that was reserved for the order to the seller account according to an order status of the corresponding order.

Description

Asset management method based on blockchain, electronic equipment and readable storage medium
Technical Field
The present invention relates to the field of communications technologies, and in particular, to an asset management method based on a blockchain, an electronic device, and a readable storage medium.
Background
The block chain technology is realized based on a block chain network, and each node device of the block chain network realizes generation, consensus and storage of block data by running a block chain program, so that a tamper-proof mechanism of the data is finally achieved, and a safe and credible technical new idea is provided for business development.
The blockchain technology can be applied to various business scenes, such as financial field, electronic commerce field, commodity or raw material tracing field, electronic certificate storing field and the like, and can be used for developing business due to the fact that the blockchain technology realizes a data tamper-proof mechanism, so that the trust crisis among parties involved in the business can be solved.
In the related art, assets may be hosted on a blockchain network, and these assets hosted in the blockchain network may be simply referred to as on-chain assets. The buyer can reliably exchange on-chain assets based on the blockchain network, such as the buyer exchanging the seller's second on-chain assets through its first on-chain assets. However, in the related art, it is also difficult to ensure the reliability of the on-chain asset when implementing the exchange of the off-chain asset with the on-chain asset.
Disclosure of Invention
The embodiment of the invention aims to provide an asset management method based on a blockchain, electronic equipment and a readable storage medium, aiming at improving the reliability of assets on a chain when assets are exchanged. The specific technical scheme is as follows:
in a first aspect of an embodiment of the present invention, there is provided an asset management method based on a blockchain, the method being applied to node devices of a blockchain network, in which asset contracts are deployed, in which asset contracts are recorded a sales account for hosting a sales asset of a seller and a seller account for hosting a non-sales asset of the seller; the method comprises the following steps:
Creating an order from information carried by an asset reservation transaction of a buyer in response to the asset reservation transaction; the order being for booking a sales asset in the sales account; the order includes an order status, the current order status of the order being an asset reservation status;
Updating an order status of an order for a payment registration exchange to an in-chain payment status in response to a payment registration transaction of a buyer;
responsive to an asset rollback transaction for a seller, determining whether to rollback a sold asset of the sales account that was reserved for the order to the seller account according to an order status of the order for which the asset rollback transaction was directed.
In a second aspect of the embodiment of the present invention, an electronic device is provided, including a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete communication with each other through the communication bus;
the memory is used for storing a computer program;
the processor is configured to implement the asset management method based on the blockchain provided by any embodiment of the present invention when executing the program stored on the memory.
In a third aspect of embodiments of the present invention, there is provided a computer readable storage medium having stored thereon a computer program which when executed by a processor implements the blockchain-based asset management method provided by any of the embodiments of the present invention.
In the invention, a selling account and a seller account are recorded in an asset contract, wherein the selling account is used for hosting a selling asset of a seller, and the seller account is used for hosting a non-selling asset of the seller. In this way, isolation is formed between the selling assets of the seller and the non-selling assets, so that selling is performed for only the selling assets of the seller more safely and reliably. When the node device processes the asset reservation transaction, an order is created according to information carried by the asset reservation transaction, the order is used for reserving the sold assets in the sales accounts, and the order further comprises an order state, and the current order state of the order is the asset reservation state. When the node device processes the payment registration transaction, the order status of the corresponding order is updated to an under-chain payment status, which characterizes the buyer as having completed payment for the predetermined sales asset at a system outside the blockchain network. When the node device processes the asset rollback transaction, it is determined whether to rollback the sold asset reserved by the order in the sold account to the seller account according to the order state of the corresponding order. Thus, for the operation of returning the selling asset managed by the selling account to the account of the seller, the blockchain network controls the selling asset, so that the seller is prevented from returning the selling asset to the account of the seller at will under the condition of violating the fairness and reliability principle. In summary, by implementing the present invention, the reliability of assets on a chain of asset exchanges can be improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below. It is evident that the drawings in the following description are only some embodiments of the present invention and that other drawings may be obtained from these drawings by those of ordinary skill in the art without inventive effort.
FIG. 1 (a) is a schematic diagram illustrating a first stage of a blockchain-based asset management method according to an embodiment of the present invention;
FIG. 1 (b) is a schematic diagram illustrating a second phase of a blockchain-based asset management method according to an embodiment of the present invention;
FIG. 1 (c) is a schematic diagram illustrating other stages of a blockchain-based asset management method according to an embodiment of the present invention;
FIG. 2 (a) is a schematic diagram of the status of a corresponding asset contract by a node device after processing a trusted transaction;
FIG. 2 (b) is a schematic diagram of the status of a corresponding asset contract by a node device after a sales transaction is processed;
FIG. 2 (c) is a state diagram of a corresponding asset contract of a node device after completion of a sell asset settlement;
FIG. 3 is a flow chart of a blockchain-based asset management method in accordance with an embodiment of the present invention;
fig. 4 is a schematic diagram of an electronic device according to an embodiment of the invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. It will be apparent that the described embodiments are some, but not all, embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
In the related art, assets may be hosted on a blockchain network, and these assets hosted in the blockchain network may be simply referred to as on-chain assets. The buyer can reliably exchange on-chain assets based on the blockchain network, such as the buyer exchanging the seller's second on-chain assets through its first on-chain assets. However, in the related art, it is also difficult to ensure the reliability of the on-chain asset when implementing the exchange of the off-chain asset with the on-chain asset.
In view of this, the present invention proposes a blockchain-based asset management method, an electronic device, and a readable storage medium, which aim to improve the reliability of assets on a chain when assets are exchanged, through the following embodiments.
It should be noted that, the present invention applies to a blockchain network, and the method provided by the present invention is executed by a node device of the blockchain network. Thus, assets hosted by a blockchain network embodying the present invention may be considered on-chain assets, while assets hosted by other systems may be considered off-chain assets. Wherein the other systems include, but are not limited to: centralized financial systems, other blockchain networks.
To facilitate understanding, illustratively, a seller asset is hosted in a blockchain network embodying the present invention, a buyer asset is hosted in a centralized financial system, and a buyer can purchase the seller asset for the seller in the blockchain network using its buyer asset in the centralized financial system. Wherein seller assets hosted in the blockchain network may be considered on-chain assets and buyer assets hosted in the centralized financial system may be considered off-chain assets.
Or illustratively, a seller asset is hosted in the blockchain network a embodying the present invention, a buyer asset is hosted in the blockchain network B, and a buyer can purchase the seller asset in the blockchain network a by using its buyer asset in the blockchain system B. From the perspective of blockchain network a, seller assets hosted in blockchain network a may be considered on-chain assets, and buyer assets hosted in blockchain network B may be relatively considered off-chain assets.
For ease of illustration, the on-chain assets hosted in the blockchain network are hereinafter referred to as assets.
Referring to fig. 1 (a), fig. 1 (a) is a schematic diagram illustrating a first stage of a blockchain-based asset management method according to an embodiment of the present invention. The asset management method is applied to node devices of a blockchain network in which a plurality of asset contracts are deployed, each asset contract being used to record an asset. One or more accounts and the balance of the asset under each account are recorded in each asset contract.
To facilitate understanding, one or more accounts and the balance of the bond asset under each account are illustratively recorded in the bond class asset contract.
The first stage shown in fig. 1 (a) is mainly implemented as follows: the transaction contract is deployed in the blockchain network, accounts are established for the transaction contract in the corresponding asset contract, and part or all of the assets under the account of the seller in the asset contract are used as the selling assets and are transferred into the accounts of the transaction contract. Wherein the trade contracts are used to control the asset management process.
Specifically, when a seller creates a need to sell an asset, the contract deployment transaction, the trust transaction, the sell transaction, and the like may be submitted in sequence to the blockchain network.
As shown in fig. 1 (a), the node device responds to the contract deployment transaction, deploys the transaction contract according to the contract data and the contract address carried by the contract deployment transaction, and the transaction contract has sales information and a plurality of business logics declared therein.
Illustratively, the vending information includes, but is not limited to: information such as ID of the vending asset, blockchain address of the seller (blockchain address may also be referred to as wallet address), total amount of the vending asset, unit price of the vending asset, vending start time, vending expiration time, payment time condition, etc.
It should be noted that, as described above, several asset contracts are deployed in the blockchain network, each asset contract having a contract address and asset ID. As previously described, one or more accounts are recorded in each asset contract, as well as the balance of the asset under each account. Wherein the account name of each account is actually the blockchain address of the corresponding user, in short, the user's account name is equal to the user's blockchain address. In the above example, the asset contract in which the seller's account is contracted by asserting the sell asset ID in the trade contract. Specific seller accounts are contracted by declaring the seller's blockchain address in the transaction contract. In summary, by declaring the sell asset ID and the blockchain address of the seller in the trade contract, the corresponding account of the corresponding asset contract is determined to be the seller account, with the asset under the account being the seller asset.
For ease of understanding, by way of example, assuming that the selling asset ID included in the selling information is bond, and the blockchain address of the seller is 16U … jvM, the selling information specifically reflects the following information: account 16U … jvM in the bond class asset contract acts as the seller account, and the bond under that account acts as the seller asset.
Illustratively, several business logics include, but are not limited to: vending logic, asset reservation logic, payment registration logic, asset rollback logic, payment confirmation logic, arbitration logic, and the like. The selling logic comprises a calling relation which is used for calling the credit transfer logic stated in the asset contract. The payment validation logic also includes a calling relationship that is used to invoke the settlement logic declared in the asset contract.
It should be noted that, before processing the contract deployment transaction, the node device may perform signature verification on signature data carried by the contract deployment transaction. In the event that signature verification passes, the contract deployment transaction is processed. To simplify the drawing, the process of signature verification is not shown in fig. 1 (a).
As shown in fig. 1 (a), in response to a trusted transaction, the node device may invoke an asset contract with a corresponding asset ID according to a sell asset ID carried by the trusted transaction; or the asset contract with the corresponding address can be called according to the asset contract address carried by the credit transaction; or the corresponding transaction contract can be called according to the transaction contract address carried by the credit transaction, and then the asset contract with the corresponding asset ID is called according to the selling asset ID stated in the transaction contract.
And then, the node equipment establishes accounts for the transaction contracts in the called asset contracts according to the transaction contract addresses carried by the credit giving transactions, wherein the account names are addresses of the transaction contracts. And then, the node equipment credits the assets of the credit amount under the account of the seller to the account of the transaction contract in the asset contract according to the credit amount carried by the credit transaction and the seller blockchain address.
For ease of understanding, assume, by way of example, that the credit transaction carries an address of an asset contract, an address of a transaction contract, a seller blockchain address a, and a credit amount 300. When the node equipment processes the credit transaction, firstly, calling a corresponding asset contract according to the address of the asset contract carried by the credit transaction; then establishing accounts for the transaction contracts in the asset contracts according to the addresses of the transaction contracts carried by the trusted transaction, wherein the account names of the accounts are the addresses of the transaction contracts; and then, according to the blockchain address A carried by the credit transaction and the credit amount 300, 300 assets under the corresponding account A are credit-granted to the accounts of the transaction contract. Specifically, as shown in fig. 2 (a), fig. 2 (a) is a schematic state diagram of a corresponding asset contract after the node device processes the credit transaction.
It should be noted that, since 300 assets of account a are currently only accounts that are trusted to the trade contract, no actual transfer has been effected. Thus, as shown in FIG. 2 (a), the asset balance of Account A will not decrease 300, remains 500, and the asset balance of the transaction contract will be 0. In the account book database and/or blockchain of the node device, the credit information of 'account A credits 300 assets to the transaction contract account' is recorded.
It should be further noted that, before executing the credit transaction, the node device may perform signature verification on the signature data of the credit transaction by using the public key corresponding to the seller blockchain address carried by the credit transaction, and only process the credit transaction if the signature verification passes, thereby credit the asset under the account of the seller to the account of the transaction contract. To simplify the drawing, the process of signature verification is not shown in fig. 1 (a).
As shown in fig. 1 (a), the node device, in response to the vending transaction, invokes the transaction contract according to a transaction contract address carried by the vending transaction, and executes vending logic claimed in the transaction contract. It should be noted that, before processing the vending transaction, the node device may perform signature verification on signature data of the vending transaction, and only process the vending transaction if the signature verification passes. The drawing is not simplified, and the process of signature verification of signature data is not shown in fig. 1 (a).
As shown in fig. 1 (a), when executing the vending logic, the node device first determines whether a signer of signature data of a vending transaction is a seller declared in a transaction contract; if not, terminating the processing of the vending transaction; if yes, continuing to call the credit transfer logic stated in the corresponding asset contract according to the call relation contained in the selling logic. When the node equipment calls and executes the credit transfer logic stated in the asset contract, firstly judging whether the accounts of the sellers are credit-granted to the accounts of the transaction contract or not according to the appointed sales carried by the sales transaction; if not, terminating the processing of the vending transaction; if yes, continuing to judge whether the balance of the assets of the seller account is not lower than the appointed selling quantity. And only under the condition that the balance of the assets of the account of the seller is not lower than the appointed selling amount, taking the assets of the appointed selling amount under the account of the seller as the selling assets, and switching to the transaction contract account. To simplify the drawing, the determination process of "determining whether the signer who sells the signature data of the transaction is the seller declared in the transaction contract", "determining whether the account of the seller has previously granted the account of the transaction contract with the asset of not less than the specified sales amount", and "determining whether the balance of the asset of the account of the seller is not less than the specified sales amount", etc. is not shown in fig. 1 (a).
For ease of understanding, along with the above example, assuming that the designated sales volume carried by the sales transaction is 300, the node device, when executing the trusted transfer logic, first determines whether the seller account has previously trusted not less than 300 assets to the transaction contract account. If so, the node device continues to determine whether the asset balance of the seller account is not less than 300. And if the balance of the assets under the account of the seller is not lower than 300, transferring 300 assets under the account of the seller into the transaction contract account. Thus, in comparison to FIG. 2 (a), the balance of the asset of the transaction contract account in FIG. 2 (b) is increased 300, and the balance of the asset of the seller account is deducted 300. Fig. 2 (b) is a schematic diagram of the status of the corresponding asset contract by the node device after the sales transaction is processed.
In the asset management process shown in fig. 1 (a), node devices of the blockchain network deploy corresponding trade contracts in response to contract deployment transactions in which vending information is declared. The node device also establishes accounts for the trade contracts in the corresponding asset contracts, and shifts a certain number of assets under the seller account to the trade contract accounts as sold assets. In the invention, the separation is formed between the residual assets under the seller account and the selling assets under the transaction contract account, which is helpful for the subsequent selling operation of the selling assets more safely and reliably.
In addition, during the process of selling transaction, the node device further invokes the credit transfer logic declared in the corresponding asset contract according to the invoking relation contained in the selling logic by invoking the selling logic declared in the transaction contract, and finally triggers the seller asset to be transferred into the transaction contract account. The beneficial effects are that: under the condition that the successful deployment of the transaction contract and normal use are ensured, the seller asset is transferred to the account of the transaction contract, so that the seller asset is prevented from being transferred to the account of the abnormal transaction contract.
For example, if the node device does not invoke the vending logic of the trade contract during the vending transaction, but instead directly shifts the vending asset to the account of the trade contract, the seller asset may shift to the account of the trade contract that has not been deployed yet, or to the account of the trade contract that failed to be deployed, or to the account of the trade contract that cannot be used normally. The method provided by the invention can transfer the seller asset, and the node equipment can successfully call the selling logic stated in the trading contract only under the condition that the trading contract is successfully deployed and can be normally used, so that the credit transfer logic stated in the corresponding asset contract is called, and the seller asset is transferred into the account of the trading contract. It can be seen that the present invention can avoid seller assets being transferred into accounts of abnormal trading contracts.
It should also be noted that the node device, during execution of the vending transaction, needs to verify whether the signer of the signature data of the vending transaction is the seller declared in the transaction contract. If so, the credit transfer logic in the asset contract is invoked, so that the seller asset is transferred to the transaction contract account. Thus, the situation that other users except the seller mistakenly transfer the assets into the transaction contract account and cause the assets to be sold mistakenly can be avoided.
Referring to fig. 1 (b), fig. 1 (b) is a schematic diagram illustrating a second stage of a blockchain-based asset management method according to an embodiment of the present invention. The second stage shown in fig. 1 (b) is mainly implemented as follows: creating an order for a buyer to reserve a sales asset, updating an in-chain payment status of the order, sales asset settlement, and the like.
Specifically, when a buyer creates a need to purchase an asset, the asset reservation transaction may be submitted to a blockchain network. After the buyer completes the under-chain payment outside of the blockchain network, i.e., after the buyer pays the under-chain asset to the seller, the payment registration transaction may be submitted to the blockchain network. After the seller determines that the buyer has paid the under-chain asset, a payment confirmation transaction may be submitted to the blockchain network.
As shown in fig. 1 (b), in response to the buyer's asset reservation transaction, the node device may create an order for a quantity of sold assets in a reservation transaction contract account based on transaction information carried by the asset reservation transaction. The node device may also update the sellable balance declared in the trade contract. The node device may perform signature verification on the signature data of the predetermined transaction of the asset in advance before processing the predetermined transaction of the asset. In the event that the signature verification passes, the asset reservation transaction is processed, thereby creating an order and updating the vendable balance. In the event that signature verification fails, the asset reservation transaction is not processed. To simplify the drawing, the process of signature verification of signature data by a node device is not shown in fig. 1 (b).
In particular, the node device may invoke a trade contract according to a trade contract address carried by the asset's predetermined trade. The node device then creates an order in the trade contract based on the buyer information, the predetermined amount of the asset, the amount of the payment in the chain, and the like carried by the predetermined trade of the asset, the order comprising: order number, buyer information, asset reservation amount, payment amount in-chain, order status, etc. The order number may be a transaction number of an asset reservation transaction, the buyer information may specifically be a blockchain address of the buyer, and the current order state is an asset reservation state.
In particular, the node device may update the marketable balance by subtracting the predetermined amount of the asset from the marketable balance declared in the trading contract based on the predetermined amount of the asset carried by the predetermined transaction of the asset.
For ease of understanding, the information carried by the asset reservation transaction illustratively includes: transaction contract address 21U … 992, transaction number cc2 … 7be, buyer blockchain address 12w … qBU, asset predetermined amount 10, under chain payment amount 50, and the like. Then the node device, when processing the asset reservation transaction, first invokes the trade contract with the address according to the trade contract address 21U … 992,992 carried by the asset reservation transaction, and then the node device creates an order in the trade contract. For example, the structure of the pen order may be as shown in Table 1.
Table 1 order schematic table
Order number cc2…7be
Buyer blockchain address 12w…qBU
Asset predetermined amount 10
Payment amount under chain 50
Order status Asset reservation status
Note that, although the order does not include the selling asset ID and the seller blockchain address, since the order is created in the trade contract, the trade contract already declares the selling asset ID and the seller blockchain address, and thus the order may not include the selling asset ID and the seller blockchain address.
As shown in fig. 1 (b), in response to a payment registration transaction by a buyer, the node device may first verify the signature data based on the signature data carried by the payment registration transaction. In the event that the signature verification fails, the payment registration transaction may be refused to be processed, or the processing result of the transaction processing failure may be directly obtained. In the case that the signature verification passes, the corresponding transaction contract may be invoked and the payment registration logic declared in the transaction contract may be executed based on the transaction contract address carried by the payment registration transaction and the business logic ID of the payment registration logic. To simplify the drawing, fig. 1 (b) does not show a process in which a node device performs signature verification on signature data.
As shown in fig. 1 (b), the node apparatus inquires an order corresponding to the order number in the trade contract according to the order number carried by the payment registration transaction by executing the payment registration logic, and then judges whether the signer corresponds to the buyer blockchain address recorded in the order. If the two do not correspond, indicating that the signer is not the buyer to which the order corresponds, the node device may terminate execution of the payment registration logic. If both correspond, indicating that the signer is the buyer to which the order corresponds, the node device may continue to determine if the current time exceeds the payment deadline declared in the trade contract. If the current time exceeds the payment expiration time, the node device may terminate processing the payment registration logic. If the current time does not exceed the payment deadline, the node device updates the order status of the order to an in-chain payment status. The order of the above-described respective judgment steps may be changed. For example, it may be first determined whether the current time exceeds the payment deadline, and then whether the signer corresponds to a buyer blockchain address recorded in the order.
For ease of understanding, along with the example described above, assuming that the order number carried by the payment registration transaction is cc2 … be, and assuming that the signature verification passed, the signer corresponds to the buyer blockchain address recorded in the order, and the current time does not exceed the payment deadline, the node device updates the order status of the order with the order number cc2 … 7be to an under-chain payment status. Illustratively, the structure of the updated order is shown in Table 2.
Table 2 schematic order form
Order number cc2…7be
Buyer blockchain address 12w…qBU
Asset predetermined amount 10
Payment amount under chain 50
Order status Under-chain payment status
Optionally, in some embodiments, the node device may specifically perform the following steps when determining whether the signer corresponds to a buyer blockchain address recorded in the order: the node equipment derives the blockchain address of the signer from the signature data, and then compares the derived blockchain address with the buyer blockchain address recorded in the order; if the two are consistent, determining that the signer corresponds to the buyer block chain address recorded in the order; if the two are not consistent, it is determined that the signer does not correspond to the buyer blockchain address recorded in the order.
As shown in fig. 1 (b), in response to a payment confirmation transaction by a seller, the node apparatus may first perform signature verification on the signature data carried by the payment confirmation transaction based on the signature data. In the event that the signature verification fails, processing of the payment confirmation transaction may be denied or the processing result of the transaction processing failure may be directly derived. In the case that the signature verification passes, the corresponding transaction contract may be invoked and the payment confirmation logic declared in the transaction contract may be executed based on the transaction contract address carried by the payment confirmation transaction and the business logic ID of the payment confirmation logic. To simplify the drawing, fig. 1 (b) does not show a process in which a node device performs signature verification on signature data.
As shown in fig. 1 (b), the node device determines whether the signer corresponds to the seller blockchain address declared in the transaction contract by executing payment confirmation logic. If the two do not correspond, indicating that the signer is not the seller declared in the transaction contract, the node may terminate execution of the payment confirmation logic. If the two correspond, the signer is stated to be the seller in the trade contract, the node equipment can continuously confirm the order number carried by the trade according to the payment, and inquire the order corresponding to the order number in the trade contract. After the corresponding order is queried, the node equipment judges whether the order state of the order is an in-chain payment state or not. If the order status is not an in-chain payment status, the node device does not update the order status and terminates execution of the payment confirmation logic. If the order status is an in-chain payment status, the node device updates the order status to a confirmed payment status and proceeds to execute the payment confirmation logic.
For ease of understanding, along with the example described above, assuming that the order number carried by the payment confirmation transaction is cc2 … 7be, and assuming that the signature verification passes, the signer corresponds to the seller blockchain address declared in the transaction contract, and the order status is the under-chain payment status, the node device updates the order status of the order with the order number cc2 … 7be to the confirmation payment status. Illustratively, the structure of the updated order is shown in Table 3.
TABLE 3 schematic order form
Order number cc2…7be
Buyer blockchain address 12w…qBU
Asset predetermined amount 10
Payment amount under chain 50
Order status Confirming payment status
As shown in fig. 1 (b), the node device, while continuing to execute the payment confirmation logic, first determines whether the current time satisfies the settlement time condition declared in the transaction contract. If not, the node device may terminate execution of the payment confirmation logic. If so, the node device may invoke the settlement logic declared in the corresponding asset contract according to the invocation relationship contained in the payment confirmation logic. The corresponding asset contract is a contract corresponding to the sold asset ID stated in the transaction contract, namely an asset contract for recording the sold asset.
Illustratively, the settlement time condition declared in the transaction contract is "immediate settlement", and the node device determines that the current time automatically satisfies the settlement time condition. Or, for example, the settlement time condition declared in the transaction contract is "settlement after reaching the preset settlement time", the node device determines whether the current time reaches the preset settlement time declared in the transaction contract, and if so, the node device determines that the current time meets the settlement time condition; if not, the node device determines that the current time does not satisfy the settling time condition.
As shown in fig. 1 (b), when executing the settlement logic stated in the asset contract, the node device transfers, in the asset contract, the sales assets of the corresponding number under the transaction contract ledger to the buyer account according to the order information of the order currently being processed (that is, the order corresponding to the order number carried by the payment confirmation transaction). Wherein the corresponding amount is the predetermined amount of the asset in the order information, and the account name of the buyer is the buyer blockchain address in the order information.
For ease of understanding, assuming, with the above example, that the buyer blockchain address is 12w … qBU and the predetermined amount of the asset is equal to 10 parts, the node device transfers 10 parts of the sold asset under the trade contract ledger to the buyer's account and then the latest asset contract is as shown in fig. 2 (c). In comparison with fig. 2 (b), the balance of the transaction contract order is deducted 10 and the balance of the buyer order is increased 10 in fig. 2 (c). Fig. 2 (c) is a schematic diagram of the status of the corresponding asset contract by the node device after completion of the settlement of the sold asset.
In the asset management process shown in fig. 1 (b), node devices of the blockchain network create a corresponding order in response to a buyer's asset reservation transaction and assign order status attributes to the order. The node device updates the order status of the order when a series of operations are subsequently performed with respect to the order. And when the node executes corresponding operation for the order, the node can judge whether the current order state of the order meets the requirement. And under the condition that the current order state of the order meets the requirement, the corresponding operation is continuously executed, so that the order is controlled to be processed according to a normal business rule.
In the present invention, the node device of the blockchain network implements a process of settling the asset on the seller chain to the buyer by performing the asset management process shown in fig. 1 (b).
Referring to fig. 1 (c), fig. 1 (c) is a schematic diagram illustrating other stages of a blockchain-based asset management method according to an embodiment of the present invention. The other phases shown in fig. 1 (c) are mainly implemented as follows: in some special scenarios, the node device manages the manner in which assets and orders are managed.
Specifically, upon reaching the payment deadline declared in the trade contract, the seller may submit an asset rollback transaction to the blockchain network. When the order status of an order is in an under-chain payment status, but the seller does not receive under-chain assets paid by the buyer, the seller may submit an arbitrated transaction to the blockchain network. Or when the order status of an order is in-chain payment status, but the buyer does not receive the seller's settled on-chain assets (i.e., sell assets), the buyer can submit an arbitrated transaction to the blockchain network.
As shown in fig. 1 (c), in response to an asset rollback transaction of a seller, a node device may invoke a corresponding transaction contract according to a transaction contract address and a business logic ID of asset rollback logic carried by the asset rollback transaction, and execute asset rollback logic declared in the transaction contract. It should be noted that, before processing the asset rollback transaction, the node device may perform signature verification on the signature data of the asset rollback transaction in advance. The asset rollback transaction is processed to perform asset rollback logic if the signature verification passes. In the event that signature verification fails, the asset rollback transaction is not processed. To simplify the drawing, the process of signature verification of signature data by a node device is not shown in fig. 1 (c).
As shown in fig. 1 (c), the node device first determines whether the current time exceeds the payment deadline declared in the trade contract by executing asset rollback logic. If not, the node device terminates executing the asset rollback logic. If so, the node device continues to execute asset rollback logic.
In some embodiments, when the node device continues to execute the asset rollback logic, according to the order number carried by the asset rollback transaction, an order corresponding to the order number is queried in the transaction contract, and then whether the current order state of the order is the asset preset state is determined. If the current order status of the order is not an asset reservation status (e.g., the order status is an in-chain payment status or a confirmation payment status), indicating that the buyer declares that it has completed an in-chain payment, the node device terminates execution of the asset rollback logic. If the current order status of the order is an asset reservation status, indicating that the buyer has not declared that he has completed an under-chain payment beyond the payment deadline, the node device invokes the declared transfer logic in the corresponding asset contract according to the invoking relationship contained in the asset rollback logic, thereby continuing to process the order by executing the transfer logic.
In other embodiments, when the node device continues to execute the asset rollback logic, a plurality of orders in corresponding trade contracts are queried according to the trade contract address carried by the asset rollback transaction. Then, for each order, judging whether the current order state of the order is an asset preset state; if the current order status of the order is not the asset reservation status, the node device terminates processing the order; if the current order status of the order is an asset reservation status, the node device invokes the transfer logic declared in the corresponding asset contract according to the invoking relationship contained in the asset rollback logic, thereby continuing to process the order by executing the transfer logic.
As shown in fig. 1 (c), the node apparatus returns the transaction contract ledger to the seller's account for the sales asset reserved by the order according to the order information of the currently processed order by executing the transfer logic. For ease of understanding, the node device returns 20 sold assets under the trade contractual agreement to the seller's account, assuming, by way of example, that the predetermined amount of assets recorded in the currently processed order is 20.
As shown in fig. 1, in response to an arbitrated transaction by a buyer or seller, a node may first verify the signature data based on the signature data carried by the arbitrated transaction. In the event that the signature verification fails, the arbitration transaction may be denied or the processing result of the transaction processing failure may be directly derived. In the case that the signature verification is passed, the corresponding transaction contract may be invoked according to the transaction contract address carried by the arbitrated transaction and the service logic ID of the arbitrated logic, and the arbitrated logic declared in the transaction contract may be executed. To simplify the drawing, fig. 1 (c) does not show the process of signature verification of signature data by a node device.
As shown in fig. 1 (c), the node device determines whether the signer corresponds to the seller blockchain address declared in the transaction contract by executing arbitration logic; or according to the order number carried by the arbitrated transaction, inquiring an order corresponding to the order number in the transaction contract, and then judging whether the signer corresponds to the buyer blockchain address recorded in the order. If the signer corresponds to a seller blockchain address declared in the trade contract, or the signer corresponds to a buyer blockchain address recorded in the corresponding order, the node device continues to execute arbitration logic. Otherwise, the node device terminates execution of the arbitration logic.
As shown in fig. 1 (c), when the node device continues to execute the arbitration logic, according to the order number carried in the arbitration transaction, the order corresponding to the order number is queried in the transaction contract, and then it is determined whether the current order status of the order is an under-chain payment status, and it is determined whether the current time exceeds the payment deadline declared in the transaction contract. If the current order state of the order is an in-chain payment state and the current time exceeds the payment deadline stated by the trade contract, the node equipment updates the order state of the order to an arbitration state to characterize that the order enters a blanking flow. Otherwise, the node device does not update the order status of the order.
In the asset management process shown in fig. 1 (c), during the asset rollback procedure, when the status of the order is in the asset reservation status, indicating that the buyer has not declared that he has completed an under-chain payment, the node device continues to execute asset rollback logic to rollback the sold asset reserved by the order in the transaction contract account to the seller account. And when the order state is in other states (such as an under-chain payment state or a confirmation payment state), the node equipment stops executing the asset rollback logic when the buyer declares that the under-chain payment is completed, so that the selling asset under the transaction contract ledger is prevented from being rolled back to the seller ledger when the selling asset under the transaction contract ledger is not settled to the buyer ledger, and the buyer is prevented from losing.
During the asset arbitration flow, when the order status is in the under-chain payment status, it indicates that the buyer has declared that it has completed the under-chain payment, and that the seller has not declared that it has received the under-chain payment from the buyer. As such, if the buyer and seller disputes on the under-chain payment event, the node device continues to execute arbitration logic, thereby updating the order status to an arbitrated status.
In the above, the present invention, through some preferred embodiments, proposes a blockchain-based asset management method. In the following, the present invention proposes other asset management methods based on blockchain in other embodiments, aiming at improving the reliability of the assets on the chain when the assets are exchanged. It should be noted that the following embodiments may be referred to with the above embodiments.
Referring to fig. 3, fig. 3 is a flowchart of a blockchain-based asset management method according to an embodiment of the present invention, where the asset management method is applied to a node device of a blockchain network, and an asset contract is deployed in the blockchain network, where a sales account and a seller account are recorded in the asset contract, where the sales account is used for hosting a seller's sales asset, and the seller account is used for hosting a seller's non-sales asset. Wherein, the sales account can be the transaction contract account in the preferred embodiment.
As shown in fig. 3, the asset management method includes the steps of:
step S31: creating an order from information carried by an asset reservation transaction of a buyer in response to the asset reservation transaction; the order being for booking a sales asset in the sales account; the order includes an order status, the current order status of the order being an asset reservation status.
As previously described, the following information may be included in the order: order number, buyer information, asset reservation amount, in-chain payment amount, order status, etc. The order number may be a transaction number of an asset reservation transaction, the buyer information may specifically be a blockchain address of the buyer, and the current order state is an asset reservation state.
Step S32: in response to a payment registration transaction by a buyer, an order status of an order for the payment registration transaction is updated to an in-chain payment status.
As previously mentioned, the order for the payment registration exchange may specifically be: the payment registers the transaction corresponding to the transaction number carried by the transaction.
Step S33: responsive to an asset rollback transaction for a seller, determining whether to rollback a sold asset of the sales account that was reserved for the order to the seller account according to an order status of the order for which the asset rollback transaction was directed.
As previously mentioned, the order for the asset return exchange may specifically be: transaction corresponding to the transaction number carried by the asset rollback transaction. Or specifically may be: all orders in the trade contract corresponding to the trade contract address carried by the asset rollback trade.
In the invention, a selling account and a seller account are recorded in an asset contract, wherein the selling account is used for hosting a selling asset of a seller, and the seller account is used for hosting a non-selling asset of the seller. In this way, isolation is formed between the selling assets of the seller and the non-selling assets, so that selling is performed for only the selling assets of the seller more safely and reliably. When the node device processes the asset reservation transaction, an order is created according to information carried by the asset reservation transaction, the order is used for reserving the sold assets in the sales accounts, and the order further comprises an order state, and the current order state of the order is the asset reservation state. When the node device processes the payment registration transaction, the order status of the corresponding order is updated to an under-chain payment status, which characterizes the buyer as having completed payment for the predetermined sales asset at a system outside the blockchain network. When the node device processes the asset rollback transaction, it is determined whether to rollback the sold asset reserved by the order in the sold account to the seller account according to the order state of the corresponding order. Thus, for the operation of returning the selling asset managed by the selling account to the account of the seller, the blockchain network controls the selling asset, so that the seller is prevented from returning the selling asset to the account of the seller at will under the condition of violating the fairness and reliability principle. In summary, by implementing the present invention, the reliability of assets on a chain of asset exchanges can be improved.
Optionally, in some specific embodiments, when determining whether to roll back a sold asset, of the sales accounts, that is reserved for the order to the seller account according to an order status of the order for the asset roll-back exchange, specifically, if the order status of the order is not an asset reservation status, the node determines that the sold asset, of the sales accounts, that is reserved for the order cannot be rolled back to the seller account.
As previously described, during the asset rollback procedure, when the status of the order is in the asset reservation status, indicating that the buyer has not declared that it has completed an under-chain payment, the node device continues to execute asset rollback logic to rollback the sold asset reserved by the order in the transaction contract account to the seller account. And when the order state is in other states (such as an under-chain payment state or a confirmation payment state), the node equipment stops executing the asset rollback logic when the buyer declares that the under-chain payment is completed, so that the selling asset under the transaction contract ledger is prevented from being rolled back to the seller ledger when the selling asset under the transaction contract ledger is not settled to the buyer ledger, and the buyer is prevented from losing.
Optionally, in some embodiments, the order further includes buyer information and a predetermined amount of the asset. As previously mentioned, the buyer information may specifically be a buyer blockchain address. The node device may also perform the steps of: updating an order status of an order for which the payment confirmation transaction is directed to a confirmation payment status in response to a payment confirmation transaction of the seller; and calling and executing the settlement logic stated in the asset contract under the condition that the settlement time condition is met, so that the corresponding quantity of the sold assets under the sold accounts are transferred to the buyer accounts according to the order information of the order aimed at by the payment confirmation transaction.
As previously mentioned, the order for the payment confirmation exchange may specifically be: and confirming the transaction corresponding to the transaction number carried by the transaction. Wherein, the corresponding number may specifically be: the order includes a predetermined number of assets.
Optionally, in some embodiments, when updating the order status of the order for the payment confirmation exchange to a confirmed payment status, specifically, the node device queries the order status of the order for the payment confirmation exchange, and in case the order status of the order is an under-chain payment status, updates the order status of the order to a confirmed payment status.
Optionally, in some embodiments, the node device may further perform the steps of: responding to an arbitration transaction of a buyer or a seller, and determining whether to update the order state of an order to an arbitration state according to the order state of the order aimed by the arbitration transaction; if the order state of the order is an in-chain payment state, updating the order state of the order to an arbitration state; if the order status of the order is not an in-chain payment status, the order status of the order is not updated.
As previously mentioned, the order for which the arbitration exchange is directed may specifically be: arbitrating the transaction corresponding to the transaction number carried by the transaction.
As previously described, during the asset arbitration flow, when the order status is in the under-chain payment status, it is indicated that the buyer has declared that it has completed the under-chain payment, while the seller has not declared that it has received the under-chain payment by the buyer. As such, if the buyer and seller disputes on the under-chain payment event, the node device continues to execute arbitration logic, thereby updating the order status to an arbitrated status.
Optionally, in some embodiments, the node device may further perform the steps of: in response to a contract deployment transaction, deploying a transaction contract according to contract data carried by the contract deployment transaction; the transaction contract declares vending information; in the asset contract, establishing the sales account according to a contract address of the transaction contract; and in the asset contract, taking the asset with the appointed selling quantity under the account of the seller as a selling asset, and transferring to the selling account.
For the specific implementation of the above steps, reference may be made to fig. 1 (c), and in order to avoid repetition, the disclosure will not be repeated.
Optionally, in some embodiments, asset reservation logic, payment registration logic, and asset rollback logic are also declared in the trade contract.
When the node device creates an order according to the information carried by the asset reservation transaction in response to the asset reservation transaction of the buyer, specifically, the node device may call and execute the asset reservation logic stated in the transaction contract in response to the asset reservation transaction of the buyer, thereby creating the order according to the information carried by the asset reservation transaction.
When the node device updates the order status of the order for the payment registration exchange to an in-chain payment status in response to a payment registration exchange of the buyer, in particular, the node device may invoke and execute the payment registration logic declared in the transaction contract in response to the payment registration exchange of the buyer, thereby updating the order status of the order for the payment registration exchange to an in-chain payment status.
When the node device responds to the asset backspacing transaction of the seller, and determines whether to backspace the sales asset reserved by the order in the sales account to the seller account according to the order state of the order aimed by the asset backspacing transaction, specifically, the node device responds to the asset backspacing transaction of the seller, and can call and execute the asset backspacing logic stated in the transaction contract, so as to determine whether to backspace the sales asset reserved by the order in the sales account to the seller account according to the order state of the order aimed by the asset backspacing transaction.
Or alternatively, in other embodiments, the blockchain program includes business logic such as asset reservation logic, payment registration logic, and asset rollback logic. The node device, in response to the transaction, may directly invoke the corresponding business logic contained in the blockchain program, rather than invoking the business logic declared in the smart contract.
Optionally, in some embodiments, payment confirmation logic is also declared in the transaction contract, where the payment confirmation logic includes a calling relationship for calling the settlement logic declared in the asset contract.
When the node device updates the order status of the order for the payment confirmation exchange to a confirmed payment status in response to the payment confirmation exchange of the seller, in particular, the node device may invoke and execute the payment confirmation logic declared in the transaction contract in response to the payment confirmation exchange of the seller, thereby updating the order status of the order for the payment confirmation exchange to a confirmed payment status.
And under the condition that the settlement time condition is met, the node equipment calls and executes the settlement logic stated in the asset contract, so that when the corresponding quantity of the sold assets under the sold accounts are transferred to the buyer accounts according to the order information of the order aimed at by the payment confirmation transaction, specifically, the node equipment can continuously execute the payment confirmation logic, and under the condition that the settlement time condition is met, the settlement logic stated in the asset contract is called and executed according to the call relation contained in the payment confirmation logic, so that the corresponding quantity of the sold assets under the sold accounts are transferred to the buyer accounts according to the order information of the order aimed at by the payment confirmation transaction.
Or alternatively, in other embodiments, the blockchain program includes payment validation logic that includes call relationships for invoking settlement logic declared in the asset contract. The node device may directly invoke the payment confirmation logic contained in the blockchain program in response to the payment confirmation transaction, rather than invoking the business logic declared in the smart contract.
Optionally, in some embodiments, a vendable balance to sell the asset is also declared in the trade contract; after creating an order from the information carried by the asset reservation transaction, the node device may further perform the steps of: updating the sellable balance stated in the trade contract based on the predetermined amount of the order for the asset to sell the asset. In particular, the node device may subtract the predetermined amount of the asset from the vendable balance to update the vendable balance.
Based on the same inventive concept, the embodiment of the invention further provides an electronic device, which is used as a node device in a blockchain network, wherein an asset contract is deployed in the blockchain network, wherein a selling account and a selling account are recorded in the asset contract, the selling account is used for hosting a selling asset of a selling party, and the selling account is used for hosting a non-selling asset of the selling party. As shown in fig. 4, the electronic device includes a processor 401, a communication interface 402, a memory 403, and a communication bus 404, wherein the processor 401, the communication interface 402, and the memory 403 perform communication with each other through the communication bus 404.
The memory 403 is used for storing a computer program;
the processor 401 is configured to implement the following steps when executing a program stored in the memory 403:
Creating an order from information carried by an asset reservation transaction of a buyer in response to the asset reservation transaction; the order being for booking a sales asset in the sales account; the order includes an order status, the current order status of the order being an asset reservation status;
Updating an order status of an order for a payment registration exchange to an in-chain payment status in response to a payment registration transaction of a buyer;
responsive to an asset rollback transaction for a seller, determining whether to rollback a sold asset of the sales account that was reserved for the order to the seller account according to an order status of the order for which the asset rollback transaction was directed.
Or processor 401 may be used to implement the blockchain-based asset management method steps provided by the other method embodiments of the present invention above when executing programs stored on memory 403.
The communication bus mentioned by the above electronic device may be a peripheral component interconnect standard (PER IPHERA lComponent I nterconnect, abbreviated as PCI) bus or an extended industry standard architecture (Extended I ndustry Standard Architecture, abbreviated as EI SA) bus, or the like. The communication bus may be classified as an address bus, a data bus, a control bus, or the like. For ease of illustration, the figures are shown with only one bold line, but not with only one bus or one type of bus.
The communication interface is used for communication between the electronic device and other devices.
The memory may include random access memory (Random Access Memory, RAM for short) or non-volatile memory (non-vo l at i l e memory), such as at least one disk memory. Optionally, the memory may also be at least one memory device located remotely from the aforementioned processor.
The processor may be a general-purpose processor, including a central processing unit (Centra l Process i ng Un it, abbreviated as CPU), a network processor (Network Processor, abbreviated as NP), etc.; it may also be a digital signal processor (DIGITA L SI GNA L processor i ng, abbreviated as DSP), application specific integrated circuit (application specific ion SPEC IFIC I NTEGRATED CI rcuit, abbreviated as asic), field programmable gate array (Fie l d-Programmab L E GATE ARRAY, abbreviated as FPGA), or other programmable logic device, discrete gate or transistor logic device, discrete hardware components.
In yet another embodiment of the present invention, a computer readable storage medium having instructions stored therein that when executed on a computer cause the computer to perform the blockchain-based asset management method of any of the above embodiments is also provided.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, produces a flow or function in accordance with embodiments of the present invention, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another, for example, by wired (e.g., coaxial cable, optical fiber, digital Subscriber Line (DSL)), or wireless (e.g., infrared, wireless, microwave, etc.). The computer readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains an integration of one or more available media. The usable medium may be a magnetic medium (e.g., floppy disk, hard disk, tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid state disk So L I DSTATE DI SK (SSD)), etc.
It is noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, 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.
In this specification, each embodiment is described in a related manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for system embodiments, since they are substantially similar to method embodiments, the description is relatively simple, as relevant to see a section of the description of method embodiments.
The foregoing description is only of the preferred embodiments of the present invention and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.

Claims (8)

1. An asset management method based on a blockchain is characterized in that the method is applied to node equipment of the blockchain network, asset contracts are deployed in the blockchain network, a selling account and a seller account are recorded in the asset contracts, the selling account is used for hosting selling assets of a seller, and the seller account is used for hosting non-selling assets of the seller; the method comprises the following steps:
Creating an order from information carried by an asset reservation transaction of a buyer in response to the asset reservation transaction; the order being for booking a sales asset in the sales account; the order includes an order status, the current order status of the order being an asset reservation status;
Updating an order status of an order for a payment registration exchange to an in-chain payment status in response to a payment registration transaction of a buyer;
Responsive to an asset rollback transaction for a seller, determining whether to rollback a sold asset of the sales account that is reserved for the order to the seller account according to an order status of the order for which the asset rollback transaction is directed;
the method comprises the steps of responding to contract deployment transaction, deploying transaction contracts according to contract data carried by the contract deployment transaction; the transaction contract declares vending information;
In the asset contract, establishing the sales account according to a contract address of the transaction contract;
in the asset contract, taking the asset with the appointed selling quantity under the account of the seller as a selling asset, and transferring into the selling account;
Wherein the transaction contract further declares asset reservation logic, payment registration logic, and asset rollback logic;
The creating an order from information carried by the asset reservation transaction in response to the asset reservation transaction of the buyer, comprising: invoking and executing asset reservation logic declared in the transaction contract in response to the buyer's asset reservation transaction, thereby creating an order based on information carried by the asset reservation transaction;
The updating of the order status of the order for the payment registering exchange to an in-chain payment status in response to the payment registering exchange of the buyer includes: invoking and executing a payment registration logic declared in the transaction contract in response to a payment registration transaction of the buyer, thereby updating an order status of an order for which the payment registration transaction is directed to an under-chain payment status;
The responding to the asset rollback transaction of the seller, determining whether to rollback the sold assets reserved by the order in the sold accounts to the seller accounts according to the order state of the order aimed by the asset rollback transaction, comprising: responsive to an asset rollback transaction for a seller, invoking and executing asset rollback logic declared in the transaction contract to determine whether to rollback a sold asset of the sold accounts that was reserved by the order to the seller account according to an order status of the order for which the asset rollback transaction was directed;
The order further includes buyer information and a predetermined amount of the asset; the method further comprises the steps of:
Updating an order status of an order for which the payment confirmation transaction is directed to a confirmation payment status in response to a payment confirmation transaction of the seller;
and calling and executing the settlement logic stated in the asset contract under the condition that the settlement time condition is met, so that the corresponding quantity of the sold assets under the sold accounts are transferred to the buyer accounts according to the order information of the order aimed at by the payment confirmation transaction.
2. The method of claim 1, wherein the determining whether to rollback the sold assets of the sales account that are reserved for the order to the seller account based on the order status of the order for which the asset rollback transaction is directed comprises:
If the order status of the order is not an asset reservation status, determining that the sold assets of the sales account reserved by the order cannot be rolled back to the seller account.
3. The method of claim 1, wherein updating the order status of the order for the payment confirmation exchange to a confirmed payment status comprises:
And inquiring the order state of the order aimed at the payment confirmation exchange, and updating the order state of the order to a confirmation payment state when the order state of the order is an under-chain payment state.
4. A method according to any one of claims 1 to 3, wherein the method further comprises:
responding to an arbitration transaction of a buyer or a seller, and determining whether to update the order state of an order to an arbitration state according to the order state of the order aimed by the arbitration transaction; if the order state of the order is an in-chain payment state, updating the order state of the order to an arbitration state; if the order status of the order is not an in-chain payment status, the order status of the order is not updated.
5. The method of claim 1, wherein a payment validation logic is also declared in the transaction contract, the payment validation logic including a call relationship for invoking a settlement logic declared in the asset contract;
The updating the order status of the order for which the payment confirmation transaction is directed to confirm the payment status in response to the payment confirmation transaction of the seller includes: invoking and executing, in response to a payment confirmation transaction by the seller, a payment confirmation logic declared in the transaction contract, thereby updating an order status of an order for which the payment confirmation transaction is directed to a confirmed payment status;
And under the condition that the settlement time condition is met, invoking and executing the settlement logic stated in the asset contract, so as to transfer the corresponding quantity of the sold assets under the sold accounts into the buyer accounts according to the order information of the order aimed at by the payment confirmation transaction, and comprising the following steps: and continuing to execute the payment confirmation logic, and calling and executing the settlement logic stated in the asset contract according to the calling relation contained in the payment confirmation logic under the condition that the settlement time condition is met, so that the corresponding quantity of the selling assets under the selling account are transferred to the buyer account according to the order information of the order aimed at by the payment confirmation transaction.
6. The method of claim 1, wherein a vendable balance of a vending asset is also declared in the trade contract; after creating an order from information carried by the asset reservation transaction, the method further comprises:
Updating the sellable balance stated in the trade contract based on the predetermined amount of the order for the asset to sell the asset.
7. The electronic equipment is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus;
the memory is used for storing a computer program;
the processor is configured to implement the method steps of any of claims 1-6 when executing a program stored on a memory.
8. A computer readable storage medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the method steps of any of claims 1-6.
CN202110221051.7A 2021-02-26 2021-02-26 Asset management method based on blockchain, electronic equipment and readable storage medium Active CN112926964B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110221051.7A CN112926964B (en) 2021-02-26 2021-02-26 Asset management method based on blockchain, electronic equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110221051.7A CN112926964B (en) 2021-02-26 2021-02-26 Asset management method based on blockchain, electronic equipment and readable storage medium

Publications (2)

Publication Number Publication Date
CN112926964A CN112926964A (en) 2021-06-08
CN112926964B true CN112926964B (en) 2024-07-02

Family

ID=76172496

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110221051.7A Active CN112926964B (en) 2021-02-26 2021-02-26 Asset management method based on blockchain, electronic equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN112926964B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114708103B (en) * 2022-06-06 2022-08-30 杭州费尔斯通科技有限公司 Data asset transaction method, computer device and readable storage medium
CN117710047A (en) * 2023-11-28 2024-03-15 深圳前海环融联易信息科技服务有限公司 Order processing method, device and storage medium based on intelligent contract

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109242450A (en) * 2018-09-21 2019-01-18 北京京东尚科信息技术有限公司 Block catenary system and based on block catenary system realize method of commerce and transaction system
CN111951106A (en) * 2020-06-17 2020-11-17 杭州增信信息技术有限公司 Data transaction system and method based on block chain intelligent contract technology

Family Cites Families (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004127260A (en) * 2002-07-30 2004-04-22 Daiwa Securities Group Inc Security trading fund loan system and its method
JP3943479B2 (en) * 2002-10-24 2007-07-11 延幸 高橋 Registration information change application support method and registration information change support system
CN106682981A (en) * 2016-11-11 2017-05-17 广州普惠创新金融信息服务有限公司 Processing method of asset assignment transaction, apparatus and system thereof
CN108182585A (en) * 2018-01-25 2018-06-19 北京正众信源传媒科技有限公司 New retail anti-counterfeiting system and method based on block chain technology
CN108805712B (en) * 2018-05-29 2021-03-23 创新先进技术有限公司 Asset transfer rollback processing method and device and electronic equipment
CN109345404A (en) * 2018-06-04 2019-02-15 山东省农业可持续发展研究所 A kind of sharing method based on block chain agricultural data
CN109003186A (en) * 2018-07-13 2018-12-14 北京创世智链信息技术研究院 A kind of method of commerce for preventing from denying, apparatus and system based on block chain
CN109377219A (en) * 2018-10-15 2019-02-22 深圳市必住科技有限公司 Transaction of servitude method, system, server and storage medium based on block chain
AU2019101593A4 (en) * 2018-11-27 2020-01-23 Advanced New Technologies Co., Ltd. System and method for improving security of smart contract on blockchain
CN109829820A (en) * 2019-01-09 2019-05-31 广州闪链区块链科技有限公司 A kind of gold assets cochain method based on block chain
CN113554516B (en) * 2019-09-05 2024-12-17 蚂蚁链技术有限公司 Method and device for processing default assets based on blockchain and electronic equipment
CN111275421A (en) * 2020-01-20 2020-06-12 厦门顺势共识信息科技有限公司 Block chain-based financial information chaining method
CN112017045A (en) * 2020-08-18 2020-12-01 无锡井通网络科技有限公司 Digital asset off-site transaction system and method based on block chain

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109242450A (en) * 2018-09-21 2019-01-18 北京京东尚科信息技术有限公司 Block catenary system and based on block catenary system realize method of commerce and transaction system
CN111951106A (en) * 2020-06-17 2020-11-17 杭州增信信息技术有限公司 Data transaction system and method based on block chain intelligent contract technology

Also Published As

Publication number Publication date
CN112926964A (en) 2021-06-08

Similar Documents

Publication Publication Date Title
US20190303926A1 (en) Blockchain loan transaction systems and methods
WO2020029630A1 (en) Transaction method and system based on centralized clearing and blockchain record keeping
WO2020029628A1 (en) Dual transaction method and system based on centralization and decentralization
CN110009489B (en) Asset transfer method and device based on block chain and electronic equipment
CN110033377B (en) Asset sorting method and device based on block chain and electronic equipment
CN113421156B (en) Asset management method and device based on blockchain, and electronic equipment
CN110020948B (en) Asset tracing method and device based on block chain and electronic equipment
WO2020088130A1 (en) Blockchain-based property execution method and system
WO2019227344A1 (en) Management method and system for maintenance device, and data management server
CN110659887A (en) Automatic transaction processing system and method based on block chain
CN112926964B (en) Asset management method based on blockchain, electronic equipment and readable storage medium
KR102136976B1 (en) Service method for tokenization mobile gift card and service provider thereof
CN112990811B (en) Block chain-based warehouse receipt processing method and warehouse receipt processing system
WO2023045532A1 (en) Blockchain-based transaction processing
CN112950181A (en) Asset management method, electronic device and readable storage medium
CN111047322A (en) Intelligent contract deployment method and device based on block chain and hardware equipment
CN114386970A (en) Service exchange method and system
CN112926963A (en) Asset transaction method and device, electronic equipment and readable storage medium
CN112967041A (en) Asset exchange method, electronic device and readable storage medium
CN111861470A (en) Blockchain-based digital asset transfer method, system, electronic device and medium
JP7221927B2 (en) Information processing device, method and program
CN113409143B (en) Asset transfer method and device based on blockchain, and electronic device
US11388052B2 (en) Gateway device for monitoring deployed equipment
KR102475662B1 (en) Method and system for managing point using blockchain based on distributed ledger
US20230103796A1 (en) Event-based triggers of cryptocurrency transactions

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant