Asset transaction method and device, medium and electronic equipment

By assigning a unique account address in the blockchain network for each transaction order and disassociating the relationship, the problem of low asset transaction efficiency in C2B transactions in the blockchain network is solved, and a more efficient and secure asset transaction process is achieved.

CN118536993APending Publication Date: 2024-08-23TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310206679.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-02-23
Publication Date
2024-08-23

AI Technical Summary

Technical Problem

It is difficult for the blockchain network to associate payment behavior with order flow in C2B transactions, resulting in low asset transaction efficiency, and the payee needs to identify the payer's address identity, which increases data calculation costs.

Method used

By assigning a unique account address held by the business entity to each transaction order, and disassociating the relationship after receiving the virtual assets, closing the transaction order, avoiding mutual interference in the transaction process, and clearly identifying the relationship between asset transfer and order.

Benefits of technology

It improves the efficiency of asset transactions, reduces data calculation costs, and enhances the security and information privacy of asset transactions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118536993A
    Figure CN118536993A
Patent Text Reader

Abstract

The invention belongs to the technical field of block chains, and particularly relates to an asset transaction method, an asset transaction device, a computer readable medium, electronic equipment and a computer program product. The method comprises the steps that one or more transaction orders used for carrying out asset transaction with a business subject are acquired, multiple account addresses associated with a main account held by the business subject are acquired, and a key of each account address is obtained by mapping a main key corresponding to the main account; distributing an account address for the transaction order; wherein different account addresses are allocated to different transaction orders; and if the account address receives the virtual assets corresponding to the transaction order, releasing the association relationship between the account address and the transaction order, and closing the transaction order. According to the embodiment of the invention, the asset transaction efficiency can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of blockchain technology, and specifically relates to an asset trading method, an asset trading device, a computer-readable medium, an electronic device, and a computer program product. Background Art

[0002] The blockchain network can be used as a payment gateway. The native payment capabilities of the blockchain network are usually only suitable for C2C (customer to customer) transfers. In the C2B (customer to business) process, it is difficult to associate a payment behavior with a specific order flow. If the payee only maintains one payment account address, the payee's address identity must be identified first, as well as which assets this payment corresponds to, resulting in low efficiency in asset transactions. Summary of the invention

[0003] The present application provides an asset trading method, an asset trading device, a computer-readable medium, an electronic device, and a computer program product, the purpose of which is to improve the efficiency of asset trading.

[0004] Other features and advantages of the present application will become apparent from the following detailed description, or may be learned in part by the practice of the present application.

[0005] According to one aspect of an embodiment of the present application, there is provided an asset trading method, the method comprising:

[0006] Obtain one or more transaction orders for asset transactions with a business subject, and obtain multiple account addresses associated with a primary account held by the business subject, where the key of each account address is mapped from a master key corresponding to the primary account;

[0007] Allocating the account address to the transaction order; wherein different transaction orders are allocated different account addresses;

[0008] If the account address receives the virtual assets corresponding to the transaction order, the association between the account address and the transaction order is released, and the transaction order is closed.

[0009] According to one aspect of an embodiment of the present application, there is provided an asset trading device, the device comprising:

[0010] An acquisition module is configured to acquire one or more transaction orders for asset transactions with a business subject, and acquire multiple account addresses associated with a primary account held by the business subject, wherein a key of each of the account addresses is mapped from a master key corresponding to the primary account;

[0011] an allocation module, configured to allocate the account address to the transaction order; wherein different transaction orders are allocated different account addresses;

[0012] The release module is configured to release the association between the account address and the transaction order and close the transaction order if the account address receives the virtual assets corresponding to the transaction order.

[0013] In some embodiments of the present application, based on the above technical solution, the allocation module may further include:

[0014] An address pool acquisition module is configured to acquire an address pool to be allocated held by the business subject, wherein the address pool to be allocated is used to maintain multiple account addresses associated with a primary account held by the business subject;

[0015] The address association module is configured to select an account address from the to-be-allocated address pool and associate the selected account address with the transaction order.

[0016] In some embodiments of the present application, based on the above technical solution, the asset trading device further includes:

[0017] The first transfer module is configured to transfer the account address associated with the transaction order from the to-be-allocated address pool to the to-be-traded address pool, where the to-be-traded address pool is used to maintain account addresses waiting to receive virtual assets.

[0018] In some embodiments of the present application, based on the above technical solution, the asset trading device further includes:

[0019] The second transfer module is configured to transfer the account address from the to-be-traded address pool to the traded address pool if the account address receives the virtual asset corresponding to the transaction order, and the traded address pool is used to maintain the account address that has completed the virtual asset reception.

[0020] In some embodiments of the present application, based on the above technical solution, the asset trading device further includes:

[0021] The third transfer module is configured to transfer the virtual assets in the account address to the collection account address held by the business entity; and transfer the account address from the traded address pool to the to-be-allocated address pool.

[0022] In some embodiments of the present application, based on the above technical solution, the asset trading device further includes:

[0023] A first detection module is configured to detect whether the account address receives the virtual assets corresponding to the transaction order within a specified period of time;

[0024] The release module is configured to release the association between the account address and the transaction order and close the transaction order if the account address does not receive the virtual asset corresponding to the transaction order within the specified time period.

[0025] In some embodiments of the present application, based on the above technical solution, the asset trading device further includes:

[0026] The fourth transfer module is configured to transfer the virtual assets stored in the account address to the collection account address held by the business entity, and transfer the account address from the address pool to be traded to the address pool to be allocated.

