Block chain data processing method and device, equipment and storage medium
Verifying and transferring digital assets through the blockchain network solves the problems of time-consuming and low security in the existing asset custody process, achieving more efficient and secure digital asset custody.
Patent Information
- Application Number
- CN202310423091.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-13
- Publication Date
- 2024-10-18
AI Technical Summary
The existing asset custody process is time-consuming and has low security. Especially when the custody platform is maliciously attacked, the security of digital assets is difficult to guarantee.
Through the blockchain network as a communication gateway between users and custodians, users transfer digital assets to on-chain addresses on the blockchain, and verify and transfer them based on the custody relationship to ensure the security and transparency of asset custody.
It improves the convenience and security of digital asset custody. Even if the custody platform is attacked, the custody record can still be queried from the blockchain to avoid transferring assets to illegal addresses and enhance the protection of digital assets.
Smart Images

Figure CN118798879A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to fields such as blockchain technology, and in particular to a blockchain data processing method, device, equipment and storage medium. Background Art
[0002] In the traditional financial field, custody of assets (i.e., funds or physical objects) often occurs, such as collectibles, large-denomination certificates of deposit, securities, etc., which can be used to realize the storage and value preservation and appreciation of assets with the help of custody platforms. The current asset custody process requires users to open a custody account at the offline store of the custody platform, and then register the assets under the custody account. It can be seen that the asset custody process is time-consuming, and if the custody platform is maliciously attacked, the security of the assets will be relatively low. Summary of the invention
[0003] The embodiments of the present application provide a blockchain data processing method, apparatus, device, and storage medium, which can improve the convenience of digital asset custody and improve the custody security of digital assets.
[0004] On the one hand, an embodiment of the present application provides a blockchain data processing method, including:
[0005] If a custody request for a first digital asset of a first object is received, the first digital asset is transferred to a first on-chain address of the first object in the blockchain; the custody request carries the first object attribute information of the first object;
[0006] If a transfer request is received to transfer the first digital asset to the first escrow address of the escrow party, verifying the escrow relationship between the first object and the escrow party according to the first object attribute information and the second object attribute information of the escrow party carried in the transfer request;
[0007] If it is verified that there is a custody relationship between the first object and the custodian, the first digital asset in the first on-chain address is transferred to the first custody address;
[0008] Based on the first digital asset, the asset custody record of the first object on the blockchain is updated.
[0009] On the one hand, an embodiment of the present application provides a blockchain data processing method, including:
[0010] Generate a transfer request for transferring a first digital asset of a first object to a first escrow address of a custodian; the first digital asset is transferred by a blockchain node to a first on-chain address of the first object in a blockchain;
[0011] The transfer request is sent to the blockchain node; the blockchain node is used to transfer the first digital asset from the first on-chain address to the first custody address when verifying that there is a custody relationship between the custodian and the first object based on the first object attribute information and the second object attribute information, and update the asset custody record of the first object according to the first digital asset; the first object attribute information belongs to the first object, and the second object attribute information belongs to the custodian.
[0012] An embodiment of the present application provides a blockchain data processing device, including:
[0013] A first transfer module, configured to transfer the first digital asset to a first on-chain address of the first object in the blockchain if a custody request for the first digital asset of the first object is received; the custody request carries the first object attribute information of the first object;
[0014] a verification module, configured to verify the custody relationship between the first object and the custodian according to the first object attribute information and the second object attribute information of the custodian carried in the transfer request, if a transfer request for transferring the first digital asset to the first custodian's first custodian address is received;
[0015] A second transfer module, configured to transfer the first digital asset in the first on-chain address to the first escrow address if it is verified that there is an escrow relationship between the first object and the escrow party;
[0016] An updating module is used to update the asset custody record of the first object on the blockchain according to the first digital asset.
[0017] An embodiment of the present application provides a blockchain data processing device, including:
[0018] A generation module, configured to generate a transfer request for transferring a first digital asset of a first object to a first escrow address of a custodian; the first digital asset is transferred from a blockchain node to a first on-chain address of the first object in a blockchain;
[0019] A sending module is used to send the transfer request to the blockchain node; the blockchain node is used to transfer the first digital asset from the first on-chain address to the first custody address when verifying that there is a custody relationship between the custodian and the first object based on the first object attribute information and the second object attribute information, and update the asset custody record of the first object according to the first digital asset; the first object attribute information belongs to the first object, and the second object attribute information belongs to the custodian.
[0020] In one aspect, an embodiment of the present application provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following is achieved:
[0021] If a custody request for a first digital asset of a first object is received, the first digital asset is transferred to a first on-chain address of the first object in the blockchain; the custody request carries the first object attribute information of the first object;
[0022] If a transfer request is received to transfer the first digital asset to the first escrow address of the escrow party, verifying the escrow relationship between the first object and the escrow party according to the first object attribute information and the second object attribute information of the escrow party carried in the transfer request;
[0023] If it is verified that there is a custody relationship between the first object and the custodian, the first digital asset in the first on-chain address is transferred to the first custody address;
[0024] Based on the first digital asset, the asset custody record of the first object on the blockchain is updated.
[0025] The memory stores a computer program, and when the processor executes the computer program, the following is achieved:
[0026] Generate a transfer request for transferring a first digital asset of a first object to a first escrow address of a custodian; the first digital asset is transferred by a blockchain node to a first on-chain address of the first object in a blockchain;
[0027] The transfer request is sent to the blockchain node; the blockchain node is used to transfer the first digital asset from the first on-chain address to the first custody address when verifying that there is a custody relationship between the custodian and the first object based on the first object attribute information and the second object attribute information, and update the asset custody record of the first object according to the first digital asset; the first object attribute information belongs to the first object, and the second object attribute information belongs to the custodian.
[0028] On one hand, an embodiment of the present application provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the above method are implemented.
[0029] On the one hand, an embodiment of the present application provides a computer program product, including a computer program, which implements the steps of the above method when executed by a processor.
[0030] In this application, by using the blockchain network as a communication gateway between the first object and the custodian, the first object is the user who needs to custodian the first digital asset, that is, in the custody process of the first digital asset, the first digital asset is first transferred to the first on-chain address of the first object in the blockchain (i.e., in the blockchain network), and then, the first digital asset is transferred from the first on-chain address to the first custodian's first custodian address, and the asset custody registration of the first object on the blockchain is updated according to the first digital asset, so that the custody process of the first digital asset is witnessed by the blockchain network, and the custody security and transparency of the digital asset are improved. At the same time, even if the custody platform is maliciously attacked, the asset custody record of the first object can still be queried from the blockchain, and the target user can still trace the first digital asset to the custodian based on the asset custody record, thereby improving the custody security of the digital asset. In addition, the blockchain node transfers the first digital asset from the first on-chain address to the first custodial address only when it verifies that there is a custodial relationship between the first object and the custodian based on the first object attribute information of the first object and the second object attribute information of the custodian, which can avoid the first digital asset from being transferred to an illegal custodial address, further improving the custodial security of the digital asset; the custody process of the first digital asset is completed online, improving the convenience and efficiency of the custody of the digital asset. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0032] Figure 1 It is a schematic diagram of a data processing system provided by this application;
[0033] Figure 2 This is a schematic diagram of an interactive scenario of a blockchain data processing method provided by this application;
[0034] Figure 3 This is a schematic diagram of an interactive scenario of a blockchain data processing method provided by this application;
[0035] Figure 4 It is a flowchart of a blockchain data processing method provided by this application;
[0036] Figure 5 It is a flowchart of a blockchain data processing method provided by this application;
[0037] Figure 6This is a schematic diagram of generating on-chain sub-addresses based on a hierarchical deterministic address mechanism provided by this application;
[0038] Figure 7 This is a schematic diagram of generating on-chain sub-addresses based on a hierarchical deterministic address mechanism provided by this application;
[0039] Figure 8 This is a schematic diagram provided by the present application for scanning a blockchain to detect whether there is an asset transfer event at a sub-address on the chain;
[0040] Fig. 9 It is a schematic diagram provided by the present application for transferring part of the digital assets in the first escrow address to the second escrow address in an offline state;
[0041] Fig.10 It is a structural schematic diagram of a blockchain data processing device provided in an embodiment of the present application;
[0042] Fig.11 It is a structural schematic diagram of a blockchain data processing device provided in an embodiment of the present application;
[0043] Fig.12 It is a structural diagram of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0044] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0045] In this application, the blockchain network is used as a communication gateway between the first object and the custodian, and the blockchain network witnesses the process of the first object entrusting the digital assets to the custodian, thereby improving the custody security of the digital assets. After the custody of the digital assets is completed, the asset custody record of the first object is recorded on the blockchain in the blockchain network. At this time, even if the custody platform is maliciously attacked, the asset custody record of the first object can still be queried from the blockchain, and the target user can still trace the first digital asset to the custodian based on the asset custody record, thereby improving the custody security of the digital assets.
[0046] First, we introduce the blockchain data processing system used in this solution. Figure 1 , Figure 1A schematic diagram of the structure of a blockchain data processing system provided in an embodiment of the present application. The blockchain data processing system may include one or more terminals, one or more hosting service devices, and a blockchain network. Among them, this application does not limit the number of terminals and the number of hosting service devices. Figure 1 In the example, the blockchain data processing system includes a terminal and a hosting service device, that is, the blockchain data processing system includes a terminal 105 and a hosting service device 106. The terminal 105 and the hosting service device 106 are connected to a network so that the hosting service device 106 and the terminal 105 can exchange information.
[0047] The terminal 105 is a device used by the user to host digital assets, and the hosting service device 106 may refer to a backend service device of a hosting platform, which is used to manage the digital assets hosted by the user. The hosting platform may refer to a web application used for hosting digital assets, a small program in a host application, etc.
[0048] It is understandable that the hosting platform can also be called a resource client, which can be used to implement resource management business functions and realize communication connection with the decentralized application client based on the resource management business functions. The resource client is a tool for managing and storing user digital resources. For example, digital resources can be transferred to other accounts (on-chain addresses or off-chain addresses) based on the resource client, and digital resources transferred from other accounts can be received based on the resource client. The resource client can be a hardware device or a software program. In the present application, the resource client of the first object can establish a communication connection with the decentralized application client to realize related operations such as authorized login of the first object.
[0049] It is understandable that with the widespread deployment of various decentralized applications on the blockchain and the increase in user activities on the blockchain, general users can use blockchain key management tools (also known as decentralized resource clients) to log in when using decentralized applications. The address in the blockchain key management tool (resource client) (i.e., the on-chain address) corresponds to a user on the blockchain. The decentralized application can obtain the user's address from the key management tool through some interfaces, in order to solve the problem that the Dapp background cannot trust the user address used when logging in to the decentralized application.
[0050] The blockchain network is an end-to-end decentralized network composed of multiple node devices (also called blockchain nodes). The number of node devices in the blockchain network can be deployed according to actual needs. This application does not limit the number of node devices. Figure 1In the example, the blockchain network includes four node devices, which are node device 101, node device 102, node device 103 and node device 104. The terminal 105 and the hosting service device 106 are respectively connected to one or more node devices in the blockchain network, so as to realize information interaction between the terminal 105 and the node devices in the blockchain network, and realize information interaction between the hosting service device 106 and the node devices in the blockchain network.
[0051] It is understandable that each node device can receive the data to be recorded when performing normal work, and maintain the blockchain based on the received data to be recorded. In order to ensure the information exchange within the blockchain network, a network connection 10 can exist between each node device in the blockchain network, and data can be transmitted between the node devices through the above network connection 10. For example, when any node device in the blockchain network receives the data to be recorded, the other node devices in the blockchain network will verify the data to be recorded according to the consensus algorithm, and after the verification is successful (that is, after reaching a consensus), the data to be recorded is stored as data in the blockchain, so that the data stored on all node devices in the blockchain network are consistent.
[0052] It is understandable that data or blocks can be transmitted between node devices through the upper network connection 10. The network connection between the above-mentioned node devices can transmit data based on node identification, each node device has a node identification corresponding to it, and each of the above-mentioned node devices can store the node identifications of other node devices connected to itself, so that the acquired data or generated blocks can be broadcast to other node devices according to the node identifications of other node devices in the future. For example, the node device 101 can maintain a node identification list, which stores the node names and node identifications of other node devices, as shown in Table 1:
[0053] Table 1
[0054]
[0055]
[0056] Among them, the node identifier can be the Internet Protocol (IP) address for interconnecting networks or any other information that can be used to identify the node device in the blockchain network. Table 1 only uses the IP address as an example for explanation.
[0057] Assuming that the node identifier of node device 101 is 117.xxx.xxx.174, node device 101 can send a data synchronization request to node device 102 through 117.xxx.xxx.174, and node device 102 can know that the data synchronization request is sent by node device 101 through node identifier 117.xxx.xxx.174; similarly, node device 102 can send transaction data A to node device 101 through node identifier 117.xxx.xxx.145, and node device 101 can know that transaction data A is sent by node device 101 through node identifier 117.xxx.xxx.145, and the same is true for data transmission between other node devices, so they will not be elaborated one by one.
[0058] It is understandable that the above-mentioned network connection does not limit the connection method, and can be directly or indirectly connected through wired communication, directly or indirectly connected through wireless communication, or through other connection methods, which are not limited in this application.
[0059] Among them, node device 101, node device 102, node device 103, node device 104 and hosting service device 106 are independent physical servers, or they can be server clusters or distributed systems composed of at least two physical servers, or they can be cloud servers that provide 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, Content Delivery Network (CDN), and big data and artificial intelligence platforms. Terminal 105 can specifically refer to a vehicle-mounted terminal, a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a screen speaker, a smart watch, etc., but is not limited to this. Each terminal and server can be directly or indirectly connected via wired or wireless communication. At the same time, the number of terminals and servers can be one or at least two, and this application does not limit it here. In particular, the hosting service device can also refer to a terminal.
[0060] Figure 1 The blockchain data processing system in can be used to host digital assets. Digital assets can refer to virtual resources, digital collections, securities, game props, game skins, etc. Figure 2 and Figure 3 As shown, the hosted game skin is used as an example for explanation. Figure 2 The terminal 20a in the example may refer to Figure 1 Terminal 105 in Figure 2 and Figure 3 The blockchain node 21a in may refer to Figure 1Any node device in the blockchain network, Figure 3 The hosting service device 22a may refer to Figure 1 The hosting service device 106 in the.
[0061] like Figure 2 As shown, the original address of user a corresponding to terminal 105 includes digital assets 23a and digital assets 24a. The original address may refer to the account of user a logging into the game application. Both digital assets 23a and digital assets 24a may refer to game skins. When user a needs to entrust digital assets 23a to the custodian b corresponding to the custodian service device 106, a custodian operation may be performed on digital assets 23a. Accordingly, the terminal generates a custodian request for digital assets 23a in response to the custodian operation for digital assets 23a, and sends the custodian request to blockchain node 21a. The custodian request carries the first on-chain address of user a on the blockchain, the signature information of user a, and the custodian transaction data. The custodian transaction data includes the asset identifier, asset type, and original address of digital assets 23a. The first on-chain address may refer to the account of user a for resource entrustment in the blockchain network. The first on-chain address may also be referred to as the account of user a for publishing digital assets to be entrusted. It is understandable that the signature information of user a can be generated in any of the following two ways: in the first way, the terminal 105 can directly generate the signature information of user a based on the escrow transaction data. Specifically, the terminal 105 can use the private key corresponding to the first chain address to sign the escrow transaction data to obtain the signature information of user a. The first chain address here can refer to the public key of user a. The public key of user a and the private key corresponding to the first chain address are an asymmetric key pair. The signature processing here can refer to inputting the private key corresponding to the first chain address and the escrow transaction data into the signature function Sign, and using the signature function Sign to sign the escrow transaction data based on the private key of user a to obtain the signature information of user a. Method 2: Terminal 105 can indirectly generate the signature information of user a based on the escrow transaction data. Specifically, terminal 105 can perform a hash operation on the escrow transaction data to obtain a hash value 1, and use the private key corresponding to the address on the first chain to sign the hash value 1 to obtain the signature information of user a. By performing a hash operation on the escrow transaction data, it is helpful to obtain a hash value of a fixed length, thereby reducing the amount of data signature calculations and the resources consumed by data transmission.
[0062] Further, after receiving the custody request, the blockchain node 21a can verify the signature information of user a in the following two ways: Method 1: When the signature information of user a is directly generated based on the custody transaction data, the blockchain node 21a can perform a decryption process on the custody transaction data according to the first chain address to obtain the decryption data 1 of the user a. The decryption process here can refer to inputting the first chain address and the signature information of user a into the verification function Verify, and performing a decryption process on the signature information of user a based on the first chain address through the verification function Verify to obtain the decryption data 1 of the user a. Then, determine the matching degree between the decryption data 1 of the user a and the custody transaction data. If the matching degree between the decryption data of the user a and the custody transaction data is less than or equal to the matching degree threshold 1, it is determined that the signature information verification of the user a has failed, that is, the user a is an illegal user and the user a is not the owner of the first chain address. If the matching degree between the decrypted data of user a and the escrow transaction data is greater than the matching degree threshold 1, it is determined that the signature information of user a has been verified, that is, user a is a legitimate user and the owner of the address on the first chain. Method 2: When the signature information of user a is indirectly generated based on the escrow transaction data, the computer device can use the first chain address to decrypt the signature information of user a to obtain the decrypted data 2 of user a, perform a hash operation on the escrow transaction data to obtain a hash value 2, and determine the matching degree between the hash value 2 and the decrypted data 2. If the matching degree between the hash value 2 and the decrypted data 2 is less than or equal to the matching degree threshold 2, it is determined that the signature information of user a has not been verified; if the matching degree between the hash value 2 and the decrypted data 2 is greater than the matching degree threshold 2, it is determined that the signature information of user a has been verified.
[0063] If the signature information of user a fails to be verified, the blockchain node 21a may refuse to execute the custody request; if the signature information of user a is verified, the blockchain node 21a may transfer the digital asset 23a in the original address to the first on-chain address of user a, that is, add the digital asset 23a to the first on-chain address, remove the digital asset 23a from the original address, that is, only the digital asset 24a remains in the original address. After the blockchain node 21a publishes the digital asset 23a in the first on-chain address, the custody service device 23a may send a transfer request to the blockchain node 21a to transfer the digital asset 23a to the first custody address of the custodian b. The transfer request may include the signature information of the custodian b, the transfer transaction data, and the object identifier of the custodian, etc. The transfer transaction data may include the asset identifier, asset type, and first custody address of the digital asset 23a. The blockchain node 21a can verify the custody relationship between user a and the custodian according to the custody request and the transfer request; for example, the blockchain node 21a can verify the signature information of the custodian according to the custody request and the transfer request, and verify whether there is a derivative relationship between the first on-chain address and the second on-chain address, and the second on-chain address can refer to the address of the custodian on the blockchain. If the signature information verification of the custodian fails, or there is no derivative relationship between the first on-chain address and the second on-chain address, it is determined that there is no custody relationship between user a and the custodian. If the signature information verification of the custodian passes, and there is a derivative relationship between the first on-chain address and the second on-chain address, it is determined that there is a custody relationship between user a and the custodian.
[0064] Next, if it is determined that there is a custody relationship between user a and the custodian, blockchain node 21a can transfer digital asset 23a from the first on-chain address to the first custody address of custodian b, that is, add digital asset 23a to the first custody address and remove digital asset 23a from the first on-chain address. Further, blockchain node 21a can generate an asset custody record for digital asset 23a and store the asset custody record in blockchain 25a. The asset custody record is used to reflect that user a has entrusted digital asset 23a to custodian b. Blockchain 25a can refer to the blockchain dimensioned by the node device in the blockchain network where blockchain node 21a is located. After receiving digital asset 23a, custodian b can rent digital asset 23a to other users to increase the value of digital asset 23a.
[0065] In summary, by using the blockchain network as a communication gateway between user a and custodian b, the blockchain network witnesses the process of user a entrusting digital assets 23a to custodian b, thereby improving the custody security of digital assets. After completing the custody of digital assets 23a, by recording the asset custody record of user a on the blockchain in the blockchain network, even if the custody platform is maliciously attacked, the asset custody record of user a can still be queried from the blockchain, and user a can still trace the digital assets 23a to custodian b based on the asset custody record, thereby improving the custody security of digital assets.
[0066] For further information, see Figure 4 This is a flowchart of a blockchain data processing method provided by an embodiment of the present application. Figure 4 As shown, this method can be Figure 1 The method is executed by a blockchain node in the blockchain network in the present application. This application takes a blockchain node as an example for explanation. The method may include the following steps:
[0067] S101. If a custody request for a first digital asset of a first object is received, the first digital asset is transferred to a first on-chain address of the first object in the blockchain; the custody request carries first object attribute information of the first object.
[0068] In this application, when the first object needs to host the first digital asset, the terminal corresponding to the first object can generate a hosting request for the first digital asset of the first object, and send a hosting request for the first digital asset to the blockchain node. The hosting request can carry the first object attribute information of the first object, and the first object attribute information can include the first chain address of the first object on the blockchain, the hosting transaction data, and the signature information of the first object, etc. The hosting transaction data can include the identification, type, and quantity of the first digital asset. In particular, the first object can transfer the first digital asset to the designated custodian, and the custodian transaction data can also include the object information of the custodian; the first object can publish the first digital asset in the first chain address, and the custodian actively initiates the hosting of the first digital asset, and the custodian transaction data may not include the object information of the custodian. Further, after receiving the hosting request, the blockchain node can transfer the first digital asset to the first chain address of the first object in the blockchain, that is, record the addition of the first digital asset to the first chain address on the blockchain (that is, record that the first chain address has transferred the first digital asset), and the first digital asset comes from the first object.
[0069] It is understandable that the signature information of the first object can be generated in any of the following two ways: in the first way, the terminal can directly generate the signature information of the first object based on the escrow transaction data. Specifically, the terminal can use the private key corresponding to the first chain address to sign the escrow transaction data to obtain the signature information of the first object. The first chain address here can refer to the public key of the first object. The public key of the first object and the private key corresponding to the first chain address are an asymmetric key pair. The signature processing here can refer to inputting the private key corresponding to the first chain address and the escrow transaction data into the signature function Sign, and signing the escrow transaction data based on the private key of the first object through the signature function Sign to obtain the signature information of the first object. In the second way, the terminal can indirectly generate the signature information of the first object based on the escrow transaction data. Specifically, the terminal can perform a hash operation on the escrow transaction data to obtain a hash value a, and use the private key corresponding to the first chain address to sign the hash value a to obtain the signature information of the first object. By performing a hash operation on the escrow transaction data, it is beneficial to obtain a hash value of a fixed length, thereby reducing the amount of data signature calculation and the resources consumed by data transmission.
[0070] Furthermore, after receiving a new custody request carrying the signature of the first object, the blockchain node can verify the signature information of the first object. If the signature information of the first object fails to be verified, indicating that the first digital asset does not belong to the first object, the first digital asset is refused to be transferred to the first on-chain address; if the signature information of the first object passes the verification, indicating that the first digital asset belongs to the first object, the first digital asset is transferred to the first on-chain address of the first object. Specifically, when the signature information of the first object is directly generated based on the custody transaction data, the blockchain node device can use the first on-chain address to decrypt the signature information of the first object and obtain the decrypted data 1 of the first object. If the matching degree between the decrypted data of the first object and the custody transaction data is greater than the matching degree threshold 1, it is determined that the signature information verification of the target user has passed; if the matching degree between the decrypted data of the first object and the custody transaction data is less than or equal to the matching degree threshold 1, it is determined that the signature information verification of the target user has failed. When the signature information of the first object is indirectly generated based on the escrow transaction data, the blockchain node device can use the first on-chain address to decrypt the signature information of the first object, obtain the decrypted data 2 of the first object, and perform a hash operation on the escrow transaction data to obtain a hash value b; if the matching degree between the decrypted data 2 of the first object and the hash value b is greater than the matching degree threshold 2, it is determined that the signature information verification of the target user has passed; if the matching degree between the decrypted data 2 of the first object and the hash value 2 is less than or equal to the matching degree threshold 2, it is determined that the signature information verification of the first object has failed. By verifying the signature information of the first object, the escrow security of the first digital asset is improved.
[0071] S102. If a transfer request is received to transfer the first digital asset to the first custodial address of the custodian, the custodial relationship between the first object and the custodian is verified based on the first object attribute information and the second object attribute information of the custodian carried in the transfer request.
[0072] In this application, after the first digital asset is published to the first on-chain address, all registered users in the blockchain network corresponding to the blockchain can query the first digital asset. When the custodian needs to accept the custody of the first digital asset, the custody service device corresponding to the custodian can send a transfer request to the blockchain node regarding the transfer of the first digital asset to the first custody address. The transfer request can carry the second object attribute information of the custodian, and the second object attribute information can include the signature information of the custodian, the object identifier of the custodian, and the custody transaction data. The custody transaction data can include the identifier, type, and quantity of the first digital asset. After receiving the transfer request, the blockchain node can verify the custody relationship between the first object and the custodian based on the first object attribute information and the second object attribute information.
[0073] Optionally, the escrow service device can generate the signature information of the custodian in any of the following two ways: In the first way, the escrow service device can directly generate the signature information of the custodian based on the escrow transaction data. Specifically, the escrow service device can use the custodian's private key to sign the escrow transaction data to obtain the signature information of the custodian. In the second way, the escrow service device can indirectly generate the signature information of the custodian based on the escrow transaction data. Specifically, the escrow service device can perform a hash operation on the escrow transaction data to obtain the hash value of the escrow transaction data, and use the custodian's private key to sign the hash value of the escrow transaction data to obtain the signature information of the custodian.
[0074] Optionally, the blockchain node device can verify the trusteeship relationship between the first object and the trustee in any of the following two ways: in the first way, the trusteeship request carries the object attribute information of the trustee, and the computer device can determine the matching degree between the object attribute information of the trustee carried in the trusteeship request and the second object attribute information. If the matching degree between the object attribute information of the trustee carried in the trusteeship request and the second object attribute information is greater than the matching degree threshold 3, it is determined that the trustee indicated by the transfer request is the trustee specified by the first object, and it is determined that there is a trusteeship relationship between the first object and the trustee indicated by the transfer request. If the matching degree between the object attribute information of the trustee carried in the trusteeship request and the second object attribute information is less than or equal to the matching degree threshold 3, it is determined that the trustee indicated by the transfer request is not the trustee specified by the first object, and it is determined that there is no trusteeship relationship between the first object and the trustee indicated by the transfer request.
[0075] Method 2: The escrow service device derives the second on-chain address of the custodian to obtain one or more on-chain sub-addresses of the second on-chain address, and assigns the on-chain sub-address of the second on-chain address to the terminal corresponding to the object having a custodial relationship with the custodian. The object having a custodial relationship with the custodian uses the on-chain sub-address of the second on-chain address as the on-chain address for custodial digital assets. Therefore, the blockchain node device can verify the custodial relationship between the first on-chain address and the second on-chain address, etc. Specifically, the blockchain node can read the second on-chain address of the custodian from the blockchain according to the object identifier of the custodian. The second on-chain address can refer to the address registered by the custodian in the blockchain; then, according to the second on-chain address and the transfer transaction data, the signature information of the custodian is verified to obtain a first verification result. The first verification result reflects whether the signature information of the custodian has passed or failed the verification. If the signature information of the custodian has passed the verification, it reflects that the custodian is a legally registered user in the blockchain; if the signature information of the custodian has failed the verification, it reflects that the custodian is an illegal registered user in the blockchain. Therefore, if the first verification result indicates that the signature information verification of the custodian has not passed, the blockchain node can determine that there is no custody relationship between the custodian and the first object; if the first verification result indicates that the signature information verification of the custodian has passed, the blockchain node can further verify the derivation relationship between the first on-chain address and the second on-chain address to obtain a second verification result. The second verification result is used to reflect that the first on-chain address is derived from the second on-chain address, or the second verification result is used to reflect that the first on-chain address is not derived from the second on-chain address. If the second verification result indicates that the first on-chain address is not derived from the second on-chain address, it is determined that there is no custody relationship between the first object and the custodian. If the second verification result indicates that the first on-chain address is derived from the second on-chain address, it is determined that there is a custody relationship between the first object and the custodian.
[0076] Optionally, the signature information of the custodian is directly generated based on the transfer transaction data; the above-mentioned verification of the signature information of the custodian according to the second on-chain address and the transfer transaction data to obtain a first verification result includes: the blockchain node can perform a decryption process on the signature information of the custodian according to the second on-chain address to obtain the first decryption data, and determine the matching degree between the first decryption data and the transfer transaction data. If the matching degree between the decryption data and the transfer transaction data is less than or equal to the first matching degree threshold, indicating that the custodian is an illegal registered user in the blockchain network, then a first verification result indicating that the signature information verification of the custodian has failed is generated. If the matching degree between the decryption data and the transfer transaction data is greater than the first matching degree threshold, indicating that the custodian is a legal registered user in the blockchain network, then a first verification result indicating that the signature information verification of the custodian has passed is generated. By verifying the signature information of the custodian, the first digital asset is prevented from being obtained by illegal users, and the security of the first digital asset is improved.
[0077] Optionally, the signature information of the custodian is indirectly generated based on the transfer transaction data; the signature information of the custodian is verified according to the second on-chain address and the transfer transaction data to obtain a first verification result, including: the blockchain node can perform a decryption process on the signature information of the custodian according to the second on-chain address to obtain the second decryption data, and perform a hash operation on the transfer transaction data to obtain the first hash value of the transfer transaction data. The blockchain node can determine the matching degree between the second decryption data and the first hash value. If the matching degree between the second decryption data and the first hash value is less than or equal to the second matching degree threshold, a first verification result indicating that the signature information verification of the custodian has failed is generated. If the matching degree between the second decryption data and the first hash value is greater than the second matching degree threshold, a first verification result indicating that the signature information verification of the custodian has passed is generated. By verifying the signature information of the custodian, the first digital asset is prevented from being obtained by illegal users, and the custody security of the first digital asset is improved.
[0078] Optionally, if the above-mentioned first verification result indicates that the signature information of the above-mentioned custodian has been verified, then the derivation relationship between the above-mentioned first on-chain address and the above-mentioned second on-chain address is verified to obtain the second verification result, including: if the above-mentioned first verification result indicates that the signature information of the above-mentioned custodian has been verified, then the blockchain node can obtain the parent node chain code of the above-mentioned custodian and the child node sequence number of the first object from the above-mentioned blockchain. The child node sequence number of the first object can be called an index number, which is used to uniquely identify the first object. The parent node chain code is used to identify the custodian and is generated based on the root seed (i.e., a random number). Further, the above-mentioned second on-chain address can be derived based on the above-mentioned parent node chain code and the above-mentioned child node sequence number to obtain the on-chain sub-address of the above-mentioned second on-chain address. Then, the first on-chain address is compared with the on-chain sub-address of the second on-chain address to obtain the matching degree between the first on-chain address and the on-chain sub-address of the second on-chain address; if the matching degree between the first on-chain address and the on-chain sub-address of the second on-chain address is less than or equal to the third matching degree threshold, a second verification result indicating that the first on-chain address is not derived from the second on-chain address is generated. If the matching degree between the first on-chain address and the on-chain sub-address of the second on-chain address is greater than the third matching degree threshold, a second verification result indicating that the first on-chain address is derived from the second on-chain address is generated. By verifying the derivation relationship between the first on-chain address and the second on-chain address, the custody security of the first digital asset is improved.
[0079] Optionally, the second on-chain address is derived according to the parent node chain code and the child node sequence number to obtain the on-chain sub-address of the second on-chain address, including: the blockchain node can use the second on-chain address, the parent node chain code and the child node sequence number as parameters to perform hash operation to obtain a second hash value; the second hash value is split to obtain a first sub-hash value and a second sub-hash value, such as if the second hash value is 512 bits, the second hash value is split into two 256 data, respectively referred to as the first sub-hash value and the second sub-hash value. Further, the first hash value and the second on-chain address are processed by operation to obtain the on-chain sub-address of the second on-chain address; the operation processing here may refer to splicing or addition, and the second sub-hash value is used to generate the child node chain code corresponding to the object occupying the on-chain sub-address of the second on-chain address, and the child node chain code is used to derive more on-chain sub-addresses. By verifying the derivation relationship between the first on-chain address and the second on-chain address, the custody security of the first digital asset is improved.
[0080] S103. If it is verified that there is a custody relationship between the first object and the custodian, the first digital asset in the first on-chain address is transferred to the first custody address.
[0081] In this application, if it is verified that there is no custody relationship between the first object and the custodian, the first digital asset in the first on-chain address can be refused to be transferred to the first custody address, which can prevent the first digital asset from being transferred to the account address of an illegal user and improve the custody security of the digital asset. If it is verified that there is a custody relationship between the first object and the custodian, the first digital asset in the first on-chain address is transferred to the first custody address, that is, the transaction data reflecting that the first on-chain address has transferred out the first digital asset and the first custody address has transferred in the first digital asset is recorded on the blockchain, so that the custodian can increase the value of the first digital asset to obtain more digital assets.
[0082] It is understandable that the types of digital assets include divisible types and indivisible types. Indivisible digital assets may include collectibles, game skins, game props, etc., and divisible digital assets may include game coins, electronic currency, etc. In step S103, when the type of the first digital asset is an indivisible type, if it is verified that there is a trusteeship relationship between the first object and the trustee, the first digital asset in the first on-chain address is transferred to the first trusteeship address. When the type of the first digital asset is a divisible type, if a trusteeship request for the first digital asset of the first object is received, the blockchain node may divide the first digital asset into G virtual sub-resources, and transfer L of the G virtual sub-resources from the first on-chain address to the first trusteeship address, where G is an integer greater than 1, and L is a positive integer greater than or less than G. GL virtual sub-resources are used to transfer to the trusteeship addresses of other trustees, so that the first digital asset of the first object can be entrusted to multiple trustees, thereby improving the trusteeship security of digital assets.
[0083] S104. Based on the first digital asset, update the asset custody record of the first object on the blockchain.
[0084] In this application, the blockchain node can update the asset custody record of the first object on the blockchain based on the first digital asset. The asset custody record is used to reflect the asset amount, asset type, custodian, custody time, etc. of the digital assets held by the first object. For example, if the first object has entrusted 1,000 yuan to the custodian during the historical time period, and the first digital asset is 2,000 yuan, then the asset custody record reflecting that the first object has entrusted 3,000 yuan to the custodian is stored on the blockchain. By recording the asset custody record of the first object on the blockchain in the blockchain network, even if the custody platform is maliciously attacked, the asset custody record of the first object can still be queried from the blockchain, and the target user can still trace the first digital asset to the custodian based on the asset custody record, thereby improving the custody security of the digital assets.
[0085] Optionally, in step S104, when the first digital assets are all transferred to the first escrow address, the asset escrow record of the first object on the blockchain can be updated based on the first digital assets. When the L virtual sub-assets in the first digital asset are transferred to the first escrow address, the asset escrow record of the first object on the blockchain can be updated based on the L virtual sub-assets.
[0086] Optionally, when a blockchain node receives a transfer request to transfer the second digital asset of a second object to the first escrow address, the blockchain node can verify the escrow relationship between the second object and the escrow party based on the object attribute information of the second object and the object attribute information of the escrow party. After verifying that there is an escrow relationship between the second object and the escrow party, the second digital asset in the third on-chain address of the second object can be transferred to the first escrow address. Further, based on the second digital asset, the asset escrow record of the second object on the blockchain is updated. By aggregating the digital assets of multiple objects into one escrow address, it is beneficial to achieve the appreciation and preservation of digital assets.
[0087] In this application, by using the blockchain network as a communication gateway between the first object and the custodian, the first object is the user who needs to custodian the first digital asset, that is, in the custody process of the first digital asset, the first digital asset is first transferred to the first on-chain address of the first object in the blockchain (i.e., in the blockchain network), and then, the first digital asset is transferred from the first on-chain address to the first custodian's first custodian address, and the asset custody registration of the first object on the blockchain is updated according to the first digital asset, so that the custody process of the first digital asset is witnessed by the blockchain network, and the custody security and transparency of the digital asset are improved. At the same time, even if the custody platform is maliciously attacked, the asset custody record of the first object can still be queried from the blockchain, and the target user can still trace the first digital asset to the custodian based on the asset custody record, thereby improving the custody security of the digital asset. In addition, the blockchain node transfers the first digital asset from the first on-chain address to the first custodial address only when it verifies that there is a custodial relationship between the first object and the custodian based on the first object attribute information of the first object and the second object attribute information of the custodian, which can avoid the first digital asset from being transferred to an illegal custodial address, further improving the custodial security of the digital asset; the custody process of the first digital asset is completed online, improving the convenience and efficiency of the custody of the digital asset.
[0088] For further information, see Figure 5 Schematic diagram of a blockchain data processing method provided by an embodiment of the present application. Figure 5 As shown, this method can be Figure 1 The method may include the following steps:
[0089] S201. Generate a transfer request for transferring a first digital asset of a first object to a first custodial address of a custodian; the first digital asset is transferred from a blockchain node to a first on-chain address of the first object in the blockchain.
[0090] In the present application, after the first digital asset is transferred to the first on-chain address, the hosting service device may generate a transfer request for transferring the first digital asset of the first object to the first hosting address of the custodian, and the transfer request carries the second object attribute information of the custodian.
[0091] Optionally, the on-chain address of the object with which the custodian has a custodial relationship may be generated by a terminal corresponding to the object, or the on-chain address of the object with which the custodian has a custodial relationship may be generated by a custodial service device. Figure 6 As shown, when the on-chain address of an object that has a custody relationship with the custodian may refer to one generated by the custody service device, the user module of the custody service device adopts a hierarchical deterministic address mechanism, derives one or more sub-key pairs through the root key pair, and converts the sub-key pairs into on-chain sub-addresses and assigns them to the object that has a custody relationship with the custodian. The user module sets the object's permissions on the on-chain sub-address to achieve key management. For example, the user module can authorize the object to transfer digital assets to and from the on-chain sub-address. Different on-chain sub-addresses can be used to record different types of digital assets. The types of digital assets include divisible types and indivisible types. Indivisible digital assets may include collectibles, game skins, game props, etc., and divisible digital assets may include game coins, electronic currency, etc. The above-mentioned hierarchical deterministic address mechanism refers to deriving one or more sub-key pairs based on the root key pair, that is, the sub-key pair can be obtained based on the root key pair, and the root key pair cannot be derived from the sub-key pair. The root key pair is controlled by the custodian. Therefore, the custodian can transfer digital assets from the on-chain sub-address generated based on the root key pair to achieve management of multiple on-chain sub-addresses. As shown Figure 6In the example, the escrow service device can derive the on-chain sub-address A, on-chain sub-address B and on-chain sub-address C according to the root key. The on-chain sub-address A, on-chain sub-address B and on-chain sub-address C belong to user a, user b and user c who have an escrow relationship with the escrow party respectively. The user module of the escrow service device can generate a QR code based on the on-chain sub-address A and the corresponding private key, and pass the on-chain sub-address A and the corresponding private key to user a through the QR code; generate a QR code based on the on-chain sub-address B and the corresponding private key, and pass the on-chain sub-address B and the corresponding private key to user b through the QR code; generate a QR code based on the on-chain sub-address C and the corresponding private key, and pass the on-chain sub-address C and the corresponding private key to user c through the QR code. User a, user b and user c can use the corresponding on-chain sub-address as the payment address of the digital asset to be escrowed to realize the escrow of digital assets.
[0092] Optionally, the escrow service device can generate a root key pair, and generate the second on-chain address of the escrow party based on the root key pair; obtain the parent node chain code corresponding to the above escrow party, and the N child node serial numbers corresponding to the N objects that have a escrow relationship with the above escrow party; N is a positive integer; derive the above second on-chain address based on the above parent node chain code and the above N child node serial numbers to obtain the on-chain sub-addresses corresponding to the above N objects; send the on-chain sub-addresses corresponding to the above N objects to the terminal of the corresponding object. The N on-chain sub-addresses store the digital assets to be escrowed of the N objects, and then the escrow service device can aggregate the digital assets in the N on-chain sub-addresses to the first escrow address, which is conducive to realizing the appreciation of the escrowed digital assets.
[0093] For example, Figure 7As shown, taking the on-chain sub-address of 256 bits as an example, the hosting service device can perform HMAC-SHA512 algorithm operation (hash operation) on the root seed (a random number) to obtain the hash value of the root seed, and use the left 256 bits of the root seed as the custodian's private key (called the parent private key), and the right 256 bits of the root seed as the custodian's node chain code (called the parent node chain code). The custodian's private key is subjected to elliptic curve multiplication to obtain the custodian's public key (called the parent public key). The parent public key and the parent private key are called a root key pair. A one-way hash operation is performed on the public key in the root key pair to obtain the custodian's second on-chain address. Furthermore, the hosting service device can generate a child node serial number corresponding to user a. The child node serial numbers of different users are different. For example, the child node serial number 1 of user a is 1. The hosting service device can use the parent public key, the parent node chain code and the child node serial number 1 as parameters to perform HMAC-SHA512 algorithm operation to obtain the hash value corresponding to the parent public key, and perform hash operation on the left 256 bits of the hash value corresponding to the parent public key and the parent private key to obtain the child private key 1 of user a. Further, the right 256 bits of the hash value corresponding to the parent public key are used as the child node chain code 1, and the child private key 1 is multiplied by the elliptic curve to obtain the public key of user a (referred to as child public key 1). Alternatively, the left 256 bits of the hash value corresponding to the parent public key can be used as the child public key 1. The child public key 1 and the child private key 1 are referred to as the child key pair 1. The child public key 1 in the child key pair 1 is subjected to a one-way hash operation to obtain the on-chain child address A of user a. Similarly, the hosting service device can generate the child node serial number corresponding to user b. For example, if the child node serial number 2 of user b is 2, the hosting service device can use the parent public key, the parent node chain code and the child node serial number 2 as parameters to perform HMAC-SHA512 algorithm operation to obtain the hash value corresponding to the parent public key, and perform hash operation on the left 256 bits of the hash value corresponding to the parent public key and the parent private key to obtain the child private key 2 of user b. Further, the right 256 bits of the hash value corresponding to the parent public key are used as the child node chain code 2, and the child private key 2 is multiplied by the elliptic curve to obtain the public key of user b (referred to as child public key 2), or the left 256 bits of the hash value corresponding to the parent public key can be used as the child public key 2, and the child public key 2 and the child private key 2 are called child key pair 2. The child public key 2 in the child key pair 2 is subjected to a one-way hash operation to obtain the on-chain sub-address B of user b. Similarly, by analogy, the on-chain address C of user c can be generated according to the root key, and the repetitions will not be repeated. After generating the on-chain sub-address of each user, the on-chain sub-address and the corresponding private key can be sent to the user to realize the custody of digital assets.
[0094] Optionally, the escrow service device may generate a transfer request for transferring the first digital asset of the first object to the first escrow address of the escrow party in any of the following two ways: Method 1: After the terminal corresponding to the first object transfers the first digital asset to the first on-chain address, it may send a escrow registration certificate for the first digital asset to the escrow service device, and the escrow registration certificate includes the first on-chain address of the first object, escrow transaction data, etc. The escrow service device may receive the escrow registration certificate for the first digital asset sent by the terminal corresponding to the first object, and scan the blockchain according to the first on-chain address in the escrow registration certificate. If an asset transfer event is found on the blockchain to exist at the first on-chain address, and the asset transfer event means that the blockchain records the transfer of digital assets to the first on-chain address, the blockchain is stopped from scanning, and a transfer request for transferring the first digital asset of the first object to the first escrow address of the escrow party is generated. By obtaining the escrow registration certificate from the terminal, it is not necessary to scan the entire blockchain, saving resources.
[0095] Method 2: The escrow service device can obtain the on-chain sub-address set of the second on-chain address of the custodian, which is generated by the escrow service device and assigned to the object with a custodial relationship with the custodian. According to the on-chain sub-address set, the blockchain is scanned and processed to obtain the target on-chain sub-address in the on-chain sub-address set where the asset transfer event exists. Further, a transfer request is generated to transfer the digital assets in the target on-chain sub-address to the above-mentioned first escrow address; the above-mentioned transfer request is used to instruct the above-mentioned blockchain node to aggregate the digital assets in the above-mentioned target on-chain sub-address to the above-mentioned first escrow address, and the target on-chain sub-address includes the above-mentioned second on-chain address.
[0096] Optionally, the above-mentioned scanning and processing of the above-mentioned blockchain according to the above-mentioned on-chain sub-address set to obtain the target on-chain sub-address in the above-mentioned on-chain sub-address set where the asset transfer event exists includes: the custody service device can obtain the historical time when the above-mentioned blockchain was last scanned; determine the blocks added to the blockchain after the above-mentioned historical time; and scan and process the added blocks according to the on-chain sub-address set to obtain the target on-chain sub-address in the above-mentioned on-chain sub-address set where the asset transfer event exists. By fully scanning the newly added blocks in the blockchain, it is beneficial to aggregate the digital assets in one or more on-chain sub-addresses and improve the custody efficiency of digital assets.
[0097] For example, Figure 8As shown, it is assumed that the on-chain sub-address set of the second on-chain address includes on-chain sub-address A, on-chain sub-address B and on-chain sub-address C. On-chain sub-address A and on-chain sub-address B are used to record the first type of digital assets, such as indivisible digital assets; on-chain sub-address C is used to record the second type of digital assets. On-chain sub-address A, on-chain sub-address B and on-chain sub-address C belong to user a, user b and user c who have a custodial relationship with the custodian respectively. The custodial service device can periodically scan the blockchain to determine whether there is a digital asset transfer in on-chain sub-address A, on-chain sub-address B and on-chain sub-address C. Specifically, when the time reaches the scanning time, the custody service device can sequentially traverse the on-chain sub-address A, the on-chain sub-address B, and the on-chain sub-address C. When traversing to the on-chain sub-address A, the last scanned block height can be obtained from the user module, and the newly added block in the blockchain is scanned according to the last scanned block height to query whether the transaction data about the asset transfer event of the on-chain sub-address A (i.e., the asset transfer event of the first type of digital asset) is recorded in the newly added block. If the transaction data about the asset transfer event of the on-chain sub-address A is queried, a transfer request 1 for transferring the digital assets in the on-chain sub-address A to the first custody address can be generated, and the transfer request 1 is sent to the blockchain node. When the blockchain node verifies that there is a custody relationship between user a and the custodian, the digital assets in the on-chain sub-address A can be transferred to the first custody address, and the asset custody record of user a is updated on the blockchain. The custody service device can generate a message notification about the successful custody, and send the message notification to user a and the custodian. Similarly, when traversing to the on-chain sub-address B, the last scanned block height can be obtained from the user module, and the newly added blocks in the blockchain can be scanned according to the last scanned block height to query whether the transaction data of the asset transfer event of the on-chain sub-address B is recorded in the newly added block. If the transaction data of the asset transfer event of the on-chain sub-address B is queried, a transfer request 2 for transferring the digital assets in the on-chain sub-address B to the first escrow address can be generated, and the transfer request 2 can be sent to the blockchain node. When the blockchain node verifies that there is a escrow relationship between user b and the custodian, the digital assets in the on-chain sub-address B can be transferred to the first escrow address, and the asset custody record of user b can be updated on the blockchain. The escrow service device can generate a message notification about the successful custody and send the message notification to user b and the custodian. By analogy, the transaction data of the asset transfer event of the on-chain sub-address C can be scanned on the blockchain to transfer the digital assets in the on-chain sub-address C to the first escrow address. After the scan is completed, the hosting service device can record the maximum block height in the current blockchain into the user module so that the newly added blocks can be scanned next time.
[0098] S202, sending the transfer request to the blockchain node; the blockchain node is used to transfer the first digital asset from the first on-chain address to the first custody address when verifying that there is a custody relationship between the custodian and the first object based on the first object attribute information and the second object attribute information, and update the asset custody record of the first object according to the first digital asset; the first object attribute information belongs to the first object, and the second object attribute information belongs to the custodian.
[0099] In the present application, the escrow service device may send the transfer request to the blockchain node so that the blockchain node transfers the first digital asset to the first escrow address after determining that there is an escrow relationship between the escrow party and the first object.
[0100] Optionally, the escrow service device can obtain the total amount of assets corresponding to the digital assets in the first escrow address; if the total amount of assets is greater than the asset amount threshold, the digital assets of the specified amount of assets in the first escrow address are transferred to the second escrow address in an offline state; the specified amount of assets is less than the total amount of assets. The first escrow address can be called a hot resource address, which is a resource address that is kept online, that is, an online resource address. The carrier of the hot resource address is an online device, such as an online mobile phone, computer, a notebook that records private keys and hot resource addresses, etc. The second escrow address can be called a cold resource address, which is a resource address that is not online, also called an offline resource address. The carrier of the cold resource address is a cold device, such as an offline mobile phone, computer, a notebook that records private keys and cold resource addresses, etc. By transferring part of the escrowed digital assets to the cold resource address, it is helpful to improve the escrow security of digital assets.
[0101] For example, Fig. 9 As shown, it is assumed that the on-chain sub-address set of the second on-chain address includes on-chain sub-address A, on-chain sub-address B and on-chain sub-address C, and on-chain sub-address A, on-chain sub-address B and on-chain sub-address C belong to user a, user b and user c who have a custody relationship with the custodian respectively. The blockchain node can aggregate the digital assets in the on-chain sub-address A, on-chain sub-address B and on-chain sub-address C to the first custody address. When the total asset amount of the first custody address is greater than the asset amount threshold, the digital assets of the specified asset amount in the first custody address can be transferred to the second custody address. And the asset custody record on the blockchain is updated according to the user module.
[0102] Optionally, upon receiving a request to release custody regarding the first digital asset, the custody service device may transfer the first digital asset from the first custody address to the first on-chain address, and then the blockchain node transfers the first digital asset in the first on-chain address to the original address of the first object.
[0103] Optionally, after the first digital asset is transferred to the first escrow address, the escrow service device may lease or lend the digital asset in the first escrow address to other users to increase the value of the digital asset in the first escrow address. Upon receiving a request to release the escrow regarding the first digital asset, the escrow service device may transfer the first digital asset and the increased-value asset from the first escrow address to the first on-chain address. Then, the blockchain node transfers the first digital asset and the increased-value asset in the first on-chain address to the original address of the first object.
[0104] In this application, by using the blockchain network as a communication gateway between the first object and the custodian, the first object is the user who needs to custodian the first digital asset, that is, in the custody process of the first digital asset, the first digital asset is first transferred to the first on-chain address of the first object in the blockchain (i.e., in the blockchain network), and then, the first digital asset is transferred from the first on-chain address to the first custodian's first custodian address, and the asset custody registration of the first object on the blockchain is updated according to the first digital asset, so that the custody process of the first digital asset is witnessed by the blockchain network, and the custody security and transparency of the digital asset are improved. At the same time, even if the custody platform is maliciously attacked, the asset custody record of the first object can still be queried from the blockchain, and the target user can still trace the first digital asset to the custodian based on the asset custody record, thereby improving the custody security of the digital asset. In addition, the blockchain node transfers the first digital asset from the first on-chain address to the first custodial address only when it verifies that there is a custodial relationship between the first object and the custodian based on the first object attribute information of the first object and the second object attribute information of the custodian, which can avoid the first digital asset from being transferred to an illegal custodial address, further improving the custodial security of the digital asset; the custody process of the first digital asset is completed online, improving the convenience and efficiency of the custody of the digital asset.
[0105] See also Fig.10 , is a schematic diagram of the structure of a blockchain data processing device provided in an embodiment of the present application. The above-mentioned blockchain data processing device may be a computer program (including program code) running on a computer device. For example, the blockchain data processing device is an application software, which can be used to execute the corresponding steps in the method provided in an embodiment of the present application. Fig.10 As shown, the blockchain data processing device may include:
[0106] The first transfer module 1011 is configured to transfer the first digital asset to the first on-chain address of the first object in the blockchain if a custody request for the first digital asset of the first object is received; the custody request carries the first object attribute information of the first object;
[0107] The verification module 1012 is configured to verify the custody relationship between the first object and the custodian according to the first object attribute information and the second object attribute information of the custodian carried in the transfer request, if a transfer request for transferring the first digital asset to the first custody address of the custodian is received;
[0108] The second transfer module 1013 is used to transfer the first digital asset in the first on-chain address to the first escrow address if it is verified that there is an escrow relationship between the first object and the escrow party;
[0109] The updating module 1014 is used to update the asset custody record of the first object on the blockchain according to the first digital asset.
[0110] Optionally, the first object attribute information includes the first on-chain address, and the second object attribute information includes the signature information of the custodian, the transfer transaction data, and the object identifier of the custodian;
[0111] Optionally, the verification module 1012 includes a reading unit 101a, a first verification unit 102a, a second verification unit 103a and a determination unit 104a;
[0112] A reading unit 101a is used to read the second on-chain address of the custodian from the blockchain according to the object identifier of the custodian;
[0113] The first verification unit 102a is used to verify the signature information of the custodian according to the second on-chain address and the transfer transaction data to obtain a first verification result;
[0114] The second verification unit 103a is used to verify the derivation relationship between the first on-chain address and the second on-chain address to obtain a second verification result if the first verification result indicates that the signature information of the custodian has been verified;
[0115] The determination unit 104a is used to determine that there is a trusteeship relationship between the first object and the trustee if the second verification result indicates that the first on-chain address is derived from the second on-chain address.
[0116] Optionally, the signature information of the custodian is directly generated based on the transfer transaction data; the first verification unit 102a verifies the signature information of the custodian according to the second on-chain address and the transfer transaction data to obtain a first verification result, including:
[0117] According to the second on-chain address, the signature information of the custodian is decrypted to obtain first decrypted data;
[0118] Determine the matching degree between the first decryption data and the transfer transaction data;
[0119] If the degree of match between the decrypted data and the transfer transaction data is greater than a first matching degree threshold, a first verification result indicating that the signature information of the custodian has been verified successfully is generated.
[0120] Optionally, the signature information of the custodian is indirectly generated based on the transfer transaction data; the first verification unit 102a verifies the signature information of the custodian according to the second on-chain address and the transfer transaction data to obtain a first verification result, including:
[0121] According to the second on-chain address, the signature information of the custodian is decrypted to obtain the second decrypted data;
[0122] Performing a hash operation on the transfer transaction data to obtain a first hash value of the transfer transaction data;
[0123] Determine the degree of match between the second decrypted signature data and the first hash value;
[0124] If the degree of match between the second decrypted data and the first hash value is greater than a second matching degree threshold, a first verification result indicating that the signature information of the custodian has passed the verification is generated.
[0125] Optionally, if the first verification result indicates that the signature information of the custodian has been verified, the second verification unit 103a verifies the derivation relationship between the first on-chain address and the second on-chain address to obtain a second verification result, including:
[0126] If the first verification result indicates that the signature information of the custodian has been verified, the parent node chain code of the custodian and the child node sequence number of the first object are obtained from the blockchain;
[0127] According to the parent node chain code and the child node sequence number, the second on-chain address is derived to obtain the on-chain child address of the second on-chain address;
[0128] Determine the degree of match between the first on-chain address and the on-chain sub-address of the second on-chain address;
[0129] If the degree of match between the first on-chain address and the on-chain sub-address of the second on-chain address is greater than a third matching degree threshold, a second verification result is generated indicating that the first on-chain address is derived from the second on-chain address.
[0130] Optionally, the second verification unit 103a derives the second on-chain address according to the parent node chain code and the child node sequence number to obtain the on-chain sub-address of the second on-chain address, including:
[0131] Perform a hash operation on the second chain address, the parent node chain code, and the child node sequence number as parameters to obtain a second hash value;
[0132] Splitting the second hash value to obtain a first sub-hash value and a second sub-hash value;
[0133] The first hash value and the second on-chain address are processed to obtain the on-chain sub-address of the second on-chain address; the second sub-hash value is used to generate a child node chain code corresponding to the object occupying the on-chain sub-address of the second on-chain address.
[0134] Optionally, the second transfer module 1013 is further configured to transfer the second digital asset in the third on-chain address of the second object to the first escrow address if a transfer request for transferring the second digital asset of the second object to the first escrow address is received and it is verified that there is an escrow relationship between the second object and the escrow party;
[0135] The updating module 1014 is further used to update the asset custody record of the second object on the blockchain according to the second digital asset.
[0136] According to one embodiment of the present application, the steps involved in the blockchain data processing method shown above can be Fig.10 The various modules in the blockchain data processing device shown are executed. For example, Figure 4 The step S101 shown in FIG. 1 can be performed by Fig.10 The first transfer module 1011 is executed, Figure 4 The step S102 shown in FIG. 1 can be performed by Fig.10 The verification module 1012 is used to execute; Figure 4 The step S103 shown in FIG. 1 can be performed by Fig.10 The second transfer module 1013 is executed; Figure 4 The step S104 shown in FIG. 1 can be performed by Fig.10 The update module 1014 in is executed.
[0137] According to one embodiment of the present application, Fig.10The various modules in the blockchain data processing device shown can be combined into one or several units separately or in whole, or one (some) of the units can be further divided into at least two functionally smaller sub-units, which can achieve the same operation without affecting the realization of the technical effects of the embodiments of the present application. The above modules are divided based on logical functions. In practical applications, the functions of one module can also be implemented by at least two units, or the functions of at least two modules can be implemented by one unit. In other embodiments of the present application, the blockchain data processing device may also include other units. In practical applications, these functions can also be implemented with the assistance of other units and can be implemented by the collaboration of at least two units.
[0138] According to one embodiment of the present application, a computer program (including program code) capable of executing each step involved in the corresponding method as shown above can be constructed by running a computer program (including program code) on a general-purpose computer device such as a computer including a central processing unit (CPU), a random access storage medium (RAM), a read-only storage medium (ROM) and other processing components and storage components. Fig.10 The blockchain data processing device shown in and the blockchain data processing method of the embodiment of the present application are implemented. The above computer program can be recorded on, for example, a computer-readable recording medium, and loaded into the above computing device through the computer-readable recording medium, and run therein.
[0139] In this application, by using the blockchain network as a communication gateway between the first object and the custodian, the first object is the user who needs to custodian the first digital asset, that is, in the custody process of the first digital asset, the first digital asset is first transferred to the first on-chain address of the first object in the blockchain (i.e., in the blockchain network), and then, the first digital asset is transferred from the first on-chain address to the first custodian's first custodian address, and the asset custody registration of the first object on the blockchain is updated according to the first digital asset, so that the custody process of the first digital asset is witnessed by the blockchain network, and the custody security and transparency of the digital asset are improved. At the same time, even if the custody platform is maliciously attacked, the asset custody record of the first object can still be queried from the blockchain, and the target user can still trace the first digital asset to the custodian based on the asset custody record, thereby improving the custody security of the digital asset. In addition, the blockchain node transfers the first digital asset from the first on-chain address to the first custodial address only when it verifies that there is a custodial relationship between the first object and the custodian based on the first object attribute information of the first object and the second object attribute information of the custodian, which can avoid the first digital asset from being transferred to an illegal custodial address, further improving the custodial security of the digital asset; the custody process of the first digital asset is completed online, improving the convenience and efficiency of the custody of the digital asset.
[0140] See also Fig.11, is a schematic diagram of the structure of a blockchain data processing device provided in an embodiment of the present application. The above-mentioned blockchain data processing device may be a computer program (including program code) running on a computer device. For example, the blockchain data processing device is an application software, which can be used to execute the corresponding steps in the method provided in an embodiment of the present application. Fig.11 As shown, the blockchain data processing device may include:
[0141] A generation module 1111 is used to generate a transfer request for transferring a first digital asset of a first object to a first escrow address of a custodian; the first digital asset is transferred from a blockchain node to a first on-chain address of the first object in a blockchain;
[0142] The sending module 1112 is used to send the transfer request to the blockchain node; the blockchain node is used to transfer the first digital asset from the first on-chain address to the first custody address when verifying that there is a custody relationship between the custodian and the first object based on the first object attribute information and the second object attribute information, and update the asset custody record of the first object according to the first digital asset; the first object attribute information belongs to the first object, and the second object attribute information belongs to the custodian.
[0143] Optionally, the generating module 1111 may include a receiving unit 111a, a scanning unit 112a and a generating unit 113a;
[0144] The receiving unit 111a is used to receive the custody registration certificate of the first digital asset sent by the terminal corresponding to the first object;
[0145] A scanning unit 112a, configured to scan the blockchain according to the first on-chain address in the custody registration certificate;
[0146] The generating unit 113a is used to generate a transfer request for transferring the first digital asset of the first object to the first custodian's first escrow address if an asset transfer event is scanned on the blockchain at the first on-chain address.
[0147] Optionally, the scanning unit 112a is further used to obtain an on-chain sub-address set of the second on-chain address of the custodian; and scan the blockchain according to the on-chain sub-address set to obtain a target on-chain sub-address in which an asset transfer event exists in the on-chain sub-address set;
[0148] The generation unit 113a is also used to generate a transfer request for transferring the digital assets in the sub-address on the target chain to the first escrow address; the transfer request is used to instruct the blockchain node to aggregate the digital assets in the sub-address on the target chain to the first escrow address, and the sub-address on the target chain includes the second address on the chain.
[0149] Optionally, the scanning unit 112a scans the blockchain according to the on-chain sub-address set to obtain the target on-chain sub-address in which the asset transfer event exists in the on-chain sub-address set, including:
[0150] Get the historical time when the above blockchain was last scanned;
[0151] Determine the blocks added to the above blockchain after the above historical time;
[0152] According to the above-mentioned on-chain sub-address set, the above-mentioned added blocks are scanned and processed to obtain the target on-chain sub-address in which the asset transfer event exists in the above-mentioned on-chain sub-address set.
[0153] Optionally, the above device further includes an acquisition module 1113 and a transfer module 1114;
[0154] An acquisition module 1113 is used to acquire the total amount of assets corresponding to the digital assets in the first escrow address;
[0155] The transfer module 1114 is used to transfer the digital assets of the specified asset amount in the first custody address to the second custody address in an offline state if the total asset amount is greater than the asset amount threshold; the specified asset amount is less than the total asset amount.
[0156] Optionally, the generating module 1111 is further used to generate a root key pair, and to generate the second on-chain address of the custodian according to the root key pair;
[0157] The acquisition module 1113 is further used to obtain the parent node chain code corresponding to the above-mentioned custodian, and N child node serial numbers corresponding to N objects having a custodial relationship with the above-mentioned custodian; N is a positive integer;
[0158] The device also includes a derivation module 1115;
[0159] The derivation module 1115 is used to derive the second on-chain address according to the parent node chain code and the N child node serial numbers to obtain the on-chain sub-addresses corresponding to the N objects respectively;
[0160] The sending module 1112 is also used to send the on-chain sub-addresses corresponding to the above-mentioned N objects to the terminals of the corresponding objects.
[0161] According to one embodiment of the present application, the steps involved in the blockchain data processing method shown above can be Fig.11 The various modules in the blockchain data processing device shown are executed. For example, Figure 5 The step S201 shown in FIG. 1 can be performed by Fig.11 The generation module 1111 in is executed, Figure 5 The step S202 shown in FIG. 1 can be performed by Fig.11 The sending module 1112 in is executed.
[0162] According to one embodiment of the present application, Fig.11 The various modules in the blockchain data processing device shown can be combined into one or several units separately or in whole, or one (some) of the units can be further divided into at least two functionally smaller sub-units, which can achieve the same operation without affecting the realization of the technical effects of the embodiments of the present application. The above modules are divided based on logical functions. In practical applications, the functions of one module can also be implemented by at least two units, or the functions of at least two modules can be implemented by one unit. In other embodiments of the present application, the blockchain data processing device may also include other units. In practical applications, these functions can also be implemented with the assistance of other units and can be implemented by the collaboration of at least two units.
[0163] According to one embodiment of the present application, a computer program (including program code) capable of executing each step involved in the corresponding method as shown above can be constructed by running a computer program (including program code) on a general-purpose computer device such as a computer including a central processing unit (CPU), a random access storage medium (RAM), a read-only storage medium (ROM) and other processing components and storage components. Fig.11 The blockchain data processing device shown in and the blockchain data processing method of the embodiment of the present application are implemented. The above computer program can be recorded on, for example, a computer-readable recording medium, and loaded into the above computing device through the computer-readable recording medium, and run therein.
[0164] In this application, by using the blockchain network as a communication gateway between the first object and the custodian, the first object is the user who needs to custodian the first digital asset, that is, in the custody process of the first digital asset, the first digital asset is first transferred to the first on-chain address of the first object in the blockchain (i.e., in the blockchain network), and then, the first digital asset is transferred from the first on-chain address to the first custodian's first custodian address, and the asset custody registration of the first object on the blockchain is updated according to the first digital asset, so that the custody process of the first digital asset is witnessed by the blockchain network, and the custody security and transparency of the digital asset are improved. At the same time, even if the custody platform is maliciously attacked, the asset custody record of the first object can still be queried from the blockchain, and the target user can still trace the first digital asset to the custodian based on the asset custody record, thereby improving the custody security of the digital asset. In addition, the blockchain node transfers the first digital asset from the first on-chain address to the first custodial address only when it verifies that there is a custodial relationship between the first object and the custodian based on the first object attribute information of the first object and the second object attribute information of the custodian, which can avoid the first digital asset from being transferred to an illegal custodial address, further improving the custodial security of the digital asset; the custody process of the first digital asset is completed online, improving the convenience and efficiency of the custody of the digital asset.
[0165] See also Fig.12 , is a schematic diagram of the structure of a computer device provided in an embodiment of the present application. Fig.12 As shown, the above-mentioned computer device 1000 can be a blockchain node or hosting service device in the above-mentioned method, specifically a terminal or a server, including: a processor 1001, a network interface 1004 and a memory 1005. In addition, the above-mentioned computer device 1000 may also include: a user interface 1003, and at least one communication bus 1002. Among them, the communication bus 1002 is used to realize the connection and communication between these components. Among them, in some embodiments, the user interface 1003 may include a display screen (DiSPlay), a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 1005 may be a high-speed RAM memory, or it may be a non-volatile memory (non-volatile MeMory), such as at least one disk storage. The memory 1005 may also be optionally at least one storage device away from the aforementioned processor 1001. As Fig.12 As shown, the memory 1005 as a computer-readable storage medium may include an operating system, a network communication module, a user interface module, and a computer application program.
[0166] exist Fig.12In the computer device 1000 shown, the network interface 1004 can provide a network communication function; the user interface 1003 is mainly used to provide an input interface; and the processor 1001 can be used to call a computer application stored in the memory 1005 to achieve:
[0167] If a custody request for a first digital asset of a first object is received, the first digital asset is transferred to a first on-chain address of the first object in the blockchain; the custody request carries the first object attribute information of the first object;
[0168] If a transfer request is received to transfer the first digital asset to the first escrow address of the escrow party, verifying the escrow relationship between the first object and the escrow party according to the first object attribute information and the second object attribute information of the escrow party carried in the transfer request;
[0169] If it is verified that there is a custody relationship between the first object and the custodian, the first digital asset in the first on-chain address is transferred to the first custody address;
[0170] Based on the first digital asset, the asset custody record of the first object on the blockchain is updated.
[0171] Optionally, the first object attribute information includes the first on-chain address, and the second object attribute information includes the signature information of the custodian, the transfer transaction data, and the object identifier of the custodian;
[0172] Optionally, the processor 1001 calls a computer application stored in the memory 1005 to implement verification of the trusteeship relationship between the first object and the trustee according to the first object attribute information and the second object attribute information of the trustee carried in the transfer request, including:
[0173] According to the object identifier of the custodian, read the second on-chain address of the custodian from the blockchain;
[0174] According to the second on-chain address and the transfer transaction data, the signature information of the custodian is verified to obtain a first verification result;
[0175] If the first verification result indicates that the signature information of the custodian has been verified, then verify the derivation relationship between the first on-chain address and the second on-chain address to obtain a second verification result;
[0176] If the second verification result indicates that the first on-chain address is derived from the second on-chain address, it is determined that there is a custodial relationship between the first object and the custodian.
[0177] Optionally, the signature information of the custodian is directly generated based on the transfer transaction data;
[0178] Optionally, the processor 1001 calls a computer application stored in the memory 1005 to verify the signature information of the custodian according to the second on-chain address and the transfer transaction data, and obtain a first verification result, including:
[0179] According to the second on-chain address, the signature information of the custodian is decrypted to obtain first decrypted data;
[0180] Determine the matching degree between the first decryption data and the transfer transaction data;
[0181] If the degree of match between the decrypted data and the transfer transaction data is greater than a first matching degree threshold, a first verification result indicating that the signature information of the custodian has been verified successfully is generated.
[0182] Optionally, the signature information of the custodian is indirectly generated based on the transfer transaction data; Optionally, the processor 1001 calls a computer application stored in the memory 1005 to verify the signature information of the custodian according to the second on-chain address and the transfer transaction data, and obtain a first verification result, including:
[0183] According to the second on-chain address, the signature information of the custodian is decrypted to obtain the second decrypted data;
[0184] Performing a hash operation on the transfer transaction data to obtain a first hash value of the transfer transaction data;
[0185] Determine the degree of match between the second decrypted signature data and the first hash value;
[0186] If the degree of match between the second decrypted data and the first hash value is greater than a second matching degree threshold, a first verification result indicating that the signature information of the custodian has passed the verification is generated.
[0187] Optionally, the processor 1001 calls a computer application stored in the memory 1005 to implement, if the first verification result indicates that the signature information of the custodian has been verified, verifying the derivation relationship between the first on-chain address and the second on-chain address to obtain a second verification result, including:
[0188] If the first verification result indicates that the signature information of the custodian has been verified, the parent node chain code of the custodian and the child node sequence number of the first object are obtained from the blockchain;
[0189] According to the parent node chain code and the child node sequence number, the second on-chain address is derived to obtain the on-chain child address of the second on-chain address;
[0190] Determine the degree of match between the first on-chain address and the on-chain sub-address of the second on-chain address;
[0191] If the degree of match between the first on-chain address and the on-chain sub-address of the second on-chain address is greater than a third matching degree threshold, a second verification result is generated indicating that the first on-chain address is derived from the second on-chain address.
[0192] Optionally, the processor 1001 calls a computer application stored in the memory 1005 to implement derivation processing of the second on-chain address according to the parent node chain code and the child node sequence number to obtain the on-chain sub-address of the second on-chain address, including:
[0193] Perform a hash operation on the second chain address, the parent node chain code, and the child node sequence number as parameters to obtain a second hash value;
[0194] Splitting the second hash value to obtain a first sub-hash value and a second sub-hash value;
[0195] The first hash value and the second on-chain address are processed to obtain the on-chain sub-address of the second on-chain address; the second sub-hash value is used to generate a child node chain code corresponding to the object occupying the on-chain sub-address of the second on-chain address.
[0196] Optionally, the processor 1001 calls a computer application stored in the memory 1005 to implement:
[0197] If a transfer request is received to transfer the second digital asset of the second object to the first escrow address, and it is verified that there is an escrow relationship between the second object and the escrow party, the second digital asset in the third on-chain address of the second object is transferred to the first escrow address;
[0198] According to the second digital asset, the asset custody record of the second object on the blockchain is updated.
[0199] Optionally, the processor 1001 calls a computer application stored in the memory 1005 to implement:
[0200] Generate a transfer request for transferring a first digital asset of a first object to a first escrow address of a custodian; the first digital asset is transferred by a blockchain node to a first on-chain address of the first object in a blockchain;
[0201] The transfer request is sent to the blockchain node; the blockchain node is used to transfer the first digital asset from the first on-chain address to the first custody address when verifying that there is a custody relationship between the custodian and the first object based on the first object attribute information and the second object attribute information, and update the asset custody record of the first object according to the first digital asset; the first object attribute information belongs to the first object, and the second object attribute information belongs to the custodian.
[0202] Optionally, the processor 1001 calls a computer application stored in the memory 1005 to realize generating a transfer request for transferring the first digital asset of the first object to the first escrow address of the escrow party, including:
[0203] Receiving a custody registration certificate for the first digital asset sent by a terminal corresponding to the first object;
[0204] Scan the blockchain according to the first on-chain address in the custody registration certificate;
[0205] If an asset transfer event is detected at the first on-chain address on the blockchain, a transfer request is generated to transfer the first digital asset of the first object to the first custodian's first escrow address.
[0206] Optionally, the processor 1001 calls a computer application stored in the memory 1005 to realize generating a transfer request for transferring the first digital asset of the first object to the first escrow address of the escrow party, including:
[0207] Obtain the on-chain sub-address set of the second on-chain address of the above-mentioned custodian;
[0208] According to the above-mentioned on-chain sub-address set, the above-mentioned blockchain is scanned and processed to obtain the target on-chain sub-address with the asset transfer event in the above-mentioned on-chain sub-address set;
[0209] Generate a transfer request for transferring the digital assets in the sub-address on the target chain to the first escrow address; the transfer request is used to instruct the blockchain node to aggregate the digital assets in the sub-address on the target chain to the first escrow address, and the sub-address on the target chain includes the second address on the chain.
[0210] Optionally, the processor 1001 calls a computer application stored in the memory 1005 to scan the blockchain according to the on-chain sub-address set, and obtains a target on-chain sub-address in the on-chain sub-address set where an asset transfer event exists, including:
[0211] Get the historical time when the above blockchain was last scanned;
[0212] Determine the blocks added to the above blockchain after the above historical time;
[0213] According to the above-mentioned on-chain sub-address set, the above-mentioned added blocks are scanned and processed to obtain the target on-chain sub-address in which the asset transfer event exists in the above-mentioned on-chain sub-address set.
[0214] Optionally, the processor 1001 calls a computer application stored in the memory 1005 to implement:
[0215] Obtain the total amount of assets corresponding to the digital assets in the first escrow address;
[0216] If the above-mentioned total amount of assets is greater than the asset amount threshold, the digital assets of the specified amount of assets in the above-mentioned first custody address will be transferred to the second custody address in an offline state; the above-mentioned specified amount of assets is less than the above-mentioned total amount of assets.
[0217] Optionally, the processor 1001 calls a computer application stored in the memory 1005 to implement:
[0218] Generate a root key pair, and generate the second on-chain address of the custodian based on the root key pair;
[0219] Obtain the parent node chain code corresponding to the above custodian, and the N child node serial numbers corresponding to the N objects that have a custodial relationship with the above custodian; N is a positive integer;
[0220] According to the parent node chain code and the N child node serial numbers, the second on-chain address is derived to obtain the on-chain sub-addresses corresponding to the N objects;
[0221] The on-chain sub-addresses corresponding to the above N objects are sent to the terminals of the corresponding objects.
[0222] In this application, by using the blockchain network as a communication gateway between the first object and the custodian, the first object is the user who needs to custodian the first digital asset, that is, in the custody process of the first digital asset, the first digital asset is first transferred to the first on-chain address of the first object in the blockchain (i.e., in the blockchain network), and then, the first digital asset is transferred from the first on-chain address to the first custodian's first custodian address, and the asset custody registration of the first object on the blockchain is updated according to the first digital asset, so that the custody process of the first digital asset is witnessed by the blockchain network, and the custody security and transparency of the digital asset are improved. At the same time, even if the custody platform is maliciously attacked, the asset custody record of the first object can still be queried from the blockchain, and the target user can still trace the first digital asset to the custodian based on the asset custody record, thereby improving the custody security of the digital asset. In addition, the blockchain node transfers the first digital asset from the first on-chain address to the first custodial address only when it verifies that there is a custodial relationship between the first object and the custodian based on the first object attribute information of the first object and the second object attribute information of the custodian, which can avoid the first digital asset from being transferred to an illegal custodial address, further improving the custodial security of the digital asset; the custody process of the first digital asset is completed online, improving the convenience and efficiency of the custody of the digital asset.
[0223] It should be understood that the computer device described in the embodiments of the present application can execute the description of the above-mentioned blockchain data processing method in the corresponding embodiment above, and can also execute the description of the above-mentioned blockchain data processing device in the corresponding embodiment above, which will not be repeated here. In addition, the description of the beneficial effects of adopting the same method will not be repeated.
[0224] In addition, it should be pointed out here that: the embodiment of the present application also provides a computer-readable storage medium, and the computer-readable storage medium stores a computer program executed by the blockchain data processing device mentioned above, and the computer program includes program instructions. When the processor executes the program instructions, it can execute the description of the blockchain data processing method in the corresponding embodiment above, so it will not be repeated here. In addition, the description of the beneficial effects of the same method will not be repeated. For technical details not disclosed in the computer-readable storage medium embodiment involved in this application, please refer to the description of the method embodiment of this application.
[0225] As an example, the above program instructions may be deployed on a computer device for execution, or deployed on at least two computer devices at one location for execution, or executed on at least two computer devices distributed at at least two locations and interconnected through a communication network. At least two computer devices distributed at at least two locations and interconnected through a communication network may constitute a blockchain network.
[0226] The computer-readable storage medium may be the blockchain data processing device provided in any of the aforementioned embodiments or the central storage unit of the computer device, such as a hard disk or a central storage of the computer device. The computer-readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, a smart memory card (SMART Media card, SMC), a secure digital (Secure digital, SD) card, a flash memory card (flaSh card), etc. equipped on the computer device. Further, the computer-readable storage medium may also include both the central storage unit of the computer device and an external storage device. The computer-readable storage medium is used to store the computer program and other programs and data required by the computer device. The computer-readable storage medium may also be used to temporarily store data that has been output or is to be output.
[0227] The terms "first", "second", etc. in the description, claims, and drawings of the embodiments of the present application are used to distinguish between contents in different media, rather than to describe a specific order. In addition, the terms "including" and any of their variations are intended to cover non-exclusive inclusions. For example, a process, method, device, product, or equipment that includes a series of steps or units is not limited to the listed steps or modules, but may optionally include steps or modules that are not listed, or may optionally include other step units inherent to these processes, methods, devices, products, or equipment.
[0228] It is understandable that when the above embodiments of the present application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of the first object attribute information of the first object and the second object attribute information of the trustee need to comply with the relevant laws, regulations and standards of the relevant countries and regions. In other words, the computer device can obtain the first object attribute information of the first object and the second object attribute information of the trustee only when the user's authorization information for the above information is obtained; that is, the first object attribute information and the second object attribute information are obtained only after the user's authorization.
[0229] For example, a computer device displays a permission prompt interface in the user interface, which is used to prompt the user that the first object attribute information of the first object and the second object attribute information of the trustee are currently being collected. After the user issues a confirmation operation on the permission prompt interface, the step of obtaining the first object attribute information of the first object and the second object attribute information of the trustee is started, otherwise the process ends.
[0230] The embodiment of the present application also provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the description of the above-mentioned blockchain data processing method and decoding method in the corresponding embodiment above, so it will not be repeated here. In addition, the description of the beneficial effects of the same method will not be repeated. For technical details not disclosed in the embodiment of the computer program product involved in this application, please refer to the description of the method embodiment of this application.
[0231] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0232] The method and related apparatus provided by the embodiment of the present application are described with reference to the method flow chart and / or structural diagram provided by the embodiment of the present application. Specifically, each process and / or box in the method flow chart and / or structural diagram, as well as the combination of the processes and / or boxes in the flow chart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable network connection device to generate a machine, so that the instructions executed by the processor of the computer or other programmable network connection device generate instructions for implementing the process in the process. Figure 1 A process or multiple processes and / or structures Figure 1 These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable network-connected device to work in a specific manner, so that the instructions stored in the computer-readable memory produce a product including an instruction device, which implements the functions specified in the process. Figure 1 A process or multiple processes and / or structures Figure 1 These computer program instructions can also be loaded onto a computer or other programmable network connected device, so that a series of operation steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide for implementing the process. Figure 1 A flow or multiple flows and / or structures illustrate the steps of the functions specified in one block or multiple blocks.
[0233] The above disclosure is only the preferred embodiment of the present application, which certainly cannot be used to limit the scope of rights of the present application. Therefore, equivalent changes made according to the claims of the present application are still within the scope covered by the present application.
Claims
1. A blockchain data processing method, characterized in that: include: If a custody request for a first digital asset of a first object is received, the first digital asset is transferred to a first on-chain address of the first object in the blockchain; The hosting request carries first object attribute information of the first object; If a transfer request for transferring the first digital asset to a first escrow address of a custodian is received, verifying the escrow relationship between the first object and the custodian according to the first object attribute information and the second object attribute information of the custodian carried in the transfer request; If it is verified that there is a custody relationship between the first object and the custodian, the first digital asset in the first on-chain address is transferred to the first custody address; According to the first digital asset, the asset custody record of the first object on the blockchain is updated.
2. The method according to claim 1, characterized in that The first object attribute information includes the first on-chain address, and the second object attribute information includes the signature information of the custodian, the transfer transaction data, and the object identifier of the custodian; The verifying the trusteeship relationship between the first object and the trustee according to the first object attribute information and the second object attribute information of the trustee carried in the transfer request includes: Reading a second on-chain address of the custodian from the blockchain according to the object identifier of the custodian; Verifying the signature information of the custodian according to the second on-chain address and the transfer transaction data to obtain a first verification result; If the first verification result indicates that the signature information of the custodian has been verified, verifying the derivation relationship between the first on-chain address and the second on-chain address to obtain a second verification result; If the second verification result indicates that the first on-chain address is derived from the second on-chain address, it is determined that there is a custody relationship between the first object and the custodian.
3. The method according to claim 2, characterized in that The signature information of the custodian is directly generated based on the transfer transaction data; the signature information of the custodian is verified according to the second on-chain address and the transfer transaction data to obtain a first verification result, including: According to the second on-chain address, the signature information of the custodian is decrypted to obtain first decrypted data; Determining a degree of match between the first signature decoding data and the transfer transaction data; If the degree of match between the decrypted data and the transfer transaction data is greater than a first matching degree threshold, a first verification result indicating that the signature information of the custodian has passed the verification is generated.
4. The method according to claim 2, characterized in that The signature information of the custodian is indirectly generated based on the transfer transaction data; the signature information of the custodian is verified according to the second on-chain address and the transfer transaction data to obtain a first verification result, including: According to the second on-chain address, the signature information of the custodian is decoded to obtain second decoded data; Performing a hash operation on the transfer transaction data to obtain a first hash value of the transfer transaction data; Determine a degree of match between the second decrypted signature data and the first hash value; If the degree of match between the second decrypted data and the first hash value is greater than a second matching degree threshold, a first verification result indicating that the signature information of the custodian has passed the verification is generated.
5. The method according to claim 2, characterized in that If the first verification result indicates that the signature information of the custodian has been verified, verifying the derivation relationship between the first on-chain address and the second on-chain address to obtain a second verification result includes: If the first verification result indicates that the signature information of the custodian has been verified, obtaining the parent node chain code of the custodian and the child node sequence number of the first object from the blockchain; According to the parent node chain code and the child node sequence number, derive the second on-chain address to obtain the on-chain child address of the second on-chain address; Determining a degree of match between the first on-chain address and the on-chain sub-address of the second on-chain address; If the degree of match between the first on-chain address and the on-chain sub-address of the second on-chain address is greater than a third matching degree threshold, a second verification result is generated indicating that the first on-chain address is derived from the second on-chain address.
6. The method according to claim 5, characterized in that The deriving the second on-chain address according to the parent node chain code and the child node sequence number to obtain the on-chain sub-address of the second on-chain address includes: Perform a hash operation on the second chain address, the parent node chain code, and the child node sequence number as parameters to obtain a second hash value; Splitting the second Hash value to obtain a first sub-Hash value and a second sub-Hash value; The first hash value and the second on-chain address are processed by operation to obtain an on-chain sub-address of the second on-chain address; the second sub-hash value is used to generate a child node chain code corresponding to an object occupying the on-chain sub-address of the second on-chain address.
7. The method according to claim 1, characterized in that The method further comprises: If a transfer request is received to transfer the second digital asset of the second object to the first escrow address, and it is verified that there is an escrow relationship between the second object and the escrow party, the second digital asset in the third on-chain address of the second object is transferred to the first escrow address; According to the second digital asset, the asset custody record of the second object on the blockchain is updated.
8. A blockchain data processing method, characterized in that: include: Generate a transfer request for transferring a first digital asset of a first object to a first escrow address of a custodian; The first digital asset is transferred by a blockchain node to a first on-chain address of the first object in the blockchain; Sending the transfer request to the blockchain node; The blockchain node is used to transfer the first digital asset from the first on-chain address to the first escrow address when verifying that there is an escrow relationship between the escrow party and the first object based on the first object attribute information and the second object attribute information, and update the asset escrow record of the first object according to the first digital asset; The first object attribute information belongs to the first object, and the second object attribute information belongs to the trustee.
9. The method according to claim 8, characterized in that The step of generating a transfer request for transferring the first digital asset of the first object to the first escrow address of the escrow party includes: Receiving a custody registration certificate for the first digital asset sent by a terminal corresponding to the first object; Scanning the blockchain according to the first on-chain address in the escrow registration certificate; If an asset transfer event is detected at the first on-chain address on the blockchain, a transfer request is generated to transfer the first digital asset of the first object to the first custodian's first escrow address.
10. The method according to claim 8, characterized in that The step of generating a transfer request for transferring the first digital asset of the first object to the first escrow address of the escrow party includes: Obtaining a set of on-chain sub-addresses of the second on-chain address of the custodian; Scan the blockchain according to the on-chain sub-address set to obtain the target on-chain sub-address for the asset transfer event in the on-chain sub-address set; Generate a transfer request for transferring the digital assets in the sub-address on the target chain to the first escrow address; the transfer request is used to instruct the blockchain node to aggregate the digital assets in the sub-address on the target chain to the first escrow address, and the sub-address on the target chain includes the second address on the chain.
11. The method according to claim 10, characterized in that The blockchain is scanned according to the on-chain sub-address set to obtain the target on-chain sub-address for which the asset transfer event exists in the on-chain sub-address set, including: Obtain the historical time when the blockchain was last scanned; Determining a block added to the blockchain after the historical time; According to the on-chain sub-address set, the added block is scanned to obtain the target on-chain sub-address in which the asset transfer event exists in the on-chain sub-address set.
12. The method according to claim 8, characterized in that The method further comprises: Obtaining the total amount of assets corresponding to the digital assets in the first escrow address; If the total amount of assets is greater than the asset amount threshold, the digital assets of the specified amount of assets in the first custody address are transferred to the second custody address in an offline state; the specified amount of assets is less than the total amount of assets.
13. The method according to claim 10, characterized in that The method further comprises: Generate a root key pair, and generate the second on-chain address of the custodian according to the root key pair; Obtain the parent node chain code corresponding to the custodian, and the N child node serial numbers corresponding to the N objects having a custodial relationship with the custodian; N is a positive integer; According to the parent node chain code and the N child node serial numbers, the second on-chain address is derived to obtain the on-chain sub-addresses corresponding to the N objects respectively; The on-chain sub-addresses corresponding to the N objects are respectively sent to the terminals of the corresponding objects.
14. A blockchain data processing device, characterized in that: include: A first transfer module, configured to transfer the first digital asset to a first on-chain address of the first object in the blockchain upon receiving a custody request for the first digital asset of the first object; The hosting request carries first object attribute information of the first object; a verification module, configured to verify the custody relationship between the first object and the custodian according to the first object attribute information and the second object attribute information of the custodian carried in the transfer request, if a transfer request for transferring the first digital asset to the first custody address of the custodian is received; A second transfer module, configured to transfer the first digital asset in the first on-chain address to the first escrow address if it is verified that there is an escrow relationship between the first object and the escrow party; An updating module is used to update the asset custody record of the first object on the blockchain according to the first digital asset.
15. A blockchain data processing device, characterized in that: include: A generating module, configured to generate a transfer request for transferring a first digital asset of a first object to a first escrow address of a custodian; The first digital asset is transferred by a blockchain node to a first on-chain address of the first object in the blockchain; A sending module, used to send the transfer request to the blockchain node; The blockchain node is used to transfer the first digital asset from the first on-chain address to the first escrow address when verifying that there is an escrow relationship between the escrow party and the first object based on the first object attribute information and the second object attribute information, and update the asset escrow record of the first object according to the first digital asset; The first object attribute information belongs to the first object, and the second object attribute information belongs to the trustee.
16. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 13 are implemented.
17. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 13 are implemented.
18. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 13 are implemented.
