Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent 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 certain aspects of one or more embodiments of the specification, as detailed in the claims which follow.
It should be noted that: in other embodiments, the steps of the corresponding methods are not necessarily performed in the order shown and described herein. In some other embodiments, the method may include more or fewer steps than those described herein. Moreover, a single step described in this specification may be broken down into multiple steps for description in other embodiments; multiple steps described in this specification may be combined into a single step in other embodiments.
Current blockchain systems typically include two mainstream transaction models; among them, one is a UTXO (un-spent Transaction Output) model represented by a bitcoin system; and the other is an account model represented by an etherhouse (Ethereum) system.
In the Account model, there is an important concept of an Account (Account). Taking an ether house as an example, the ether house generally divides an account into an external account and a contract account; the external account is an account directly controlled by the user and is also called as a user account; and the contract account is created by the user through an external account, the account containing the contract code (i.e. the smart contract).
For accounts in a blockchain, the account status of the account is usually maintained through a structure. When a transaction in a block is executed, the status of the account associated with the transaction in the block chain is also typically changed.
The structure of an account usually includes fields such as Balance, Nonce, Code and Storage; wherein:
a Balance field for maintaining the 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 replay attack is effectively avoided;
a Code field for maintaining a contract Code for the account; in practical applications, only the hash value of the contract Code is typically maintained in the Code field; thus, the Code field is also commonly referred to as the Codhash field.
A Storage field for maintaining the Storage contents of the account (default field value is null); for a contract account, a separate storage space is usually allocated to store the storage content of the contract account; this separate storage space is often referred to as the account storage of the contract account.
In a programmable blockchain, it is often possible to support the conversion of physical assets in the real world into digital assets on the blockchain. Converting the physical assets to the digital assets generally refers to a process of "anchoring" the physical assets to the digital assets on the blockchain as a value support for the virtual assets, and further generating digital assets on the blockchain that match the value of the physical assets and can be circulated between blockchain accounts on the blockchain.
In the implementation process, the account types supported by the blockchain can be expanded, and an asset account (also called an asset object) is expanded on the basis of the account types supported by the blockchain; for example, an asset account can be expanded on the basis of an external account and a contract account supported by a block chain; the asset account, expanded, may serve as a vehicle for holding digital assets anchored to the physical asset value in the real world.
For a user accessing a block chain, in addition to completing the creation of a user account and an intelligent contract on the block chain, a digital asset matched with the value of an entity asset in the real world can be created on the block chain and circulated on the block chain; for example, a user may convert a physical asset, such as a held currency, real estate, stock, etc., into a value-matched digital asset for circulation over a blockchain.
Or, the account types supported by the blockchain may be expanded, and on the basis of the account types supported by the blockchain, a fund account (also called a fund object) is expanded; for example, an asset account can be expanded on the basis of an external account and a contract account supported by a block chain; the expanded funding account may serve as a medium for holding real-world currency and may be value-anchored to real-world funding accounts (e.g., savings accounts, credit accounts, etc.).
The account status of the fund account may be maintained through a structure. The structure of the fund account may include the same contents as the structure of the account.
However, based on the structure of the accounts, the fund account for holding money created on the block chain can only maintain the amount of money in the money held by the fund account through the Balance field therein, but cannot maintain other information related to the money held by the fund account. Thus, the monetary account is less applicable for practical business scenarios that often involve issues with different transaction currencies, etc.
In order to solve the above-described problems, the present specification proposes a money account structure in a block chain, based on which money accounts created on the block chain can hold money of different currencies and can make payments with credit amounts corresponding to the held currencies.
In the implementation process, the account types supported by the block chain can be expanded, and a fund account is expanded on the basis of the account types supported by the block chain; the expanded funds account may be used to hold currency.
For the fund account holding the currency, the account structure of the fund account may include: a field (referred to as a first field) for filling currency information of the currency; and a field (referred to as a second field) for populating a credit line corresponding to the currency.
A node device in the blockchain may receive an asset creation transaction for creating a funding account; wherein the asset creation transaction may include an account identification of the credit account to which the funded account value is anchored; the credit account may be an out-of-chain credit account.
Since the money account is anchored to the credit account value, the money type information of the money held by the credit account (referred to as target money) and information such as the credit amount of the credit account corresponding to the target money can be shared between the money account and the credit account.
When the asset creation transaction is received, the asset creation transaction may be responded to acquire currency information of the target currency held in the credit account corresponding to the account identifier and a credit amount corresponding to the target currency.
In the case where the currency information of the target currency and the credit line of the credit account corresponding to the target currency are acquired, a fund account for holding the target currency may be created on the block chain, the acquired currency information of the target currency may be filled in the first field of the fund account, and the acquired credit line of the credit account corresponding to the target currency may be filled in the second field of the fund account.
Taking the fund account for holding the target currency, which is created on the blockchain as shown in fig. 1 as an example, the account structure of the fund account may include: the above-mentioned first field for filling in currency information of the target currency (i.e., "currency" field in fig. 1); and the second field mentioned above (i.e., "credit" field in FIG. 1) for filling in the credit corresponding to the target currency.
Assuming that the target currency is RMB and the credit line of the fund account corresponding to the target currency is 10000 RMB, that is, the fund account has the credit line of 10000 RMB, the first field may be filled with "RMB" and the second field may be filled with "10000".
It can be seen that for a fund account for holding money created on a blockchain by adopting the above account structure, on one hand, the fund account can hold money of different currencies by filling different currency information in the first field in the fund account; on the other hand, payment can be made using the credit line corresponding to the held currency, based on the credit line filled in the second field in the money account. That is, the ability of paying by using the credit amount corresponding to the held currency is equivalent to endowing the fund account with currencies of different currencies, so that the fund account can be suitable for different business scenes with different transaction currencies and payment modes, and the flexibility of accessing different business scenes by using the fund account is improved.
Referring to fig. 2, fig. 2 is a schematic diagram illustrating a network environment related to a blockchain according to the present disclosure.
In a network environment as shown in fig. 2, may include a client-side computing device 201, a server-side 202, and at least one blockchain system; such as blockchain system 203, blockchain system 204, and blockchain system 205.
In one embodiment shown, the client-side computing device 201, may include a variety of different types of client-side computing devices; for example, the client side terminal device may include devices such as a PC terminal device, a mobile terminal device, an internet of things device, and other forms of smart devices with certain computing capabilities, and so on.
It should be noted that the client-side computing device 201 does not represent that all of the client-side computing devices are in the same communication network, but is merely a generic term for the client-side computing devices.
In one embodiment shown, the client-side computing device 201, may also include one or more user-side servers; such as the device 5 shown in fig. 1. At least a part of the computing devices in the client-side terminal device 201 can be connected to the user-side server, and the user-side server can be further connected with the server 202; for example, device 1 and device 2 are connected to device 5, and device 5 is further connected to server side 202.
The user side server can be realized by a service entity which builds a user account system; the service entities may include an operator entity that provides service bearers for various online and/or offline services to users. In particular, the service carrier may include a service carrier in a form of software (for example, various client software for providing online internet services), and may also include a service carrier in a form of hardware (for example, various intelligent devices deployed under the online environment and capable of providing offline services). The operation entity may include an operator corresponding to the service bearer; for example, the operation entity may include an individual, an organization, a company, an enterprise, and the like that operate and manage the service carrier.
In one embodiment shown, at least a portion of the computing devices in the client-side terminal device 201 may be connected to the server side 202 via a wired and/or wireless communication network; for example, device 1 and device 2 are connected to the server side 202. Alternatively, some terminal devices in the client-side terminal device 201 may not be connected to the server side 202, but may be directly connected to the blockchain system as blockchain nodes through a wired and/or wireless communication network; for example, the device 4 may be connected as a blockchain link point to a blockchain system.
In one embodiment shown, server side 202 may also be connected to one or more blockchain systems through various communication networks; for example, the server side 202 may be connected to the blockchain system 203, the blockchain system 204, and the blockchain system 205, respectively, and so on.
Each blockchain system may maintain one or more blockchains (e.g., public blockchains, private blockchains, federation blockchains, etc.) and include a plurality of blockchain nodes (e.g., blockchain nodes 1 to i, etc.) for carrying the one or more blockchains. The various blockchain nodes can be connected together to form a network through various types of communication methods. And cross-chain data access can be performed among the blockchains contained in each blockchain system and among the blockchain systems.
The blockchain node may be a physical device (e.g., a physical host in a server cluster), or may be a virtual device implemented in a server or a server cluster (e.g., a virtual machine created after a hardware resource carried by the server or the server cluster is virtualized based on a virtualization technology).
In one illustrated embodiment, the server 202 may include a BaaS platform (also referred to as a BaaS cloud) for providing a Blockchain Service (BaaS).
Referring to fig. 3, fig. 3 is a flowchart illustrating a method for blockchain-based asset management according to an exemplary embodiment of the present disclosure.
In conjunction with the network environment shown in fig. 2, the above-described blockchain-based asset management method may be applied to node devices in a blockchain.
In practical application, for some blockchain models derived based on an account model architecture, account types supported by blockchains can be further expanded.
Therefore, in the asset management method based on the blockchain, the account types supported by the blockchain can be expanded, and a fund account is expanded on the basis of the account types supported by the blockchain; the expanded funds account may be used to hold currency.
For the fund account holding the currency, the account structure of the fund account may include: a field (referred to as a first field) for filling currency information of the currency; and a field (referred to as a second field) for populating a credit line corresponding to the currency.
It should be noted that, the fields in the fund account, such as the first field and the second field, may be a plurality of fields that are expanded by expanding a Balance field in a traditional account structure, that is, the account structure of the fund account may still include fields such as a Nonce, a Code, and a Storage. Alternatively, the account structure of the fund account may not include the Balance, Nonce, Code, Storage, etc. fields, but only include the first field, the second field, etc. fields.
Further, the above block chain-based asset management method may include the following steps:
step 302: receiving an asset creation transaction for creating a funding account; wherein the asset creation transaction comprises an account identification of the funded account value-anchored credit account; the credit account is an out-of-chain credit account.
In practical applications, for data generated outside the chain, the data may be constructed into a standard transaction (transaction) format supported by the blockchain, and then issued to the blockchain, a device joining the blockchain (also referred to as a node in the blockchain) identifies the transaction, and after the identification is achieved, the transaction is packaged into a block by a node device serving as an accounting node in the blockchain, and persistent storage is performed in the blockchain.
Thus, to trigger the process of creating the funding account on the blockchain, a transaction for creating the funding account on the blockchain (referred to as an asset creation transaction) may be issued to the blockchain. A node device in the blockchain may receive the asset creation transaction issued to the blockchain and respond to the asset creation transaction to create the funding account on the blockchain.
Wherein the asset creation transaction may include an account identification of the credit account to which the value of the fund account is anchored; the credit account may be an out-of-chain credit account. Credit accounts outside the chain are those that are not on the blockchain.
It should be noted that, since the fund account is anchored to the value of the credit account, the fund account and the credit account may share currency information of a currency (referred to as a target currency) held by the credit account and a credit line of the credit account corresponding to the target currency.
In implementations, the credit account may include an out-of-chain credit account for a user who needs to create a funding account on the blockchain. In particular, the credit account may comprise a credit account opened by the user on an off-chain payment system interfacing with the blockchain. For example, assuming that the out-of-chain payment system is an out-of-chain payment system provided by an asset manager, the asset manager being a bank, the financial account may comprise a financial account opened by the user at the bank.
Wherein, the off-chain payment system is a payment system without a block chain; the off-chain payment system may be an off-chain payment system provided by the asset manager or an off-chain payment system provided by a trusted third party.
Specifically, in one example, the user who needs to create a fund account on the blockchain may access the blockchain in advance through the user client. Subsequently, the user can issue the asset creation transaction to the blockchain through the user client, so that the node devices in the blockchain can receive the asset creation transaction.
In another example, the above asset managers managing funds, assets, etc. may have prior access to the blockchain. Subsequently, the asset manager may issue the asset creation transaction to the blockchain in place of the user needing to create a funding account on the blockchain so that the node devices in the blockchain may receive the asset creation transaction.
Wherein, the asset manager may comprise a financial institution (e.g. a bank) accessing the blockchain; the user may include a user who is provided asset service by the financial institution.
In conjunction with the network environment shown in fig. 2, the blockchain may include a blockchain system 203 in the network environment; the node devices in the blockchain may include blockchain nodes 1 to i, etc. in the blockchain system 203.
In one example, the user client described above may comprise device 4 in client-side computing device 201 in the network environment. The user may initiate the asset creation transaction via device 4 and the asset creation transaction is issued by device 4 to blockchain system 203; each blockchain link point in the blockchain system 203 may receive the asset creation transaction and respond to the asset creation transaction to create the aforementioned funding account in the blockchain system 203.
In another example, the asset manager may include a server side 202 in the network environment; the user client may include device 1, device 2, device 3, or device 5 in the client-side computing device 201 in the network environment, i.e., the device connected to the server side 202. Assuming that the user client is the device 3, the user may initiate the asset creation transaction through the device 3, and the device 3 issues the asset creation transaction to the blockchain system 203 through the server 202; each blockchain link point in the blockchain system 203 may receive the asset creation transaction and respond to the asset creation transaction to create the aforementioned funding account in the blockchain system 203.
In another example, to secure data of the blockchain and facilitate management of the blockchain, the asset manager does not typically establish a communication connection directly with a node device in the blockchain, but instead accesses the blockchain by establishing a communication connection with a blockchain service platform. In this case, the blockchain service platform may include the server side 202 in the network environment; the asset manager may include device 1, device 2, device 3, or device 5 in the client-side computing device 201 in the network environment; the user clients may include user clients that establish communication connections with device 1, device 2, device 3, or device 5 in the client-side computing device 201 in the network environment; for example, the user client may be device 1 or device 2 when the asset management party is device 5, and the user client may be a user client that establishes a communication connection with device 1, device 2, or device 3 when the asset management party is device 1, device 2, or device 3. Assuming that the asset management party is a device 5 and the user client is a device 1, the user may initiate the asset creation transaction through the device 1, and the device 1 issues the asset creation transaction to the blockchain system 203 through the device 5 and the server 202; each blockchain link point in the blockchain system 203 may receive the asset creation transaction and respond to the asset creation transaction to create the aforementioned funding account in the blockchain system 203.
Step 304: in response to the asset creation transaction, acquiring currency information of a target currency held by the credit account corresponding to the account identification and a credit line of the credit account corresponding to the target currency.
In practical applications, for the UTXO model, the transaction types supported by the blockchain include only transfer transactions; for the account model, the types of transactions supported by the blockchain include transfer transactions, smart contract creation transactions, and smart contract invocation transactions.
Therefore, the transaction types supported by the blockchain can be expanded, and a new transaction type (namely the asset creation transaction) is expanded on the basis of the transaction types supported by the blockchain; the asset creation transaction that is extended may be a transaction type that is independent of the transfer transaction, smart contract creation transaction, or smart contract invocation transaction for creating the above-described fund account on the blockchain. In this case, the node device in the blockchain responds to the asset creation transaction, runs the native code of the blockchain corresponding to the asset creation transaction, and implements the logic indicated by the native code.
Or, an intelligent contract may be deployed on the block chain in advance; wherein the intelligent contract may be used to create the above-mentioned fund account on the blockchain. Accordingly, the smart contract invocation transaction for invoking the smart contract may be considered the asset creation transaction. In this case, the node devices in the blockchain respond to the asset creation transaction, invoke the intelligent contract, run the contract code in the intelligent contract, and implement the logic indicated by the contract code.
When the node device in the block chain responds to the asset creating transaction, because the asset creating transaction includes the account identifier of the credit account with the anchored value of the fund account, the corresponding credit account can be determined according to the account identifier, and the currency information of the target currency held by the credit account and the credit line of the credit account corresponding to the target currency can be acquired.
In practical applications, since the credit account may include a credit account opened on the off-link payment system, the off-link payment system may maintain account information such as account identifier, credit limit, used credit amount, currency information of held currency, and fund amount of the credit account; the amount of funds in the currency held by the credit account may also be referred to as the account balance of the credit account.
In practical applications, the intelligent contracts deployed on the blockchain generally only have access to data contents stored on the blockchain; in some complex business scenarios implemented based on smart contract technology, the smart contracts may also require access to external data stored on data entities outside the chain. In this case, the intelligent contract deployed on the blockchain can access data on the data entities outside the chain through the Oracle ora; data entities outside the chain may include, for example, centralized servers or data centers deployed outside the chain, and so on.
Therefore, when the asset creation transaction is the new transaction type, the native code of the blockchain corresponding to the asset creation transaction may be executed, and the instruction information for acquiring the account information of the credit account corresponding to the account identifier may be generated and stored in the blockchain. When the instruction information stored in the block chain is acquired, the off-link payment system can respond to the instruction information and issue the account information of the credit account to the block chain for storage, so that the node device in the block chain can acquire the account information of the credit account maintained by the off-link payment system from the block chain.
Or, when the asset creating transaction is the intelligent contract invoking transaction, running contract codes in an intelligent contract corresponding to the asset creating transaction and deployed on the block chain, and accessing data in the off-chain payment system by the intelligent contract through an Oracle prompter to acquire account information of the credit account corresponding to the account identifier and maintained by the off-chain payment system.
Step 306: and creating a fund account for holding the target currency on the block chain, filling the acquired currency information of the target currency into the first field in the fund account, and filling the acquired credit line into the second field in the fund account.
When the node device in the block chain acquires the currency information of the target currency and the credit line of the credit account corresponding to the target currency, a fund account for holding the target currency may be further created on the block chain, the acquired currency information of the target currency may be filled into the first field of the fund account, and the acquired credit line may be filled into the second field of the fund account.
In one embodiment, before creating the fund account on the blockchain, the credit account may be frozen by an off-chain payment system interfacing with the blockchain and generating a corresponding frozen credential; wherein the frozen credential may be used for validity checking. In this case, the asset creation transaction may further include the frozen credential that the off-chain payment system freezes the credit account.
It should be noted that the off-link payment system in step 306 may be the same off-link payment system as the off-link payment system in steps 302 and 304, or may be a different off-link payment system.
In implementation, in order to create the fund account on the blockchain, the validity of the frozen certificate may be checked first, and when the check is passed, the fund account is created on the blockchain.
In practical applications, the validity check for the frozen certificate can be designed based on practical requirements.
For example, the validity check on the frozen certificate may include any one or more of the following checking methods: checking whether the digital signature in the frozen certificate is legal or not, wherein the digital signature can be obtained by the off-chain payment system performing signature processing on the frozen certificate when the frozen certificate is generated; checking whether the amount of funds in the frozen voucher is the same as the amount of funds in the target currency held by the credit account frozen by the off-link payment system; checking whether the credit line in the frozen certificate is the same as the credit line of the credit account frozen by the off-link payment system and corresponding to the target currency or not; checking whether the frozen voucher is in a valid period; and so on.
In one embodiment, the off-chain payment system may freeze the credit account itself when freezing the credit account, and at this time, the frozen credit account cannot be used any more; alternatively, portions of the credit account may be frozen, at which point the frozen portions of the credit account are no longer usable, but the non-frozen portions are still usable normally.
For example, if the credit line of a certain credit account is 1 ten thousand yuan, and the held fund amount is 2000 yuan, only the credit line of 8000 yuan and the fund amount of 1000 yuan of the credit account may be frozen, and the remaining credit line of 2000 yuan and the fund amount of 1000 yuan of the credit account may still be used normally.
In this case, in step 304, when acquiring the credit line of the credit account corresponding to the target currency, the out-of-chain payment system may specifically acquire the frozen credit line corresponding to the target currency for the credit account. That is, the credit amount filled into the second field of the fund account is the credit amount corresponding to the target currency, which is frozen by the off-chain payment system for the credit account.
Further, in one embodiment shown, the account structure of the fund account created on the above block chain may further include: a field for populating the credit used amount corresponding to the currency held by the funding account (referred to as a third field).
In practical application, for a certain credit account, assuming that the credit line of the credit account is 1 ten thousand yuan of RMB, it indicates that the credit line of the account can be used to pay for 1 ten thousand yuan of RMB at most; further assume that the amount of funds paid using the credit line of the account is 1000 yuan, the credit used amount of the credit account is 1000 yuan.
The node device in the blockchain may further obtain a credit used amount corresponding to the target currency, which is frozen by the off-chain payment system for the credit account, when responding to the asset creation transaction, and fill the obtained credit used amount into the third field in the fund account created on the blockchain.
Still further, in one embodiment shown, the account structure of the fund account created on the blockchain may further include: a field for filling the amount of funds in the currency held by the funds account (referred to as the fourth field).
When the node device in the block chain responds to the asset creation transaction, the node device may further obtain a fund amount of the target currency held by the credit account frozen by the off-chain payment system, and fill the obtained fund amount into the fourth field in the fund account created on the block chain.
In practical applications, the asset management party or the user who creates the fund account on the blockchain may freeze the credit line, the used credit amount or the fund amount of the credit account again through the off-chain payment system or unfreeze the credit line, the used credit amount or the fund amount of the credit account through the off-chain payment system and issue an account change transaction for the fund account to the blockchain when the information related to the target currency held by the fund account needs to be changed.
Wherein the account change transaction may include a credit line, credit used or fund amount of the credit account that is refroked by the off-chain payment system, or may include a credit line, credit used or fund amount of the credit account that is defrosted by the off-chain payment system.
It should be noted that, similar to the asset creation transaction, the account change transaction may be a new transaction type supported by an expanded blockchain, or may be an intelligent contract invocation transaction; this description is not repeated herein.
Subsequently, when receiving the account change transaction, the node device in the blockchain may respond to the account change transaction, and update the data filled in the second field, the third field, or the fourth field in the fund account based on the credit amount, the used credit amount, or the fund amount in the account change transaction.
Specifically, when the account change transaction includes the credit line of the credit account that is refroked by the off-link payment system, the sum of the credit line of the refroked credit account and the credit line filled in the second field of the financial account may be calculated, and the credit line filled in the second field of the financial account may be replaced with the sum. Alternatively, when the account change transaction includes a credit line of the credit account defrosted by the off-link payment system, a difference between the credit line filled in the second field of the financial account and the defrosted credit line of the credit account may be calculated and the credit line filled in the second field of the financial account may be replaced with the difference.
In another embodiment, account information such as account id, credit limit, used credit amount, currency information of held currency and fund amount of a credit account opened on the off-link payment system can be maintained by the off-link payment system.
In this case, the off-chain payment system may issue an account update transaction for updating the credit line to the block chain when the credit line corresponding to the target currency of the maintained credit account is updated.
The account update transaction may include update information of a credit amount of the credit account corresponding to the target currency.
When receiving the account update transaction, the node device in the block chain may respond to the account update transaction, and update the credit line filled in the second field in the fund account created on the block chain based on the update information of the credit line in the account update transaction, so as to ensure that the credit line in the credit account and the credit line in the fund account are updated synchronously.
For example, if the updated information of the credit line includes the updated credit line of the credit account corresponding to the target currency held by the credit account, the credit line filled in the second field of the financial account may be replaced with the updated credit line; assuming that the updated information of the credit line includes a change value of the credit line of the credit account corresponding to the target currency held by the credit account, the credit line filled in the second field of the fund account may be added to the change value of the credit line.
Further, in one embodiment shown, the account structure of the fund account created on the above block chain may further include: a third field for populating a credit used amount corresponding to the currency held by the funding account.
The node device in the blockchain may further acquire a credit used amount of the credit account blocked by the off-chain payment system corresponding to the target currency when responding to the asset creation transaction, and fill the acquired credit used amount of the credit account corresponding to the target currency into the third field in the fund account created on the blockchain.
Similarly to the updating process of the credit line, the used credit amount in the credit account and the used credit amount in the fund account are updated synchronously.
For example, the account update transaction may further include update information of the credit used amount of the credit account corresponding to the target currency held by the credit account. The node device in the blockchain may update the credit used amount filled in the third field in the fund account created on the blockchain, based on the update information of the credit used amount in the account update transaction, in response to the account update transaction when receiving the account update transaction.
Still further, in one embodiment shown, the account structure of the fund account created on the blockchain may further include: a fourth field for populating a fund amount of currency held by the fund account.
When the node device in the blockchain responds to the asset creation transaction, the node device may further acquire a fund amount of the target currency held by the credit account frozen by the off-chain payment system, and fill the acquired fund amount of the target currency held by the credit account into the fourth field in the fund account created on the blockchain.
Similarly to the updating process of the credit line, the fund amount in the credit account is updated synchronously with the fund amount in the fund account.
For example, the account update transaction may further include update information of a fund amount of the target currency held by the credit account. The node device in the blockchain may respond to the account update transaction when receiving the account update transaction, and update the fund amount filled in the fourth field in the fund account created on the blockchain based on the update information of the fund amount in the account update transaction.
Referring to fig. 4, fig. 4 is a diagram illustrating a funding account created on a blockchain according to an exemplary embodiment of the present disclosure.
As shown in fig. 4, the above-mentioned money account is used for holding money; the account structure of the fund account may include: a first field for filling currency information of the currency (i.e., "currency" field in fig. 4); a second field for filling in the credit line corresponding to the currency (i.e., the "credit line" field in FIG. 4); a third field for filling the credit used amount corresponding to the currency (i.e., "credit used amount" field in fig. 4); a fourth field for filling the amount of funds in the currency (i.e., the "balance" field in fig. 4).
The following examples are given in this specification by way of illustration.
Assuming that the off-chain payment system freezes the off-chain credit account; the frozen credit account has a credit limit of 1 ten thousand yuan, the frozen credit account has a used credit amount of 2000 yuan, and the frozen credit account has a fund amount of 1000 yuan.
A node device in the blockchain may receive an asset creation transaction for creating a funding account; wherein the funds account is anchored to the value of the credit account, the funds account being used to hold a target currency (i.e., the currency held by the credit account), and the asset creation transaction including the account identification and the frozen credentials of the credit account.
Node devices in the blockchain, upon receiving the asset creation transaction, may respond to the asset creation transaction by obtaining the frozen credit line of the credit account, the credit used amount, and the held monetary amount of funds. In this case, the node device in the blockchain may create the fund account on the blockchain after passing the validity check of the frozen certificate, fill "renminbi" in a first field of the fund account as currency information of the target currency, fill "10000" in a second field of the fund account as a credit amount corresponding to the target currency, fill "2000" in a third field of the fund account as a credit used amount corresponding to the target currency, and fill "1000" in a fourth field of the fund account as a fund amount of the target currency held by the fund account.
In the above technical solution, for a fund account created on a block chain and used for holding money, since the account structure of the fund account may include a first field for filling currency information of the currency and a second field for filling a credit line corresponding to the currency held by the fund account, the fund account is endowed with currencies with different currencies and can be paid by using the credit line corresponding to the held currency, so that the fund account can be applied to different business scenarios with different transaction currencies and payment modes, and flexibility in accessing different business scenarios by using the fund account is improved.
In correspondence with the foregoing embodiments of the blockchain-based asset management method, the present specification also provides embodiments of a blockchain-based asset management apparatus.
The embodiment of the block chain-based asset management device can be applied to the electronic equipment. The device embodiments may be implemented by software, or by hardware, or by a combination of hardware and software. Taking a software implementation as an example, as a logical device, the device is formed by reading, by a processor of the electronic device where the device is located, a corresponding computer program instruction in the nonvolatile memory into the memory for operation. From a hardware aspect, as shown in fig. 5, the hardware structure diagram of the electronic device where the asset management device based on the block chain is located in this specification is shown, except for the processor, the memory, the network interface, and the nonvolatile memory shown in fig. 5, the electronic device where the device is located in the embodiment may also include other hardware according to the actual function of the asset management based on the block chain, which is not described again.
Referring to fig. 6, fig. 6 is a block diagram of an asset management device based on a block chain according to an exemplary embodiment of the present disclosure. The block chain-based asset management device 60 may be applied to an electronic device as shown in fig. 5, which may be a node device in a block chain; the types of accounts supported by the blockchain include funding accounts for holding currency; the account structure of the funding account comprises a first field and a second field; the first field is used for filling currency information of the currency; the second field is used for filling a credit line corresponding to the currency; the block chain based asset management device 60 may include:
a receiving module 601, which receives an asset creation transaction for creating a funding account; wherein the asset creation transaction comprises an account identification of the funded account value-anchored credit account; the credit account is an out-of-chain credit account;
an obtaining module 602, configured to obtain currency information of a target currency held by the credit account corresponding to the account identifier and a credit limit of the credit account corresponding to the target currency in response to the asset creation transaction; and the number of the first and second groups,
the creating module 603 creates a fund account for holding the target currency on the blockchain, fills the acquired currency information of the target currency into the first field of the fund account, and fills the acquired credit line into the second field of the fund account.
The implementation process of the functions and actions of each module in the above device is specifically described in the implementation process of the corresponding step in the above method, and is not described herein again.
For the device embodiments, since they substantially correspond to the method embodiments, reference may be made to the partial description of the method embodiments for relevant points. The above-described embodiments of the apparatus are merely illustrative, wherein the modules described as separate parts may or may not be physically separate, and the parts displayed as modules may or may not be physical modules, may be located in one place, or may be distributed on a plurality of network modules. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution in the specification. One of ordinary skill in the art can understand and implement it without inventive effort.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. A typical implementation device is a computer, which may take the form of a personal computer, laptop computer, cellular telephone, camera phone, smart phone, personal digital assistant, media player, navigation device, email messaging device, game console, tablet computer, wearable device, or a combination of any of these devices.
In a typical configuration, a computer includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
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 computer storage media 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 disk storage, quantum memory, graphene-based storage media or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
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 an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The foregoing description has been directed to specific embodiments of this disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
The terminology used in the description of the one or more embodiments is for the purpose of describing the particular embodiments only and is not intended to be limiting of the description of the one or more embodiments. As used in one or more embodiments of the present specification and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It should be understood that although the terms first, second, third, etc. may be used in one or more embodiments of the present description to describe various information, such information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of one or more embodiments herein. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
The above description is only for the purpose of illustrating the preferred embodiments of the one or more embodiments of the present disclosure, and is not intended to limit the scope of the one or more embodiments of the present disclosure, and any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the one or more embodiments of the present disclosure should be included in the scope of the one or more embodiments of the present disclosure.