[0027] In some embodiments of the present application, based on the above technical solution, the acquisition module can be further configured to: obtain a master key corresponding to the main account held by the business entity; use different mapping parameters to map the master key respectively to obtain multiple sub-keys; perform hash operations on the multiple sub-keys respectively to obtain multiple account addresses; and associate the multiple account addresses to the main account.

[0028] In some embodiments of the present application, based on the above technical solution, the acquisition module can be further configured to: form an address pool to be allocated by combining the multiple account addresses associated with the primary account; detect the number of account addresses in the address pool to be allocated in real time; if the number of addresses is less than the number threshold, add a new account address to the address pool to be allocated.

[0029] In some embodiments of the present application, based on the above technical solution, the acquisition module may further include:

[0030] A parsing module, configured to parse one or more transaction requests triggered by a transaction object to obtain the type of asset to be traded;

[0031] The creation module is configured to create one or more transaction orders for the business subject to conduct asset transactions with the transaction object if the asset type is a virtual asset.

[0032] In some embodiments of the present application, based on the above technical solution, the asset trading device further includes:

[0033] The sending module is configured to send the account address allocated to the transaction order to the transaction object corresponding to the transaction order.

[0034] In some embodiments of the present application, based on the above technical solution, the account address allocated to the transaction order is an account with zero amount of virtual assets.

[0035] According to one aspect of an embodiment of the present application, a computer-readable medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the asset trading method in the above technical solution is implemented.

[0036] According to one aspect of an embodiment of the present application, an electronic device is provided, comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute the executable instructions to implement the asset trading method in the above technical solution.

[0037] According to one aspect of an embodiment of the present application, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the asset trading method in the above technical solution is implemented.

[0038] In the technical solution provided in the embodiment of the present application, after obtaining one or more transaction orders for asset transactions with a business entity, different account addresses held by the business entity can be assigned to different transaction orders respectively; if an account address receives a virtual asset corresponding to a transaction order, the association between the account address and the transaction order is released, and the transaction order is closed. By assigning a unique account address to each transaction order, the embodiment of the present application can avoid mutual interference in the transaction process of multiple transaction orders, and can clearly identify the corresponding relationship between each asset transfer and each transaction order, thereby improving the efficiency of asset transactions and reducing the data calculation cost in the asset transaction process.

[0039] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] The drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present application, and together with the specification are used to explain the principles of the present application. Obviously, the drawings described below are only some embodiments of the present application, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0041] Figure 1 A schematic diagram of the composition of the blockchain system in an embodiment of the present application is shown.

[0042] Figure 2 The component structure of the blockchain maintained on the blockchain network is shown.

[0043] Figure 3 The network architecture of the blockchain network using the technical solution of the present application is schematically shown.

[0044] Figure 4 A schematic diagram of a scenario of virtual asset transactions via a blockchain network is shown.

[0045] Figure 5 A flowchart of the steps of an asset trading method in one embodiment of the present application is shown.

[0046] Figure 6 A flow chart of a method for executing asset transactions according to asset types in one embodiment of the present application is shown.

[0047] Figure 7 A flow chart of a method for transferring assets by managing account addresses using an address pool in one embodiment of the present application is shown.

[0048] Figure 8 An interactive flow chart of asset transactions in a commodity purchase application scenario according to an embodiment of the present application is shown.

[0049] Fig. 9 The account address tree created in one embodiment of the present application is shown.

[0050] Fig.10 A schematic diagram showing account management in an application scenario in an embodiment of the present application is shown.

[0051] Fig.11 The structural block diagram of the asset trading device provided in the embodiment of the present application is schematically shown.

[0052] Fig.12 The structure block diagram of a computer system suitable for implementing an electronic device of an embodiment of the present application is schematically shown. DETAILED DESCRIPTION

[0053] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this application will be more comprehensive and complete and fully convey the concept of the example embodiments to those skilled in the art.

[0054] In addition, described feature, structure or characteristic can be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present application. However, those skilled in the art will appreciate that the technical scheme of the present application can be put into practice without one or more of the specific details, or other methods, components, devices, steps, etc. can be adopted. In other cases, known methods, devices, realizations or operations are not shown or described in detail to avoid blurring the various aspects of the application.

[0055] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities may be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.

[0056] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps can be decomposed, and some operations / steps can be combined or partially combined, so the actual execution order may change according to actual conditions.

[0057] In the specific implementation of this application, data related to the user's asset account or asset transaction is involved. When the various embodiments of this application are applied to specific products or technologies, the user's permission or consent is required, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions.

[0058] Blockchain is a shared digital ledger with a chained-block data structure that is anti-counterfeiting, anti-tampering and traceable, built through transparent and trusted rules in a peer-to-peer network environment. The block-chain data structure is a data structure that stores transactions that occur over a period of time in blocks and connects the blocks into a chain in chronological order using a cryptographic algorithm. The ledger is distributed to all member nodes in the network, and the history of asset transactions that occur between peer nodes in the network is permanently recorded in a sequential chain of blocks linked by a hash cryptographic algorithm. All confirmed and proven transactions are linked from the beginning of the chain to the latest block, hence the name blockchain. The blockchain can act as a single source of truth, and members in the blockchain network can only view transactions that are relevant to them.

