WO2022206209A1 - 基于区块链的资产管理 - Google Patents

基于区块链的资产管理 Download PDF

Info

Publication number
WO2022206209A1
WO2022206209A1 PCT/CN2022/076779 CN2022076779W WO2022206209A1 WO 2022206209 A1 WO2022206209 A1 WO 2022206209A1 CN 2022076779 W CN2022076779 W CN 2022076779W WO 2022206209 A1 WO2022206209 A1 WO 2022206209A1
Authority
WO
WIPO (PCT)
Prior art keywords
asset
blockchain
type
transaction
target
Prior art date
Application number
PCT/CN2022/076779
Other languages
English (en)
French (fr)
Inventor
李艳鹏
陆旭明
周知远
郭学鹏
赵文强
Original Assignee
支付宝(杭州)信息技术有限公司
蚂蚁区块链科技(上海)有限公司
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 支付宝(杭州)信息技术有限公司, 蚂蚁区块链科技(上海)有限公司 filed Critical 支付宝(杭州)信息技术有限公司
Publication of WO2022206209A1 publication Critical patent/WO2022206209A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3827Use of message hashing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor

Definitions

  • the embodiments of this specification relate to the field of blockchain technology, and in particular, to a blockchain-based asset management.
  • This specification proposes a blockchain-based asset management method, which is applied to node devices in the blockchain; wherein the transaction types supported by the blockchain include a first asset definition transaction for defining an asset model ;
  • the operator of the blockchain defines an asset type and an asset format corresponding to the asset type in the blockchain; the method includes: receiving the information issued by the asset management party accessing the blockchain The first asset definition transaction; wherein the first asset definition transaction includes an asset model defined by the asset manager and corresponding to a target asset type; the asset model includes asset creation information corresponding to the target asset type ; in response to the first asset definition transaction, save the asset model on the blockchain, so that the asset creator docked with the asset manager creates information based on the asset in the asset model, and communicates with The asset format corresponding to the target asset type creates a standardized blockchain asset in the blockchain.
  • the transaction type supported by the blockchain further includes a second asset definition transaction for defining an asset type; the method further includes: receiving the second asset definition transaction issued by the operator; wherein, The second asset definition transaction includes the target asset type defined by the operator and an asset format corresponding to the target asset type; in response to the second asset definition transaction, saving all the assets on the blockchain.
  • the target asset type and the asset format corresponding to the target asset type are included in the transaction type supported by the blockchain.
  • the storing the asset model on the blockchain includes: saving the asset model in the Merkle state tree of the blockchain in the form of a key-value pair;
  • the storing of the target asset type and the asset format corresponding to the target asset type on the blockchain includes: converting the target asset type and the asset format corresponding to the target asset type with key-
  • the form of value key-value pair is stored in the Merkle state tree of the blockchain.
  • the transaction type supported by the blockchain further includes an asset creation transaction for creating an asset corresponding to the target asset type; the method further includes: receiving a message from an asset creator connected by the asset management party The asset creation transaction; wherein, the asset creation transaction includes the type identifier of the target asset type; in response to the asset creation transaction, obtain the target asset type stored in the blockchain and indicated by the type identifier The corresponding asset format and the asset model corresponding to the target asset type, and based on the asset creation information in the asset model and the asset format corresponding to the target asset type, create a standardized area in the blockchain. blockchain assets.
  • the asset management party deploys an asset-related smart contract on the blockchain; the method further includes: receiving a contract invocation transaction sent by an asset creator connected to the asset management party; wherein, The contract invocation transaction includes the type identifier of the target asset type; in response to the contract invocation transaction, the query logic in the smart contract is invoked to query the data stored in the blockchain and indicated by the type identifier.
  • the asset format corresponding to the target asset type, and the asset model corresponding to the target asset type and after querying the asset format corresponding to the target asset type and the asset model corresponding to the target asset type, further call the According to the creation logic in the smart contract, based on the asset creation information in the asset model and the asset format corresponding to the target asset type, a standardized blockchain asset is created in the blockchain.
  • the asset format includes several asset attribute fields; the asset creation transaction or the contract invocation transaction includes attribute values submitted by the asset creator and corresponding to the several asset attribute fields; the asset creation information Including verification rules for attribute values corresponding to the several asset attribute fields; the asset creation information based on the asset model and the asset format corresponding to the target asset type, in the blockchain Creating standardized blockchain assets includes: verifying, based on the verification rules in the asset model, the attribute values submitted by the asset creator and corresponding to the several asset attribute fields; if the verification is passed, further Based on the attribute values, and an asset format corresponding to the target asset type, a standardized blockchain asset is created in the blockchain.
  • the asset creation information includes a state machine corresponding to the blockchain asset; the method further includes: after creating a standardized blockchain asset in the blockchain, based on the asset model The state machine of , updates the asset state corresponding to the blockchain asset.
  • the transaction type supported by the blockchain further includes an asset transfer transaction for transferring assets; the method further includes: receiving an asset transfer transaction sent by an asset transfer party docked by the asset management party; wherein, the The asset transfer transaction includes the asset identifier of the block chain asset to be transferred; in response to the asset transfer transaction, obtain the block chain asset stored in the block chain and corresponding to the asset identifier, and perform an analysis on the asset corresponding to the asset. Identify the corresponding blockchain assets for asset transfer.
  • the asset management party deploys an asset-related smart contract on the blockchain; the method further includes: receiving a contract invocation transaction sent by an asset transfer party docked by the asset management party; wherein, The contract invocation transaction includes the asset identifier of the blockchain asset; in response to the contract invocation transaction, the query logic in the smart contract is invoked to query the area stored in the blockchain that corresponds to the asset identifier.
  • block chain assets and after querying the block chain assets corresponding to the asset identifiers, further call the transfer logic in the smart contract to transfer the assets of the block chain assets corresponding to the asset identifiers.
  • the asset type and the asset format corresponding to the asset type are defined in the blockchain by the operator based on a general programming language; the asset model is defined by the asset manager based on the general programming language. language definition.
  • the general-purpose programming language includes a general-purpose declarative programming language.
  • the general-purpose declarative programming language includes a domain-specific language.
  • the operator includes a blockchain service platform;
  • the asset management party includes a financial institution accessing the blockchain service platform;
  • the asset creator includes a user who is provided with asset services by the financial institution client.
  • This specification also proposes a blockchain-based asset management device, which is applied to a node device in a blockchain; wherein the transaction type supported by the blockchain includes a first asset definition for defining an asset model transaction; the operator of the blockchain defines an asset type and an asset format corresponding to the asset type in the blockchain; the device includes: a first receiving module, which receives and accesses the blockchain The first asset definition transaction issued by the asset management party; wherein, the first asset definition transaction includes an asset model defined by the asset management party and corresponding to the target asset type; Asset creation information corresponding to the type; the first definition module, in response to the first asset definition transaction, saves the asset model on the blockchain, so that the asset creator docked with the asset manager is based on the The asset creation information in the asset model and the asset format corresponding to the target asset type are used to create standardized blockchain assets in the blockchain.
  • the transaction type supported by the blockchain further includes a second asset definition transaction used to define an asset type; the apparatus further includes: a second receiving module for receiving the second asset issued by the operator A definition transaction; wherein the second asset definition transaction includes the target asset type defined by the operator and an asset format corresponding to the target asset type; a second definition module, in response to the second asset definition transaction , and save the target asset type and the asset format corresponding to the target asset type on the blockchain.
  • the first definition module saves the asset model in the Merkle state tree of the blockchain in the form of key-value pairs; the second definition module: saves the asset model
  • the target asset type and the asset format corresponding to the target asset type are stored in the Merkle state tree of the blockchain in the form of key-value pairs.
  • the transaction type supported by the blockchain further includes an asset creation transaction for creating an asset corresponding to the target asset type;
  • the device further includes: a third receiving module for receiving the docking of the asset management party An asset creation transaction sent by the asset creator of The asset format corresponding to the target asset type indicated by the type identifier, and the asset model corresponding to the target asset type, and based on the asset creation information in the asset model, and the asset format corresponding to the target asset type , creating standardized blockchain assets in the blockchain.
  • the asset management party has deployed an asset-related smart contract on the blockchain;
  • the device further includes: a fourth receiving module that receives a contract sent by an asset creator connected to the asset management party Invoke transaction; wherein, the contract invocation transaction includes the type identifier of the target asset type; the second creation module, in response to the contract invocation transaction, invokes the query logic in the smart contract to query the blockchain storage
  • the asset format corresponding to the target asset type indicated by the type identifier, and the asset model corresponding to the target asset type, and the asset format corresponding to the target asset type and the target asset After the asset model corresponding to the type, the creation logic in the smart contract is further invoked, and based on the asset creation information in the asset model and the asset format corresponding to the target asset type, a standardized creation is created in the blockchain. blockchain assets.
  • the asset format includes several asset attribute fields;
  • the asset creation transaction or the contract invocation transaction includes attribute values submitted by the asset creator and corresponding to the several asset attribute fields;
  • the asset creation information Including verification rules for the attribute values corresponding to the several asset attribute fields;
  • the creation module based on the verification rules in the asset model The attribute value is verified; if the verification is passed, a standardized blockchain asset is created in the blockchain based on the attribute value and the asset format corresponding to the target asset type.
  • the asset creation information includes a state machine corresponding to the blockchain asset; the creation module: after creating a standardized blockchain asset in the blockchain, based on the A state machine that updates the asset state corresponding to the blockchain asset.
  • the transaction type supported by the blockchain further includes an asset transfer transaction for transferring the blockchain asset;
  • the device further includes: a fifth receiving module for receiving the asset transfer docked by the asset management party The asset transfer transaction sent by the party; wherein, the asset transfer transaction includes the asset identifier of the blockchain asset to be transferred; the first transfer module, in response to the asset transfer transaction, obtains the data stored in the blockchain and the The blockchain asset corresponding to the asset identifier, and the asset transfer is performed on the blockchain asset corresponding to the asset identifier.
  • the asset management party has deployed an asset-related smart contract on the blockchain;
  • the device further includes: a sixth receiving module for receiving a contract sent by an asset transfer party connected to the asset management party Invoke transaction; wherein, the contract invocation transaction includes the asset identifier of the blockchain asset; the second transfer module, in response to the contract invocation transaction, invokes the query logic in the smart contract to query the blockchain
  • the stored blockchain asset corresponding to the asset identifier and after querying the blockchain asset corresponding to the asset identifier, the transfer logic in the smart contract is further invoked, and the transfer logic corresponding to the asset identifier is further called.
  • the corresponding blockchain assets are transferred.
  • the asset type and the asset format corresponding to the asset type are defined in the blockchain by the operator based on a general programming language; the asset model is defined by the asset manager based on the general programming language. definition.
  • the general-purpose programming language includes a general-purpose declarative programming language.
  • the general-purpose declarative programming language includes a domain-specific language.
  • the operator includes a blockchain service platform;
  • the asset management party includes a financial institution accessing the blockchain service platform;
  • the asset creator includes a user who is provided with asset services by the financial institution client.
  • This specification also proposes an electronic device, comprising: a processor; a memory for storing instructions executable by the processor; wherein the processor implements the steps of the above method by running the executable instructions.
  • This specification also proposes a computer-readable storage medium on which computer instructions are stored, and when the instructions are executed by a processor, implement the steps of the above method.
  • the operator of the blockchain can define the target asset type and the asset format corresponding to the target asset type in the blockchain; the node device in the blockchain can receive the asset management party
  • the asset model corresponding to the target asset type defined by the asset manager in the first asset definition transaction is saved on the blockchain,
  • the asset creator connected with the asset manager can create a standardized asset in the blockchain based on the asset creation information stored in the asset model and the asset format corresponding to the target asset type. Since the operator of the above-mentioned blockchain defines the asset type and the asset format corresponding to the asset type in the above-mentioned blockchain, all asset managers accessing the blockchain are located in this area.
  • the asset model corresponding to the asset type defined in the blockchain all instructs the creation of blockchain assets according to the asset format corresponding to the asset type. Therefore, for the asset creator connected with any of the asset managers, these
  • the asset format of the blockchain assets corresponding to the asset type created by the asset creator on the blockchain is the same, and they are defined in the blockchain by the blockchain operator and correspond to the asset type. Asset format; thus realizes the creation of standardized blockchain assets in the blockchain, thereby facilitating the circulation of the created blockchain assets on the blockchain.
  • FIG. 1 is a schematic diagram of a network environment related to the blockchain shown in this specification
  • FIG. 2 is a flowchart of a blockchain-based asset management method shown in an exemplary embodiment of this specification
  • FIG. 3 is a schematic diagram of a state machine shown in an exemplary embodiment of the present specification
  • FIG. 4 is a hardware structure diagram of an electronic device where a blockchain-based asset management device is located according to an exemplary embodiment of this specification;
  • FIG. 5 is a block diagram of a blockchain-based asset management device shown in an exemplary embodiment of the present specification.
  • the steps of the corresponding methods are not necessarily performed in the order shown and described in this specification.
  • the method may include more or fewer steps than described in this specification.
  • a single step described in this specification may be decomposed into multiple steps for description in other embodiments; and multiple steps described in this specification may also be combined into a single step in other embodiments. describe.
  • FIG. 1 is a schematic diagram of a network environment related to the blockchain shown in this specification.
  • a client-side computing device 101 a server-side 102, and at least one blockchain system may be included; for example, a blockchain system 103, a blockchain system 104, and a blockchain system 105.
  • the client-side computing device 101 may include various types of client-side computing devices; for example, the client-side terminal device may include, for example, a PC terminal device, a mobile terminal device, an Other forms of smart devices with certain computing capabilities, and so on.
  • the client-side terminal device may include, for example, a PC terminal device, a mobile terminal device, an Other forms of smart devices with certain computing capabilities, and so on.
  • client-side computing device 101 does not mean that all the client-side computing devices therein are in the same communication network, but is merely a general term for these client-side computing devices.
  • At least part of the computing devices in the client-side terminal device 101 may be coupled to the server side 102 through various communication networks; for example, the device 1 and device 2 shown in FIG. 1 and the server side 102 coupled.
  • terminal devices in the client-side terminal device 101 may not be coupled with the server-side 102, but directly coupled to the blockchain system as blockchain nodes through various communication networks; for example, The device 4 shown in Figure 1 can be coupled to the blockchain system as a blockchain node.
  • the above-mentioned communication network may include wired and/or wireless communication networks; for example, it may be a Local Area Network (LAN), Wide Area Network (WAN), the Internet, or a combination thereof.
  • LAN Local Area Network
  • WAN Wide Area Network
  • the Internet or a combination thereof.
  • the client-side computing device 101 may further include one or more user-side servers; for example, the device 5 shown in FIG. 1 . At least part of the computing devices in the client-side terminal device 101 may be coupled to the user-side server, and the user-side server may be further coupled to the above-mentioned server 102; for example, the device 1 and the device shown in FIG. 1 2 is coupled to the device 5, and the device 5 is further coupled to the server side 102.
  • the above-mentioned user-side server may be implemented by a service entity that has built a user account system; the above-mentioned service entity may include an operating entity that provides various online and/or offline services to users for service carriers; wherein , the above-mentioned service carrier may include a service carrier in the form of software, and may also include a service carrier in the form of hardware.
  • the above-mentioned service carrier may include various client software for providing online Internet services; for example, a website, a webpage, an APP, and the like.
  • the above service carrier may also include various smart devices deployed offline and capable of providing offline services; for example, smart express cabinets deployed in residential areas, office areas, and public places.
  • the above-mentioned operating entities may include operators corresponding to the above-mentioned service carriers; for example, the above-mentioned operating entities may include individuals, organizations, companies, and enterprises that operate and manage the above-mentioned service carriers, and so on.
  • the server side 102 may also be coupled to one or more blockchain systems through various communication networks; for example, the server side 102 shown in FIG. 1 may be respectively coupled to the blockchain system 103 , Blockchain System 104 and Blockchain System 105, etc.
  • each blockchain system may maintain one or more blockchains (eg, public blockchains, private blockchains, consortium blockchains, etc.) or multiple blockchain nodes of multiple blockchains; for example, blockchain node 1, blockchain node 2, blockchain node 3, blockchain node 4, blockchain node 4 as shown in Figure 1 Node i, etc. can jointly host one or more blockchains.
  • Cross-chain data access can also be performed between the blockchains included in each blockchain system and between the various blockchain systems.
  • blockchain nodes may include full nodes and light nodes.
  • the full node can download the blockchain transactions contained in each block in the blockchain in full, and can perform consensus verification on the blockchain transactions contained in each blockchain according to the blockchain consensus algorithm on board. .
  • the light node can not download the complete blockchain, but can only download the block header data of each block in the blockchain, and use the data contained in the block header as the verification root to verify the blockchain. authenticity of the transaction. Light nodes can attach to full nodes to access more features of the blockchain.
  • each blockchain node in the blockchain system 103 shown in FIG. 1 can serve as a full node; and the device 4 shown in FIG. 1 that is directly coupled to the blockchain system can serve as a light node , attached to each full node in the blockchain system 103 .
  • the blockchain node may be a physical device or a virtual device implemented in a server or server cluster; for example, the blockchain node device may be a physical host in a server cluster, or It is a virtual machine created after virtualizing the hardware resources carried by a server or server cluster based on virtualization technology.
  • Each blockchain node can be coupled together through various types of communication methods (such as TCP/IP) to form a network to carry one or more blockchains.
  • the server side 102 may include a BaaS platform (also referred to as a BaaS cloud) for providing blockchain services (BaaS, Blockchain as a Service).
  • the BaaS platform can target client-side computing devices coupled to the BaaS platform by providing pre-written software for activities that take place on the blockchain, such as subscriptions and notifications, user authentication, database management, and remote updates.
  • Simple and easy to use, one-click deployment, fast verification, flexible and customizable blockchain services which can accelerate the development, testing, and launch of blockchain business applications, and help the implementation of blockchain business application scenarios in various industries.
  • software such as MQ (Message Queue, message queue) services can be provided with the BaaS platform; client-side computing devices coupled with the BaaS platform can subscribe to the blockchain system coupled with the BaaS platform
  • MQ Message Queue, message queue
  • the smart contract deployed on a certain blockchain in the middle of the world generates contract events on the blockchain after the execution is triggered; the BaaS platform can monitor the events generated on the blockchain after the smart contract is triggered and executed, and then based on the MQ
  • the software related to the service adds the contract event to the message queue in the form of a notification message, so that the client-side computing device subscribed to the message queue can obtain the notification related to the above-mentioned contract event.
  • the BaaS platform can also provide enterprise-level platform services based on blockchain technology to help enterprise-level customers build a secure and stable blockchain environment and easily manage the deployment, operation, and maintenance of blockchains and development.
  • the BaaS platform can implement rich security policies and multi-tenant isolation environments based on cloud technology, provide advanced security protection based on chip encryption technology, and provide end-to-end services that can be quickly expanded without interruption based on highly reliable data storage.
  • high-availability services on the client side in another example, enhanced management capabilities to help customers build enterprise-grade blockchain network environments; and native support for standard blockchain applications and data, such as Hyperledger Fabric and Enterprise Ethereum-Quorum's mainstream open source blockchain technology to build an open and inclusive technology ecosystem.
  • Blockchains are generally divided into three types: Public Blockchain, Private Blockchain and Consortium Blockchain.
  • the public chain is represented by Bitcoin and Ethereum.
  • Participants who join the public chain (also called nodes in the blockchain) can read the data records on the chain, participate in transactions, and compete for the accounting rights of new blocks, etc. .
  • each node can freely join or leave the network and perform related operations.
  • the private chain is on the contrary, the write permission of the network is controlled by an organization or institution, and the data read permission is regulated by the organization.
  • a private chain can be a weakly centralized system with strict restrictions on nodes and a small number of nodes.
  • This type of blockchain is more suitable for internal use within a specific institution.
  • the consortium chain is a blockchain between the public chain and the private chain, which can achieve "partial decentralization".
  • Each node in the alliance chain usually has a corresponding entity or organization; the node joins the network through authorization and forms a stakeholder alliance to jointly maintain the operation of the blockchain.
  • the blockchain is usually composed of several blocks. Timestamps corresponding to the creation time of the blocks are respectively recorded in these blocks, and all blocks form a time-ordered data chain strictly according to the timestamps recorded in the blocks.
  • the real data generated in the physical world it can be constructed into a standard transaction format supported by the blockchain, and then published to the blockchain, and the node devices in the blockchain will perform consensus processing on the received transactions , and after reaching a consensus, the node device in the blockchain as the accounting node will package the transaction into the block and store the certificate persistently in the blockchain.
  • the consensus algorithms supported in the blockchain can include: the first type of consensus algorithm, that is, the consensus algorithm in which node devices need to compete for the accounting rights of each round of accounting cycles, such as Proof of Work (POW), equity Consensus algorithms such as Proof of Stake (POS) and Delegated Proof of Stake (DPOS); the second type of consensus algorithm is to pre-select billing nodes for each round of billing cycle (no need to compete for billing rights). Consensus algorithms, such as Practical Byzantine Fault Tolerance (PBFT) and other consensus algorithms.
  • POP Proof of Work
  • POS Proof of Stake
  • DPOS Delegated Proof of Stake
  • Consensus algorithms such as Practical Byzantine Fault Tolerance (PBFT) and other consensus algorithms.
  • all node devices competing for the right to bookkeeping can execute the transaction after receiving the transaction.
  • One of the node devices competing for the accounting right may win in the process of competing for the accounting right in this round and become an accounting node.
  • the accounting node can package the received transaction with other transactions to generate the latest block, and send the generated latest block or the block header of the latest block to other node devices for consensus.
  • the node equipment with accounting rights has been negotiated before this round of accounting. Therefore, after the node device receives the transaction, if it is not the accounting node of the current round, it can send the transaction to the accounting node.
  • the transaction may be executed during or before the process of packaging the transaction with other transactions to generate the latest block.
  • the accounting node After the accounting node generates the latest block, it can send the latest block or the block header of the latest block to other node devices for consensus.
  • the accounting node of this round can package the received transaction to generate the latest block, and use the generated latest block or the latest block
  • the block header is sent to other node devices for consensus verification. If other node devices receive the latest block or the block header of the latest block and verify that there is no problem, the latest block can be appended to the end of the original blockchain, thereby completing the blockchain accounting process. In the process of verifying the new block or block header sent by the accounting node, other nodes can also execute the transactions contained in the block.
  • FIG. 2 is a flowchart of a blockchain-based asset management method shown in an exemplary embodiment of this specification.
  • the above-mentioned blockchain-based asset management method can be applied to node devices in the blockchain; the method may include the following steps: Step 202, receiving assets accessing the blockchain The first asset definition transaction issued by the management party; wherein the first asset definition transaction includes an asset model defined by the asset management party and corresponding to the target asset type; the asset model includes an asset model corresponding to the target asset type The asset creation information; Step 204, in response to the first asset definition transaction, save the asset model on the blockchain, so that the asset creator docked with the asset manager is based on the asset model.
  • the asset creation information, and the asset format corresponding to the target asset type create standardized blockchain assets in the blockchain.
  • converting non-monetary physical assets in the real world into virtual assets on the blockchain usually refers to "anchoring" the physical assets with virtual assets on the blockchain as these virtual assets.
  • the user can create a virtual asset on the blockchain that matches the value of the real-world non-monetary physical asset and circulate it on the blockchain; for example, the Users can convert non-monetary physical assets, such as real estate, stocks, loan contracts, bills and accounts receivable, into virtual assets with matching value and circulate on the blockchain.
  • non-monetary physical assets such as real estate, stocks, loan contracts, bills and accounts receivable
  • the blockchain operator may define one or more asset types in the blockchain, and asset formats corresponding to each asset type respectively.
  • the transaction types supported by the above-mentioned blockchain can be extended to extend an asset-defining transaction for defining an asset model in the blockchain.
  • the transaction types supported by the blockchain usually include: ordinary transfer transactions, transactions that create smart contracts, and transactions that invoke smart contracts; in this case, on the basis of the above three types of transactions, the above blocks A new type of transaction is extended in the chain, that is, the asset definition transaction used to define the asset model, and the above four types of transactions are all used as transaction types supported by the blockchain.
  • the node devices in the blockchain can execute these types of transactions in the local virtual machine to run the native code of the blockchain corresponding to these types of transactions, to achieve The logic dictated by these native codes.
  • the logic indicated by the native code corresponding to the above-mentioned transfer transaction is usually the logic of executing the transfer operation based on information such as the transfer-out account, the transfer-in account, and the transfer amount in the transfer transaction; the native code corresponding to the above-mentioned smart contract creation transaction
  • the indicated logic is usually the logic of creating a contract account corresponding to the smart contract and anchoring the contract code of the smart contract to the contract account.
  • the code hash of the contract code in the block can be filled to the corresponding In the code field in the contract account of the smart contract; the logic indicated by the native code corresponding to the transaction that calls the smart contract above is usually to load the contract code of the smart contract from the contract account corresponding to the called smart contract, and run the load
  • the contract code in the contract code implements the logic indicated by the contract code. For example, you can search for the corresponding contract code in the block based on the code hash filled in the code field in the contract account; the native code corresponding to the above asset definition transaction indicates Logic is the logic that defines the asset model in the blockchain.
  • the asset management party can access the above-mentioned blockchain in advance, that is, it can establish a communication connection with the node device in the blockchain. Subsequently, the asset manager may use the asset definition transaction (called the first asset type) for defining an asset model corresponding to a certain asset type (called the target asset type) defined by the operator of the blockchain in the blockchain. An asset-defining transaction) is posted to the blockchain.
  • the first asset definition transaction may include an asset model defined by the asset manager and corresponding to the target asset type; the asset model may include asset creation information corresponding to the target asset type.
  • the blockchain asset to be created corresponding to the target asset type can be used as an object, and the asset model is the class used to create the blockchain asset corresponding to the target asset type. That is, the asset model is an instance of the blockchain asset corresponding to the target asset type.
  • the above-mentioned asset management party can define an asset model corresponding to this asset type in the above-mentioned blockchain.
  • one asset type can correspond to multiple asset models; these asset models can be defined in the blockchain by different asset managers.
  • the asset model may include asset creation information corresponding to the asset type. In this case, based on the asset creation information and the asset format corresponding to the asset type, a blockchain asset corresponding to the asset type can be created in the above-mentioned blockchain (that is, the aforementioned can be created on the blockchain. circulating virtual assets).
  • the asset model defined based on the first asset-defining transaction can be saved on the blockchain, so as to be compatible with the first asset-defining transaction.
  • the asset creator connected to the asset management party may be based on the asset creation information stored in the asset model on the blockchain and the target asset type defined in the blockchain by the blockchain operator.
  • the corresponding asset format create a blockchain asset corresponding to the target asset type in the blockchain.
  • hash value can also be calculated for the above-mentioned blockchain asset created, and the calculated hash value can be used as the asset identifier of the blockchain asset.
  • the operator of the above-mentioned blockchain defines the asset type and the asset format corresponding to the asset type in the above-mentioned blockchain
  • all asset managers accessing the blockchain define in the blockchain the same
  • the asset model corresponding to the asset type all instructs the creation of blockchain assets according to the asset format corresponding to the asset type. Therefore, for the asset creators connected with any of the asset management parties, these asset creators are in this block.
  • the asset format of the blockchain asset corresponding to the asset type created on the chain is the same, and it is the asset format corresponding to the asset type defined in the blockchain by the operator of the blockchain; in this case below, the above-mentioned blockchain assets created in the above-mentioned blockchains can be regarded as standardized blockchain assets.
  • the operator of the above-mentioned blockchain may include a blockchain service platform; the above-mentioned asset management party may include a financial institution that accesses the blockchain service platform; the above-mentioned asset creator may include a user client that provides asset services by the financial institution. .
  • the above-mentioned blockchain operator, the above-mentioned asset manager and the above-mentioned asset creator may refer to the same entity, for example, these three are a financial institution or an individual; or, may refer to different entities.
  • the above-mentioned blockchain may include the blockchain system 103 in the network environment; the node devices in the blockchain may include the blockchain nodes 1, 1 and 1 in the blockchain system 103 Block chain node 2, block chain node 3, block chain node 4, block chain node i, etc.; the block chain service platform as the operator of the above block chain may include the server 102 in the network environment , that is, the electronic device corresponding to the blockchain service platform can be the server 102 in the network environment; in order to ensure the data security of the above-mentioned blockchain and facilitate the management and maintenance of the blockchain, as the above-mentioned asset management
  • the financial institution of the other party usually does not directly establish a communication connection with the node device in the blockchain, but accesses the blockchain by establishing a communication connection with the blockchain service platform; in this case, the financial institution The institution may include Device 1, Device 2, Device 3 or Device 5 in the client-side computing device 101 in the network environment, that is, the electronic device corresponding to the financial institution
  • the electronic device corresponding to the financial institution is device 5
  • the electronic device corresponding to the user client can be device 1 or device 2
  • the user client may be a user client that establishes a communication connection with Device 1, Device 2, or Device 3.
  • the creation of the target asset type in the above blockchain in this embodiment corresponds to the target asset type.
  • the process of the blockchain asset is explained.
  • the blockchain operator may define one or more asset types in the blockchain, and asset formats corresponding to each asset type respectively.
  • the operator of the above-mentioned blockchain may define one or more asset types in the blockchain based on a general programming language, and asset formats corresponding to each asset type respectively.
  • the asset manager of the blockchain can, based on the general programming language, perform operations on the blockchain defined by the blockchain operator in the blockchain.
  • the asset type and the asset format corresponding to the asset type are parsed, and a blockchain asset is created in the blockchain according to the parsing result.
  • the general-purpose programming language may include a general-purpose declarative programming language; further, the general-purpose declarative programming language may include domain-specific languages (DSL). That is, the general programming language may specifically include a domain-specific language; using the domain-specific language to define asset types and asset formats can improve code development efficiency and reduce programming workload.
  • DSL domain-specific languages
  • the operator of the above-mentioned blockchain can define asset types such as "real estate", "stock” and “accounts receivable” in the above-mentioned blockchain; and, the asset format corresponding to the "real estate” asset type, Asset formats such as the asset format corresponding to the "stock” asset type and the asset format corresponding to the "accounts receivable” asset type.
  • the asset format may include: several asset attribute fields; and a data structure used when assembling attribute values corresponding to the several asset attribute fields into a blockchain asset.
  • the asset attribute fields of the asset may include: on-chain identifier, off-chain identifier, asset type , amount, validity end date, financial institution, receivable and payable, etc.; in this case, the "Accounts Receivable” asset type can be defined using a declarative programming language as shown below, as well as the “Accounts Receivable” asset type
  • “StandardAR” is the type identifier of the "Accounts Receivable” asset type; the "idOnChain” field represents the on-chain identifier, the “idOffChain” field represents the off-chain identifier, the “assetType” field represents the asset type, the “amount” field represents the amount, " The validDateUntil field indicates the end date of the validity period, the "financeEnterprise” field indicates the financial institution, the “receivablesEnterprise” field indicates the receivable party, and the “payableEnterpsie” field indicates the payable party; “idOnChain”, “idOffChain”, “assetType”, “financeEnterprise”, “ receivablesEnterpsie” and “payableEnterpsie” are fields of type string, “amount” is a field of type long, and “validDateUntil” is a field of type date.
  • the transaction types supported by the above-mentioned blockchain can be extended to extend an asset-defining transaction for defining an asset model in the blockchain.
  • the transaction types supported by the blockchain usually include ordinary transfer transactions, transactions that create smart contracts, and transactions that invoke smart contracts; in this case, on the basis of the above three types of transactions, the blockchain A new type of transaction is expanded in , that is, the asset definition transaction used to define the asset model, and the above four types of transactions are all used as the transaction types supported by the blockchain.
  • the node devices in the blockchain can execute these types of transactions in the local virtual machine to run the native code of the blockchain corresponding to these types of transactions, and realize The logic dictated by these native codes.
  • the logic indicated by the native code corresponding to the above-mentioned transfer transaction is usually the logic of executing the transfer operation based on information such as the transfer-out account, the transfer-in account, and the transfer amount in the transfer transaction; the native code corresponding to the above-mentioned smart contract creation transaction
  • the indicated logic is usually the logic of creating a contract account corresponding to the smart contract and anchoring the contract code of the smart contract to the contract account.
  • the code hash of the contract code in the block can be filled into the corresponding In the code field in the contract account; the logic indicated by the native code corresponding to the above-mentioned transaction calling the smart contract, usually loads the contract code of the smart contract from the contract account corresponding to the called smart contract, and runs the loaded
  • the contract code implements the logic indicated by the contract code.
  • the corresponding contract code can be searched in the block; corresponding to the above-mentioned asset definition transaction used to define the asset model
  • the logic indicated by the native code is the logic for defining the asset model in the blockchain. Since the above asset definition transaction is not a transaction of calling a contract, when the node device in the blockchain executes the asset definition transaction in the local virtual machine, there is no need to call the logic indicated by the contract code in the smart contract deployed on the blockchain. .
  • the asset management party can access the above-mentioned blockchain in advance, that is, can establish a communication connection with the node device in the blockchain.
  • the asset manager may use the asset definition transaction (called the first asset type) for defining an asset model corresponding to a certain asset type (called the target asset type) defined by the operator of the blockchain in the blockchain.
  • An asset-defining transaction is posted to the blockchain.
  • the first asset definition transaction may include an asset model defined by the asset manager and corresponding to the target asset type; the asset model may include asset creation information corresponding to the target asset type.
  • the asset management party may define an asset model corresponding to the target asset type based on the general programming language.
  • the above-mentioned asset management party can define an asset model corresponding to the asset type in the above-mentioned blockchain.
  • one asset type can correspond to multiple asset models; these asset models can be defined in the blockchain by different asset managers.
  • the asset model may include asset creation information corresponding to the asset type; in this case, the asset creation information may be based on the asset type and the asset format corresponding to the asset type , and create a blockchain asset corresponding to the asset type in the above blockchain.
  • the above asset creation information may include: verification rules for attribute values corresponding to several asset attribute fields; state machines corresponding to the blockchain assets to be created; and the like.
  • the asset creator may submit attribute values corresponding to several asset attribute fields in the asset format corresponding to the asset type;
  • the attribute values submitted by the asset creator are assembled, so that the assembled attribute values corresponding to these asset attribute fields can be used as the blockchain assets created in the blockchain; , update the state corresponding to the created blockchain asset, and store the blockchain asset in association with the state of the blockchain asset.
  • an asset model corresponding to the "Accounts Receivable” asset type can be defined using a declarative programming language:
  • “StandardAR” is the type identifier of the “Accounts Receivable” asset type
  • “stdAr” is the model identifier of the asset model
  • “STD-FUNCTIONALITY” indicates that when creating a blockchain asset based on the asset model, use the aforementioned and All asset attribute fields in the asset format corresponding to the "accounts receivable” asset type; that is, the created blockchain asset corresponding to the "accounts receivable” asset type contains attributes corresponding to all the above asset attribute fields value
  • the "VALIDATION” part indicates the validation rules for attribute values corresponding to all the above asset attribute fields
  • the "STATE-MACHINE” part indicates the state machine corresponding to the blockchain asset to be created.
  • the state machine corresponding to the blockchain asset to be created in the asset model corresponding to the "accounts receivable” asset type includes: “NULL” means stateless; After the block chain asset, the state of the block chain asset is set to the "READY” state; after the block chain asset is confirmed (CONFIRM), the state of the block chain asset is switched from the "READY” state to the "READY” state.
  • CONFIRMED state
  • the settlement (SETTLE) of the blockchain asset switch the state of the blockchain asset from the “CONFIRMED” state to the "PARTIAL_SETTLE” state, or keep the state of the blockchain asset in " PARTIAL_SETTLE” state
  • the blockchain asset is mortgaged (MORTGAGE)
  • the state of the blockchain asset is switched from the "CONFIRMED” state to the "BACKED” state, or the state of the blockchain asset is changed from "PARTIAL_SETTLED” " state is switched to "BACKED” state
  • the blockchain asset is cleared (CLEAR)
  • the state of the blockchain asset is switched from “BACKED” state to "CLEARED” state.
  • the node device in the above-mentioned blockchain when the node device in the above-mentioned blockchain receives the above-mentioned first asset-defining transaction, in response to the first asset-defining transaction, execute the first asset-defining transaction in the local virtual machine to Run the native code of the blockchain corresponding to the first asset definition transaction to save the asset model defined based on the first asset definition transaction on the blockchain, so that the asset creator connected with the above asset management party can Based on the above-mentioned asset creation information in the asset model stored on the blockchain, and the asset format corresponding to the above-mentioned target asset type defined in the blockchain by the operator of the blockchain, in the blockchain Create a blockchain asset corresponding to the target asset type in .
  • the transaction type supported by the An asset-defining transaction for defining asset types is extended in the blockchain.
  • the transaction types supported by the blockchain at this time may include: ordinary transfer transactions, transactions for creating smart contracts, transactions for invoking smart contracts, and the above-mentioned asset definition transactions for defining asset models; in this case, you can On the basis of the above four types of transactions, a new type of transaction is extended in the above blockchain, that is, the asset definition transaction used to define the asset type, and the above five types of transactions are used as the Transaction types supported by the blockchain.
  • the logic of the native code indication corresponding to the asset definition transaction used to define the asset model above is the logic of defining the asset model in the blockchain; the native code instruction corresponding to the asset definition transaction used to define the asset type. , which is the logic of defining asset types in the blockchain.
  • the operator of the above-mentioned blockchain may publish an asset-defining transaction (referred to as a second asset-defining transaction) for defining the above-mentioned target asset type to the above-mentioned blockchain.
  • an asset-defining transaction referred to as a second asset-defining transaction
  • the second asset definition transaction may include: the target asset type defined by the operator of the blockchain, and an asset format corresponding to the target asset type.
  • the node device in the above-mentioned blockchain receives the above-mentioned second asset-defining transaction, in response to the second asset-defining transaction, execute the second asset-defining transaction in the local virtual machine to run and the second asset.
  • the native code of the blockchain corresponding to the transaction is defined, and the target asset type defined based on the second asset definition transaction and the asset format corresponding to the target asset type are stored on the blockchain.
  • these blockchain systems usually use Merkle trees; or, data structures based on Merkle trees to store and maintain data; where the data in Merkle trees are usually in the form of Merkle trees. It is stored in the form of key-value key-value pairs. That is, in one embodiment, the above-mentioned asset type and the asset format corresponding to the asset type can be saved in the Merkle state tree of the above-mentioned blockchain in the form of a key-value key-value pair; In the form of key-value key-value pairs, the asset model is saved to the Merkle state tree of the above blockchain. For example, the hash value of the asset model can be used as the key, and the asset model itself can be stored as the value in the Merkle state tree of the blockchain.
  • the above-mentioned blockchain may include the blockchain system 103 in the network environment; the node devices in the blockchain may include the blockchain nodes 1, The blockchain node 2, the blockchain node 3, the blockchain node 4, the blockchain node i, etc.; the above-mentioned blockchain operator may include the server 102 in the network environment; the above-mentioned asset management party may include the Device 5 in client-side computing device 101 in a network environment.
  • the above-mentioned asset management party can access the blockchain system 103 through the device 5 in the client-side computing device 101 in advance; the first asset definition transaction used to define the asset model corresponding to the above-mentioned target asset type can be subsequently published through the device 5 to the blockchain system 103.
  • the first asset definition transaction may include an asset model defined by the asset manager and corresponding to the target asset type; the asset model may include asset creation information corresponding to the target asset type; the first asset definition transaction is an extension Types of transactions supported by the blockchain.
  • the node device in the blockchain system 103 When the node device in the blockchain system 103 receives the above-mentioned first asset definition transaction, in response to the first asset definition transaction, execute the first asset definition transaction in the local virtual machine to run and the first asset definition transaction.
  • the native code of the blockchain corresponding to the asset definition transaction realizes that the asset model defined based on the first asset definition transaction is saved in the blockchain system 103, so that the asset creator connected with the above-mentioned asset management party can be based on the block chain.
  • the above-mentioned asset creation information in the asset model saved in the blockchain system 103, and the asset format corresponding to the target asset type defined in the blockchain system 103 by the operator of the blockchain, in the blockchain system 103 Create a blockchain asset corresponding to the target asset type.
  • the device 5 in the client-side computing device 101 can send the first asset definition request (the first asset definition request) initiated by the asset manager. including the asset model defined by the asset manager and corresponding to the above target asset type) is sent to the server side 102, and the server side 102 packages the first asset definition request into the above-mentioned first asset definition transaction, and the first asset definition
  • the transaction is published to the blockchain system 103; in this case, the node device in the blockchain system 103 that has established a communication connection with the server 102 can first receive the first asset definition transaction, and then the first asset Define the transaction to be sent to other node devices in the blockchain system 103 .
  • Each node device such as the blockchain node 1, blockchain node 2, blockchain node 3, blockchain node 4, and blockchain node i in the blockchain system 103 receives the first asset definition transaction.
  • consensus processing can be performed on the first asset definition transaction, and after reaching a consensus, the first asset definition transaction is packaged into a block, and the certificate is persistently stored in the blockchain system 103 .
  • the node device in the blockchain system 103 can respond to the first asset definition transaction and execute the first asset definition transaction in the local virtual machine to run and execute the first asset definition transaction.
  • the native code of the blockchain corresponding to the first asset definition transaction realizes that the asset model defined by the first asset definition transaction is saved in the blockchain system 103, so that the asset creator connected with the above-mentioned asset management party can be based on
  • the above-mentioned asset creation information in the asset model saved in the blockchain system 103, and the asset format corresponding to the target asset type defined in the blockchain system 103 by the operator of the blockchain, are stored in the blockchain system 103.
  • a blockchain asset corresponding to the target asset type is created.
  • the operator of the above-mentioned blockchain may publish the second asset definition transaction for defining the above-mentioned target asset type to the blockchain system 103 through the server 102 .
  • the second asset definition transaction may include: the target asset type defined by the operator of the blockchain and an asset format corresponding to the target asset type; the second asset definition transaction is an extended transaction type supported by the blockchain .
  • the node device in the blockchain system 103 When the node device in the blockchain system 103 receives the above-mentioned second asset definition transaction, in response to the second asset definition transaction, execute the second asset definition transaction in the local virtual machine to run and the second asset definition transaction.
  • the native code of the blockchain corresponding to the asset definition transaction realizes that the above-mentioned target asset type defined based on the second asset definition transaction and the asset format corresponding to the target asset type are stored in the blockchain system 103 .
  • the server 102 can package the target asset type defined by the operator of the blockchain and the asset format corresponding to the target asset type Create the above-mentioned second asset definition transaction, and publish the second asset definition transaction to the blockchain system 103; in this case, the node device in the blockchain system 103 that has established a communication connection with the server 102 can After receiving the second asset definition transaction, the second asset definition transaction is sent to other node devices in the blockchain system 103 .
  • Each node device such as blockchain node 1, blockchain node 2, blockchain node 3, blockchain node 4, and blockchain node i in the blockchain system 103 receives the second asset definition transaction.
  • consensus processing can be performed on the second asset definition transaction, and after reaching a consensus, the second asset definition transaction is packaged into a block, and the certificate is persistently stored in the blockchain system 103 .
  • the node device in the blockchain system 103 can respond to the second asset definition transaction, and execute the second asset definition transaction in the local virtual machine to run and the second asset definition transaction.
  • the native code of the blockchain corresponding to the second asset definition transaction realizes that the above-mentioned target asset type defined based on the second asset definition transaction and the asset format corresponding to the target asset type are stored in the blockchain system 103 .
  • the operator of the above-mentioned blockchain can pre-write the above-mentioned target asset type and the asset format corresponding to the target asset type into the native code of the blockchain system 103 through the server 102; subsequently, The above asset management party can access the blockchain system 103 through the device 5 in the client-side computing device 101, and publish the second asset definition transaction for defining the target asset type to the blockchain system 103 through the device 5.
  • the second asset defines a transaction as an extended transaction type supported by the blockchain.
  • the node device in the blockchain system 103 When the node device in the blockchain system 103 receives the above-mentioned second asset definition transaction, in response to the second asset definition transaction, execute the second asset definition transaction in the local virtual machine to run and the second asset.
  • the native code of the blockchain corresponding to the transaction realize reading the above target asset type and the asset format corresponding to the target asset type from the native code of the blockchain system 103, and save it in the blockchain system 103 The read target asset type above, and the asset format corresponding to the target asset type.
  • the transaction type supported by the An asset creation transaction for creating blockchain assets is extended from the blockchain.
  • the transaction types supported by the blockchain at this time may include: ordinary transfer transactions, transactions for creating smart contracts, transactions for invoking smart contracts, and the above-mentioned asset definition transactions for defining asset models; in this case, you can On the basis of the above four types of transactions, a new type of transaction is extended in the above blockchain, that is, an asset creation transaction for creating blockchain assets, and the above five types of transactions are all As the transaction type supported by this blockchain.
  • the logic indicated by the native code corresponding to the asset definition transaction used to define the asset model above is the logic of defining the asset model in the blockchain
  • the logic indicated by the native code corresponding to the above asset creation transaction is the logic indicated by the native code.
  • the transaction types supported by the blockchain can also include: ordinary transfer transactions, transactions that create smart contracts, and transactions that call smart contracts.
  • the asset creator connected with the above-mentioned asset management party can publish the asset creation transaction for creating the asset corresponding to the above-mentioned target asset type to the above-mentioned blockchain.
  • the asset creation transaction may include the type identifier of the target asset type.
  • the node device in the blockchain can execute the asset creation transaction in the local virtual machine in response to the asset creation transaction to run the blockchain corresponding to the asset creation transaction.
  • obtain the asset format stored in the blockchain corresponding to the asset type indicated by the type identifier in the asset creation transaction that is, obtain the asset stored in the blockchain corresponding to the above target asset type
  • obtaining the asset model stored in the blockchain corresponding to the asset type indicated by the type identifier in the asset creation transaction that is, obtaining the asset model stored in the blockchain corresponding to the target asset type ;
  • a blockchain asset corresponding to the target asset type can be created in the blockchain;
  • the created blockchain asset calculates the hash value, and uses the calculated hash value as the asset identifier of the blockchain asset.
  • the asset management party may deploy an asset-related smart contract on the blockchain in advance; the asset creator connected with the asset management party may call the contract for invoking the smart contract to a transaction Publish to this blockchain.
  • the contract invocation transaction may include the type identifier of the above-mentioned target asset type.
  • the node device in the above-mentioned blockchain When the node device in the above-mentioned blockchain receives the above-mentioned contract invocation transaction, it can call the query logic in the above-mentioned smart contract in response to the contract invocation transaction, and inquire about the type stored in the blockchain and in the contract invocation transaction.
  • the creation logic in the smart contract creates a blockchain asset corresponding to the target asset type in the blockchain based on the queried asset creation information in the asset model and the asset format corresponding to the target asset type ;
  • the hash value can be calculated for the created blockchain asset, and the calculated hash value can be used as the asset identifier of the blockchain asset.
  • the operator of the above-mentioned blockchain defines the asset type and the asset format corresponding to the asset type in the above-mentioned blockchain, all asset managers accessing the blockchain are in this block.
  • the asset model corresponding to the asset type defined in the chain all instructs the creation of blockchain assets according to the asset format corresponding to the asset type. Therefore, for the asset creator connected with any of the asset managers, these assets are
  • the asset format of the blockchain assets corresponding to the asset type created by the creator on the blockchain is the same, and they are all assets corresponding to the asset type defined in the blockchain by the blockchain operator Format; in this case, the above-mentioned blockchain assets created in the above-mentioned blockchains can be regarded as standardized blockchain assets.
  • the asset creator docked with the device 5 as the asset manager may include device 1 or device 2 in the client-side computing device 101 in the network environment.
  • the above-mentioned asset creator can publish the asset creation transaction for creating an asset corresponding to the above-mentioned target asset type to the above-mentioned blockchain through the device 1 .
  • the asset creation transaction may include the type identifier of the target asset type; the asset creation transaction is an extended transaction type supported by the blockchain.
  • the node device in the blockchain system 103 can execute the asset creation transaction in the local virtual machine in response to the asset creation transaction to run the block corresponding to the asset creation transaction.
  • the native code of the chain obtains the asset format stored in the blockchain system 103 corresponding to the above-mentioned target asset type indicated by the type identifier in the asset creation transaction;
  • the asset model corresponding to the target asset type subsequently, based on the acquired asset creation information in the asset model and the asset format corresponding to the target asset type, create a block chain system 103 corresponding to the target asset type
  • the hash value can be calculated for the created blockchain asset, and the calculated hash value can be used as the asset identifier of the blockchain asset.
  • the device 1 can send the asset creation request initiated by the above-mentioned asset creator (the asset creation includes the type identifier of the above-mentioned target asset type) to the device 5, and the device 5
  • the asset creation request is sent to the server 102, and the server 102 packages the asset creation request into the above asset creation transaction, and publishes the asset creation transaction to the blockchain system 103; in this case, with the server
  • the node device in the blockchain system 103 where the terminal 102 has established a communication connection can first receive the asset creation transaction, and then send the asset creation transaction to other node devices in the blockchain system 103 .
  • each node device such as blockchain node 1, blockchain node 2, blockchain node 3, blockchain node 4, and blockchain node i in the blockchain system 103 receives the asset creation transaction
  • Consensus processing can be performed on the asset creation transaction, and after a consensus is reached, the asset creation transaction is packaged into a block, and a persistent certificate is stored in the blockchain system 103 .
  • the node device in the blockchain system 103 can respond to the asset creation transaction and execute the asset creation transaction in the local virtual machine to run the asset creation transaction corresponding to the asset creation transaction.
  • the native code of the blockchain obtains the asset format stored in the blockchain system 103 and corresponding to the above-mentioned target asset type indicated by the type identifier in the asset creation transaction; on the other hand, obtains the blockchain system 103
  • the asset model corresponding to the target asset type saved in the asset model; subsequently, based on the acquired asset creation information in the asset model and the asset format corresponding to the target asset type, create a block chain system 103 corresponding to the target asset type.
  • the blockchain asset corresponding to the asset type; in addition, the hash value can be calculated for the created blockchain asset, and the calculated hash value can be used as the asset identifier of the blockchain asset.
  • the above-mentioned asset manager can deploy the smart contract related to the asset in the blockchain system 103 through the device 5 in advance; the above-mentioned asset creator can call the contract for calling the smart contract through the device 1 that has established a communication connection with the device 5. Transactions are posted to the blockchain system 103 .
  • the contract invocation transaction may include the type identifier of the above-mentioned target asset type.
  • the node device in the blockchain system 103 When the node device in the blockchain system 103 receives the above-mentioned contract invocation transaction, it can call the query logic in the above-mentioned smart contract in response to the contract invocation transaction, and query the data stored in the blockchain system 103 and the contract invocation transaction.
  • the asset creation information in the asset model and the asset format corresponding to the target asset type create a blockchain asset corresponding to the target asset type in the blockchain system 103;
  • the asset calculates the hash value, and uses the calculated hash value as the asset identifier of the blockchain asset.
  • the asset format corresponding to a certain asset type defined in the above-mentioned blockchain by the operator of the above-mentioned blockchain may include several asset attribute fields of the asset type; the above-mentioned asset management party is in this area
  • the asset creation information in the asset model corresponding to the asset type defined in the blockchain may include verification rules for attribute values corresponding to the above-mentioned several asset attribute fields; the above-mentioned asset creation transaction initiated by the above-mentioned asset creator or the above-mentioned
  • the contract invocation transaction may include attribute values submitted by the asset creator and corresponding to the above-mentioned several asset attribute fields.
  • the verification rule for the attribute values corresponding to the above-mentioned several asset attribute fields is to verify the attribute values corresponding to these asset attribute fields submitted by the above-mentioned asset creator; format, and assemble the attribute values submitted by the asset creator, so that the assembled attribute values corresponding to these asset attribute fields can be used as the blockchain assets created in the blockchain.
  • the asset model indicates the use of the asset format corresponding to the "Accounts Receivable” asset type. All the asset attribute fields of the blockchain asset are created; but in practical applications, the asset model can also instruct the use of some asset attribute fields to create blockchain assets; this specification does not limit this.
  • the asset creation information in the asset model corresponding to the asset type defined by the asset management party in the blockchain may include: a state corresponding to the blockchain asset to be created machine.
  • the created blockchain can be updated and created according to the state machine corresponding to the blockchain asset to be created in the above-mentioned asset model
  • the state corresponding to the asset is stored in association with the state of the blockchain asset.
  • the asset creation information in the asset model corresponding to the asset type defined by the asset management party in the above-mentioned blockchain may include: verification rules for attribute values corresponding to the above-mentioned several asset attribute fields; And, the state machine corresponding to the blockchain asset to be created.
  • the attribute values corresponding to these asset attribute fields submitted by the above-mentioned asset creator may be verified first according to the verification rules for the attribute values corresponding to the above-mentioned several asset attribute fields in the above-mentioned asset model; After the verification is passed, the attribute values submitted by the asset creator can be assembled according to the asset format corresponding to the asset type, so that the assembled attribute values corresponding to these asset attribute fields can be used as the block chain. Afterwards, the state corresponding to the blockchain asset to be created can be updated according to the state machine corresponding to the blockchain asset to be created in the asset model, and the blockchain asset Associated storage with the state of the blockchain asset.
  • an asset creation transaction that creates an asset corresponding to the "Accounts Receivable” asset type can be constructed using a declarative programming language as follows:
  • StandardAR is the type identifier of the “Accounts Receivable” asset type
  • stdAr is the model identifier of the asset model.
  • the node device in the above blockchain can respond to the asset creation transaction and execute the asset creation transaction in the local virtual machine to run the native code of the blockchain corresponding to the asset creation transaction.
  • the verification rule in the asset model corresponding to the "Accounts receivable” asset type is used to verify the attribute value corresponding to the asset attribute field in the asset creation transaction; for example, according to the verification rule "AMOUNT:RULE_GREATER_THAN_ZERO", Verify whether the attribute value corresponding to the "amount” (ie balance) field in the asset creation transaction is greater than 0; and, according to the verification rule "VALID_DATE_UNTIL:RULE_GREATER_THAN_30”, verify the asset creation transaction and " Whether the interval between the attribute value corresponding to the validDateUntil" (that is, the end date of the validity period) field and the current date is greater than 30.
  • a transaction can be created based on the asset for several asset attribute fields in the asset format corresponding to the "Accounts Receivable” asset type used in the asset model corresponding to the "Accounts Receivable” asset type
  • the attribute values corresponding to these asset attribute fields contained in the , and the asset format corresponding to the "Accounts Receivable” asset type create a blockchain asset corresponding to the "Accounts Receivable” asset type in this blockchain;
  • the asset attribute fields used in the asset model corresponding to the "Accounts Receivable” asset type include all the asset attribute fields in the asset format corresponding to the "Accounts Receivable” asset type, namely on-chain identification, off-chain identification , Asset Type, Amount, Validity End Date, Financial Institution, Receivable, and Payable; attribute values corresponding to these asset attribute fields include: “12345”, “12345”, “StandardAR”, 10000000, "2021.01.01” , "Enterprise A", “Enterprise B", “Enterprise C”.
  • the blockchain asset created in the blockchain can be The state is set to the "READY" state.
  • the transaction types supported by the blockchain can be further extended, so as to extend an asset transfer transaction for transferring blockchain assets in the blockchain, and transfer the transaction to the blockchain.
  • Asset transfer transactions are also included as transaction types supported by this blockchain.
  • the asset transfer party connected with the above-mentioned asset management party can publish the asset transfer transaction for transferring blockchain assets to the above-mentioned blockchain.
  • the asset transfer transaction may include the asset identifier of the blockchain asset to be transferred.
  • the node device in the above-mentioned blockchain receives the above-mentioned asset transfer transaction, in response to the asset transfer transaction, execute the asset transfer transaction in the local virtual machine to run the blockchain corresponding to the asset transfer transaction. , obtain the blockchain asset corresponding to the asset identifier in the asset transfer transaction stored in the blockchain, and transfer the obtained blockchain asset.
  • the blockchain asset can be transferred from the account of the payer to the account of the receivable.
  • the asset management party may deploy an asset-related smart contract on the blockchain in advance; the asset transfer party connected with the asset management party may call the contract for invoking the smart contract to a transaction Publish to this blockchain.
  • the contract invocation transaction may include the asset identifier of the blockchain asset to be transferred.
  • the node device in the above-mentioned blockchain receives the above-mentioned contract invocation transaction, in response to the contract invocation transaction, the node device can invoke the query logic in the above-mentioned smart contract to inquire about the assets stored in the blockchain and in the asset transfer transaction.
  • the corresponding blockchain asset is identified, and after the blockchain asset is queried, the transfer logic in the smart contract is further invoked to transfer the queried blockchain asset.
  • the above smart contract for transferring blockchain assets and the aforementioned smart contract for creating blockchain assets can be the same smart contract (that is, the contract code of the smart contract indicates the query logic, creation logic, transfer logic, etc.), or two different smart contracts; this specification does not limit this.
  • a target asset type and an asset format corresponding to the target asset type can be defined in the blockchain by the operator of the blockchain; the node device in the blockchain can receive the asset management
  • the asset model corresponding to the target asset type defined by the asset management party in the first asset definition transaction is saved on the blockchain , so that the asset creator docked with the asset manager can create in the blockchain based on the asset creation information in the asset model saved on the blockchain and the asset format corresponding to the target asset type.
  • Standardized blockchain assets since the operator of the above-mentioned blockchain defines the asset type in the above-mentioned blockchain and the asset format corresponding to the asset type, all asset managers accessing the blockchain are in this blockchain.
  • the asset model corresponding to the asset type defined in the blockchain all instructs the creation of blockchain assets according to the asset format corresponding to the asset type. Therefore, for the asset creator connected with any of the asset managers,
  • the asset format of the blockchain assets corresponding to the asset type created by these asset creators on the blockchain is the same, and they are defined in the blockchain by the blockchain operator and correspond to the asset type.
  • the asset format thus, the creation of standardized blockchain assets in the blockchain is realized, so that the created blockchain assets can be circulated on the blockchain.
  • this specification also provides an embodiment of a blockchain-based asset management apparatus.
  • the embodiments of the blockchain-based asset management apparatus in this specification can be applied to electronic devices.
  • the apparatus embodiment may be implemented by software, or may be implemented by hardware or a combination of software and hardware.
  • a device in a logical sense is formed by reading the corresponding computer program instructions in the non-volatile memory into the memory for operation by the processor of the electronic device where the device is located.
  • this specification is a hardware structure diagram of the electronic equipment where the blockchain-based asset management device is located, except for the processor, memory, network interface, and non-volatile hardware shown in Figure 4
  • the electronic device in which the apparatus in the embodiment is located usually may also include other hardware according to the actual function of the blockchain-based asset management, which will not be repeated here.
  • FIG. 5 is a block diagram of a blockchain-based asset management apparatus shown in an exemplary embodiment of this specification.
  • the blockchain-based asset management apparatus 50 can be applied to an electronic device as shown in FIG. 4 , and the electronic device can be used as a node device in a blockchain; wherein, the transaction types supported by the blockchain include a type used to define The first asset definition transaction of the asset model; the operator of the blockchain defines an asset type and an asset format corresponding to the asset type in the blockchain; the blockchain-based asset management device 50 can It includes: a first receiving module 501, which receives the first asset definition transaction issued by an asset management party accessing the blockchain; wherein the first asset definition transaction includes a target asset defined by the asset management party The asset model corresponding to the type; the asset model includes asset creation information corresponding to the target asset type; the first definition module 502, in response to the first asset definition transaction, saves the asset on the blockchain A model, so that the asset creator docked with the asset manager creates a standardized block in the blockchain based on
  • the transaction type supported by the blockchain further includes a second asset definition transaction for defining an asset type;
  • the apparatus 50 further includes: a second receiving module 503, which receives the data released by the operator. the second asset definition transaction; wherein, the second asset definition transaction includes the target asset type defined by the operator and an asset format corresponding to the target asset type; the second definition module 504, in response to the The second asset definition transaction saves the target asset type and the asset format corresponding to the target asset type on the blockchain.
  • the first definition module 502 saves the asset model in the form of key-value pairs in the Merkle state tree of the blockchain;
  • the second definition module 504 Save the target asset type and the asset format corresponding to the target asset type in the Merkle state tree of the blockchain in the form of key-value pairs.
  • the transaction type supported by the blockchain further includes an asset creation transaction for creating an asset corresponding to the target asset type;
  • the apparatus 50 further includes: a third receiving module 505, which receives the The asset creation transaction sent by the asset creator connected by the asset management party; wherein, the asset creation transaction includes the type identifier of the target asset type; the first creation module 506, in response to the asset creation transaction, obtains the block The asset format corresponding to the target asset type indicated by the type identifier and the asset model corresponding to the target asset type stored in the chain, and the asset creation information based on the asset model and the target asset The asset format corresponding to the type, and standardized blockchain assets are created in the blockchain.
  • the asset management party may deploy an asset-related smart contract on the blockchain; the device 50 may further include: a fourth receiving module 507 for receiving a contract sent by an asset creator connected to the asset management party Invoke transaction, the contract invocation transaction includes the type identifier of the target asset type; the second creation module 508 invokes the query logic in the smart contract in response to the contract invocation transaction, and inquires about the and The asset format corresponding to the target asset type indicated by the type identifier and the asset model corresponding to the target asset type, and the asset format corresponding to the target asset type and the asset format corresponding to the target asset type are queried.
  • the creation logic in the smart contract is further invoked, and based on the asset creation information in the asset model and the asset format corresponding to the target asset type, a standardized blockchain is created in the blockchain assets.
  • the asset creation information includes asset attribute information; the creation module 506 or 508: based on the asset attribute information in the asset model and the asset format corresponding to the target asset type, in the Create standardized blockchain assets in the blockchain.
  • the asset format includes several asset attribute fields;
  • the asset creation transaction or the contract invocation transaction includes attribute values submitted by the asset creator and corresponding to the several asset attribute fields;
  • the asset The creation information includes verification rules for attribute values corresponding to the several asset attribute fields;
  • the creating module 506 or 508 based on the verification rules in the asset model, perform verification on the verification rules submitted by the asset creator and the several asset attribute fields.
  • the attribute value corresponding to the asset attribute field is verified; if the verification is passed, a standardized blockchain asset is created in the blockchain based on the attribute value and the asset format corresponding to the target asset type. .
  • the asset creation information includes a state machine corresponding to the blockchain asset; the creation module 506 or 508: after creating a standardized blockchain asset in the blockchain, based on the The state machine in the asset model is used to update the asset state corresponding to the blockchain asset.
  • the transaction type supported by the blockchain further includes an asset transfer transaction for transferring the blockchain asset;
  • the apparatus 50 further includes: a fifth receiving module 509 for receiving the asset management party The asset transfer transaction sent by the connected asset transfer party; wherein, the asset transfer transaction includes the asset identifier of the blockchain asset to be transferred; the first transfer module 510, in response to the asset transfer transaction, obtains the blockchain Save the blockchain asset corresponding to the asset identifier, and perform asset transfer on the blockchain asset corresponding to the asset identifier.
  • the asset management party has deployed an asset-related smart contract on the blockchain;
  • the device 50 further includes: a sixth receiving module 511 for receiving the asset transfer docked by the asset management party The contract invocation transaction sent by the party; wherein, the contract invocation transaction includes the asset identifier of the blockchain asset; the second transfer module 512, in response to the contract invocation transaction, invokes the query logic in the smart contract to query The blockchain asset stored in the blockchain and corresponding to the asset identifier, and after the blockchain asset corresponding to the asset identifier is queried, the transfer logic in the smart contract is further invoked to correct the The blockchain asset corresponding to the asset identifier performs asset transfer.
  • the asset type and the asset format corresponding to the asset type may be defined in the blockchain by the operator based on a general programming language; the asset model may be defined by the asset manager based on the general programming language.
  • the general-purpose programming language may include a general-purpose declarative programming language.
  • the general-purpose declarative programming language may include a domain-specific language.
  • the operator may include a blockchain service platform; the asset manager includes a financial institution accessing the blockchain service platform; and the asset creator includes a user client provided by the financial institution with asset services.
  • a typical implementing device is a computer, which may be in the form of a personal computer, laptop computer, cellular phone, camera phone, smart phone, personal digital assistant, media player, navigation device, email sending and receiving device, game control desktop, tablet, wearable device, or a combination of any of these devices.
  • a computer includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
  • Memory may include forms of non-persistent memory, random access memory (RAM) and/or non-volatile memory in computer readable media, such as read only memory (ROM) or flash memory (flash RAM).
  • RAM random access memory
  • ROM read only memory
  • flash RAM flash memory
  • Computer-readable media includes both persistent and non-permanent, removable and non-removable media.
  • Information storage can be implemented by any method or technology.
  • Information may be computer readable instructions, data structures, modules of programs, 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 Disc (DVD) or other optical storage, magnetic Tape cartridges, disk storage, quantum memory, graphene-based storage media or other magnetic storage devices or any other non-transmission media can be used to store information that can be accessed by computing devices.
  • computer-readable media does not include transitory computer-readable media, such as modulated data signals and carrier waves.
  • first, second, third, etc. may be used in this specification to describe various information, such information should not be limited by these terms. These terms are only used to distinguish the same type of information from each other.
  • first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information without departing from the scope of one or more embodiments of the present specification.
  • word "if” as used herein can be interpreted as "at the time of" or "when” or "in response to determining.”

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Computing Systems (AREA)
  • Finance (AREA)
  • Strategic Management (AREA)
  • General Business, Economics & Management (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

本说明书一个或多个实施例提供一种基于区块链的资产管理方法、装置及电子设备,应用于区块链中的节点设备;区块链支持的交易类型包括用于定义资产模型的第一资产定义交易;区块链的运营方在区块链中定义了资产类型和与资产类型对应的资产格式;该方法包括:接收资产管理方发布的第一资产定义交易;第一资产定义交易包括资产管理方定义的与目标资产类型对应的资产模型;资产模型包括与目标资产类型对应的资产创建信息;响应于第一资产定义交易,在区块链上保存资产模型,以使资产创建方基于资产模型中的资产创建信息,以及与目标资产类型对应的资产格式,在区块链中创建标准化的区块链资产。

Description

基于区块链的资产管理 技术领域
本说明书实施例涉及区块链技术领域,尤其涉及一种基于区块链的资产管理。
背景技术
在实际应用中,可以将现实世界中的一些非货币属性的实体资产,转化成为能够在区块链上流通的虚拟资产。但是,由不同的金融机构发布至区块链的虚拟资产的资产格式通常互不相同,导致这些虚拟资产难以在不同的金融机构之间流通。
发明内容
本说明书提出一种基于区块链的资产管理方法,所述方法应用于区块链中的节点设备;其中,所述区块链支持的交易类型包括用于定义资产模型的第一资产定义交易;所述区块链的运营方在所述区块链中定义了资产类型和与所述资产类型对应的资产格式;所述方法包括:接收接入所述区块链的资产管理方发布的所述第一资产定义交易;其中,所述第一资产定义交易包括所述资产管理方定义的与目标资产类型对应的资产模型;所述资产模型包括与所述目标资产类型对应的资产创建信息;响应于所述第一资产定义交易,在所述区块链上保存所述资产模型,以使与所述资产管理方对接的资产创建方基于所述资产模型中的资产创建信息,以及与所述目标资产类型对应的资产格式,在所述区块链中创建标准化的区块链资产。
可选地,所述区块链支持的交易类型还包括用于定义资产类型的第二资产定义交易;所述方法还包括:接收所述运营方发布的所述第二资产定义交易;其中,所述第二资产定义交易包括所述运营方定义的所述目标资产类型和与所述目标资产类型对应的资产格式;响应于所述第二资产定义交易,在所述区块链上保存所述目标资产类型和与所述目标资产类型对应的资产格式。
可选地,所述在所述区块链上保存所述资产模型,包括:将所述资产模型,以key-value键值对的形式,保存至所述区块链的Merkle状态树中;所述在所述区块链上保存所述目标资产类型和与所述目标资产类型对应的资产格式,包括:将所述目标资产类型和与所述目标资产类型对应的资产格式,以key-value键值对的形式,保存至所述区块链的Merkle状态树中。
可选地,所述区块链支持的交易类型还包括用于创建与所述目标资产类型对应的资产的资产创建交易;所述方法还包括:接收所述资产管理方对接的资产创建方发送的资产创建交易;其中,所述资产创建交易包括所述目标资产类型的类型标识;响应于所述资产创建交易,获取所述区块链保存的与所述类型标识指示的所述目标资产类型对应的资产格式及与所述目标资产类型对应的资产模型,并基于所述资产模型中的资产创建信息及与所述目标资产类型对应的资产格式,在所述区块链中创建标准化的区块链资产。
可选地,所述资产管理方在所述区块链上部署了与资产相关的智能合约;所述方法还包括:接收所述资产管理方对接的资产创建方发送的合约调用交易;其中,所述合约调用交易包括所述目标资产类型的类型标识;响应于所述合约调用交易,调用所述智能合约中的查询逻辑,查询所述区块链保存的与所述类型标识指示的所述目标资产类型对应的资产格式,以及与所述目标资产类型对应的资产模型,并在查询到与所述目标资产类型对应的资产格式和与所述目标资产类型对应的资产模型后,进一步调用所述智能合约中的创建逻辑,基于所述资产模型中的资产创建信息,以及与所述目标资产类型对应的资产格式,在所述区块链中创建标准化的区块链资产。
可选地,所述资产格式包括若干资产属性字段;所述资产创建交易或者所述合约调用交易包括所述资产创建方提交的与所述若干资产属性字段对应的属性值;所述资产创建信息包括针对与所述若干资产属性字段对应的属性值的校验规则;所述基于所述资产 模型中的资产创建信息,以及与所述目标资产类型对应的资产格式,在所述区块链中创建标准化的区块链资产,包括:基于所述资产模型中的校验规则对所述资产创建方提交的与所述若干资产属性字段对应的属性值进行校验;如果校验通过,则进一步基于所述属性值,以及与所述目标资产类型对应的资产格式,在所述区块链中创建标准化的区块链资产。
可选地,所述资产创建信息包括与所述区块链资产对应的状态机;所述方法还包括:在所述区块链中创建标准化的区块链资产之后,基于所述资产模型中的状态机,更新与所述区块链资产对应的资产状态。
可选地,所述区块链支持的交易类型还包括用于转移资产的资产转移交易;所述方法还包括:接收所述资产管理方对接的资产转移方发送的资产转移交易;其中,所述资产转移交易包括待转移的区块链资产的资产标识;响应于所述资产转移交易,获取所述区块链保存的与所述资产标识对应的区块链资产,并对与所述资产标识对应的区块链资产进行资产转移。
可选地,所述资产管理方在所述区块链上部署了与资产相关的智能合约;所述方法还包括:接收所述资产管理方对接的资产转移方发送的合约调用交易;其中,所述合约调用交易包括所述区块链资产的资产标识;响应于所述合约调用交易,调用所述智能合约中的查询逻辑,查询所述区块链保存的与所述资产标识对应的区块链资产,并在查询到与所述资产标识对应的区块链资产后,进一步调用所述智能合约中的转移逻辑,对与所述资产标识对应的区块链资产进行资产转移。
可选地,所述资产类型和所述资产类型对应的资产格式由所述运营方基于通用编程语言在所述区块链中定义;所述资产模型由所述资产管理方基于所述通用编程语言定义。
可选地,所述通用编程语言包括通用的声明式编程语言。
可选地,所述通用的声明式编程语言包括领域特定语言。
可选地,所述运营方包括区块链服务平台;所述资产管理方包括接入所述区块链服务平台的金融机构;所述资产创建方包括由所述金融机构提供资产服务的用户客户端。
本说明书还提出一种基于区块链的资产管理装置,所述装置应用于区块链中的节点设备;其中,所述区块链支持的交易类型包括用于定义资产模型的第一资产定义交易;所述区块链的运营方在所述区块链中定义了资产类型和与所述资产类型对应的资产格式;所述装置包括:第一接收模块,接收接入所述区块链的资产管理方发布的所述第一资产定义交易;其中,所述第一资产定义交易包括所述资产管理方定义的与目标资产类型对应的资产模型;所述资产模型包括与所述目标资产类型对应的资产创建信息;第一定义模块,响应于所述第一资产定义交易,在所述区块链上保存所述资产模型,以使与所述资产管理方对接的资产创建方基于所述资产模型中的资产创建信息,以及与所述目标资产类型对应的资产格式,在所述区块链中创建标准化的区块链资产。
可选地,所述区块链支持的交易类型还包括用于定义资产类型的第二资产定义交易;所述装置还包括:第二接收模块,接收所述运营方发布的所述第二资产定义交易;其中,所述第二资产定义交易包括所述运营方定义的所述目标资产类型和与所述目标资产类型对应的资产格式;第二定义模块,响应于所述第二资产定义交易,在所述区块链上保存所述目标资产类型和与所述目标资产类型对应的资产格式。
可选地,所述第一定义模块:将所述资产模型,以key-value键值对的形式,保存至所述区块链的Merkle状态树中;所述第二定义模块:将所述目标资产类型和与所述目标资产类型对应的资产格式,以key-value键值对的形式,保存至所述区块链的Merkle状态树中。
可选地,所述区块链支持的交易类型还包括用于创建与所述目标资产类型对应的资产的资产创建交易;所述装置还包括:第三接收模块,接收所述资产管理方对接的资产创建方发送的资产创建交易;其中,所述资产创建交易包括所述目标资产类型的类型标 识;第一创建模块,响应于所述资产创建交易,获取所述区块链保存的与所述类型标识指示的所述目标资产类型对应的资产格式,以及与所述目标资产类型对应的资产模型,并基于所述资产模型中的资产创建信息,以及与所述目标资产类型对应的资产格式,在所述区块链中创建标准化的区块链资产。
可选地,所述资产管理方在所述区块链上部署了与资产相关的智能合约;所述装置还包括:第四接收模块,接收所述资产管理方对接的资产创建方发送的合约调用交易;其中,所述合约调用交易包括所述目标资产类型的类型标识;第二创建模块,响应于所述合约调用交易,调用所述智能合约中的查询逻辑,查询所述区块链保存的与所述类型标识指示的所述目标资产类型对应的资产格式,以及与所述目标资产类型对应的资产模型,并在查询到与所述目标资产类型对应的资产格式和与所述目标资产类型对应的资产模型后,进一步调用所述智能合约中的创建逻辑,基于所述资产模型中的资产创建信息,以及与所述目标资产类型对应的资产格式,在所述区块链中创建标准化的区块链资产。
可选地,所述资产格式包括若干资产属性字段;所述资产创建交易或者所述合约调用交易包括所述资产创建方提交的与所述若干资产属性字段对应的属性值;所述资产创建信息包括针对与所述若干资产属性字段对应的属性值的校验规则;所述创建模块:基于所述资产模型中的校验规则对所述资产创建方提交的与所述若干资产属性字段对应的属性值进行校验;如果校验通过,则进一步基于所述属性值,以及与所述目标资产类型对应的资产格式,在所述区块链中创建标准化的区块链资产。
可选地,所述资产创建信息包括与所述区块链资产对应的状态机;所述创建模块:在所述区块链中创建标准化的区块链资产之后,基于所述资产模型中的状态机,更新与所述区块链资产对应的资产状态。
可选地,所述区块链支持的交易类型还包括用于转移所述区块链资产的资产转移交易;所述装置还包括:第五接收模块,接收所述资产管理方对接的资产转移方发送的资产转移交易;其中,所述资产转移交易包括待转移的区块链资产的资产标识;第一转移模块,响应于所述资产转移交易,获取所述区块链保存的与所述资产标识对应的所述区块链资产,并对与所述资产标识对应的区块链资产进行资产转移。
可选地,所述资产管理方在所述区块链上部署了与资产相关的智能合约;所述装置还包括:第六接收模块,接收所述资产管理方对接的资产转移方发送的合约调用交易;其中,所述合约调用交易包括所述区块链资产的资产标识;第二转移模块,响应于所述合约调用交易,调用所述智能合约中的查询逻辑,查询所述区块链保存的与所述资产标识对应的所述区块链资产,并在查询到与所述资产标识对应的区块链资产后,进一步调用所述智能合约中的转移逻辑,对与所述资产标识对应的区块链资产进行资产转移。
可选地,所述资产类型和与所述资产类型对应的资产格式由所述运营方基于通用编程语言在所述区块链中定义;所述资产模型由所述资产管理方基于通用编程语言定义。
可选地,所述通用编程语言包括通用的声明式编程语言。
可选地,所述通用的声明式编程语言包括领域特定语言。
可选地,所述运营方包括区块链服务平台;所述资产管理方包括接入所述区块链服务平台的金融机构;所述资产创建方包括由所述金融机构提供资产服务的用户客户端。
本说明书还提出一种电子设备,包括:处理器;用于存储处理器可执行指令的存储器;其中,所述处理器通过运行所述可执行指令以实现上述方法的步骤。
本说明书还提出一种计算机可读存储介质,其上存储有计算机指令,该指令被处理器执行时实现上述方法的步骤。
在上述技术方案中,可以由区块链的运营方在该区块链中定义目标资产类型和与该目标资产类型对应的资产格式;该区块链中的节点设备可以在接收到资产管理方发布的属于该区块链支持的交易类型的第一资产定义交易时,在该区块链上保存该第一资产定义交易中的由资产管理方定义的与该目标资产类型对应的资产模型,从而使与该资产管 理方对接的资产创建方可以基于保存在该区块链上的该资产模型中的资产创建信息,以及与该目标资产类型对应的资产格式,在该区块链中创建标准化的区块链资产;由于上述区块链的运营方在上述区块链中定义了资产类型,以及与该资产类型对应的资产格式,而接入该区块链的所有资产管理方在该区块链中定义的与该资产类型对应的资产模型,都指示了按照与该资产类型对应的资产格式创建区块链资产,因此对于与其中任一资产管理方对接的资产创建方而言,这些资产创建方在该区块链上创建的与该资产类型对应的区块链资产的资产格式相同,都是由该区块链的运营方在该区块链中定义的与该资产类型对应的资产格式;由此实现了在该区块链中创建标准化的区块链资产,从而便于创建的区块链资产在该区块链上流通。
附图说明
图1是本说明书示出的一种与区块链相关的网络环境的示意图;
图2是本说明书一示例性实施例示出的一种基于区块链的资产管理方法的流程图;
图3是本说明书一示例性实施例示出的一种状态机的示意图;
图4是本说明书一示例性实施例示出的一种基于区块链的资产管理装置所在电子设备的硬件结构图;
图5是本说明书一示例性实施例示出的一种基于区块链的资产管理装置的框图。
具体实施方式
这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本说明书一个或多个实施例相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本说明书一个或多个实施例的一些方面相一致的装置和方法的例子。
需要说明的是:在其他实施例中并不一定按照本说明书示出和描述的顺序来执行相应方法的步骤。在一些其他实施例中,其方法所包括的步骤可以比本说明书所描述的更多或更少。此外,本说明书中所描述的单个步骤,在其他实施例中可能被分解为多个步骤进行描述;而本说明书中所描述的多个步骤,在其他实施例中也可能被合并为单个步骤进行描述。
请参考图1,图1是本说明书示出的一种与区块链相关的网络环境的示意图。
在如图1所示的网络环境中,可以包括客户端侧计算设备101、服务器端102,以及至少一个区块链***;例如,区块链***103、区块链***104和区块链***105。
在一种实施方式中,客户端侧计算设备101,可以包括各种不同类型的客户端侧计算设备;例如,客户端侧终端设备可以包括诸如PC终端设备、移动终端设备、物联网设备,以及其它形式的具有一定的计算能力的智能设备,等等。
需要说明的是,客户端侧计算设备101并不表示其中的所有客户端侧计算设备在同一个通信网络中,而仅仅是对这些客户端侧计算设备的统称。
在一种实施方式中,客户端侧终端设备101中的至少部分计算设备,可以通过各种通信网络耦接到服务器端102;例如,图1中示出的设备1和设备2与服务器端102进行了耦接。
不难理解,客户端侧终端设备101中的部分终端设备,也可以不与服务器端102进行耦接,而是作为区块链节点通过各种通信网络直接耦接到区块链***;例如,图1中示出的设备4,可以作为区块链节点耦接到区块链***。
其中,上述通信网络可以包括有线和/或无线通信网络;例如,可以是基于运营商提供的有线接入网络或者无线接入网络(比如移动蜂窝网络)实现的局域网(Local Area Network,LAN)、广域网(Wide Area Network,WAN)、因特网或其组合。
在一种实施方式中,客户端侧计算设备101,还可以包括一个或多个用户侧服务器; 例如,图1中示出的设备5。客户端侧终端设备101中的至少部分计算设备,可以耦接到该用户侧服务器,而该用户侧服务器可以进一步与上述服务端102进行耦接;例如,图1中示出的设备1和设备2耦接到设备5,设备5进一步耦接服务器端102。
在一种实施方式中,上述用户侧服务器可以由搭建了用户账户体系的服务实体来实现;上述服务实体可以包括面向用户提供各种线上和/或线下服务的服务载体的运营实体;其中,上述服务载体可以包括软件形式的服务载体,也可以包括硬件形式的服务载体。
在一种实施方式中,上述服务载体可以包括提供线上互联网服务的各种客户端软件;例如,网站、网页、APP等。
在一种实施方式中,上述服务载体也可以包括部署在线下的,能够提供线下服务的各种智能设备;例如,部署在居住区、办公区、公共场所的智能快递柜。
相应的,上述运营实体可以包括上述服务载体对应的运营方;例如,上述运营实体可以包括对上述服务载体进行运营和管理的个人、组织、公司和企业,等等。
在一种实施方式中,服务器端102也可以通过各种通信网络耦接到一个或者多个区块链***;例如,图1中示出的服务器端102可以分别耦接到区块链***103、区块链***104和区块链***105,等等。
在一种实施方式中,每个区块链***都可以维护一个或多个区块链(例如,公有区块链、私有区块链、联盟区块链等),并包括用于承载上述一个或多个区块链的多个区块链节点;例如,如图1中示出的区块链节点1、区块链节点2、区块链节点3、区块链节点4、区块链节点i等可以共同承载一个或者多个区块链。各个区块链***包含的区块链之间,以及各个区块链***之间,还可以进行跨链的数据访问。
在一种实施方式中,区块链节点可以包括全节点和轻节点。全节点可以全量下载区块链中的每个区块所包含的区块链交易,并可以根据搭载的区块链共识算法,对每个区块链中所包含的区块链交易进行共识验证。
而轻节点可以不下载完整的区块链,而是可以只下载区块链中的每个区块的区块头数据,并将区块头所包含的数据作为验证根,用于以验证区块链交易的真实性。轻节点可以依附于全节点来访问区块链的更多功能。
例如,图1中示出的区块链***103中的各个区块链节点都可以作为全节点;而图1中示出的直接耦接到区块链***的设备4,就可以作为轻节点,依附于区块链***103中的各个全节点。
在一种实施方式中,区块链节点可以是物理设备,也可以是在服务器或者服务器集群中实现的虚拟设备;例如,区块链节点设备可以是服务器集群中的一台物理主机,也可以是基于虚拟化技术对服务器或者服务器集群搭载的硬件资源进行虚拟化后,创建的虚拟机。每个区块链节点之间,可以通过各种类型的通信方法(比如TCP/IP)耦接在一起形成网络,来承载一个或者多个区块链。
在一种实施方式中,服务器端102可以包括用于提供区块链服务(BaaS,Blockchain as a Service)的BaaS平台(也称之为BaaS云)。BaaS平台可以通过为区块链上发生的活动(诸如订阅和通知、用户验证、数据库管理和远程更新),提供预先编写的软件的方式,面向与BaaS平台耦接的客户端侧计算设备,提供简单易用,一键部署,快速验证,灵活可定制的区块链服务,进而可以加速区块链业务应用开发、测试、上线,助力各行业区块链商业应用场景的落地。
例如,在一个例子中,与BaaS平台可以提供诸如MQ(Message Queue,消息队列)服务之类的软件;与BaaS平台耦接的客户端侧计算设备,可以订阅BaaS平台耦接的区块链***中某一区块链上部署的智能合约,在触发执行后在区块链上产生的合约事件;而BaaS平台可以监听该智能合约在触发执行后在区块链上产生的事件,再基于MQ服务相关的软件,将该合约事件以通知消息的形式添加到消息队列中,使得订阅该消息队列的客户端侧计算设备,能够得到与上述合约事件相关的通知。
在一种实施方式中,BaaS平台还可提供基于区块链技术的企业级平台服务,以帮助企业级客户构建安全且稳定的区块链环境,并轻松管理区块链的部署、操作、维护和开发。例如,BaaS平台可以基于云技术实现丰富的安全策略和多租户的隔离环境、基于芯片加密技术来提供高级的安全保护、基于高度可靠的数据存储,提供可以快速扩展,而不会中断的端到端的高可用***;在另一个例子中,还可以提供增强的管理功能,以帮助客户构建企业级区块链网络环境;以及,还可为标准区块链应用和数据提供本地支持,支持例如Hyperledger Fabric和Enterprise Ethereum-Quorum的主流开源区块链技术,以构建开放且包容的技术生态***。
区块链一般被划分为三种类型:公有链(Public Blockchain),私有链(Private Blockchain)和联盟链(Consortium Blockchain)。此外,还可以有上述多种类型的结合,比如私有链+联盟链、联盟链+公有链等。其中,去中心化程度最高的是公有链。公有链以比特币、以太坊为代表,加入公有链的参与者(也可称为区块链中的节点)可以读取链上的数据记录、参与交易、以及竞争新区块的记账权等。而且,各节点可自由加入或者退出网络,并进行相关操作。私有链则相反,该网络的写入权限由某个组织或者机构控制,数据读取权限受组织规定。简单来说,私有链可以为一个弱中心化***,其对节点具有严格限制且节点数量较少。这种类型的区块链更适合于特定机构内部使用。联盟链则是介于公有链以及私有链之间的区块链,可实现“部分去中心化”。联盟链中各个节点通常有与之相对应的实体机构或者组织;节点通过授权加入网络并组成利益相关联盟,共同维护区块链运行。
基于区块链的基本特性,区块链通常是由若干个区块构成。在这些区块中分别记录有与该区块的创建时刻对应的时间戳,所有的区块严格按照区块中记录的时间戳,构成一条在时间上有序的数据链条。
对于物理世界产生的真实数据,可以将其构建成区块链所支持的标准的交易(transaction)格式,然后发布至区块链,由区块链中的节点设备对收到的交易进行共识处理,并在达成共识后,由区块链中作为记账节点的节点设备,将这笔交易打包进区块,在区块链中进行持久化存证。
区块链中支持的共识算法可包括:第一类共识算法,即节点设备需要争夺每一轮的记账周期的记账权的共识算法,例如工作量证明(Proof of Work,POW)、股权证明(Proof of Stake,POS)、委任权益证明(Delegated Proof of Stake,DPOS)等共识算法;第二类共识算法是预先为每一轮记账周期选举记账节点(无需争夺记账权)的共识算法,例如实用拜占庭容错(Practical Byzantine Fault Tolerance,PBFT)等共识算法。
在采用第一类共识算法的区块链网络中,争夺记账权的节点设备,都可以在接收到交易后执行该笔交易。争夺记账权的节点设备中可能有一个节点设备在本轮争夺记账权的过程中胜出,成为记账节点。记账节点可以将收到的交易与其它交易一起打包以生成最新区块,并将生成的最新区块或者该最新区块的区块头发送至其它节点设备进行共识。
在采用第二类共识算法的区块链网络中,具有记账权的节点设备在本轮记账前已经商定好。因此,节点设备在接收到交易后,如果自身不是本轮的记账节点,则可以将该交易发送至记账节点。对于本轮的记账节点,在将该交易与其它交易一起打包以生成最新区块的过程中或者之前,可以执行该交易。记账节点在生成最新区块后,可以将该最新区块或者该最新区块的区块头发送至其它节点设备进行共识。
如上所述,无论区块链采用以上示出的哪种共识算法,本轮的记账节点都可以将接收到的交易打包以生成最新区块,并将生成的最新区块或者该最新区块的区块头发送至其它节点设备进行共识验证。如果其它节点设备接收到最新区块或者该最新区块的区块头后,经验证没有问题,可以将该最新区块追加到原有的区块链末尾,从而完成区块链的记账过程。其它节点验证记账节点发来的新的区块或区块头的过程中,也可以执行该区块中的包含的交易。
请参考图2,图2是本说明书一示例性实施例示出的一种基于区块链的资产管理方法的流程图。
结合如图1所示的网络环境,上述基于区块链的资产管理方法可以应用于区块链中的节点设备;该方法可以包括以下步骤:步骤202,接收接入所述区块链的资产管理方发布的所述第一资产定义交易;其中,所述第一资产定义交易包括所述资产管理方定义的与目标资产类型对应的资产模型;所述资产模型包括与所述目标资产类型对应的资产创建信息;步骤204,响应于所述第一资产定义交易,在所述区块链上保存所述资产模型,以使与所述资产管理方对接的资产创建方基于所述资产模型中的资产创建信息,以及与所述目标资产类型对应的资产格式,在所述区块链中创建标准化的区块链资产。
在实际应用中,可以将现实世界中的一些非货币属性的实体资产,转化成为能够在区块链上流通的虚拟资产。
需要说明的是,将现实世界中的非货币属性的实体资产转化为区块链上的虚拟资产,通常是指将该实体资产与区块链上的虚拟资产进行“锚定”,作为这些虚拟资产的价值支撑,进而在区块链上产生与实体资产的价值匹配,且能够在区块链上的区块链账户之间进行流通的虚拟资产的过程。
对于接入上述区块链的用户而言,该用户可以在区块链上创建一笔与现实世界的非货币属性的实体资产价值匹配的虚拟资产,在区块链上进行流通;例如,该用户可以将持有的房产、股票、贷款合同、票据和应收账款等非货币属性的实体资产,转换为价值匹配的虚拟资产在区块链上流通。
在本实施例中,一方面,区块链的运营方可以在区块链中定义一个或多个资产类型,以及分别与各个资产类型对应的资产格式。另一方面,可以对上述区块链支持的交易类型进行扩展,以在该区块链中扩展出一种用于定义资产模型的资产定义交易。
区块链支持的交易类型通常包括:普通的转账交易、创建智能合约的交易和调用智能合约的交易;在这种情况下,可以在以上三种类型的交易的基础上,再在上述区块链中扩展出一种新的类型的交易,即用于定义资产模型的资产定义交易,并将以上四种类型的交易都作为该区块链支持的交易类型。对于区块链支持的交易类型而言,该区块链中的节点设备可以在本地的虚拟机中执行这些类型的交易,以运行与这些类型的交易对应的该区块链的原生代码,实现这些原生代码指示的逻辑。
与上述转账交易对应的原生代码指示的逻辑,通常是根据该转账交易中的转出账户、转入账户和转账数额等信息,执行转账操作的逻辑;与上述创建智能合约的交易对应的原生代码指示的逻辑,通常是创建与智能合约对应的合约账户,并将该智能合约的合约代码锚定到该合约账户中的逻辑,例如:可以将区块中的合约代码的code hash,填充到对应的合约账户中的code字段中;与上述调用智能合约的交易对应的原生代码指示的逻辑,通常是从与被调用的智能合约对应的合约账户中,加载该智能合约的合约代码,并运行加载的该合约代码,实现该合约代码指示的逻辑,例如:可以基于合约账户中的code字段中填充的code hash,去区块中查找对应的合约代码;与上述资产定义交易对应的原生代码指示的逻辑,即为在区块链中定义资产模型的逻辑。
由于上述资产定义交易不是调用合约的交易,区块链中的节点设备在本地的虚拟机中执行该资产定义交易时,无需调用部署在该区块链上的智能合约中的合约代码指示的逻辑。
资产管理方可预先接入上述区块链,即可以与该区块链中的节点设备建立通信连接。后续,该资产管理方可以将用于定义与该区块链的运营商在该区块链中定义的某个资产类型(称为目标资产类型)对应的资产模型的资产定义交易(称为第一资产定义交易)发布至该区块链。该第一资产定义交易可以包括该资产管理方定义的与该目标资产类型对应的资产模型;该资产模型可以包括与该目标资产类型对应的资产创建信息。在面向对象的编程过程中,可将待创建的与该目标资产类型对应的区块链资产作为对象,此时 该资产模型为用于创建与该目标资产类型对应的区块链资产的类,即该资产模型为与该目标资产类型对应的区块链资产的实例。
针对上述区块链的运营方在上述区块链中定义的任意一个资产类型,都可以由上述资产管理方在该区块链中定义与该资产类型对应的资产模型。在上述区块链中,一个资产类型可与多个资产模型相对应;这些资产模型可由不同的资产管理方在该区块链中定义。对于与某个资产类型对应的资产模型而言,该资产模型可包括与该资产类型对应的资产创建信息。在这种情况下,可以基于该资产创建信息,以及与该资产类型对应的资产格式,在上述区块链中创建与该资产类型对应的区块链资产(即前述能够在该区块链上流通的虚拟资产)。
上述区块链中的节点设备在接收到上述第一资产定义交易时,可响应于该第一资产定义交易,在该区块链上保存基于第一资产定义交易定义的资产模型,从而使与上述资产管理方对接的资产创建方可以基于保存在该区块链上的该资产模型中的上述资产创建信息,以及该区块链的运营商在该区块链中定义的与上述目标资产类型对应的资产格式,在该区块链中创建与该目标资产类型对应的区块链资产。
除此之外,还可针对创建的上述区块链资产计算hash值,并将计算得到的hash值作为该区块链资产的资产标识。
由于上述区块链的运营方在上述区块链中定义了资产类型及与该资产类型对应的资产格式,而接入该区块链的所有资产管理方在该区块链中定义的与该资产类型对应的资产模型,都指示了按照与该资产类型对应的资产格式创建区块链资产,因此对于与其中任一资产管理方对接的资产创建方而言,这些资产创建方在该区块链上创建的与该资产类型对应的区块链资产的资产格式相同,都是由该区块链的运营方在该区块链中定义的与该资产类型对应的资产格式;在这种情况下,可将在上述区块链中创建的上述区块链资产作为标准化的区块链资产。
上述区块链的运营方可包括区块链服务平台;上述资产管理方可以括接入该区块链服务平台的金融机构;上述资产创建方可包括由该金融机构提供资产服务的用户客户端。
上述区块链的运营方、上述资产管理方和上述资产创建方可指代同一实体,例如这三者都是某家金融机构或某个个体;或者,可指代不同的实体。
结合如图1所示的网络环境,上述区块链可以包括该网络环境中的区块链***103;该区块链中的节点设备可以包括区块链***103中的区块链节点1、区块链节点2、区块链节点3、区块链节点4和区块链节点i等;作为上述区块链的运营方的区块链服务平台,可以包括该网络环境中的服务器端102,即与该区块链服务平台对应的电子设备可以是该网络环境中的服务器端102;为了保障上述区块链的数据安全,并便于对该区块链进行管理和维护,作为上述资产管理方的金融机构,通常不会直接与该区块链中的节点设备建立通信连接,而是通过与区块链服务平台建立通信连接,接入该区块链;在这种情况下,该金融机构可以包括该网络环境中的客户端侧计算设备101中的设备1、设备2、设备3或者设备5,即与该金融机构对应的电子设备可以是该网络环境中的客户端侧计算设备101中的设备1、设备2、设备3或设备5;作为上述资产创建方的由上述金融机构提供资产服务的用户客户端,可以包括与该网络环境中的客户端侧计算设备101中的设备1、设备2、设备3或设备5建立通信连接的用户客户端;例如,假设与该金融机构对应的电子设备为设备5,则与该用户客户端对应的电子设备可以是设备1或设备2;假设与该金融机构对应的电子设备为设备1、设备2或设备3,则该用户客户端可以是与设备1、设备2或设备3建立通信连接的用户客户端。
下面结合如图1所示的与区块链相关的网络环境,针对上述目标资产类型,从资产定义和资产创建两个方面,对本实施例中在上述区块链中创建与该目标资产类型对应的区块链资产的流程进行解释说明。
(1)资产定义
在本实施例中,一方面,区块链的运营方可以在区块链中定义一个或多个资产类型,以及分别与各个资产类型对应的资产格式。
在示出的一种实施方式中,上述区块链的运营方可以基于通用编程语言在区块链中定义一个或多个资产类型,以及分别与各个资产类型对应的资产格式。
由于上述区块链的运营方在上述区块链中定义资产类型,以及与该资产类型对应的资产格式时,使用的都是通用编程语言,因此可以保证该区块链的运营方、接入该区块链的资产管理方,以及与该资产管理方对接的资产创建方等资产相关方,都可以基于该通用编程语言,对由该区块链的运营方在该区块链中定义的资产类型,以及与该资产类型对应的资产格式进行解析,并根据解析结果在该区块链中创建区块链资产。
进一步地,在示出的一种实施方式中,上述通用编程语言可以包括通用的声明式编程语言;进一步地,该通用的声明式编程语言可以包括领域特定语言(domain-specific languages,DSL)。也即,该通用编程语言具体可以包括领域特定语言;使用领域特定语言执行资产类型和资产格式等的定义,可以提高代码开发效率,减少编程工作量。
举例来说,上述区块链的运营商可以在上述区块链中定义“房产”、“股票”和“应收账款”等资产类型;以及,与“房产”资产类型对应的资产格式、与“股票”资产类型对应的资产格式和与“应收账款”资产类型对应的资产格式等资产格式。
其中,资产格式可以包括:若干资产属性字段;以及,将与若干资产属性字段对应的属性值组装成区块链资产时所采用的数据结构。具体地,以“应收账款”资产类型为例,对于与“应收账款”资产类型对应的资产而言,该资产的资产属性字段可以包括:链上标识、链下标识、资产类型、金额、有效期结束日期、金融机构、应收方和应付方等;在这种情况下,如下所示,可以使用声明式编程语言定义“应收账款”资产类型,以及与“应收账款”资产类型对应的资产格式:
define StandardAsset StandardAR{
String idOnChain;
String idOffChain;
String assetType;
Long amount;
Date validDateUntil;
String financeEnterprise;
String receivablesEnterpsie;
String payableEnterpsie;
}
“StandardAR”为“应收账款”资产类型的类型标识;“idOnChain”字段表示链上标识,“idOffChain”字段表示链下标识,“assetType”字段表示资产类型,“amount”字段表示金额,“validDateUntil”字段表示有效期结束日期,“financeEnterprise”字段表示金融机构,“receivablesEnterpsie”字段表示应收方,“payableEnterpsie”字段表示应付方;“idOnChain”、“idOffChain”、“assetType”、“financeEnterprise”、“receivablesEnterpsie”和“payableEnterpsie”为string类型的字段,“amount”为long类型的字段,“validDateUntil”为date类型的字段。
另一方面,可对上述区块链支持的交易类型进行扩展,以在该区块链中扩展出一种用于定义资产模型的资产定义交易。区块链支持的交易类型通常包括普通的转账交易、创建智能合约的交易和调用智能合约的交易;在这种情况下,可在以上三种类型的交易的基础上,再在上述区块链中扩展出一种新的类型的交易,即用于定义资产模型的资产定义交易,并将以上四种类型的交易都作为该区块链支持的交易类型。对于区块链支持的交易类型而言,该区块链中的节点设备可在本地的虚拟机中执行这些类型的交易,以运行与这些类型的交易对应的该区块链的原生代码,实现这些原生代码指示的逻辑。
与上述转账交易对应的原生代码指示的逻辑,通常是根据该转账交易中的转出账户、转入账户和转账数额等信息,执行转账操作的逻辑;与上述创建智能合约的交易对 应的原生代码指示的逻辑,通常是创建与智能合约对应的合约账户,并将该智能合约的合约代码锚定到该合约账户中的逻辑,例如可将区块中的合约代码的code hash,填充到对应的合约账户中的code字段中;与上述调用智能合约的交易对应的原生代码指示的逻辑,通常是从与被调用的智能合约对应的合约账户中,加载该智能合约的合约代码,并运行加载的该合约代码,实现该合约代码指示的逻辑,例如可基于合约账户中的code字段中填充的code hash,去区块中查找对应的合约代码;与上述用于定义资产模型的资产定义交易对应的原生代码指示的逻辑,即为在区块链中定义资产模型的逻辑。由于上述资产定义交易不是调用合约的交易,区块链中的节点设备在本地的虚拟机中执行该资产定义交易时,无需调用部署在该区块链上的智能合约中的合约代码指示的逻辑。
在本实施例中,资产管理方可以预先接入上述区块链,即可以与该区块链中的节点设备建立通信连接。后续,该资产管理方可以将用于定义与该区块链的运营商在该区块链中定义的某个资产类型(称为目标资产类型)对应的资产模型的资产定义交易(称为第一资产定义交易)发布至该区块链。该第一资产定义交易可以包括该资产管理方定义的与该目标资产类型对应的资产模型;该资产模型可以包括与该目标资产类型对应的资产创建信息。
上述资产管理方可基于上述通用编程语言定义与该目标资产类型对应的资产模型。
在实际应用中,针对上述区块链的运营方在上述区块链中定义的任意一个资产类型,都可由上述资产管理方在该区块链中定义与该资产类型对应的资产模型。在上述区块链中,一个资产类型可与多个资产模型相对应;这些资产模型可由不同的资产管理方在该区块链中定义。对于与某个资产类型对应的资产模型而言,该资产模型可以包括与该资产类型对应的资产创建信息;在这种情况下,可以基于该资产创建信息,以及与该资产类型对应的资产格式,在上述区块链中创建与该资产类型对应的区块链资产。
上述资产创建信息可以包括:针对与若干资产属性字段对应的属性值的校验规则;与待创建的区块链资产对应的状态机;等等。具体地,在上述区块链中创建与上述资产类型对应的区块链资产时,可以由资产创建方提交与该资产类型对应的资产格式中的若干资产属性字段对应的属性值;后续,可以先按照上述资产创建信息中的校验规则,对该资产创建方提交的与这些资产属性字段对应的属性值进行校验;在校验通过之后,可以按照与该资产类型对应的资产格式,对该资产创建方提交的属性值进行组装,从而可以将组装后的与这些资产属性字段对应的属性值作为在该区块链中创建的区块链资产;此外,还可以按照该资产创建信息中的状态机,更新与创建的该区块链资产对应的状态,并将该区块链资产与该区块链资产的状态进行关联存储。
继续以前述“应收账款”资产类型为例,如下所示,可使用声明式编程语言定义与“应收账款”资产类型对应的资产模型:
define StandardAsset StandardAR stdAr{
STD-FUNCTIONALITY;//
VALIDATION(AMOUNT:RULE_GREATER_THAN_ZERO,
VALID_DATE_UNTIL:RULE_GREATER_THAN_30);//
STATE-MACHINE:
CREATE(NULL,READY)
CONFIRM(READY,CONFIRMED)
SETTLE(CONFIRMED,PARTIAL_SETTLE)
MORTGAGE(CONFIRMED,BACKED)
MORTGAGE(PARTIAL_SETTLED,BACKED)
CLEAR(BACKED,CLEARED)//
}
其中,“StandardAR”为“应收账款”资产类型的类型标识,“stdAr”为该资产模型的模型标识;“STD-FUNCTIONALITY”指示在基于该资产模型创建区块链资产时,使用前述与“应收账款”资产类型对应的资产格式中的所有资产属性字段;也即,创建的与“应收 账款”资产类型对应的区块链资产中包含与上述所有资产属性字段对应的属性值;“VALIDATION”部分指示针对与上述所有资产属性字段对应的属性值的校验规则;“STATE-MACHINE”部分指示与待创建的区块链资产对应的状态机。
如图3所示,与“应收账款”资产类型对应的资产模型中的与待创建的区块链资产对应的状态机包括:“NULL”表示无状态;在创建(CREATE)了该区块链资产之后,将该区块链资产的状态设置为“READY”状态;在对该区块链资产进行确认(CONFIRM)之后,将该区块链资产的状态由“READY”状态切换至“CONFIRMED”状态;在对该区块链资产进行结算(SETTLE)之后,将该区块链资产的状态由“CONFIRMED”状态切换至“PARTIAL_SETTLE”状态,或者将该区块链资产的状态保持在“PARTIAL_SETTLE”状态;在对该区块链资产进行抵押(MORTGAGE)之后,将该区块链资产的状态由“CONFIRMED”状态切换至“BACKED”状态,或者将该区块链资产的状态由“PARTIAL_SETTLED”状态切换至“BACKED”状态;在对该区块链资产进行结清(CLEAR)之后,将该区块链资产的状态由“BACKED”状态切换至“CLEARED”状态。
在本实施例中,上述区块链中的节点设备在接收到上述第一资产定义交易时,可以响应于该第一资产定义交易,在本地的虚拟机中执行该第一资产定义交易,以运行与该第一资产定义交易对应的该区块链的原生代码,实现在该区块链上保存基于第一资产定义交易定义的资产模型,从而使与上述资产管理方对接的资产创建方可以基于保存在该区块链上的该资产模型中的上述资产创建信息,以及该区块链的运营商在该区块链中定义的与上述目标资产类型对应的资产格式,在该区块链中创建与该目标资产类型对应的区块链资产。
在一种实施方式中,除了可以在上述区块链中扩展出上述用于定义资产模型的资产定义交易之外,还可以再进一步地对该区块链支持的交易类型进行扩展,以在该区块链中扩展出一种用于定义资产类型的资产定义交易。具体地,此时区块链支持的交易类型可以包括:普通的转账交易、创建智能合约的交易、调用智能合约的交易,以及上述用于定义资产模型的资产定义交易;在这种情况下,可以在以上四种类型的交易的基础上,再在上述区块链中扩展出一种新的类型的交易,即用于定义资产类型的资产定义交易,并将以上五种类型的交易都作为该区块链支持的交易类型。
其中,与上述用于定义资产模型的资产定义交易对应的原生代码指示的逻辑,即为在区块链中定义资产模型的逻辑;与上述用于定义资产类型的资产定义交易对应的原生代码指示的逻辑,即为在区块链中定义资产类型的逻辑。
在这种情况下,上述区块链的运营方可以将用于定义上述目标资产类型的资产定义交易(称为第二资产定义交易)发布至上述区块链。
其中,该第二资产定义交易可以包括:该区块链的运营方定义的该目标资产类型,以及与该目标资产类型对应的资产格式。
上述区块链中的节点设备在接收到上述第二资产定义交易时,可以响应于该第二资产定义交易,在本地的虚拟机中执行该第二资产定义交易,以运行与该第二资产定义交易对应的该区块链的原生代码,实现在该区块链上保存基于第二资产定义交易定义的上述目标资产类型,以及与该目标资产类型对应的资产格式。
在实际应用中,对于大多数区块链***而言,这些区块链***通常都会使用Merkle树;或者,基于Merkle树的数据结构,来存储和维护数据;其中,Merkle树中的数据通常以key-value键值对的形式进行存储。也即,在一种实施方式中,可以以key-value键值对的形式,将上述资产类型和与该资产类型对应的资产格式保存至上述区块链的Merkle状态树中;或者,可以以key-value键值对的形式,将资产模型保存至上述区块链的Merkle状态树中。举例来说,可以将资产模型的hash值作为key,并将该资产模型本身作为value,保存至该区块链的Merkle状态树中。
结合如图1所示的网络环境,上述区块链可以包括该网络环境中的区块链***103; 该区块链中的节点设备可以包括区块链***103中的区块链节点1、区块链节点2、区块链节点3、区块链节点4和区块链节点i等;上述区块链的运营方可以包括该网络环境中的服务器端102;上述资产管理方可以包括该网络环境中的客户端侧计算设备101中的设备5。上述资产管理方可以预先通过客户端侧计算设备101中的设备5接入区块链***103;后续可以通过设备5将用于定义与上述目标资产类型对应的资产模型的第一资产定义交易发布至区块链***103。
其中,该第一资产定义交易可以包括该资产管理方定义的与该目标资产类型对应的资产模型;该资产模型可以包括与该目标资产类型对应的资产创建信息;该第一资产定义交易为扩展出的该区块链支持的交易类型。
区块链***103中的节点设备在接收到上述第一资产定义交易时,可以响应于该第一资产定义交易,在本地的虚拟机中执行该第一资产定义交易,以运行与该第一资产定义交易对应的该区块链的原生代码,实现在区块链***103中保存基于该第一资产定义交易定义的资产模型,从而使与上述资产管理方对接的资产创建方可以基于区块链***103中保存的该资产模型中的上述资产创建信息,以及该区块链的运营商在区块链***103中定义的与该目标资产类型对应的资产格式,在区块链***103中创建与该目标资产类型对应的区块链资产。
在具体实现时,参考前述在区块链中持久化存证数据的过程,客户端侧计算设备101中的设备5可以将上述资产管理方发起的第一资产定义请求(该第一资产定义请求包括该资产管理方定义的与上述目标资产类型对应的资产模型)发送至服务器端102,由服务器端102将该第一资产定义请求打包成上述第一资产定义交易,并将该第一资产定义交易发布至区块链***103;在这种情况下,与服务器端102建立了通信连接的区块链***103中的节点设备可以先接收到该第一资产定义交易,再将该第一资产定义交易发送给区块链***103中的其它节点设备。区块链***103中的区块链节点1、区块链节点2、区块链节点3、区块链节点4和区块链节点i等各台节点设备在接收到该第一资产定义交易时,可以对该第一资产定义交易进行共识处理,并在达成共识之后,将该第一资产定义交易打包进区块,在区块链***103中进行持久化存证。
针对打包进区块的上述第一资产定义交易,区块链***103中的节点设备可以响应于该第一资产定义交易,在本地的虚拟机中执行该第一资产定义交易,以运行与该第一资产定义交易对应的该区块链的原生代码,实现在区块链***103中保存由该第一资产定义交易定义的资产模型,从而使与上述资产管理方对接的资产创建方可以基于区块链***103中保存的该资产模型中的上述资产创建信息,以及该区块链的运营商在区块链***103中定义的与该目标资产类型对应的资产格式,在区块链***103中创建与该目标资产类型对应的区块链资产。
在一个例子中,上述区块链的运营方可以通过服务器端102将用于定义上述目标资产类型的第二资产定义交易发布至区块链***103。
该第二资产定义交易可包括:该区块链的运营方定义的该目标资产类型及该目标资产类型对应的资产格式;该第二资产定义交易为扩展出的该区块链支持的交易类型。
区块链***103中的节点设备在接收到上述第二资产定义交易时,可以响应于该第二资产定义交易,在本地的虚拟机中执行该第二资产定义交易,以运行与该第二资产定义交易对应的该区块链的原生代码,实现在区块链***103中保存基于该第二资产定义交易定义的上述目标资产类型,以及与该目标资产类型对应的资产格式。
在具体实现时,参考前述在区块链中持久化存证数据的过程,服务器端102可以将上述区块链的运营方定义的该目标资产类型,以及与该目标资产类型对应的资产格式打包成上述第二资产定义交易,并将该第二资产定义交易发布至区块链***103;在这种情况下,与服务器端102建立了通信连接的区块链***103中的节点设备可以先接收到该第二资产定义交易,再将该第二资产定义交易发送给区块链***103中的其它节点 设备。区块链***103中的区块链节点1、区块链节点2、区块链节点3、区块链节点4和区块链节点i等各台节点设备在接收到该第二资产定义交易时,可以对该第二资产定义交易进行共识处理,并在达成共识之后,将该第二资产定义交易打包进区块,在区块链***103中进行持久化存证。
针对打包进区块的上述第二资产定义交易,区块链***103中的节点设备可以响应于该第二资产定义交易,在本地的虚拟机中执行该第二资产定义交易,以运行与该第二资产定义交易对应的该区块链的原生代码,实现在区块链***103中保存基于该第二资产定义交易定义的上述目标资产类型,以及与该目标资产类型对应的资产格式。
在另一个例子中,上述区块链的运营方可以通过服务器端102预先将上述目标资产类型,以及与该目标资产类型对应的资产格式,写入至区块链***103的原生代码;后续,上述资产管理方可以通过客户端侧计算设备101中的设备5接入区块链***103,并通过设备5将用于定义该目标资产类型的第二资产定义交易发布至区块链***103。
其中,该第二资产定义交易为扩展出的该区块链支持的交易类型。
区块链***103中节点设备在接收到上述第二资产定义交易时,可以响应于该第二资产定义交易,在本地的虚拟机中执行该第二资产定义交易,以运行与该第二资产定义交易对应的该区块链的原生代码,实现从区块链***103的原生代码中读取上述目标资产类型,以及与该目标资产类型对应的资产格式,并在区块链***103中保存读取到的上述目标资产类型,以及与该目标资产类型对应的资产格式。
(2)资产创建
在一种实施方式中,除了可以在上述区块链中扩展出上述用于定义资产模型的资产定义交易之外,还可以再进一步地对该区块链支持的交易类型进行扩展,以在该区块链中扩展出一种用于创建区块链资产的资产创建交易。
具体地,此时区块链支持的交易类型可以包括:普通的转账交易、创建智能合约的交易、调用智能合约的交易,以及上述用于定义资产模型的资产定义交易;在这种情况下,可以在以上四种类型的交易的基础上,再在上述区块链中扩展出一种新的类型的交易,即用于创建区块链资产的资产创建交易,并将以上五种类型的交易都作为该区块链支持的交易类型。其中,与上述用于定义资产模型的资产定义交易对应的原生代码指示的逻辑,即为在区块链中定义资产模型的逻辑;与上述资产创建交易对应的原生代码指示的逻辑,即为在区块链中创建区块链资产的逻辑。
当然,参考前述资产定义的过程,在对上述区块链支持的原生交易进行扩展之后,该区块链支持的交易类型也可以包括:普通的转账交易、创建智能合约的交易、调用智能合约的交易、上述用于定义资产模型的资产定义交易、上述用于定义资产类型的资产定义交易,以及用于创建区块链资产的资产创建交易这五种类型的交易。
与上述资产管理方对接的资产创建方可以将用于创建与上述目标资产类型对应的资产的资产创建交易发布至上述区块链。其中,该资产创建交易可以包括该目标资产类型的类型标识。
上述区块链中的节点设备在接收到上述资产创建交易时,可以响应于该资产创建交易,在本地的虚拟机中执行该资产创建交易,以运行与该资产创建交易对应的该区块链的原生代码,一方面,获取该区块链中保存的与该资产创建交易中的类型标识指示的资产类型对应的资产格式,即获取该区块链中保存的与上述目标资产类型对应的资产格式;另一方面,获取该区块链中保存的与该资产创建交易中的类型标识指示的资产类型对应的资产模型,即获取该区块链中保存的与该目标资产类型对应的资产模型;后续可以基于获取到的该资产模型中的资产创建信息,以及与该目标资产类型对应的资产格式,在该区块链中创建与该目标资产类型对应的区块链资产;此外,可以针对创建的该区块链资产计算hash值,并将计算得到的hash值作为该区块链资产的资产标识。
在另一种实施方式中,上述资产管理方可以预先在上述区块链上部署与资产相关 的智能合约;与上述资产管理方对接的资产创建方可以将用于调用该智能合约的合约调用交易发布至该区块链。其中,该合约调用交易可以包括上述目标资产类型的类型标识。
上述区块链中的节点设备在接收到上述合约调用交易时,可以响应于该合约调用交易,调用上述智能合约中的查询逻辑,查询该区块链中保存的与该合约调用交易中的类型标识指示的上述目标资产类型对应的资产格式,以及与该目标资产类型对应的资产模型,并在查询到与该目标资产类型对应的资产格式和与该目标资产类型对应的资产模型之后,进一步调用该智能合约中的创建逻辑,基于查询到的该资产模型中的资产创建信息,以及与该目标资产类型对应的资产格式,在该区块链中创建与该目标资产类型对应的区块链资产;此外,可以针对创建的该区块链资产计算hash值,并将计算得到的hash值作为该区块链资产的资产标识。
需要说明的是,由于上述区块链的运营方在上述区块链中定义了资产类型,以及与该资产类型对应的资产格式,而接入该区块链的所有资产管理方在该区块链中定义的与该资产类型对应的资产模型,都指示了按照与该资产类型对应的资产格式创建区块链资产,因此对于与其中任一资产管理方对接的资产创建方而言,这些资产创建方在该区块链上创建的与该资产类型对应的区块链资产的资产格式相同,都是由该区块链的运营方在该区块链中定义的与该资产类型对应的资产格式;在这种情况下,可以将在上述区块链中创建的上述区块链资产作为标准化的区块链资产。
结合如图1所示的网络环境,与作为上述资产管理方的设备5对接的上述资产创建方可以包括该网络环境中的客户端侧计算设备101中的设备1或设备2。
上述资产创建方可通过设备1将用于创建与上述目标资产类型对应的资产的资产创建交易发布至上述区块链。其中,该资产创建交易可以包括该目标资产类型的类型标识;该资产创建交易为扩展出的该区块链支持的交易类型。
区块链***103中的节点设备在接收到上述资产创建交易时,可以响应于该资产创建交易,在本地的虚拟机中执行该资产创建交易,以运行与该资产创建交易对应的该区块链的原生代码,一方面,获取区块链***103中保存的与该资产创建交易中的类型标识指示的上述目标资产类型对应的资产格式;另一方面,获取区块链***103中保存的与该目标资产类型对应的资产模型;后续可以基于获取到的该资产模型中的资产创建信息,以及与该目标资产类型对应的资产格式,在区块链***103中创建与该目标资产类型对应的区块链资产;此外,可以针对创建的该区块链资产计算hash值,并将计算得到的hash值作为该区块链资产的资产标识。
参考前述在区块链中持久化存证数据的过程,设备1可以将上述资产创建方发起的资产创建请求(该资产创建包括上述目标资产类型的类型标识)发送至设备5,先由设备5将该资产创建请求发送至服务器端102,再由服务器端102将该资产创建请求打包成上述资产创建交易,并将该资产创建交易发布至区块链***103;在这种情况下,与服务器端102建立了通信连接的区块链***103中的节点设备可以先接收到该资产创建交易,再将该资产创建交易发送给区块链***103中的其它节点设备。区块链***103中的区块链节点1、区块链节点2、区块链节点3、区块链节点4和区块链节点i等各台节点设备在接收到该资产创建交易时,可以对该资产创建交易进行共识处理,并在达成共识之后,将该资产创建交易打包进区块,在区块链***103中进行持久化存证。
针对打包进区块的上述资产创建交易,区块链***103中的节点设备可以响应于该资产创建交易,在本地的虚拟机中执行该资产创建交易,以运行与该资产创建交易对应的该区块链的原生代码,一方面,获取区块链***103中保存的与该资产创建交易中的类型标识指示的与上述目标资产类型对应的资产格式;另一方面,获取区块链***103中保存的与该目标资产类型对应的资产模型;后续可以基于获取到的该资产模型中的资产创建信息,以及与该目标资产类型对应的资产格式,在区块链***103中创建与该目标资产类型对应的区块链资产;此外,可以针对创建的该区块链资产计算hash值,并 将计算得到的hash值作为该区块链资产的资产标识。
上述资产管理方可以预先通过设备5在区块链***103中部署与资产相关的智能合约;上述资产创建方可以通过与设备5建立了通信连接的设备1将用于调用该智能合约的合约调用交易发布至区块链***103。其中,该合约调用交易可以包括上述目标资产类型的类型标识。
区块链***103中的节点设备在接收到上述合约调用交易时,可响应于该合约调用交易,调用上述智能合约中的查询逻辑,查询区块链***103中保存的与该合约调用交易中的类型标识指示的上述目标资产类型对应的资产格式及与该目标资产类型对应的资产模型,并在查询到该资产格式和该资产模型之后,进一步调用该智能合约中的创建逻辑,基于查询到的该资产模型中的资产创建信息及与该目标资产类型对应的资产格式,在区块链***103中创建与该目标资产类型对应的区块链资产;此外,可以针对创建的该区块链资产计算hash值,并将计算得到的hash值作为该区块链资产的资产标识。
在一种实施方式中,上述区块链的运营方在上述区块链中定义的与某个资产类型对应的资产格式,可包括该资产类型的若干资产属性字段;上述资产管理方在该区块链中定义的与该资产类型对应的资产模型中的资产创建信息,可包括针对与上述若干资产属性字段对应的属性值的校验规则;由上述资产创建方发起的上述资产创建交易或者上述合约调用交易,可包括该资产创建方提交的与上述若干资产属性字段对应的属性值。
在这种情况下,在基于上述资产模型中的资产创建信息,以及与上述目标资产类型对应的资产格式,在上述区块链中创建区块链资产时,可以先按照该资产模型中的针对与上述若干资产属性字段对应的属性值的校验规则,对上述资产创建方提交的与这些资产属性字段对应的属性值进行校验;在校验通过之后,可以按照与该资产类型对应的资产格式,对该资产创建方提交的属性值进行组装,从而可以将组装后的与这些资产属性字段对应的属性值作为在该区块链中创建的区块链资产。
结合前述与“应收账款”资产类型对应的资产格式,以及与“应收账款”资产类型对应的资产模型,该资产模型指示使用与“应收账款”资产类型对应的资产格式中的所有资产属性字段创建区块链资产;但在实际应用中,资产模型也可以指示使用部分资产属性字段创建区块链资产;本说明书对此不作限制。
在示出的一种实施方式中,上述资产管理方在上述区块链中定义的与上述资产类型对应的资产模型中的资产创建信息,可以包括:与待创建的区块链资产对应的状态机。
在这种情况下,在上述区块链中创建了标准化的区块链资产之后,可以按照上述资产模型中的与待创建的区块链资产对应的状态机,更新与创建的该区块链资产对应的状态,并将该区块链资产与该区块链资产的状态进行关联存储。
在实际应用中,上述资产管理方在上述区块链中定义的与上述资产类型对应的资产模型中的资产创建信息,可以包括:针对与上述若干资产属性字段对应的属性值的校验规则;以及,与待创建的区块链资产对应的状态机。
在这种情况下,可以先按照上述资产模型中的针对与上述若干资产属性字段对应的属性值的校验规则,对上述资产创建方提交的与这些资产属性字段对应的属性值进行校验;在校验通过之后,可以按照与该资产类型对应的资产格式,对该资产创建方提交的属性值进行组装,从而可以将组装后的与这些资产属性字段对应的属性值作为在该区块链中创建的区块链资产;后续,可以按照该资产模型中的与待创建的区块链资产对应的状态机,更新与创建的该区块链资产对应的状态,并将该区块链资产与该区块链资产的状态进行关联存储。
继续以前述“应收账款”资产类型为例,如下所示,可以使用声明式编程语言构建用于创建与“应收账款”资产类型对应的资产的资产创建交易:
CALL CREATE StandardAR stdAr{
String idOnChain=“12345”;
String idOffChain=“12345”;
String assetType=“StandardAR”;
Long amount=10000000;
Date validDateUntil=“2021.01.01”;
String financeEnterprise=“企业A”;
String receivablesEnterpsie=“企业B”;
String payableEnterpsie=“企业C”;
}
“StandardAR”为“应收账款”资产类型的类型标识,“stdAr”为该资产模型的模型标识。
上述区块链中的节点设备可以响应于该资产创建交易,在本地的虚拟机中执行该资产创建交易,以运行与该资产创建交易对应的该区块链的原生代码,实现先按照与“应收账款”资产类型对应的资产模型中的校验规则对该资产创建交易中的与资产属性字段对应的属性值进行校验;例如,可以按照“AMOUNT:RULE_GREATER_THAN_ZERO”这一校验规则,校验该资产创建交易中的与“amount”(即余额)字段对应的属性值的是否大于0;并且,按照“VALID_DATE_UNTIL:RULE_GREATER_THAN_30”这一校验规则,校验该资产创建交易中的与“validDateUntil”(即有效期结束日期)字段对应的属性值与当前日期之间的间隔天数是否大于30。
如果校验通过,则可以针对与“应收账款”资产类型对应的资产模型中,使用的与“应收账款”资产类型对应的资产格式中的若干资产属性字段,基于该资产创建交易中包含的与这些资产属性字段对应的属性值,以及与“应收账款”资产类型对应的资产格式,在该区块链中创建与“应收账款”资产类型对应区块链资产;其中,与“应收账款”资产类型对应的资产模型中使用的资产属性字段包括与“应收账款”资产类型对应的资产格式中的所有资产属性字段,即链上标识、链下标识、资产类型、金额、有效期结束日期、金融机构、应收方和应付方;与这些资产属性字段对应的属性值包括:“12345”、“12345”、“StandardAR”、10000000、“2021.01.01”、“企业A”、“企业B”、“企业C”。
除此之外,按照与“应收账款”资产类型对应的资产模型中的与待创建的区块链资产对应的状态机,可将在该区块链中创建的该区块链资产的状态设置为“READY”状态。
在一种实施方式中,还可再进一步地对该区块链支持的交易类型进行扩展,以在该区块链中扩展出一种用于转移区块链资产的资产转移交易,并将该资产转移交易也作为该区块链支持的交易类型。与上述资产管理方对接的资产转移方可将用于转移区块链资产的资产转移交易发布至上述区块链。其中,该资产转移交易可包括待转移的区块链资产的资产标识。
上述区块链中的节点设备在接收到上述资产转移交易时,可响应于该资产转移交易,在本地的虚拟机中执行该资产转移交易,以运行与该资产转移交易对应的该区块链的原生代码,获取该区块链中保存的该资产转移交易中的资产标识对应的区块链资产,并对获取到的该区块链资产进行转移。举例来说,针对在上述区块链中创建的“应收账款”资产类型对应的区块链资产,可将该区块链资产从应付方账户中转移至应收方账户。
在另一种实施方式中,上述资产管理方可以预先在上述区块链上部署与资产相关的智能合约;与上述资产管理方对接的资产转移方可以将用于调用该智能合约的合约调用交易发布至该区块链。该合约调用交易可以包括待转移的区块链资产的资产标识。
上述区块链中的节点设备在接收到上述合约调用交易时,可以响应于该合约调用交易,调用上述智能合约中的查询逻辑,查询该区块链中保存的与该资产转移交易中的资产标识对应的区块链资产,并在查询到该区块链资产之后,进一步调用该智能合约中的转移逻辑,对查询到的该区块链资产进行转移。
需要说明的是,上述用于转移区块链资产的智能合约,与前述用于创建区块链资产的智能合约,可以是同一个智能合约(即该智能合约的合约代码指示了查询逻辑、创建逻辑、转移逻辑等),也可以是不同的两个智能合约;本说明书对此不作限制。
在上述技术方案中,可以由区块链的运营方在该区块链中定义了目标资产类型和 与该目标资产类型对应的资产格式;该区块链中的节点设备可以在接收到资产管理方发布的属于该区块链支持的交易类型的第一资产定义交易时,在该区块链上保存该第一资产定义交易中的由资产管理方定义的与该目标资产类型对应的资产模型,从而使与该资产管理方对接的资产创建方可以基于保存在该区块链上的该资产模型中的资产创建信息,以及与该目标资产类型对应的资产格式,在该区块链中创建标准化的区块链资产;由于上述区块链的运营方在上述区块链中定义了资产类型,以及与该资产类型对应的资产格式,而接入该区块链的所有资产管理方在该区块链中定义的与该资产类型对应的资产模型,都指示了按照与该资产类型对应的资产格式创建区块链资产,因此对于与其中任一资产管理方对接的资产创建方而言,这些资产创建方在该区块链上创建的与该资产类型对应的区块链资产的资产格式相同,都是由该区块链的运营方在该区块链中定义的与该资产类型对应的资产格式;由此实现了在该区块链中创建标准化的区块链资产,从而便于创建的区块链资产在该区块链上流通。
与前述基于区块链的资产管理方法的实施例相对应,本说明书还提供了基于区块链的资产管理装置的实施例。
本说明书基于区块链的资产管理装置的实施例可以应用在电子设备上。装置实施例可以通过软件实现,也可以通过硬件或者软硬件结合的方式实现。以软件实现为例,作为一个逻辑意义上的装置,是通过其所在电子设备的处理器将非易失性存储器中对应的计算机程序指令读取到内存中运行形成的。从硬件层面而言,如图4所示,为本说明书基于区块链的资产管理装置所在电子设备的一种硬件结构图,除了图4所示的处理器、内存、网络接口、以及非易失性存储器之外,实施例中装置所在的电子设备通常根据该基于区块链的资产管理的实际功能,还可以包括其他硬件,对此不再赘述。
请参考图5,图5是本说明书一示例性实施例示出的一种基于区块链的资产管理装置的框图。该基于区块链的资产管理装置50可以应用于如图4所示的电子设备,该电子设备可以作为区块链中的节点设备;其中,所述区块链支持的交易类型包括用于定义资产模型的第一资产定义交易;所述区块链的运营方在所述区块链中定义了资产类型和与所述资产类型对应的资产格式;该基于区块链的资产管理装置50可以包括:第一接收模块501,接收接入所述区块链的资产管理方发布的所述第一资产定义交易;其中,所述第一资产定义交易包括所述资产管理方定义的与目标资产类型对应的资产模型;所述资产模型包括与所述目标资产类型对应的资产创建信息;第一定义模块502,响应于所述第一资产定义交易,在所述区块链上保存所述资产模型,以使与所述资产管理方对接的资产创建方基于所述资产模型中的资产创建信息,以及与所述目标资产类型对应的资产格式,在所述区块链中创建标准化的区块链资产。
在本实施例中,所述区块链支持的交易类型还包括用于定义资产类型的第二资产定义交易;所述装置50还包括:第二接收模块503,接收所述运营方发布的所述第二资产定义交易;其中,所述第二资产定义交易包括所述运营方定义的所述目标资产类型和与所述目标资产类型对应的资产格式;第二定义模块504,响应于所述第二资产定义交易,在所述区块链上保存所述目标资产类型和与所述目标资产类型对应的资产格式。
在本实施例中,所述第一定义模块502:将所述资产模型,以key-value键值对的形式,保存至所述区块链的Merkle状态树中;所述第二定义模块504:将所述目标资产类型和与所述目标资产类型对应的资产格式,以key-value键值对的形式,保存至所述区块链的Merkle状态树中。
在本实施例中,所述区块链支持的交易类型还包括用于创建与所述目标资产类型对应的资产的资产创建交易;所述装置50还包括:第三接收模块505,接收所述资产管理方对接的资产创建方发送的资产创建交易;其中,所述资产创建交易包括所述目标资产类型的类型标识;第一创建模块506,响应于所述资产创建交易,获取所述区块链保存的与所述类型标识指示的所述目标资产类型对应的资产格式,以及与所述目标资产类 型对应的资产模型,并基于所述资产模型中的资产创建信息,以及与所述目标资产类型对应的资产格式,在所述区块链中创建标准化的区块链资产。
所述资产管理方可在所述区块链上部署了与资产相关的智能合约;所述装置50还可包括:第四接收模块507,接收所述资产管理方对接的资产创建方发送的合约调用交易,所述合约调用交易包括所述目标资产类型的类型标识;第二创建模块508,响应于所述合约调用交易调用所述智能合约中的查询逻辑,查询所述区块链保存的与所述类型标识指示的所述目标资产类型对应的资产格式以及与所述目标资产类型对应的资产模型,并在查询到与所述目标资产类型对应的资产格式和与所述目标资产类型对应的资产模型后,进一步调用所述智能合约中的创建逻辑,基于所述资产模型中的资产创建信息以及与所述目标资产类型对应的资产格式,在所述区块链中创建标准化的区块链资产。
在本实施例中,所述资产创建信息包括资产属性信息;所述创建模块506或508:基于所述资产模型中的资产属性信息,以及与所述目标资产类型对应的资产格式,在所述区块链中创建标准化的区块链资产。
在本实施例中,所述资产格式包括若干资产属性字段;所述资产创建交易或者所述合约调用交易包括所述资产创建方提交的与所述若干资产属性字段对应的属性值;所述资产创建信息包括针对与所述若干资产属性字段对应的属性值的校验规则;所述创建模块506或508:基于所述资产模型中的校验规则对所述资产创建方提交的与所述若干资产属性字段对应的属性值进行校验;如果校验通过,则进一步基于所述属性值,以及与所述目标资产类型对应的资产格式,在所述区块链中创建标准化的区块链资产。
在本实施例中,所述资产创建信息包括与所述区块链资产对应的状态机;所述创建模块506或508:在所述区块链中创建标准化的区块链资产之后,基于所述资产模型中的状态机,更新与所述区块链资产对应的资产状态。
在本实施例中,所述区块链支持的交易类型还包括用于转移所述区块链资产的资产转移交易;所述装置50还包括:第五接收模块509,接收所述资产管理方对接的资产转移方发送的资产转移交易;其中,所述资产转移交易包括待转移的区块链资产的资产标识;第一转移模块510,响应于所述资产转移交易,获取所述区块链保存的与所述资产标识对应的所述区块链资产,并对与所述资产标识对应的区块链资产进行资产转移。
在本实施例中,所述资产管理方在所述区块链上部署了与资产相关的智能合约;所述装置50还包括:第六接收模块511,接收所述资产管理方对接的资产转移方发送的合约调用交易;其中,所述合约调用交易包括所述区块链资产的资产标识;第二转移模块512,响应于所述合约调用交易,调用所述智能合约中的查询逻辑,查询所述区块链保存的与所述资产标识对应的所述区块链资产,并在查询到与所述资产标识对应的区块链资产后,进一步调用所述智能合约中的转移逻辑,对与所述资产标识对应的区块链资产进行资产转移。
所述资产类型和与所述资产类型对应的资产格式可由所述运营方基于通用编程语言在所述区块链中定义;所述资产模型可由所述资产管理方基于所述通用编程语言定义。
所述通用编程语言可包括通用的声明式编程语言。
所述通用的声明式编程语言可包括领域特定语言。
所述运营方可包括区块链服务平台;所述资产管理方包括接入所述区块链服务平台的金融机构;所述资产创建方包括由所述金融机构提供资产服务的用户客户端。
上述装置中各个模块的功能和作用的实现过程具体详见上述方法中对应步骤的实现过程,在此不再赘述。对于装置实施例而言,由于其基本对应于方法实施例,所以相关之处参见方法实施例的部分说明即可。以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的模块可以是或者也可以不是物理上分开的,作为模块显示的部件可以是或者也可以不是物理模块,即可以位于一个地方,或者也可以分布到多个网络模块上。可以根据实际的需要选择其中的部分或者全部模块来实现本说明书方案的目 的。本领域普通技术人员在不付出创造性劳动的情况下,即可以理解并实施。
上述实施例阐明的***、装置、模块或单元,具体可以由计算机芯片或实体实现,或者由具有某种功能的产品来实现。一种典型的实现设备为计算机,计算机的具体形式可以是个人计算机、膝上型计算机、蜂窝电话、相机电话、智能电话、个人数字助理、媒体播放器、导航设备、电子邮件收发设备、游戏控制台、平板计算机、可穿戴设备或者这些设备中的任意几种设备的组合。
在一个典型的配置中,计算机包括一个或多个处理器(CPU)、输入/输出接口、网络接口和内存。内存可能包括计算机可读介质中的非永久性存储器,随机存取存储器(RAM)和/或非易失性内存等形式,如只读存储器(ROM)或闪存(flash RAM)。内存是计算机可读介质的示例。
计算机可读介质包括永久性和非永久性、可移动和非可移动媒体。可由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带、磁盘存储、量子存储器、基于石墨烯的存储介质或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。按照本文中界定,计算机可读介质不包括暂存电脑可读媒体(transitory media),如调制的数据信号和载波。
还需要说明的是,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、商品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、商品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、商品或者设备中还存在另外的相同要素。
上述对本说明书特定实施例进行了描述。其它实施例在所附权利要求书的范围内。在一些情况下,在权利要求书中记载的动作或步骤可以按照不同于实施例中的顺序来执行并且仍然可以实现期望的结果。另外,在附图中描绘的过程不一定要求示出的特定顺序或者连续顺序才能实现期望的结果。在某些实施方式中,多任务处理和并行处理也是可以的或者可能是有利的。
在本说明书一个或多个实施例使用的术语是仅仅出于描述特定实施例的目的,而非旨在限制本说明书一个或多个实施例。在本说明书一个或多个实施例和所附权利要求书中所使用的单数形式的“一种”、“所述”和“该”也旨在包括多数形式,除非上下文清楚地表示其他含义。还应当理解,本文中使用的术语“和/或”是指并包含一个或多个相关联的列出项目的任何或所有可能组合。
应当理解,尽管在本说明书一个或多个实施例可能采用术语第一、第二、第三等来描述各种信息,但这些信息不应限于这些术语。这些术语仅用来将同一类型的信息彼此区分开。例如,在不脱离本说明书一个或多个实施例范围的情况下,第一信息也可以被称为第二信息,类似地,第二信息也可以被称为第一信息。取决于语境,如在此所使用的词语“如果”可以被解释成为“在……时”或“当……时”或“响应于确定”。
以上所述仅为本说明书一个或多个实施例的较佳实施例而已,并不用以限制本说明书一个或多个实施例,凡在本说明书一个或多个实施例的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本说明书一个或多个实施例保护的范围之内。

Claims (28)

  1. 一种基于区块链的资产管理方法,所述方法应用于区块链中的节点设备;其中,所述区块链支持的交易类型包括用于定义资产模型的第一资产定义交易;所述区块链的运营方在所述区块链中定义了资产类型和与所述资产类型对应的资产格式;所述方法包括:
    接收接入所述区块链的资产管理方发布的所述第一资产定义交易;其中,所述第一资产定义交易包括所述资产管理方定义的与目标资产类型对应的资产模型;所述资产模型包括与所述目标资产类型对应的资产创建信息;
    响应于所述第一资产定义交易,在所述区块链上保存所述资产模型,以使与所述资产管理方对接的资产创建方基于所述资产模型中的资产创建信息,以及与所述目标资产类型对应的资产格式,在所述区块链中创建标准化的区块链资产。
  2. 根据权利要求1所述的方法,所述区块链支持的交易类型还包括用于定义资产类型的第二资产定义交易;
    所述方法还包括:
    接收所述运营方发布的所述第二资产定义交易;其中,所述第二资产定义交易包括所述运营方定义的所述目标资产类型和与所述目标资产类型对应的资产格式;
    响应于所述第二资产定义交易,在所述区块链上保存所述目标资产类型和与所述目标资产类型对应的资产格式。
  3. 根据权利要求2所述的方法,所述在所述区块链上保存所述资产模型,包括:
    将所述资产模型,以key-value键值对的形式保存至所述区块链的Merkle状态树中;
    所述在所述区块链上保存所述目标资产类型和与所述目标资产类型对应的资产格式,包括:
    将所述目标资产类型和与所述目标资产类型对应的资产格式,以key-value键值对的形式,保存至所述区块链的Merkle状态树中。
  4. 根据权利要求1所述的方法,所述区块链支持的交易类型还包括用于创建与所述目标资产类型对应的资产的资产创建交易;
    所述方法还包括:
    接收所述资产管理方对接的资产创建方发送的资产创建交易;其中,所述资产创建交易包括所述目标资产类型的类型标识;
    响应于所述资产创建交易,获取所述区块链保存的与所述类型标识指示的所述目标资产类型对应的资产格式,以及与所述目标资产类型对应的资产模型,并基于所述资产模型中的资产创建信息,以及与所述目标资产类型对应的资产格式,在所述区块链中创建标准化的区块链资产。
  5. 根据权利要求1所述的方法,所述资产管理方在所述区块链上部署了与资产相关的智能合约;
    所述方法还包括:
    接收所述资产管理方对接的资产创建方发送的合约调用交易;其中,所述合约调用交易包括所述目标资产类型的类型标识;
    响应于所述合约调用交易,调用所述智能合约中的查询逻辑,查询所述区块链保存的与所述类型标识指示的所述目标资产类型对应的资产格式,以及与所述目标资产类型对应的资产模型,并在查询到与所述目标资产类型对应的资产格式和与所述目标资产类型对应的资产模型后,进一步调用所述智能合约中的创建逻辑,基于所述资产模型中的资产创建信息,以及与所述目标资产类型对应的资产格式,在所述区块链中创建标准化的区块链资产。
  6. 根据权利要求4或5所述的方法,所述资产格式包括若干资产属性字段;所述资产创建交易或者所述合约调用交易包括所述资产创建方提交的与所述若干资产属性 字段对应的属性值;所述资产创建信息包括针对与所述若干资产属性字段对应的属性值的校验规则;
    所述基于所述资产模型中的资产创建信息,以及与所述目标资产类型对应的资产格式,在所述区块链中创建标准化的区块链资产,包括:
    基于所述资产模型中的校验规则对所述资产创建方提交的与所述若干资产属性字段对应的属性值进行校验;
    如果校验通过,则进一步基于所述属性值,以及与所述目标资产类型对应的资产格式,在所述区块链中创建标准化的区块链资产。
  7. 根据权利要求4或5所述的方法,所述资产创建信息包括与所述区块链资产对应的状态机;
    所述方法还包括:
    在所述区块链中创建标准化的区块链资产之后,基于所述资产模型中的状态机,更新与所述区块链资产对应的资产状态。
  8. 根据权利要求1所述的方法,所述区块链支持的交易类型还包括用于转移资产的资产转移交易;
    所述方法还包括:
    接收所述资产管理方对接的资产转移方发送的资产转移交易;其中,所述资产转移交易包括待转移的区块链资产的资产标识;
    响应于所述资产转移交易,获取所述区块链保存的与所述资产标识对应的区块链资产,并对与所述资产标识对应的区块链资产进行资产转移。
  9. 根据权利要求1所述的方法,所述资产管理方在所述区块链上部署了与资产相关的智能合约;
    所述方法还包括:
    接收所述资产管理方对接的资产转移方发送的合约调用交易;其中,所述合约调用交易包括所述区块链资产的资产标识;
    响应于所述合约调用交易,调用所述智能合约中的查询逻辑,查询所述区块链保存的与所述资产标识对应的区块链资产,并在查询到与所述资产标识对应的区块链资产后,进一步调用所述智能合约中的转移逻辑,对与所述资产标识对应的区块链资产进行资产转移。
  10. 根据权利要求1所述的方法,所述资产类型和与所述资产类型对应的资产格式由所述运营方基于通用编程语言在所述区块链中定义;所述资产模型由所述资产管理方基于所述通用编程语言定义。
  11. 根据权利要求10所述的方法,所述通用编程语言包括通用的声明式编程语言。
  12. 根据权利要求11所述的方法,所述通用的声明式编程语言包括领域特定语言。
  13. 根据权利要求1所述的方法,所述运营方包括区块链服务平台;所述资产管理方包括接入所述区块链服务平台的金融机构;所述资产创建方包括由所述金融机构提供资产服务的用户客户端。
  14. 一种基于区块链的资产管理装置,所述装置应用于区块链中的节点设备;其中,所述区块链支持的交易类型包括用于定义资产模型的第一资产定义交易;所述区块链的运营方在所述区块链中定义资产类型和与所述资产类型对应的资产格式;所述装置包括:
    第一接收模块,接收接入所述区块链的资产管理方发布的所述第一资产定义交易;其中,所述第一资产定义交易包括所述资产管理方定义的与目标资产类型对应的资产模型;所述资产模型包括与所述目标资产类型对应的资产创建信息;
    第一定义模块,响应于所述第一资产定义交易,在所述区块链上保存所述资产模型,以使与所述资产管理方对接的资产创建方基于所述资产模型中的资产创建信息,以及与所述目标资产类型对应的资产格式,在所述区块链中创建标准化的区块链资产。
  15. 根据权利要求14所述的装置,所述区块链支持的交易类型还包括用于定义资产类型的第二资产定义交易;
    所述装置还包括:
    第二接收模块,接收所述运营方发布的所述第二资产定义交易;其中,所述第二资产定义交易包括所述运营方定义的所述目标资产类型和与所述目标资产类型对应的资产格式;
    第二定义模块,响应于所述第二资产定义交易,在所述区块链上保存所述目标资产类型和与所述目标资产类型对应的资产格式。
  16. 根据权利要求15所述的装置,所述第一定义模块:
    将所述资产模型,以key-value键值对的形式保存至所述区块链的Merkle状态树中;
    所述第二定义模块:
    将所述目标资产类型和与所述目标资产类型对应的资产格式,以key-value键值对的形式,保存至所述区块链的Merkle状态树中。
  17. 根据权利要求14所述的装置,所述区块链支持的交易类型还包括用于创建与所述目标资产类型对应的资产的资产创建交易;
    所述装置还包括:
    第三接收模块,接收所述资产管理方对接的资产创建方发送的资产创建交易;其中,所述资产创建交易包括所述目标资产类型的类型标识;
    第一创建模块,响应于所述资产创建交易,获取所述区块链保存的与所述类型标识指示的所述目标资产类型对应的资产格式,以及与所述目标资产类型对应的资产模型,并基于所述资产模型中的资产创建信息,以及与所述目标资产类型对应的资产格式,在所述区块链中创建标准化的区块链资产。
  18. 根据权利要求14所述的装置,所述资产管理方在所述区块链上部署了与资产相关的智能合约;
    所述装置还包括:
    第四接收模块,接收所述资产管理方对接的资产创建方发送的合约调用交易;其中,所述合约调用交易包括所述目标资产类型的类型标识;
    第二创建模块,响应于所述合约调用交易,调用所述智能合约中的查询逻辑,查询所述区块链保存的与所述类型标识指示的所述目标资产类型对应的资产格式,以及与所述目标资产类型对应的资产模型,并在查询到与所述目标资产类型对应的资产格式和与所述目标资产类型对应的资产模型后,进一步调用所述智能合约中的创建逻辑,基于所述资产模型中的资产创建信息,以及与所述目标资产类型对应的资产格式,在所述区块链中创建标准化的区块链资产。
  19. 根据权利要求17或18所述的装置,所述资产格式包括若干资产属性字段;所述资产创建交易或者所述合约调用交易包括所述资产创建方提交的与所述若干资产属性字段对应的属性值;所述资产创建信息包括针对与所述若干资产属性字段对应的属性值的校验规则;
    所述创建模块:
    基于所述资产模型中的校验规则对所述资产创建方提交的与所述若干资产属性字段对应的属性值进行校验;
    如果校验通过,则进一步基于所述属性值,以及与所述目标资产类型对应的资产格式,在所述区块链中创建标准化的区块链资产。
  20. 根据权利要求17或18所述的装置,所述资产创建信息包括与所述区块链资产对应的状态机;
    所述创建模块:
    在所述区块链中创建标准化的区块链资产之后,基于所述资产模型中的状态机,更 新与所述区块链资产对应的资产状态。
  21. 根据权利要求14所述的装置,所述区块链支持的交易类型还包括用于转移资产的资产转移交易;
    所述装置还包括:
    第五接收模块,接收所述资产管理方对接的资产转移方发送的资产转移交易;其中,所述资产转移交易包括待转移的区块链资产的资产标识;
    第一转移模块,响应于所述资产转移交易,获取所述区块链保存的与所述资产标识对应的所述区块链资产,并对与所述资产标识对应的区块链资产进行资产转移。
  22. 根据权利要求14所述的装置,所述资产管理方在所述区块链上部署了与资产相关的智能合约;
    所述装置还包括:
    第六接收模块,接收所述资产管理方对接的资产转移方发送的合约调用交易;其中,所述合约调用交易包括所述区块链资产的资产标识;
    第二转移模块,响应于所述合约调用交易,调用所述智能合约中的查询逻辑,查询所述区块链保存的与所述资产标识对应的所述区块链资产,并在查询到与所述资产标识对应的区块链资产后,进一步调用所述智能合约中的转移逻辑,对与所述资产标识对应的区块链资产进行资产转移。
  23. 根据权利要求14所述的装置,所述资产类型和与所述资产类型对应的资产格式由所述运营方基于通用编程语言在所述区块链中定义;所述资产模型由所述资产管理方基于所述通用编程语言定义。
  24. 根据权利要求23所述的装置,所述通用编程语言包括通用的声明式编程语言。
  25. 根据权利要求24所述的装置,所述通用的声明式编程语言包括领域特定语言。
  26. 根据权利要求14所述的装置,所述运营方包括区块链服务平台;所述资产管理方包括接入所述区块链服务平台的金融机构;所述资产创建方包括由所述金融机构提供资产服务的用户客户端。
  27. 一种电子设备,包括:
    处理器;
    用于存储处理器可执行指令的存储器;
    其中,所述处理器通过运行所述可执行指令以实现如权利要求1至13中任一项所述的方法。
  28. 一种计算机可读存储介质,其上存储有计算机指令,该指令被处理器执行时实现如权利要求1至13中任一项所述的方法。
PCT/CN2022/076779 2021-03-30 2022-02-18 基于区块链的资产管理 WO2022206209A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110343358.4A CN113095824B (zh) 2021-03-30 2021-03-30 基于区块链的资产管理方法、装置及电子设备
CN202110343358.4 2021-03-30

Publications (1)

Publication Number Publication Date
WO2022206209A1 true WO2022206209A1 (zh) 2022-10-06

Family

ID=76671336

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/076779 WO2022206209A1 (zh) 2021-03-30 2022-02-18 基于区块链的资产管理

Country Status (2)

Country Link
CN (1) CN113095824B (zh)
WO (1) WO2022206209A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113095824B (zh) * 2021-03-30 2022-05-31 支付宝(杭州)信息技术有限公司 基于区块链的资产管理方法、装置及电子设备

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106815764A (zh) * 2017-01-18 2017-06-09 中钞***产业发展有限公司北京智能卡技术研究院 一种基于联盟链的数字资产的管理方法及***
US20170206523A1 (en) * 2015-11-06 2017-07-20 Cable Television Laboratories, Inc Systems and methods for digital asset security ecosystems
CN108416675A (zh) * 2018-02-14 2018-08-17 阿里巴巴集团控股有限公司 资产管理方法及装置、电子设备
CN109242675A (zh) * 2018-07-27 2019-01-18 阿里巴巴集团控股有限公司 基于区块链的资产发布方法及装置、电子设备
CN110147987A (zh) * 2019-05-23 2019-08-20 北京亿生生网络科技有限公司 基于区块链的动态资产管理方法及装置
WO2019161023A1 (en) * 2018-02-14 2019-08-22 Alibaba Group Holding Limited Asset management method and apparatus, and electronic device
CN110766550A (zh) * 2019-09-05 2020-02-07 阿里巴巴集团控股有限公司 基于区块链的资产查询方法及装置、电子设备
CN112308553A (zh) * 2020-09-16 2021-02-02 电子科技大学 一种基于区块链的数字资产分类管理方法
CN113095824A (zh) * 2021-03-30 2021-07-09 支付宝(杭州)信息技术有限公司 基于区块链的资产管理方法、装置及电子设备

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108335206B (zh) * 2018-02-14 2020-12-22 创新先进技术有限公司 资产管理方法及装置、电子设备
CN108711104A (zh) * 2018-05-09 2018-10-26 北京磁云数字科技有限公司 基于区块链的实物资产信息流转方法、装置和设备
CN110020936B (zh) * 2019-01-03 2021-04-27 创新先进技术有限公司 基于区块链的资产管理方法及装置、电子设备
US10937096B2 (en) * 2019-07-15 2021-03-02 Advanced New Technologies Co., Ltd. Transaction processing in a service blockchain
CN110648123A (zh) * 2019-09-11 2020-01-03 杭州秘猿科技有限公司 一种数字资产的构建方法、装置及电子设备
CN110910000A (zh) * 2019-11-14 2020-03-24 腾讯科技(深圳)有限公司 一种区块链资产管理方法和装置
CN111340628A (zh) * 2020-03-13 2020-06-26 普洛斯科技(重庆)有限公司 基于区块链的资产信息管理方法和装置
CN111738738A (zh) * 2020-07-31 2020-10-02 支付宝(杭州)信息技术有限公司 基于区块链的生物资产对象管理方法及装置
CN112200568B (zh) * 2020-10-09 2022-05-13 支付宝(杭州)信息技术有限公司 基于区块链的账户创建方法、装置及电子设备

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170206523A1 (en) * 2015-11-06 2017-07-20 Cable Television Laboratories, Inc Systems and methods for digital asset security ecosystems
CN106815764A (zh) * 2017-01-18 2017-06-09 中钞***产业发展有限公司北京智能卡技术研究院 一种基于联盟链的数字资产的管理方法及***
CN108416675A (zh) * 2018-02-14 2018-08-17 阿里巴巴集团控股有限公司 资产管理方法及装置、电子设备
WO2019161023A1 (en) * 2018-02-14 2019-08-22 Alibaba Group Holding Limited Asset management method and apparatus, and electronic device
CN109242675A (zh) * 2018-07-27 2019-01-18 阿里巴巴集团控股有限公司 基于区块链的资产发布方法及装置、电子设备
CN110147987A (zh) * 2019-05-23 2019-08-20 北京亿生生网络科技有限公司 基于区块链的动态资产管理方法及装置
CN110766550A (zh) * 2019-09-05 2020-02-07 阿里巴巴集团控股有限公司 基于区块链的资产查询方法及装置、电子设备
CN112308553A (zh) * 2020-09-16 2021-02-02 电子科技大学 一种基于区块链的数字资产分类管理方法
CN113095824A (zh) * 2021-03-30 2021-07-09 支付宝(杭州)信息技术有限公司 基于区块链的资产管理方法、装置及电子设备

Also Published As

Publication number Publication date
CN113095824A (zh) 2021-07-09
CN113095824B (zh) 2022-05-31

Similar Documents

Publication Publication Date Title
US20230004537A1 (en) Extracting data from a blockchain network
CN110471984B (zh) 基于区块链的业务处理方法及装置、电子设备
US20200252205A1 (en) Systems, methods, and apparatuses for implementing a multi tenant blockchain platform for managing einstein platform decisions using distributed ledger technology (dlt)
US11728992B2 (en) Cryptlet binding key graph
US10740455B2 (en) Encave pool management
US11176246B2 (en) Enclave pool shared key
EP3622662B1 (en) Cryptlet smart contract
US11853291B2 (en) Privacy preserving architecture for permissioned blockchains
US20190116174A1 (en) Selecting and securing proof delgates for cryptographic functions
CN110458631B (zh) 基于区块链的票据号码分配方法、装置及电子设备
US10664591B2 (en) Enclave pools
US11397919B1 (en) Electronic agreement data management architecture with blockchain distributed ledger
WO2022206210A1 (zh) 基于区块链的资产管理
CN110738566A (zh) 一种基于区块链的资产筛选方法、装置及电子设备
CN111327613B (zh) 分布式服务的权限控制方法、装置及计算机可读存储介质
WO2022077186A1 (zh) 区块链中智能合约的执行方法及装置和电子设备
US20210256012A1 (en) Methods and apparatuses for reading and updating data structures, and electronic devices
CN112883109B (zh) 基于区块链的数字商品交易方法和装置
CN110032598A (zh) 字段更新方法及装置、电子设备
US20220121466A1 (en) System and method for facilitating participation in a blockchain environment
WO2020112029A1 (en) System and method for facilitating participation in a blockchain environment
Evermann et al. Workflow management on proof-of-work blockchains: Implications and recommendations
Garcia Bringas et al. BlockChain platforms in financial services: current perspective
WO2022206209A1 (zh) 基于区块链的资产管理
CN113762939A (zh) 基于区块链的资产管理方法、装置及电子设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22778394

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 22778394

Country of ref document: EP

Kind code of ref document: A1