[0059] Blockchain is generally divided into three types: public chain, private chain and consortium chain. Among them, the public chain has the highest degree of decentralization. Nodes / participants who join the public chain can read the data on the chain, publish transactions, and compete for the right to record new blocks, etc. Moreover, each node / participant can freely join and exit the public chain. On the contrary, the private chain's accounting authority is controlled by a certain organization or institution, and the data reading authority is also controlled by the organization or institution. There are few participants and they cannot join the private chain at will. They must be reviewed by the organization or institution. Consortium chain, also known as community blockchain, refers to a blockchain whose consensus process is controlled by pre-selected nodes. It is a mixture of public chain and private chain, which can achieve "partial decentralization". Each node on the chain usually has a corresponding entity or organization; participants join the network through authorization and form a stakeholder alliance to jointly maintain the operation of the blockchain. Through the consortium chain, new participants can join the established blockchain and share data without having to build it from scratch. Whether it is a public chain, a private chain or a consortium chain, it may provide the function of smart contracts. Smart contracts on the blockchain are contracts that can be triggered and executed by transactions on the blockchain system. Smart contracts can be defined in the form of code. Smart contract: also known as chaincode or application code, is a computer protocol designed to propagate, verify or execute contracts in an information-based manner. It is a program deployed in the nodes of the blockchain network, carrying the business logic of executing transactions and running in an isolated operating environment (such as a container or virtual machine). The contract program automatically executed by each node in the blockchain system according to specific conditions can operate on the data stored on the chain. It is an important way for business entities to interact with the blockchain and use the blockchain to implement business logic. The purpose of smart contracts is to provide a security method that is superior to traditional contracts and reduce other transaction costs associated with contracts. It allows trusted transactions without a third party, and these transactions are traceable and irreversible.

[0060] Figure 1The schematic diagram of the composition of the blockchain system in the embodiment of the present application is shown. The blockchain system 100 may include at least one client 110 and a blockchain network 120, and the blockchain network 120 includes at least one blockchain node 121. The client 110 may be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart wearable device, a smart vehicle device, a smart payment terminal, a facial recognition terminal, and other electronic devices. By installing the corresponding client application, blockchain data services can be provided to users. The blockchain node 121 may be a terminal device or a server. For example, the blockchain node 121 may be an independent physical server, or a server cluster composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms.

[0061] In the blockchain network 120, each blockchain node 121 can receive input information when performing normal work, and maintain shared data in the blockchain network based on the received input information. In order to ensure information intercommunication, there can be information connections between the blockchain nodes 121, and the blockchain nodes 121 can transmit information to each other through the information connection. For example, when any blockchain node 121 in the blockchain network 120 receives input information and broadcasts the input information in the blockchain network 120, other node devices in the blockchain network 120 can obtain the input information according to the consensus algorithm and store the input information as shared data.

[0062] Each blockchain node 121 in the blockchain network 120 has a node identifier corresponding thereto, and each blockchain node 121 in the blockchain network 120 can store the node identifiers of other blockchain nodes in the same blockchain network, so that the generated blocks can be broadcast to other nodes in the blockchain network 120 according to the node identifiers of other blockchain nodes. A node identifier list as shown in Table 1 can be maintained in the blockchain node 121, and the node name and the node identifier are stored in the node identifier list accordingly. Among them, the node identifier can be an IP (Internet Protocol, a protocol for interconnecting networks) address and any other information that can be used to identify the node. Table 1 is a node identifier list taking an IP address as an example.

[0063] Table 1

[0064]

[0065]

[0066] Figure 2The structure of the blockchain maintained on the blockchain network is shown. Figure 2 As shown, the blockchain consists of a plurality of sequentially connected blocks. Whenever new data needs to be written into the blockchain, these data will be aggregated into a newly generated block, and the newly generated block will be linked to the end of the blockchain. The consensus algorithm can ensure that the newly added blocks on each node device 121 are exactly the same. The data of the current block is recorded in the block body of each block, and the hash value (Hash) of the previous block connected to it is saved in its block header. If the transaction data in the previous block changes, the hash value of the current block will also change accordingly. Therefore, the data uploaded to the blockchain network is difficult to be tampered with, which can improve the reliability of shared data.

[0067] Figure 3 The network architecture of the blockchain network using the technical solution of this application is schematically shown. Figure 3 As shown, in an application scenario of virtual asset transactions based on a blockchain network, a business entity 310, a transaction object 320 and an asset transaction platform 330 located in the blockchain network jointly maintain one or more blockchains 340.

[0068] The business subject 310 and the transaction object 320 are blockchain nodes that conduct asset transactions on the blockchain network. For example, they can be blockchain nodes that participate in virtual asset chain transactions on behalf of governments, enterprises, banks or individuals.

[0069] The asset trading platform 330 is a blockchain node that provides trading scenarios for business entities 310 and trading objects 320. To ensure the validity of on-chain transactions of virtual assets, all relevant data in the transaction process can be stored on the blockchain 340. Decentralized data storage can effectively avoid trust crises.

[0070] For example, the asset trading platform 330 can be an online mall built on a blockchain network, the business entity 310 is an online merchant that provides goods for sale to consumers through the asset trading platform 330, and the transaction object 320 is a consumer who purchases goods through the asset trading platform 330.

[0071] Figure 4 The following is a schematic diagram of a scenario in which virtual assets are traded through a blockchain network. Figure 4 As shown, merchant 410 provides goods for sale through the blockchain network. When user 420 purchases goods, he can transfer a specified amount of virtual assets to merchant 410 through the blockchain network. After confirming receipt of the transfer of virtual assets, merchant 410 can send the corresponding goods to user 420.

[0072] In the related technology of this application, if only one user places an order at the same time, it is easy to associate this payment behavior with the order. However, once multiple users make commodity payments in the system at the same time, it is difficult to distinguish these transfer payments from orders. At the same time, the merchant's payment address is directly exposed to the public view of the user, and the user or a third-party organization can easily trace the address on the chain to analyze the merchant's cash flow and daily operations.

[0073] In view of the defects in the above-mentioned related technologies, the payment merchant in the embodiment of the present application can generate a certain number of sub-address accounts based on the main account held by itself, and assign a sub-address account with a balance of zero to each user's order. At this time, there is no need to care about the payment address adopted by the payee. It is only necessary to detect whether the payment account of the order has received the specified order amount within the specified time to determine that the order has been paid. This solution can ensure that the payment merchant uses multiple payment sub-addresses and only needs to maintain one master private key, reducing the risk of multiple account leakage. At the same time, from an external perspective, the sub-addresses are not relevant, and each sub-address corresponds to only one order, and it is impossible to perceive the merchant's other payment operations from the payment. For the payee, there is no need to limit the payment address, and multiple wallets can be selected to pay for an order, or a third party can be requested to pay, which greatly improves the convenience of payment.

[0074] The following is a detailed description of the technical solutions such as the asset trading method, asset trading device, computer-readable medium, electronic device, and computer program product provided in the embodiments of the present application in conjunction with specific implementation methods.

[0075] Figure 5 A flowchart showing the steps of an asset trading method in an embodiment of the present application is shown. The asset trading method can be performed by Figure 1 The client or blockchain node shown is executed, and the asset transaction method executed on the blockchain node is used as an example to illustrate the embodiment of the present application. Figure 5 As shown, the asset trading method may include the following steps S510 to S530.

[0076] S510: Obtain one or more transaction orders for asset transactions with the business subject, and obtain multiple account addresses associated with the primary account held by the business subject, where the key of each account address is mapped from the master key corresponding to the primary account.

[0077] The business subject is the subject that provides asset transactions to users through the blockchain network. For example, it can be a blockchain node that represents the government, enterprise, bank or individual to participate in virtual asset transactions on the blockchain. Taking the application scenario of online transactions of goods as an example, the business subject can be a merchant that provides goods for sale on the online mall. When a user requests to purchase a product, the business subject can generate a transaction order corresponding to the asset transaction, and the transaction order indicates the amount of virtual assets that need to be paid for the purchase of the product.

[0078] In one embodiment of the present application, virtual assets traded on a blockchain network may include two types of unique assets and non-unique assets, and different types of virtual assets may be managed by different protocol standards. Virtual assets may include non-unique assets and unique assets. Non-unique assets have the characteristics of being divisible, computable and replaceable, and can be managed based on a preset first protocol standard. Unique assets have the characteristics of being indivisible, irreplaceable and verifiable. Depending on whether a unique asset is computable, it can be further divided into non-computable unique assets and computable unique assets. Non-computable unique assets can be managed based on a preset second protocol standard, and computable unique assets can be managed based on a preset third protocol standard. The difference between the third protocol standard and the second protocol standard is that non-computable unique assets managed based on the second protocol standard can only exist in one blockchain, while computable unique assets managed based on the third protocol standard can exist in multiple copies on one blockchain at the same time. The asset management method provided in the embodiment of the present application can be applied to different protocol standards in various application scenarios.

[0079] An account address is an address created on a blockchain network that can receive virtual asset transfers. In the embodiments of the present application, the master key corresponding to the main account held by the business entity can be used to map multiple subkeys, and each subkey can generate an account address. For example, when N subkeys are mapped using the master key, N account addresses can be generated accordingly. The N account addresses are all associated with the main account, and the N account addresses are independent of each other and are managed using different subkeys.

[0080] In one embodiment of the present application, a method for obtaining multiple account addresses may include: obtaining a master key corresponding to a primary account held by a business entity; mapping the master key using different mapping parameters to obtain multiple subkeys; performing hash operations on the multiple subkeys to obtain multiple account addresses; and associating the multiple account addresses to the primary account.

[0081] For example, in the embodiment of the present application, the master key and mapping parameters can be input into the key mapping function, and the key mapping function maps the master key and mapping parameters together to obtain the corresponding subkey. Different mapping parameters can be used to map different subkeys. The hash function is used to perform a hash operation on the subkey to obtain a hash value uniquely associated with the subkey, and then some fields are extracted from the hash value as the corresponding account address.

[0082] S520: Allocate an account address to the transaction order; wherein different transaction orders are allocated different account addresses.

[0083] When a business subject obtains a transaction order, a unique account address can be assigned to the transaction order; when a business subject obtains multiple transaction orders, an account address can be assigned to each transaction order, and different account addresses can be assigned to different transaction orders. For example, when a business subject obtains N transaction orders at the same time, the N account addresses held by the business subject can be assigned to the N transaction orders in a one-to-one correspondence.

[0084] In one embodiment of the present application, the account address assigned to the transaction order is an account with zero virtual assets. On the one hand, by assigning an account address with zero virtual assets to the transaction order, when conducting a virtual asset transfer transaction, a unique correspondence can be established between the virtual asset quantity in the account address and the transaction order, simplifying the calculation process of the virtual asset quantity in the transaction process; on the other hand, by assigning an account address with zero virtual assets to the transaction order, it is possible to avoid leaking the asset quantity information of the business subject through transaction tracing of the account address, thereby improving asset security and information security.

[0085] S530: If the account address receives the virtual assets corresponding to the transaction order, the association between the account address and the transaction order is released, and the transaction order is closed.

[0086] Each account address is individually assigned to a transaction order, so that the transfer transaction of virtual assets generated on each account address can be associated with the corresponding transaction order. For example, a transaction order requires the transfer of m virtual assets, and the business entity can individually determine whether the account address associated with the transaction order has received m virtual assets. If the judgment result is that m virtual assets have been received, the association between the account address and the corresponding transaction order can be terminated, and the transaction order can be closed. The transfer of virtual assets involved in different transaction orders will not interfere with each other, and the business entity does not need to identify the correspondence between the virtual assets received in the account address and different transaction orders.

[0087] In the asset transaction method provided in the embodiment of the present application, after obtaining one or more transaction orders for asset transactions with a business entity, different account addresses held by the business entity can be assigned to different transaction orders respectively; if an account address receives a virtual asset corresponding to a transaction order, the association between the account address and the transaction order is released, and the transaction order is closed. By assigning a unique account address to each transaction order, the embodiment of the present application can avoid mutual interference in the transaction process of multiple transaction orders, and can clearly identify the corresponding relationship between each asset transfer and each transaction order, thereby improving the efficiency of asset transactions and reducing the data calculation cost in the asset transaction process.

[0088] Figure 6 A flowchart of a method for executing asset transactions according to asset types in one embodiment of the present application is shown. The method can be performed by Figure 1 The client or blockchain node shown is executed, and the embodiment of the present application takes the asset transaction method executed on the blockchain node as an example for explanation. Figure 6 As shown, the asset transaction method may include the following steps S610 to S640.

[0089] S610: Parse one or more transaction requests triggered by the transaction object to obtain the type of asset to be traded.

[0090] The transaction object is the object of asset transaction with the business subject, for example, it can be a consumer who transfers assets to the business subject through the blockchain network in order to purchase the corresponding goods. A transaction object can trigger one or more transaction requests, where each transaction request can carry the same or different asset types, which can include virtual assets or physical assets. Among them, virtual assets refer to digital assets that do not have a physical form.

[0091] S620: If the asset type is a virtual asset, one or more transaction orders are created for the business subject and the transaction object to conduct asset transactions.

[0092] According to the asset type carried in the transaction request, if the transaction object requests to trade a virtual asset that can be traded through the blockchain network, one or more transaction orders can be created for the business entity and the transaction object to trade the asset, and each transaction order can identify the corresponding quantity of virtual assets that need to be transferred.

[0093] If the transaction object requests to trade other types of assets besides virtual assets, the asset transfer can be carried out through other transaction channels besides the blockchain network accordingly, and the embodiments of the present application do not specifically limit this.

[0094] S630: Acquire multiple account addresses associated with a primary account held by the business subject, where the key of each account address is mapped from a master key corresponding to the primary account.

[0095] S640: Allocate an account address held by the business entity to the transaction order; wherein different transaction orders are allocated different account addresses.

[0096] S650: If the account address receives the virtual assets corresponding to the transaction order, the association between the account address and the transaction order is released, and the transaction order is closed.

[0097] The specific implementation of steps S630 to S650 may refer to the relevant description of steps S510 to S530 in the above embodiment, which will not be repeated here.

[0098] In one embodiment of the present application, after the account address held by the business subject is assigned to the transaction order, the account address assigned to the transaction order can also be sent to the transaction object corresponding to the transaction order. After receiving the account address, the transaction object can transfer the corresponding amount of virtual assets to the account address according to the number of assets identified by the transaction order, or can transfer assets with the help of a third party. By sending the account address to the transaction object, an association relationship between the transaction object, the transaction order and the account address can be established, and point-to-point asset transfer can be realized, thereby improving the efficiency and security of asset transfer.

[0099] Figure 7 A flow chart of a method for transferring assets by managing account addresses using an address pool in one embodiment of the present application is shown. The method can be performed by Figure 1 The client or blockchain node shown is executed, and the embodiment of the present application takes the asset transaction method executed on the blockchain node as an example for explanation. Figure 7 As shown, the asset trading method may include the following steps S710 to S740.

[0100] S710: Obtain one or more transaction orders for conducting asset transactions with the business subject, and obtain multiple account addresses associated with the primary account held by the business subject, where the key of each account address is mapped from the master key corresponding to the primary account.

[0101] S720: Acquire an address pool to be allocated held by the business subject, where the address pool to be allocated is used to maintain multiple account addresses held by the business subject.

[0102] S730: Select an account address from the address pool to be allocated, and associate the selected account address with a transaction order, wherein different transaction orders are associated with different account addresses.

[0103] S740: If the account address receives the virtual assets corresponding to the transaction order, the association between the account address and the transaction order is released, and the transaction order is closed.

[0104] In one embodiment of the present application, a method for obtaining a pool of addresses to be allocated held by a business entity may include: generating multiple subkeys based on a master key held by the business entity; mapping the subkeys to obtain account addresses corresponding to each subkey; and organizing the account addresses into a pool of addresses to be allocated held by the business entity.

[0105] In the embodiment of the present application, a public key can be dispersed into sub-public keys without the participation of a private key, and the dispersed sub-public keys can be authenticated by the dispersed sub-private keys. Each sub-public key can be mapped to an account address.

[0106] In one embodiment of the present application, after the account addresses are grouped into a pool of addresses to be allocated held by the business entity, the number of addresses in the pool of addresses to be allocated can be detected in real time; if the number of addresses is less than the quantity threshold, new account addresses are added to the pool of addresses to be allocated until the number of addresses reaches the quantity threshold. The quantity threshold can be the minimum quantity that can meet the account address allocation requirements obtained by predicting the number of orders in the historical time period. Controlling the number of account addresses in the pool of addresses to be allocated according to the quantity threshold can improve the efficiency of asset transactions and avoid the problem of being unable to conduct asset transactions due to missing account addresses.

[0107] In one embodiment of the present application, after the selected account address is associated with the transaction order, the account address associated with the transaction order can be transferred from the address pool to be allocated to the address pool to be traded, and the address pool to be traded is used to maintain the account address waiting to receive the virtual asset.

[0108] In one embodiment of the present application, after the account address associated with the transaction order is transferred from the address pool to be allocated to the address pool to be traded, if the account address receives the virtual asset corresponding to the transaction order, the account address is transferred from the address pool to be traded to the traded address pool, and the traded address pool is used to maintain the account address that has completed the virtual asset reception.

[0109] In one embodiment of the present application, after the account address is transferred from the address pool to be traded to the address pool that has been traded, the virtual assets in the account address can be transferred to the collection account address held by the business entity; and the account address can be further transferred from the address pool that has been traded to the address pool to be allocated.

[0110] In one embodiment of the present application, after the account address is transferred from the address pool to be allocated to the address pool to be traded, it can be detected whether the account address receives the virtual asset corresponding to the transaction order within the specified time period; if the account address does not receive the virtual asset corresponding to the transaction order within the specified time period, the association between the account address and the transaction order is released, and the transaction order is closed.

[0111] In one embodiment of the present application, if the account address does not receive the virtual assets corresponding to the transaction order within the specified time period, after the association between the account address and the transaction order is released, the virtual assets stored in the account address can be transferred to the collection account address held by the business entity, and the account address can be transferred from the address pool to be traded to the address pool to be allocated.

[0112] The embodiment of the present application utilizes multiple address pools to jointly maintain the account addresses held by the business entity. The account addresses can be transferred between multiple address pools at different progress of asset transactions, thereby improving the utilization and management efficiency of the account addresses.

[0113] The following describes the implementation method of the embodiment of the present application in conjunction with an application scenario of purchasing goods through asset transactions.

[0114] Figure 8 The interactive flow chart of asset transaction in the application scenario of commodity purchase in the embodiment of the present application is shown. Figure 8 As shown, the process of asset transaction between a user and a merchant includes the following steps.

[0115] S801: The user specifies the item to be paid.

[0116] Users select products in the mall, choose virtual assets to pay, and place orders.

[0117] S802: The merchant returns the on-chain address corresponding to the order to the user.

[0118] The merchant creates a product order in the backend and allocates an address with an empty balance from the on-chain address pool to the order.

[0119] S803: The user pays virtual assets to the on-chain address.

[0120] After receiving the payment address, the user needs to transfer the specified balance of virtual assets to the address within the specified time. There is no restriction on the transferor at this time. The user can choose any or multiple wallet addresses for transfer payment, or choose to request a third-party friend to pay for his order.

[0121] S804: The merchant sends the product to the user.

[0122] Merchants need to check the allocated payment sub-address. Once the address receives enough virtual assets, the order can be marked as paid and the merchant will execute the delivery process. The additional assets received will no longer be associated with the order information and can be used as third-party donations.

[0123] At the same time, the order can set a payment timeout. Once the payment timeout is reached, the association between the payment sub-address and the order can be disconnected. If the payment sub-address has received part of the order funds (but less than the order amount) at this time, the merchant can deduct the transfer fee and transfer the remaining virtual assets back to the payment address.

[0124] From the merchant's perspective, since there are different payment orders from multiple users at the same time, merchants need to have multiple payment sub-addresses. Merchants only need to maintain the master key information, and in theory, they can derive an unlimited number of sub-wallet addresses. And add the specified number of sub-addresses to the address pool for unified maintenance.

[0125] Fig. 9 Figure 2 shows an account address tree created in one embodiment of the present application. Fig. 9 As shown, the account address tree includes a main account wallet HDwallet held by the merchant. Taking HDwallet as the root node, the first-level account addresses account 1, accountN and accountS can be derived using the master key information. By continuing to deduce based on the first-level account address, the second-level account address can be obtained.

[0126] Fig.10 A schematic diagram of an embodiment of the present application for account management in an application scenario is shown. Fig.10 As shown, these addresses generated by the master key information are allocated to three address pools: an address pool to be allocated, an address pool to be paid, and a paid address pool.

[0127] The sub-addresses maintained in the pool to be allocated all have zero virtual assets and are not associated with any orders. Newly created sub-addresses are also added to the pool to be allocated. When a user creates an order, a sub-address will be taken from the pool to be allocated and added to the pool of addresses to be paid, and the order will be associated with it.

[0128] The backend needs to continuously detect whether there is a payment record for the sub-address in the address pool to be paid in the blockchain network. If the associated sub-address has not received the specified amount of virtual assets after the order timeout, the order will be closed and the sub-address association will be cancelled. After the assets in the sub-address are transferred, the sub-address will be recovered back to the address pool to be allocated. If the sub-address receives the specified order amount, that is, the user has completed the payment behavior, the association with the sub-address can be removed after the order is marked as paid, and the address can be transferred to the paid address pool. After waiting for the funds to settle, the virtual assets in different paid sub-addresses will be aggregated into a unified merchant address (which can eventually be deposited in a cold wallet). After the virtual assets in the sub-address are cleared again, the sub-address will be recovered back to the address pool to be allocated and used when a new order is generated.

[0129] The embodiment of the present application implements a virtual asset payment solution that supports multiple people and multiple orders at the same time. The solution binds the on-chain payment address to the order, and can obtain the order payment status without sensing the wallet address of the orderer in advance. The embodiment of the present application proposes the concept of forming an address pool with a series of payment sub-addresses. The B-side merchant only needs to rely on a pair of root keys to complete the maintenance and management of the payment sub-address. At the same time, the sub-addresses in the address pool are assigned to different orders, which enables the B-side merchant to support multiple people and multiple orders to pay at the same time, and different orders and payment sub-addresses are not related, ensuring the financial security and privacy of the B-side merchant.

[0130] It should be noted that although the steps of the method in the present application are described in a specific order in the drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps, etc.

[0131] The following introduces an apparatus embodiment of the present application, which can be used to execute the asset trading method in the above-mentioned embodiment of the present application. Fig.11 The structure block diagram of the asset trading device provided in the embodiment of the present application is schematically shown. Fig.11 As shown, the asset trading device 1100 may include:

[0132] An acquisition module 1110 is configured to acquire one or more transaction orders for performing asset transactions with a business entity;

[0133] The allocation module 1120 is configured to allocate an account address held by the business entity to the transaction order; wherein different transaction orders are allocated different account addresses;

[0134] The release module 1130 is configured to release the association between the account address and the transaction order and close the transaction order if the account address receives the virtual assets corresponding to the transaction order.

[0135] In some embodiments of the present application, based on the above technical solution, the allocation module 1120 may further include:

[0136] An address pool acquisition module is configured to acquire an address pool to be allocated held by the business entity, wherein the address pool to be allocated is used to maintain multiple account addresses held by the business entity;

[0137] The address association module is configured to select an account address from the to-be-allocated address pool and associate the selected account address with the transaction order.

[0138] In some embodiments of the present application, based on the above technical solution, the asset trading device 1100 further includes:

[0139] The first transfer module is configured to transfer the account address associated with the transaction order from the to-be-allocated address pool to the to-be-traded address pool, where the to-be-traded address pool is used to maintain account addresses waiting to receive virtual assets.

[0140] In some embodiments of the present application, based on the above technical solution, the asset trading device 1100 further includes:

[0141] The second transfer module is configured to transfer the account address from the to-be-traded address pool to the traded address pool if the account address receives the virtual asset corresponding to the transaction order, and the traded address pool is used to maintain the account address that has completed the virtual asset reception.

[0142] In some embodiments of the present application, based on the above technical solution, the asset trading device 1100 further includes:

[0143] The third transfer module is configured to transfer the virtual assets in the account address to the collection account address held by the business entity; and transfer the account address from the traded address pool to the to-be-allocated address pool.

[0144] In some embodiments of the present application, based on the above technical solution, the asset trading device 1100 further includes:

[0145] A first detection module is configured to detect whether the account address receives the virtual assets corresponding to the transaction order within a specified period of time;

[0146] The release module is configured to release the association between the account address and the transaction order and close the transaction order if the account address does not receive the virtual asset corresponding to the transaction order within the specified time period.

[0147] In some embodiments of the present application, based on the above technical solution, the asset trading device 1100 further includes:

[0148] The fourth transfer module is configured to transfer the virtual assets stored in the account address to the collection account address held by the business entity, and transfer the account address from the address pool to be traded to the address pool to be allocated.

[0149] In some embodiments of the present application, based on the above technical solution, the address pool acquisition module can be further configured to: generate multiple subkeys according to the master key held by the business entity; map the subkeys to obtain account addresses corresponding to each of the subkeys; and organize the account addresses into an address pool to be allocated held by the business entity.

[0150] In some embodiments of the present application, based on the above technical solution, the address pool acquisition module can be further configured to: detect the number of account addresses in the address pool to be allocated in real time; if the number of addresses is less than the number threshold, add a new account address to the address pool to be allocated.

[0151] In some embodiments of the present application, based on the above technical solution, the acquisition module 1110 may further include:

[0152] A parsing module, configured to parse one or more transaction requests triggered by a transaction object to obtain the type of asset to be traded;

[0153] The creation module is configured to create one or more transaction orders for the business subject to conduct asset transactions with the transaction object if the asset type is a virtual asset.

[0154] In some embodiments of the present application, based on the above technical solution, the asset trading device further includes:

[0155] The sending module is configured to send the account address allocated to the transaction order to the transaction object corresponding to the transaction order.

[0156] In some embodiments of the present application, based on the above technical solution, the account address allocated to the transaction order is an account with zero amount of virtual assets.

[0157] The specific details of the asset trading device provided in each embodiment of the present application have been described in detail in the corresponding method embodiment and will not be repeated here.

[0158] Fig.12 The structure block diagram of a computer system for implementing an electronic device according to an embodiment of the present application is schematically shown.

[0159] It should be noted that Fig.12 The computer system 1200 of the electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0160] like Fig.12 As shown, the computer system 1200 includes a central processing unit 1201 (CPU), which can perform various appropriate actions and processes according to the program stored in the read-only memory 1202 (ROM) or the program loaded from the storage part 1208 to the random access memory 1203 (RAM). Various programs and data required for system operation are also stored in the random access memory 1203. The central processing unit 1201, the read-only memory 1202 and the random access memory 1203 are connected to each other through a bus 1204. The input / output interface 1205 (Input / Output interface, i.e., I / O interface) is also connected to the bus 1204.

[0161] The following components are connected to the input / output interface 1205: an input section 1206 including a keyboard, a mouse, etc.; an output section 1207 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 1208 including a hard disk, etc.; and a communication section 1209 including a network interface card such as a LAN card, a modem, etc. The communication section 1209 performs communication processing via a network such as the Internet. A drive 1210 is also connected to the input / output interface 1205 as needed. A removable medium 1211, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 1210 as needed so that a computer program read therefrom is installed into the storage section 1208 as needed.

[0162] In particular, according to an embodiment of the present application, the process described in each method flow chart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer readable medium, and the computer program contains a program code for executing the method shown in the flow chart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 1209, and / or installed from the removable medium 1211. When the computer program is executed by the central processor 1201, various functions defined in the system of the present application are executed.

[0163] It should be noted that the computer-readable medium shown in the embodiment of the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by an instruction execution system, device or device or used in combination with it. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, wherein a computer-readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer readable signal media may also be any computer readable medium other than computer readable storage media, which may send, propagate, or transmit programs for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.

[0164] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the above-mentioned module, program segment or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0165] It should be noted that, although several modules or units of the equipment for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present application, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into being embodied by multiple modules or units.

[0166] Through the description of the above implementation methods, it is easy for those skilled in the art to understand that the example implementation methods described here can be implemented by software or by combining software with necessary hardware. Therefore, the technical solution according to the implementation methods of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a touch terminal, or a network device, etc.) to execute the method according to the implementation methods of the present application.

[0167] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary technical means in the art that are not disclosed in the present application.

[0168] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.

Claims

1. An asset trading method, characterized in that: include: Obtain one or more transaction orders for asset transactions with a business subject, and obtain multiple account addresses associated with a primary account held by the business subject, where the key of each account address is mapped from a master key corresponding to the primary account; Allocating the account address to the transaction order; wherein different transaction orders are allocated different account addresses; If the account address receives the virtual assets corresponding to the transaction order, the association between the account address and the transaction order is released, and the transaction order is closed.

2. The asset transaction method according to claim 1, characterized in that: Allocating the account address to the transaction order includes: Acquire a pool of addresses to be allocated held by the business subject, where the pool of addresses to be allocated is used to maintain multiple account addresses associated with a primary account held by the business subject; An account address is selected from the to-be-allocated address pool, and the selected account address is associated with the transaction order.

3. The asset transaction method according to claim 2, characterized in that: After associating the selected account address with the transaction order, the method further includes: The account address associated with the transaction order is transferred from the to-be-allocated address pool to the to-be-transacted address pool, where the to-be-transacted address pool is used to maintain account addresses waiting to receive virtual assets.

4. The asset transaction method according to claim 3, characterized in that: After transferring the account address associated with the transaction order from the to-be-allocated address pool to the to-be-transacted address pool, the method further includes: If the account address receives the virtual asset corresponding to the transaction order, the account address is transferred from the pending transaction address pool to the transaction address pool, and the transaction address pool is used to maintain the account address that has completed the virtual asset reception.

5. The asset transaction method according to claim 4, characterized in that: After transferring the account address from the pending transaction address pool to the transaction address pool, the method further includes: Transferring the virtual assets in the account address to the collection account address held by the business entity; The account address is transferred from the transaction address pool to the to-be-allocated address pool.

6. The asset transaction method according to claim 3, characterized in that: After transferring the account address from the to-be-allocated address pool to the to-be-transacted address pool, the method further includes: Detecting whether the account address receives the virtual assets corresponding to the transaction order within a specified period of time; If the account address does not receive the virtual asset corresponding to the transaction order within the specified period of time, the association between the account address and the transaction order is terminated, and the transaction order is closed.

7. The asset transaction method according to claim 6, characterized in that: If the account address does not receive the virtual asset corresponding to the transaction order within the specified period, after the association between the account address and the transaction order is removed, the method further includes: The virtual assets stored in the account address are transferred to the collection account address held by the business entity, and the account address is transferred from the address pool to be traded to the address pool to be allocated.

8. The asset transaction method according to claim 1, characterized in that: Obtain multiple account addresses associated with the primary account held by the business subject, including: Obtaining a master key corresponding to a primary account held by the business subject; Using different mapping parameters to map the master key respectively to obtain multiple subkeys; Performing hash operations on the multiple subkeys respectively to obtain multiple account addresses; The plurality of account addresses are associated with the master account.

9. The asset transaction method according to claim 8, characterized in that: After associating the multiple account addresses with the primary account, the method further includes: The multiple account addresses associated with the primary account form an address pool to be allocated; Detecting the number of account addresses in the address pool to be allocated in real time; If the number of addresses is less than the number threshold, a new account address is added to the address pool to be allocated.

10. The asset transaction method according to any one of claims 1 to 9, characterized in that: Obtain one or more transaction orders for asset transactions with business entities, including: Parse one or more transaction requests triggered by the transaction object to obtain the asset type to be traded; If the asset type is a virtual asset, one or more transaction orders are created for the business subject to conduct asset transactions with the transaction object.

11. The asset transaction method according to claim 10, characterized in that: After allocating the account address held by the business subject to the transaction order, the method further includes: The account address allocated for the transaction order is sent to the transaction object corresponding to the transaction order.

12. The asset transaction method according to any one of claims 1 to 9, characterized in that: The account address assigned to the transaction order is an account with zero virtual asset quantity.

13. An asset trading device, characterized in that: include: An acquisition module is configured to acquire one or more transaction orders for asset transactions with a business subject, and acquire multiple account addresses associated with a primary account held by the business subject, wherein a key of each of the account addresses is mapped from a master key corresponding to the primary account; an allocation module, configured to allocate the account address to the transaction order; wherein different transaction orders are allocated different account addresses; The release module is configured to release the association between the account address and the transaction order and close the transaction order if the account address receives the virtual assets corresponding to the transaction order.

14. A computer readable medium, characterized in that The computer-readable medium stores a computer program, and when the computer program is executed by a processor, the asset trading method according to any one of claims 1 to 12 is implemented.

15. An electronic device, characterized in that: include: processor; as well as A memory, configured to store executable instructions of the processor; Wherein, the processor is configured to execute the executable instructions to implement the asset trading method as described in any one of claims 1 to 12.

16. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the asset trading method according to any one of claims 1 to 12 is implemented.