Resource management method and device, equipment and storage medium

By converting basic resources into new resources on the blockchain and configuring target logic contracts, and using new resource management contracts to manage multiple new resources, the problem of excessive number of contracts and difficulty in management due to the excessive number of digital asset types is solved, and specific business logic functions for new business scenarios are realized.

CN120670093APending Publication Date: 2025-09-19TENPAY PAID TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410306883.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-03-18
Publication Date
2025-09-19

AI Technical Summary

Technical Problem

Due to the excessive number of digital assets on the blockchain, there are too many contracts, which greatly increases the difficulty of management.

Method used

By converting basic resources into new resources and configuring target logic contracts, new resource management contracts are used to manage multiple new resources, reducing the number of contracts and realizing specific business logic functions for new business scenarios.

Benefits of technology

It reduces the number of contracts in the blockchain system, easing the difficulty of digital asset management and enabling specific business logic functions for new business scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120670093A_ABST
    Figure CN120670093A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of block chains, and provides a resource management method and device, equipment and a storage medium. The method comprises the steps of obtaining a target logic contract in response to a resource creation instruction triggered for a target business scene; registering the resource information of the target novel resource and the mapping relation between the target novel resource and the target logic contract into a novel resource management contract; calling a target logic contract, and creating the basic resources of the first conversion quantity into target novel resources conforming to the creation quantity; the plurality of novel resources are created based on the same basic resources; and calling the novel resource management contract, and modifying the holding quantity of the target novel resources of the resource creation party address based on the creation quantity. According to the method, the management difficulty of the digital assets can be reduced by reducing the number of contracts. The embodiment of the invention can be applied to various scenes such as cloud technology, artificial intelligence, intelligent traffic, auxiliary driving and the like.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of blockchain technology and provides a resource management method, apparatus, device and storage medium. Background Art

[0002] Financial activities on blockchains are becoming increasingly frequent, encompassing a wide variety of business scenarios, each using different digital assets. As these business scenarios continue to expand, the variety of digital assets created is also rapidly increasing. This situation significantly increases the difficulty of managing digital assets on blockchains.

[0003] For example, if there are N business scenarios, N digital assets need to be created. Since each of these N digital assets requires the deployment of its own digital asset contract and its own business logic contract to implement its own transaction logic, subsequent digital asset management on the blockchain requires the management of N digital asset contracts and N business logic contracts. As N increases, the number of digital asset contracts and business logic contracts that need to be managed also increases significantly.

[0004] Based on this, as the application scenarios of blockchain increase, there is a problem in related technologies that the difficulty of digital asset management has greatly increased due to the excessive types of digital assets. Summary of the Invention

[0005] The embodiments of the present application provide a resource management method, apparatus, device, and storage medium to address the problem in related technologies that the excessive number of types of digital assets leads to an excessive number of contracts, greatly increasing the difficulty of digital asset management.

[0006] In a first aspect, an embodiment of the present application provides a resource management method, which is applied to any node in a blockchain system, comprising:

[0007] In response to a resource creation instruction triggered for a target business scenario, a target logical contract is obtained; the resource creation instruction carries at least the resource creator address and creation quantity of a target new resource, the target new resource being a new data resource applied to the target business scenario, and the target logical contract represents the processing logic of the target new resource;

[0008] Registering the resource information of the target new resource and the mapping relationship between the target new resource and the target logical contract in a new resource management contract; the new resource management contract is used to manage multiple new resources in the blockchain system;

[0009] Invoking the target logic contract to create a first conversion quantity of the basic resource into a target new resource that matches the creation quantity; the basic resource is a data resource already existing in the blockchain system, and the multiple new resources are created based on the same basic resource; the first conversion quantity is determined based on the creation quantity and the processing logic of the target new resource;

[0010] The new resource management contract is called to modify the holding quantity of the target new resource of the resource creator address based on the creation quantity.

[0011] In a second aspect, an embodiment of the present application further provides a resource management device, which is applied to any node in a blockchain system, including:

[0012] an acquisition unit, configured to acquire a target logical contract in response to a resource creation instruction triggered for a target business scenario; the resource creation instruction carries at least a resource creator address and a creation quantity of a target new resource, the target new resource being a new data resource applied to the target business scenario; and the target logical contract representing a processing logic for the target new resource;

[0013] A registration unit, configured to register resource information of the target new resource and a mapping relationship between the target new resource and the target logical contract in a new resource management contract; the new resource management contract is configured to manage multiple new resources in the blockchain system;

[0014] a creation unit, configured to call the target logic contract and create a first conversion quantity of the basic resource into a target new resource that meets the creation quantity; the basic resource is a data resource already existing in the blockchain system, and the multiple new resources are created based on the same basic resource; the first conversion quantity is determined based on the creation quantity and the processing logic of the target new resource;

[0015] The resource transfer unit is used to call the new resource management contract and modify the holding quantity of the target new resource of the resource creator address based on the creation quantity.

[0016] In one possible implementation, before the creation unit calls the target logical contract to create the first conversion quantity of basic resources as the target new type of resources that meet the creation quantity, the authorization unit is used to: write the calling address of the target logical contract and the resource creator address into the digital asset contract used to manage basic resources, so that the target logical contract obtains the operation authority of the basic resources located at the resource creator address; when the creation unit calls the target logical contract to create the first conversion quantity of basic resources as the target new type of resources that meet the creation quantity, it is specifically used to: call the target logical contract to determine the first conversion quantity of basic resources required to create the target new type of resources that meet the creation quantity; based on the operation authority, obtain the basic resources that meet the first conversion quantity from the resource creator address; and use the obtained basic resources to create the target new type of resources that meet the creation quantity.

[0017] In one possible implementation, when the creation unit calls the target logical contract to determine the first conversion quantity of basic resources required to create the target new type of resources that meets the creation quantity, it is specifically used to: call the target logical contract, and based on the processing logic of the target new type of resources, calculate the first conversion quantity of basic resources required to create the target new type of resources that meets the creation quantity; when the creation unit obtains the basic resources that meet the first conversion quantity from the resource creator address based on the operation authority, it is specifically used to: transfer the basic resources that meet the first conversion quantity from the resource creator address to the calling address of the target logical contract based on the operation authority.

[0018] In a third aspect, an embodiment of the present application further provides a computer device comprising a processor and a memory, wherein the memory stores program code, and when the program code is executed by the processor, the processor executes the steps of any one of the above-mentioned resource management methods.

[0019] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium comprising a program code. When the program product is run on a computer device, the program code is used to enable the computer device to execute the steps of any one of the above-mentioned resource management methods.

[0020] In a fifth aspect, an embodiment of the present application further provides a computer program product, comprising computer instructions, which are executed by a processor to perform the steps of any one of the above-mentioned resource management methods.

[0021] The beneficial effects of this application are as follows:

[0022] The embodiments of the present application provide a resource management method, apparatus, device, and storage medium, in which the method generates resources that can be applied to new business scenarios and have processing logic corresponding to the new business scenarios by converting basic resources into new resources. Since the target new resources are created on the basis of basic resources, when transferring resources, it can be achieved by calling a digital asset contract. Moreover, through the new resource management contract, multiple new resources in the blockchain system can be managed, so there is no need to separately configure a digital asset contract that is unique to the target new resource for the target new resource, thereby greatly reducing the number of contracts in the blockchain system. This solves the problem in the related art that due to the excessive number of types of digital assets, the number of contracts is too large, and the difficulty of digital asset management is greatly increased.

[0023] In addition, since the target logic contract is configured for the target new resource, even if the target new resource is created based on the basic resource, the specific business logic functions of the new business scenario can be realized.

[0024] Other features and advantages of the present application will be described in the following description, and in part will become apparent from the description, or will be understood by practicing the present application. The purposes and other advantages of the present application can be realized and obtained by the structures particularly pointed out in the written description, claims, and drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0026] Figure 1 A schematic diagram of the mapping relationship between digital assets and contracts in the related technology provided in the embodiments of this application;

[0027] Figure 2 This is an optional structural diagram of the distributed system provided in the embodiment of the present application applied to a blockchain system;

[0028] Figure 3 An optional schematic diagram of the block structure provided in an embodiment of the present application;

[0029] Figure 4 An exemplary flow chart of a resource management method provided in an embodiment of the present application;

[0030] Figure 5 A schematic diagram of the content of a new resource management contract provided in an embodiment of the present application;

[0031] Figure 6AA schematic diagram of a contract in a blockchain system provided in an embodiment of the present application;

[0032] Figure 6B A schematic diagram of the contract structure provided for an embodiment of this application;

[0033] Figure 7 A schematic diagram of the target new resource creation process provided in an embodiment of the present application;

[0034] Figure 8 A schematic diagram of the target new resource creation process provided in an embodiment of the present application;

[0035] Figure 9 A schematic diagram of a transaction process for a target new resource provided in an embodiment of the present application;

[0036] Figure 10A A schematic diagram of a transaction process for a target new resource provided in an embodiment of the present application;

[0037] Figure 10B A schematic diagram of another transaction process for a target new resource provided in an embodiment of the present application;

[0038] Figure 11 A flowchart of a method for redeeming a target new resource provided in an embodiment of the present application;

[0039] Figure 12 A schematic diagram of the redemption process provided in an embodiment of the present application;

[0040] Figure 13 Schematic diagram of the redemption process provided in the embodiment of the present application;

[0041] Figure 14 A schematic diagram of the structure of a resource management device provided in an embodiment of the present application;

[0042] Figure 15 A schematic diagram of the hardware structure of a computer device to which the embodiments of the present application are applied;

[0043] Figure 16 A schematic diagram of the hardware structure of another computer device to which an embodiment of the present application is applied. DETAILED DESCRIPTION

[0044] To make the purpose, technical solutions, and advantages of the embodiments of this application more clear, the technical solutions of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are part of the embodiments of the technical solutions of this application, but not all of them. Based on the embodiments described in this application document, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the technical solutions of this application.

[0045] The following explains some of the terms used in the embodiments of the present application to facilitate understanding by those skilled in the art.

[0046] 1) Prohibited Transaction List: Used to restrict accounts or addresses on the list from participating in specific operations or transactions.

[0047] 2) Allowed transaction list: used to allow accounts or addresses on the list to participate in specific operations or transactions.

[0048] The following is a brief introduction to the design concept of the embodiment of this application:

[0049] Financial activities on the blockchain are becoming increasingly frequent, and a variety of different business scenarios have emerged. By using a different digital asset for each business scenario, asset types can be clearly defined and the business scenarios can be highly customized. However, as business scenarios continue to expand, the corresponding digital asset types and the number of contracts have also increased dramatically. This situation has greatly increased the difficulty of managing digital assets on the blockchain.

[0050] See also Figure 1 This is a diagram of the mapping relationship between digital assets and contracts in the related technology provided by the embodiment of this application. Figure 1 As shown in the figure, assume that there are N digital assets in the current blockchain system: Digital Asset 1, Digital Asset 2, and so on. Each digital asset corresponds to a digital asset contract and a business logic contract. That is, Digital Asset 1 corresponds to Digital Asset Contract 11 and Business Logic Contract 12, Digital Asset 2 corresponds to Digital Asset Contract 21 and Business Logic Contract 22, Digital Asset 3 corresponds to Digital Asset Contract 31 and Business Logic Contract 32, and so on. Digital Asset N corresponds to Digital Asset Contract N1 and Business Logic Contract N2. This shows that when a blockchain system manages digital assets, it needs to manage N digital asset contracts and N business logic contracts. As the value of N increases, the number of digital asset contracts and business logic contracts that need to be managed also increases significantly, which undoubtedly increases the difficulty of managing digital assets on the blockchain.

[0051] In view of this, an embodiment of the present application provides a resource management method, apparatus, device and storage medium. The method can be applied to any node in a blockchain system, including: in response to a resource creation instruction triggered for a target business scenario, obtaining a target logical contract, and registering the resource information of the target new resource, as well as the mapping relationship between the target new resource and the target logical contract, into a new resource management contract. Call the target logical contract to create the basic resource of the first conversion quantity as a target new resource that meets the creation quantity. Call the new resource management contract to modify the holding quantity of the target new resource of the resource creator address based on the creation quantity. The basic resource is a data resource already existing in the blockchain system, and multiple new resources are created based on the same basic resource.

[0052] The resource management method provided in the embodiment of the present application can generate resources that can be applied to new business scenarios and have processing logic corresponding to the new business scenarios by converting basic resources into new resources. Since the target new resources are created based on the basic resources, when transferring resources, it can be achieved by calling the digital asset contract. Moreover, through the new resource management contract, multiple new resources in the blockchain system can be managed, so there is no need to separately configure a digital asset contract that is unique to the target new resource for the target new resource, thereby greatly reducing the number of contracts in the blockchain system. This solves the problem in the related art that due to the excessive number of digital assets, the number of contracts is too large, and the difficulty of digital asset management is greatly increased.

[0053] In addition, since the target logic contract is configured for the target new resource, even if the target new resource is created based on the basic resource, the specific business logic functions of the new business scenario can be realized.

[0054] The preferred embodiments of the present application are described below in conjunction with the drawings in the specification. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present application and are not used to limit the present application. In addition, the embodiments and features in the embodiments of the present application can be combined with each other if there is no conflict.

[0055] The system involved in the embodiment of the present invention may be a distributed system formed by connecting a client and multiple nodes (any form of computing devices in an access network, such as a server and a user terminal) through network communication.

[0056] Taking the distributed system as the blockchain system as an example, see Figure 2 , Figure 2This is an optional structural diagram of the distributed system 100 provided in an embodiment of the present application applied to a blockchain system. The system is composed of multiple nodes (any form of computing device connected to the network, such as servers and user terminals) and clients. The nodes form a peer-to-peer network. The peer-to-peer protocol is an application layer protocol running on top of the Transmission Control Protocol (TCP). In a distributed system, any machine, such as a server or terminal, can join and become a node. Nodes include the hardware layer, the middle layer, the operating system layer, and the application layer.

[0057] See also Figure 2 The functions of each node in the blockchain system shown include:

[0058] 1) Routing: A basic function of a node, used to support communication between nodes.

[0059] In addition to the routing function, nodes can also have the following functions:

[0060] 2) Applications, deployed in the blockchain, implement specific services based on actual business needs, record data related to the implementation of functions to form record data, carry digital signatures in the record data to indicate the source of the task data, and send the record data to other nodes in the blockchain system for other nodes to add the record data to a temporary block when they successfully verify the source and integrity of the record data.

[0061] 3) Blockchain, including a series of blocks that are connected to each other in the order of their generation. Once a new block is added to the blockchain, it will not be removed. The block records the record data submitted by the nodes in the blockchain system.

[0062] See also Figure 3 , Figure 3 This is an optional schematic diagram of the block structure provided by the embodiment of the present application. Each block includes the hash value of the transaction record stored in this block (the hash value of this block) and the hash value of the previous block. The blocks are connected by hash values ​​to form a blockchain. In addition, the block can also include information such as the timestamp when the block was generated. Blockchain is essentially a decentralized database, a series of data blocks generated using cryptographic methods. Each data block contains relevant information used to verify the validity of its information (anti-counterfeiting) and generate the next block.

[0063] The present invention provides a resource management method that can be applied to Figure 2 Any node in the blockchain system shown. Figure 4This is an exemplary flow chart of a resource management method provided in an embodiment of the present application. The method may include the following steps 401 to 404:

[0064] Step 401: In response to a resource creation instruction triggered for a target business scenario, a target logical contract is obtained.

[0065] The resource creation instruction carries at least the resource creator address of the target new resource and the target new resource creation quantity. The target new resource is a new type of resource, which is a new data resource applied to a new business scenario. For example, the target new resource is a new digital asset applied to a new business scenario. For example, the target new resource can be a digital asset used to purchase items in a newly developed blockchain game. The target new resource can also be a digital asset used to access premium content in a blockchain-based forum, and so on.

[0066] In one possible implementation, the resource creator of each new resource can configure a corresponding logic contract for it. The target logic contract is pre-configured by the resource creator of the target new resource based on the processing logic of the target new resource. Therefore, it can be used to represent the processing logic of the target new resource. The processing logic may include transaction logic, such as issuance, subscription, and redemption logic. The resource creators of different new resources can be the same or different.

[0067] In one example, A is the target new resource and B is the base resource. The resource creator of A can configure transaction logic such as A's allowed transaction list, prohibited transaction list, and the selling price of A equal to n Bs in A's target logic contract. Here, n can be any integer, such as 1, 10, or 100.

[0068] It should be noted that the processing logic of the target new resource can be configured by the resource creator based on experience or the actual business needs of the target business scenario, and this application does not limit this.

[0069] Optionally, after the target new resource is created, if the processing logic of the target new resource needs to be adjusted, the target logic contract can be called to update the configured processing logic. For example, the addresses included in the allowed transaction list and the addresses included in the prohibited transaction list can be adjusted.

[0070] Step 402: Register the resource information of the target new resource and the mapping relationship between the target new resource and the target logical contract into the new resource management contract.

[0071] The new resource management contract is used to manage multiple new resources included in the blockchain system. When a blockchain system includes multiple new resources, the new resource management contract can include resource information for each of the multiple new resources, as well as the mapping relationship between the multiple new resources and their corresponding logical contracts.

[0072] Specifically, when registering the target new resource's resource information with a new resource management contract, relevant information about the new resource, such as the name of the new resource and the total amount of new resource created, can be written into the new resource management contract. When registering the mapping relationship between multiple new resources and their corresponding logical contracts with a new resource management contract, the identifier of the corresponding logical contract and the call address of the logical contract can be written into the new resource management contract.

[0073] In one possible implementation, if the target new resource is created for the first time, the total creation amount can be configured as the creation amount. If the target new resource is not created for the first time, the total creation amount of the target new resource configured in the new resource management contract can be modified according to the creation amount.

[0074] For example, if the target new resource creation quantity is 100 and this is the first creation, the total creation quantity of the target new resource in the new resource management contract is configured to be 100. If this is not the first creation and the total creation quantity of the target new resource configured in the new resource management contract is 50, the total creation quantity configured in the new resource management contract can be modified to 100 + 50 = 150.

[0075] See also Figure 5 This is a schematic diagram of the content of the new resource management contract provided in the embodiment of this application. Figure 5 As shown in the figure, assume that the blockchain system includes new resources A, B, and C, and that new resource A corresponds to logical contract aa, new resource B corresponds to logical contract bb, and new resource C corresponds to logical contract cc. The new resource management contract can include the name of new resource A: tokenA, total creation quantity: 100, the logical contract corresponding to new resource A: logical contract aa, and the calling address of logical contract aa; the name of new resource B: tokenB, total creation quantity: 50, the logical contract corresponding to new resource B: logical contract bb, and the calling address of logical contract bb; the name of new resource C: tokenC, total creation quantity: 300, the logical contract corresponding to new resource C: logical contract cc, and the calling address of logical contract cc.

[0076] See also Figure 6AThis is a schematic diagram of a contract in a blockchain system provided by an embodiment of the present application. In the case where all new resources in the blockchain system are converted based on the same basic resource, the blockchain system may include only one digital asset contract, that is, only the digital asset contract corresponding to the basic resource. Based on this, Figure 6A As shown, when there are M new types of resources, the contracts in the blockchain system may include 1 digital asset contract, 1 new resource management contract and M logic contracts.

[0077] In one example, see Figure 6B Schematic diagram of the contract structure provided for the embodiment of this application. Taking the target new resource as an example, the digital asset contract is used to implement the transfer operation of the basic resource, thereby converting the basic resource into the target new resource. The new resource management contract is used to manage the target new resource, such as the resource information of the target new resource, the total creation amount, and the number of target new resources held by the holder of the target new resource. The target logic contract is used to provide the processing logic of the target new resource. In specific implementation, the resource creator can create the target new resource by configuring the processing logic of the target new resource in the target logic contract and registering the target new resource in the new resource contract.

[0078] Based on the above scheme, Figure 6A The M in Figure 1 When N is equal, the related art requires managing 2N contracts, while the resource management method provided by the embodiments of this application only requires managing M+2 contracts. Compared with the related art, the number of contracts is reduced by N-2. Therefore, as business scenarios gradually increase, the resource management method provided by the embodiments of this application greatly reduces the number of contracts, thereby reducing the difficulty of managing digital assets.

[0079] Step 403: Call the target logical contract to create the first conversion quantity of basic resources into target new resources that meet the creation quantity.

[0080] The base resource is a data resource already in the blockchain system, and multiple new resources are created based on the same base resource. For example, the base resource can be a digital asset already in the blockchain system. The first conversion quantity is determined based on the creation quantity and the processing logic of the target new resource.

[0081] In one possible implementation, before executing step 403, the calling address of the target logical contract and the resource creator address can also be written into the digital asset contract used to manage the basic resources, so that the target logical contract obtains the operation authority of the basic resources located at the resource creator address.

[0082] Specifically, the resource creator can call the authorization function of the digital asset contract, write the calling address and the resource creator address into the digital asset contract used to manage basic resources, thereby authorizing the target logical contract to operate the specified number of basic resources in the resource creator address.

[0083] In one example, the authorization function can be: function approve(address_spender,uint256_value)returns(bool success). Wherein, address_spender represents the authorized address, so in step 402, address_spender can be the calling address of the target logical contract. uint256_value represents an unsigned integer, which is used to represent the number of basic resources that the authorized party is allowed to operate. returns(boolsuccess) indicates that the return type of the function is a Boolean value (bool), which is used to represent the result or status of the function execution. That is, when the function is actually called, if the function is successfully executed and achieves the expected result, true is returned, indicating that the operation is successful; if the function execution fails or does not achieve the expected result, false is returned, indicating that the operation failed.

[0084] In some embodiments, after the authorization function is called and the authorization is successfully completed, an authorization event can be triggered to record the relevant information of the authorization: event Approval(address indexed_owner, address indexed_spender, uint256_value). Among them, address indexed_owner represents the address of the owner of the basic resource, which is the address of the resource creator in this embodiment. Address indexed_spender represents the authorized address, which is the calling address of the target logical contract in this embodiment. uint256_value represents the authorized quantity, that is, the number of basic resources that the authorized party is allowed to operate. Based on this, the authorization event can record relevant information such as the authorizer, the authorized party, and the authorized quantity, so as to provide relevant personnel with historical and real-time information on the authorization.

[0085] It should be noted that the above authorization functions and authorization event forms are merely exemplary. The authorization functions may be different when different protocol standards are applied. This application does not limit the specific forms of the authorization functions and authorization events.

[0086] In one possible implementation, step 403 can be specifically performed as follows: calling the target logic contract, determining the first conversion quantity of the basic resources required to create the target new type of resources that meets the creation quantity, and then based on the operation authority, obtaining the basic resources that meet the first conversion quantity from the resource creator address, and then using the obtained basic resources to create the target new type of resources that meets the creation quantity.

[0087] Specifically, the target logical contract can be called to calculate the first conversion quantity of the basic resources required to create the target new resource in the required quantity based on the transaction logic of the target new resource. The target logical contract can then, based on the obtained operation permissions, transfer the basic resources that meet the first conversion quantity from the resource creator's address to the calling address. This creates the target new resource in the required quantity using the obtained basic resources.

[0088] For example, if A is the target new resource and B is the base resource, and the creation quantity is 5, and the selling price of A configured in the target logic contract is 10 B, then the first conversion quantity can be calculated as 5*10=50. The target logic contract can then transfer 50 B from the resource creator address to the calling address, and then use the 50 B to create 5 A.

[0089] In some embodiments, after transferring the basic resources that meet the first conversion quantity from the resource creator address to the calling address of the target logical contract, the basic resource transfer result may be returned to the target logical contract. Specifically, if the transfer is successful, a transfer success message may be returned to the target logical contract; otherwise, a transfer failure message may be returned to the target logical contract. For example, if the resource creator address does not have a sufficient number of basic resources, a transfer failure message may be returned to the target logical contract.

[0090] In one example, the transfer of basic resources can be achieved through the transfer function: function transferFrom (address_from, address_to, uint256_value) returns (bool success). Among them, address_from represents the address of the basic resource to be transferred, which is the address of the resource creator in the embodiment of the present application. Address_to represents the address to which the basic resource is transferred, which is the calling address of the target logical contract in the embodiment of the present application. uint256_value represents the number of basic resources transferred. returns (bool success) indicates that the return type of the function is a Boolean value (bool), which is used to represent the result or status of the function execution. That is, when the function is actually called, if the function is executed successfully and achieves the expected result, true is returned, indicating that the transfer is successful; if the function execution fails or does not achieve the expected result, false is returned, indicating that the transfer failed.

[0091] Furthermore, after calling the transfer function and successfully transferring the underlying resource, a transfer event can be triggered: eventTransfer(address indexed_from, address indexed_to, uint256_value). Addressindexed_from represents the address of the underlying resource being transferred, which in this embodiment is the address of the resource creator. Addressindexed_to represents the address to which the underlying resource is being transferred, which in this embodiment is the calling address of the target logical contract. uint256_value represents the amount of the underlying resource transferred. Based on this, the transfer event can record relevant information such as the transfer parties and the transfer amount, providing relevant personnel with historical and real-time information on the transfer.

[0092] In one possible implementation, the address authorized to operate basic resources can perform basic resource transfer operations on behalf of the address of the basic resources being transferred by calling the above transfer function multiple times. However, the total number of basic resources transferred cannot exceed the value of uint256_value in the authorization function, that is, it cannot exceed the authorized quantity.

[0093] Based on this, when performing a basic resource transfer operation, you can also query the remaining transferable amount through the quota query function: function allowance(address_owner,address_spender)view returns(uint256remaining). Among them, the transferable amount is the difference between the authorized amount and the amount of basic resources that have been transferred. The meanings of address_owner and address_spender can be found in the relevant descriptions in the above embodiments and will not be repeated here. uint256 remaining represents the remaining transferable amount. view returns(uint256 remaining) means reading and returning the remaining transferable amount.

[0094] Optionally, when the authorization quantity needs to be reset, in order to avoid directly calling the authorization function in the above method embodiment once, which may result in the authorized address having the opportunity to transfer basic resources exceeding the authorized quantity, you can first call approve(address_spender,0) to cancel the authorization, and then call approve(address_spender,uint256 newAllowance) after the transaction is confirmed to reset the authorization quantity, where uint256newAllowance represents the new authorization quantity, that is, the new quantity of basic resources that the address with authorized basic resource operation authority is allowed to transfer.

[0095] It should be noted that the forms of the above transfer functions and transfer events are merely exemplary. The transfer functions may be different when different protocol standards are applied. This application does not limit the specific forms of the transfer functions and transfer events.

[0096] Optionally, this application does not limit the order between step 402 and step 403. For example, step 402 can be executed after step 403, that is, the mapping relationship between the target new resource and the target logical contract can also be written into the new resource management contract by the resource creator after step 403 is executed.

[0097] Step 404: Call the new resource management contract and modify the holding quantity of the target new resource located at the resource creator address based on the creation quantity.

[0098] The created target new resource may be transferred to the resource creator address by executing step 404 .

[0099] See also Figure 7 This is a schematic diagram of the target new resource creation process provided in the embodiment of this application. Figure 7 The target new resource creation process shown may include the following steps:

[0100] Step 701: trigger resource creation instruction.

[0101] Resource creators can trigger resource creation instructions by logging into an application in the blockchain system. For example, if a resource creator needs to issue a new digital asset in a new business scenario, they can trigger the resource creation instruction by logging into an application in the blockchain system.

[0102] Optionally, the resource creator may first log in to the application in the blockchain system to query the number of basic resources held by itself, and based on the number of held, determine the authorized number of basic resources that allow the target logical contract to operate, and then execute step 702 based on the authorized number.

[0103] In one example, you can query the amount of underlying resources held by calling the balance query function: function balanceOf(address_owner) view returns(uint256 balance). Address_owner represents the owner's address, which in this case is the resource creator's address. View returns(uint256 balance) returns the balance, which is the amount of underlying resources held by the resource creator's address.

[0104] Step 702: Grant basic resource operation permissions to the target logical contract.

[0105] By calling the authorization function, the target logic contract is granted the operation rights of the basic resources of the specified authorized quantity in the resource creator address, so that when the target new resource is subsequently created, the target logic contract can lock the specified quantity of basic resources. Figure 4 The relevant descriptions in the method embodiment shown are not repeated here.

[0106] Step 703: Return the authorization result.

[0107] When the authorization is successful, information indicating that the operation is successful can be returned, and an authorization event can be triggered; when the authorization fails, information indicating that the operation failed can be returned, and the creation process of the target new resource is ended without executing subsequent steps.

[0108] Step 704: Register the target new resource.

[0109] The resource creator can register the target new resource by calling the new resource management contract.

[0110] Step 705: Write the resource information of the target new resource.

[0111] The target new resource is registered by registering the resource information of the target new resource and the mapping relationship between the target new resource and the target logical contract in the new resource management contract. The specific method can be found in the relevant description of the above method embodiment and will not be repeated here.

[0112] Step 706: Return the target new resource registration result.

[0113] When the registration is successful, information indicating that the operation is successful may be returned; when the registration fails, information indicating that the operation fails may be returned, and the target new resource creation process is ended without executing subsequent steps.

[0114] Optionally, steps 704 to 706 may also be performed in steps 702 to 703, that is, first register the target new resource, and then authorize the target logical contract to operate the basic resource.

[0115] Step 707: Generate target new resources.

[0116] The target new resource generation process is initiated by calling the target logic contract.

[0117] Step 708: Calculate the first conversion quantity.

[0118] The target logic contract calculates the first conversion quantity of the basic resources required to meet the creation quantity of the target new resources based on the configured processing logic of the target new resources.

[0119] Step 709: Obtain basic resources.

[0120] The target logic contract calls the digital asset contract to obtain the basic resources at the address of the resource creator.

[0121] Step 710: Transfer basic resources.

[0122] Based on the obtained operation permissions, the target logic contract transfers the basic resources that meet the first conversion quantity from the resource creator address to the calling address of the target logic contract.

[0123] Step 711: Return the basic resource transfer result.

[0124] When the transfer is successful, information indicating that the operation is successful can be returned to the target logical contract; when the transfer fails, information indicating that the operation failed can be returned to the target logical contract, and the target new resource creation process is ended without executing subsequent steps.

[0125] Step 712: Transfer the target new resource to the resource creator.

[0126] The target logic contract calls the new resource management contract to transfer the target new resource to the resource creator address.

[0127] Step 713: Modify the holding quantity of the target new resource of the resource creator address.

[0128] The new resource management contract transfers the target new resource to the resource creator by modifying the holding quantity of the target new resource at the resource creator's address.

[0129] For example, if the initial holding quantity of the target new resource at the resource creator address is 0 and the creation quantity is 50, then the holding quantity of the target new resource at the resource creator address is modified to 0+50=50.

[0130] Step 714: Return the target new resource creation result.

[0131] The new resource management contract returns the target new resource creation result to the target logic contract.

[0132] Specifically, when the creation is successful, information indicating that the operation is successful is returned to the target logical contract; when the creation fails, information indicating that the operation fails is returned to the target logical contract.

[0133] Step 715: Return the target new resource creation result.

[0134] The target logic contract returns the target new resource creation result.

[0135] Specifically, when the creation is successful, information indicating that the operation is successful is returned; when the creation fails, information indicating that the operation fails is returned.

[0136] For example, based on Figure 7 The process diagram shown is shown in Figure 8 Schematic diagram of the target new resource creation process provided by the embodiment of this application. Assume that one target new resource needs to be created, and five basic resources are required to create one target new resource. Then, by calling the digital asset contract, the five basic resources are transferred from the resource creator address to the calling address of the target logic contract. Then, by calling the target logic contract and the new resource management contract, one target new resource can be created and transferred to the resource creator address. Among them, Figure 8 Each solid circle represents a basic resource, and each rounded square represents a target new resource. The dotted circle included in the target new resource is used to indicate that the target new resource is converted from five basic resources.

[0137] In some embodiments, after the target new resource is created, the target new resource can also be traded. The transaction can be executed in the following way: in response to the resource transaction instruction triggered for the target new resource, the target logic contract is called to verify whether the recipient address carried in the resource transaction instruction is included in the prohibited transaction list. The prohibited transaction list is pre-configured in the target logic contract. If the recipient address is not included in the prohibited transaction list, the new resource management contract is called to transfer the target new resource that meets the transaction quantity carried in the resource transaction instruction from the resource creator address to the recipient address. If the recipient address is included in the prohibited transaction list, the prohibited transaction information can be returned.

[0138] See also Figure 9 A schematic diagram of a transaction process for a target new resource provided in an embodiment of the present application. The transaction process includes the following steps 901 to 907:

[0139] Step 901: triggering a resource transaction instruction.

[0140] The resource creator can log in to the application in the blockchain system to trigger resource transaction instructions.

[0141] Step 902: The resource creator initiates a target new resource transfer process.

[0142] The resource creator initiates the target new resource transfer process by calling the target logic contract.

[0143] Step 903: Verify the recipient address.

[0144] The target logic contract verifies the recipient's address based on the pre-configured prohibited transaction list. If the recipient's address is included in the prohibited transaction list, it returns a message indicating that the transaction is prohibited, and ends the transaction process without executing subsequent steps ( Figure 9 (not shown). When the recipient's address is not included in the prohibited transaction list, step 904 is continued.

[0145] Step 904: Transfer the target new resource to the recipient.

[0146] Call the new resource management contract to transfer the target new resource to the recipient.

[0147] Step 905: Modify the holding quantity of the target new resource of the resource creator address and the recipient address.

[0148] The new resource management contract transfers the target new resource by modifying the holding quantity of the target new resource at the resource creator address and the recipient address.

[0149] For example, if the transaction quantity carried in the resource transaction instruction is 50, then 50 target new resources need to be transferred from the resource creator address to the recipient address. The new resource management contract can reduce the target new resource holding quantity of the resource creator address by 50 and increase the target new resource holding quantity of the recipient address by 50.

[0150] Step 906: Return the target new resource transfer result.

[0151] The new resource management contract returns the target new resource transfer result to the target logic contract.

[0152] Specifically, when the transfer is successful, information indicating that the transaction is successful is returned to the target logical contract; when the transfer fails, information indicating that the transaction fails is returned to the target logical contract.

[0153] Step 907: Return the target new resource transfer result.

[0154] The target logic contract returns the target new resource transfer result to inform the resource creator whether the target new resource is successfully transferred.

[0155] Specifically, when the transfer is successful, information indicating that the transaction is successful is returned; when the transfer fails, information indicating that the transaction fails is returned.

[0156] In other embodiments, the target new resource may be created based on the transaction quantity after the recipient initiates the transaction. That is, in response to a resource transaction instruction triggered for a target business scenario, a resource creation instruction for the target new resource corresponding to the target business scenario is triggered. The creation quantity carried in the resource creation instruction is determined based on the transaction quantity of the target new resource carried in the resource transaction instruction.

[0157] In this embodiment, before executing step 403, it is necessary to determine whether the recipient address carried by the resource transaction instruction is on the prohibited transaction list. If the recipient address is on the prohibited transaction list, step 403 is not executed and a prohibited transaction message is returned.

[0158] Furthermore, in this embodiment, after creating a resource, the created target resource must be transferred to the recipient. Therefore, after executing step 404, the new resource management contract can be invoked to transfer the target new resource that matches the transaction quantity from the resource creator's address to the recipient's address. Furthermore, since the total created quantity will change based on the transaction quantity, to ensure the accuracy of the target new resource's resource information, after transferring the target new resource to the recipient's address, the new resource management contract must be invoked to modify the total created quantity included in the target new resource's resource information based on the transaction quantity.

[0159] Optional, see Figure 10A A schematic diagram of a transaction process for a target new resource provided in an embodiment of the present application. Taking a blockchain game as an example, a resource transaction instruction can be triggered by the recipient completing certain specified actions within the blockchain game, such as completing certain specified tasks. In response to the resource transaction instruction, the resource creator can transfer a specified amount of the target new resource to the recipient as a task reward. In this case, the target new resource can be created first, and then traded after the creation is complete. Figure 10A In this example, a reward of one target new resource is used, and five base resources can be converted into one target new resource. When the target new resource is created, it is transferred to the resource creator's address. In response to a resource transaction instruction, the resource creator can transfer the target new resource at the resource creator's address to the recipient's address by calling the target logic contract and resource management contract, thus completing the transaction process.

[0160] See also Figure 10B This is another schematic diagram of the transaction process of the target new resource provided in the embodiment of this application. Figure 10B As shown, using the blockchain gaming business scenario as an example, a resource transaction instruction can also be triggered by the recipient initiating the purchase process of the target new resource within the blockchain game using basic resources or other types of data resources. Assume that the recipient wants to purchase one target new resource, and five basic resources can be converted into one target new resource. In response to the resource transaction instruction, the resource creator can verify that the recipient is not on the prohibited transaction list and then initiate the creation process of the target new resource. After creation, the target new resource can be transferred from the resource creator's address to the recipient's address by calling the target logic contract and the new resource management contract. The total created quantity of the target new resource, included in the resource information, is modified based on the transaction amount.

[0161] The creation process can be found in Figure 7 For the relevant description of the method embodiment shown, the transaction process can be found in Figure 9 The relevant descriptions in the method embodiment shown are not repeated here.

[0162] Based on the above scheme, the resource creator can choose to trade after creating the target new resource according to its own business needs, or create the target new resource only when trading. Therefore, the resource management method provided by the embodiment of the present application can better meet different business needs and has a wider range of applications.

[0163] In a possible implementation, the recipient of the target new resource can act as the redeemer and trigger a resource redemption instruction for the target new resource to redeem the target new resource. Figure 11 Schematic diagram of the process of redeeming the target new resource provided in the embodiment of the present application. Figure 11 The redemption can be performed by following the steps 1101-1103:

[0164] Step 1101: Check whether the redeeming party's address is included in the allowed transaction list.

[0165] The redeemer can log in to the blockchain system and initiate a redemption instruction for the target new resource. In response to this redemption instruction, the target logic contract can be called to verify whether the redeemer's address carried in the resource redemption instruction is included in the allowed transaction list.

[0166] When the redeeming party's address is not included in the allowed transaction list, execute step 1102; when the redeeming party's address is included in the allowed transaction list, execute step 1103.

[0167] The allowed transaction list is pre-configured by the resource creator in the target logic contract, and the redemption logic can be pre-configured to allow redemption operations only for addresses included in the allowed transaction list.

[0168] Step 1102: Return transaction not allowed information.

[0169] Returns information to the redeeming party address indicating that redemption is not allowed.

[0170] Step 1103: Execute a redemption operation based on the transaction logic of the target new resource.

[0171] Call the target logic contract and perform the redemption operation based on the transaction logic of the target new resource.

[0172] Specifically, step 1103 can be specifically performed as follows: calling the target logic contract to calculate the second conversion quantity of the basic resource that needs to be transferred to the redeemer's address based on the target new resource's redemption quantity carried in the redemption resource redemption instruction. Calling the new resource management contract to destroy the target new resource that meets the redemption quantity at the redeemer's address and modify the total creation quantity included in the resource information based on the redemption quantity. Finally, calling the digital asset contract to transfer the basic resource that meets the second conversion quantity from the resource creator's address to the redeemer's address.

[0173] Among them, the basic resources that meet the second conversion quantity can first be transferred from the resource creator address to the calling address of the target logical contract, and then transferred from the calling address of the target logical contract to the redeemer address.

[0174] Combine Figure 11 The process shown is shown in Figure 12 This is a redemption process diagram provided by the embodiment of this application. Figure 12As shown, the redemption process may include the following steps 1201-1211.

[0175] Step 1201: trigger resource redemption instructions.

[0176] The redeeming party can trigger a resource redemption instruction for the target new resource by logging into the application in the blockchain system.

[0177] Step 1202: Initiate redemption process.

[0178] In response to the redemption instruction triggered by the redeeming party, the redemption process is initiated.

[0179] Step 1203: Verify the redeemer's address.

[0180] The target logical contract verifies whether the redeeming party's address in the resource redemption instruction is included in the allowed transaction list. If so, proceed to step 1204; otherwise, terminate the redemption process.

[0181] Step 1204: Calculate the second conversion quantity.

[0182] Based on the processing logic of the target new resource included in the target logic contract, the second conversion quantity of the basic resource that needs to be transferred to the redeeming party address is calculated based on the redemption quantity of the target new resource carried in the redemption resource redemption instruction.

[0183] For example, assuming the redemption quantity is 50, based on the transaction logic included in the target logic contract, it can be determined that 5 basic resources can be converted into 1 target new resource. The second conversion quantity is 50*5=250.

[0184] Step 1205: Destroy the target new resource of the redeeming party's address.

[0185] The destruction process of the target new resource is initiated by calling the new resource management contract, thereby destroying the target new resource that meets the redemption quantity and is located at the redeemer's address.

[0186] Step 1206: Modify the holding quantity of the redeeming party and the total creation quantity of the target new resource.

[0187] The new resource management contract can destroy the target new resource that matches the redemption quantity at the redeemer's address by modifying the redeemer's holding quantity. For example, if the redeemer's address holds 5 of the target new resource and the redemption quantity is 1, the new resource management contract can be called to modify the redeemer's address's holding quantity of the target new resource to 5-1=4, thereby destroying 1 target new resource at the redeemer's address.

[0188] After the destruction, since the total creation amount of the target new resource has changed, the total creation amount in the new resource management contract can be modified based on the redemption amount. For example, assuming the redemption amount is 50 and the total creation amount before redemption is 500, after destroying 50 target new resources at the redeemer's address, the total creation amount can be modified to 500-50=450.

[0189] Step 1207: Return the destruction result.

[0190] Returns the destruction result to the target logical contract. If the destruction is successful, the message indicating the success of the destruction is returned to the target logical contract; if the destruction fails, the message indicating the failure of the destruction is returned to the target logical contract.

[0191] Step 1208: Transfer basic resources.

[0192] Transfer basic resources by calling digital asset contracts.

[0193] Step 1209: Transfer basic resources to the redeeming party address.

[0194] Based on the obtained operation permissions, the target logical contract can transfer the basic resources that meet the second conversion quantity from the resource creator address to the target logical contract, and then transfer them from the target logical contract to the redeemer address.

[0195] Step 1210: Return the basic resource transfer result.

[0196] Returns the basic resource transfer result to the target logical contract. If the transfer is successful, a message indicating the transfer is successful is returned to the target logical contract; if the transfer fails, a message indicating the transfer failed is returned to the target logical contract.

[0197] Step 1211: Return the redemption result.

[0198] The redemption result is returned to inform the redeemer of the result of the redemption operation. If the redemption is successful, a message indicating a successful transaction is returned; if the redemption fails, a message indicating a failed transaction is returned.

[0199] In one example, based on Figure 12 The process diagram shown is shown in Figure 13 Schematic diagram of the redemption process provided by an embodiment of the present application. The redeemer initiates the redemption process through the blockchain system. Assuming the redemption quantity is 1, and 1 target new resource can be converted into 5 basic resources. By calling the target logical contract new resource management contract and digital asset contract, the 1 target new resource in the redeemer's address can be destroyed, and the 5 basic resources that meet the requirements can be transferred from the resource creator to the target logical contract, and then from the target logical contract to the redeemer's address.

[0200] Based on the above solution, holders of target new resources can easily convert them into basic resources when they need to redeem them. This allows the target new resources to meet the business logic requirements of different application scenarios, ultimately resolving the related technical issue of reducing the difficulty of digital asset management amidst the ever-increasing application scenarios of blockchain systems.

[0201] Based on the same inventive concept as the above method embodiment, the present application embodiment also provides a resource management device. Figure 14 The resource management device 1400 shown is applied to any node in the blockchain system and may include an acquisition unit 1401, a registration unit 1402, a creation unit 1403, a resource transfer unit 1404, a verification unit 1405, a redemption unit 1406 and an authorization unit 1407.

[0202] Acquisition unit 1401 is configured to acquire a target logical contract in response to a resource creation instruction triggered for a target business scenario; the resource creation instruction carries at least the resource creator address and the creation quantity of the target new resource, which is a new data resource applied to the target business scenario; and the target logical contract represents the processing logic of the target new resource.

[0203] A registration unit 1402 is configured to register resource information of a target new resource and a mapping relationship between the target new resource and a target logical contract in a new resource management contract; the new resource management contract is configured to manage multiple new resources in the blockchain system;

[0204] Creation unit 1403 is configured to call a target logic contract to create a first conversion quantity of a basic resource into a target new resource that matches the creation quantity; the basic resource is an existing data resource in the blockchain system, and multiple new resources are created based on the same basic resource; the first conversion quantity is determined based on the creation quantity and the processing logic of the target new resource;

[0205] The resource transfer unit 1404 is used to call the new resource management contract and modify the holding quantity of the target new resource of the resource creator address based on the creation quantity.

[0206] In one possible implementation, the verification unit 1405 is used to call the target logical contract in response to a resource transaction instruction triggered for a target new resource, and verify whether the recipient address carried in the resource transaction instruction is included in the prohibited transaction list; the prohibited transaction list is pre-configured in the target logical contract; the resource transfer unit 1404 is used to call the new resource management contract when the recipient address is not included in the prohibited transaction list, and transfer the target new resource that meets the transaction quantity carried in the resource transaction instruction from the resource creator address to the recipient address; the verification unit 1405 is also used to return prohibited transaction information when the recipient address is included in the prohibited transaction list.

[0207] In one possible implementation, the acquisition unit 1401 responds to the resource creation instruction triggered for the target business scenario, and before acquiring the target logical contract, the creation unit 1403 is also used to: respond to the resource transaction instruction triggered for the target business scenario, trigger the resource creation instruction of the target new resource corresponding to the target business scenario; the creation quantity carried in the resource creation instruction is determined based on the transaction quantity of the target new resource carried by the resource transaction instruction; then the creation unit 1403 calls the target logical contract, and before creating the basic resources of the first conversion quantity as the target new resource that meets the creation quantity, the verification unit 1405 is used to determine that the recipient address carried by the resource transaction instruction is not on the prohibited transaction list; then after the creation unit 1403 creates the basic resources of the first conversion quantity as the target new resource that meets the creation quantity, the resource transfer unit 1404 is also used to: call the new resource management contract, and transfer the target new resource that meets the transaction quantity from the resource creator address to the recipient address; call the new resource management contract, and modify the total creation quantity included in the resource information based on the transaction quantity.

[0208] In one possible implementation, the verification unit 1405 is used to call the target logical contract in response to a redemption instruction triggered for the target new resource, and verify whether the redeemer's address carried in the resource redemption instruction is included in the allowed transaction list; the allowed transaction list is pre-configured in the target logical contract; the redemption unit 1406 is used to call the target logical contract when the redeemer's address is included in the allowed transaction list, and perform the redemption operation based on the processing logic of the target new resource; the verification unit 1405 is used to return transaction-disallowed information when the redeemer's address is included in the prohibited transaction list. In one possible implementation, the redemption unit 1406 calls the target logical contract, and when executing the redemption operation based on the transaction logic of the target new resource, it is used to: call the target logical contract, calculate the target new resource with the redemption quantity carried in the redemption instruction, and the second conversion quantity of the basic resource that needs to be transferred to the redeemer's address; call the new resource management contract, destroy the target new resource that meets the redemption quantity and is located at the redeemer's address, and modify the total creation quantity included in the resource information based on the redemption quantity; the resource transfer unit 1404 is used to call the digital asset contract to transfer the basic resource that meets the second conversion quantity from the resource creator address to the redeemer address.

[0209] In one possible implementation, before the creation unit 1403 calls the target logical contract to create the first conversion quantity of basic resources as the target new type of resources that meet the creation quantity, the authorization unit 1407 is used to: write the calling address of the target logical contract and the resource creator address into the digital asset contract used to manage the basic resources, so that the target logical contract obtains the operation authority of the basic resources located at the resource creator address; when the creation unit 1403 calls the target logical contract to create the first conversion quantity of basic resources as the target new type of resources that meet the creation quantity, it is specifically used to: call the target logical contract to determine the first conversion quantity of basic resources required to create the target new type of resources that meet the creation quantity; based on the operation authority, obtain the basic resources that meet the first conversion quantity from the resource creator address; and use the obtained basic resources to create the target new type of resources that meet the creation quantity.

[0210] In one possible implementation, when the creation unit 1403 calls the target logical contract to determine the first conversion quantity of the basic resources required to create the target new type of resources that meets the creation quantity, it is specifically used to: call the target logical contract, and based on the processing logic of the target new type of resources, calculate the first conversion quantity of the basic resources required to create the target new type of resources that meets the creation quantity; when the creation unit 1403 obtains the basic resources that meet the first conversion quantity from the resource creator address based on the operation authority, it is specifically used to: transfer the basic resources that meet the first conversion quantity from the resource creator address to the calling address of the target logical contract based on the operation authority.

[0211] For the convenience of description, the above parts are divided into each module (or unit) according to function and described separately. In the embodiment of the present application, the term "module" or "unit" refers to a computer program or a part of a computer program with a predetermined function, and works together with other related parts to achieve a predetermined goal, and can be implemented in whole or in part by using software, hardware (such as processing circuit or memory) or a combination thereof. Similarly, a processor (or multiple processors or memory) can be used to implement one or more modules or units. In addition, each module or unit can be a part of the overall module or unit that includes the module or unit function.

[0212] After introducing the resource management method and apparatus according to an exemplary embodiment of the present application, a computer device according to another exemplary embodiment of the present application will be introduced next.

[0213] Those skilled in the art will appreciate that various aspects of the present application can be implemented as systems, methods, or program products. Therefore, various aspects of the present application can be specifically implemented in the following forms: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or an implementation that combines hardware and software aspects, which may be collectively referred to herein as a "circuit," "module," or "system."

[0214] Based on the same inventive concept as the above method embodiment, a computer device is also provided in the embodiment of the present application. In one embodiment, the computer device may be a server. In this embodiment, the structure of the computer device is as follows: Figure 15 As shown, it may include at least a memory 1501 , a communication module 1503 , and at least one processor 1502 .

[0215] Memory 1501 is used to store computer programs executed by processor 1502. Memory 1501 may primarily include a program storage area and a data storage area. The program storage area may store an operating system and programs required for running instant messaging functions, while the data storage area may store various instant messaging messages and operating instruction sets.

[0216] Memory 1501 may be a volatile memory, such as random-access memory (RAM); a non-volatile memory, such as read-only memory, flash memory, a hard disk drive (HDD), or a solid-state drive (SSD); or any other medium capable of carrying or storing a desired computer program in the form of instructions or data structures and accessible by a computer, but is not limited thereto. Memory 1501 may be a combination of the aforementioned memories.

[0217] The processor 1502 may include one or more central processing units (CPUs) or digital processing units, etc. The processor 1502 is configured to implement the above resource management method when calling the computer program stored in the memory 1501 .

[0218] The communication module 1503 is used to communicate with terminal devices and other servers.

[0219] The specific connection medium between the memory 1501, the communication module 1503 and the processor 1502 is not limited in the embodiment of the present application. Figure 15 In the embodiment, the memory 1501 and the processor 1502 are connected via a bus 1504. The bus 1504 is connected to the processor 1502 via a bus 1504. Figure 15 The connections between the other components are shown in bold lines for illustration only and are not intended to be limiting. The bus 1504 can be divided into an address bus, a data bus, a control bus, etc. For ease of description, Figure 15 The diagram shows a single thick line, but this does not indicate that there is only one bus or one type of bus.

[0220] The memory 1501 stores a computer storage medium, which stores computer executable instructions. The computer executable instructions are used to implement the resource management method of the embodiment of the present application. The processor 1502 is used to execute the above resource management method, such as Figure 4 shown.

[0221] In another embodiment, the computer device may also be other computer devices. In this embodiment, the structure of the computer device may be as follows: Figure 16 As shown, it includes: a communication component 1610, a memory 1620, a display unit 1630, a camera 1640, a sensor 1650, an audio circuit 1660, a Bluetooth module 1670, a processor 1680 and other components.

[0222] The communication component 1610 is used to communicate with the server. In some embodiments, it may include a wireless fidelity (WiFi) module. The WiFi module is a short-range wireless transmission technology. The electronic device can help the object send and receive information through the WiFi module.

[0223] The memory 1620 can be used to store software programs and data. The processor 1680 executes various functions and data processing of the physical terminal device 110 by running the software programs or data stored in the memory 1620. The memory 1620 may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. The memory 1620 stores an operating system that enables the physical terminal device 110 to run. In the present application, the memory 1620 can store the operating system and various application programs, and may also store computer programs that execute the resource management method of the embodiment of the present application.

[0224] The display unit 1630 can also be used to display a graphical user interface (GUI) of various menus for information input by or provided to the subject. Specifically, the display unit 1630 may include a display screen 1632 disposed on the front of the physical terminal device 110. The display screen 1632 may be configured in the form of a liquid crystal display, a light-emitting diode, or the like.

[0225] The display unit 1630 can also be used to receive input digital or character information and generate signal input related to object setting and function control. Specifically, the display unit 1630 may include a touch screen 1631 set on the front of the physical terminal device, which can collect touch operations of objects on or near it, such as clicking a button, dragging a scroll box, etc.

[0226] The touch screen 1631 can be covered on the display screen 1632, or the touch screen 1631 and the display screen 1632 can be integrated to realize the input and output functions of the physical terminal device, and the integrated display screen can be simply called a touch display screen. In this application, the display unit 1630 can display applications and corresponding operation steps.

[0227] The camera 1640 can be used to capture still images, and the subject can publish the images captured by the camera 1640 through an application. The camera 1640 can be one or more. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, which is then transmitted to the processor 1680 for conversion into a digital image signal.

[0228] The physical terminal device may further include at least one sensor 1650, such as an accelerometer 1651, a distance sensor 1652, a fingerprint sensor 1653, and a temperature sensor 1654. The terminal device may also be equipped with other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, an infrared sensor, a light sensor, and a motion sensor.

[0229] The audio circuit 1660, speaker 1661, and microphone 1662 can provide an audio interface between the object and the physical terminal device 110. The audio circuit 1660 can transmit the electrical signal converted from the received audio data to the speaker 1661, which converts it into a sound signal for output. The physical terminal device 210 can also be equipped with a volume button for adjusting the volume of the sound signal. On the other hand, the microphone 1662 converts the collected sound signal into an electrical signal, which is received by the audio circuit 1660 and converted into audio data. The audio data is then output to the communication component 1610 for transmission to, for example, another physical terminal device 210, or the audio data is output to the memory 1620 for further processing.

[0230] The Bluetooth module 1670 is used to exchange information with other Bluetooth devices having a Bluetooth module through the Bluetooth protocol. For example, a physical terminal device can establish a Bluetooth connection with a wearable electronic device (such as a smart watch) that also has a Bluetooth module through the Bluetooth module 1670 to exchange data.

[0231] Processor 1680 is the control center of the physical terminal device, connecting the various parts of the entire terminal using various interfaces and lines. It performs various functions of the terminal device and processes data by running or executing software programs stored in memory 1620 and calling data stored in memory 1620. In some embodiments, processor 1680 may include one or more processing units; processor 1680 may also integrate an application processor and a baseband processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the baseband processor mainly processes wireless communications. It is understood that the above-mentioned baseband processor may not be integrated into processor 1680. In this application, processor 1680 can run the operating system, application programs, user interface display and touch response, as well as the resource management method of the embodiment of this application. In addition, processor 1680 is coupled to display unit 1630.

[0232] In addition, it should be noted that in the specific implementation of this application, object data related to resource management, etc. is involved. When the above embodiments of this application are applied to specific products or technologies, it is necessary to obtain object permission or consent, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.

[0233] In some possible implementations, various aspects of the resource management method provided in the present application may also be implemented in the form of a program product, which includes a computer program. When the program product is run on a computer device, the computer program is used to cause the computer device to execute the steps of the resource management method according to various exemplary embodiments of the present application described above in this specification. For example, the computer device may execute the following steps: Figure 4 Follow the steps shown in .

[0234] The program product can use any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof.

[0235] The program product of the embodiment of the present application may be a portable compact disc read-only memory (CD-ROM) and include a computer program, and can be run on an electronic device. However, the program product of the present application is not limited thereto. In this document, a readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with a command execution system, apparatus, or device.

[0236] A readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries a readable computer program. Such a propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable signal medium may also be any readable medium other than a readable storage medium that can transmit, propagate, or transfer a program for use by or in conjunction with a command execution system, apparatus, or device.

[0237] The computer program embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

[0238] The computer program for performing the operations of the present application can be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as "C" or similar programming languages. The computer program can be executed entirely on the user's computer device, partially on the user's computer device, as a stand-alone software package, partially on the user's computer device and partially on a remote computer device, or entirely on the remote computer device. In the case of a remote computer device, the remote computer device can be connected to the user's computer device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer device (e.g., through the Internet using an Internet service provider).

[0239] It should be noted that although several units or subunits of the device are mentioned in the detailed description above, this division is merely exemplary and not mandatory. In fact, depending on the embodiment of the application, the features and functions of two or more units described above can be embodied in a single unit. Conversely, the features and functions of a single unit described above can be further divided and embodied by multiple units.

[0240] Furthermore, although the operations of the method of the present application are described in a particular order in the accompanying drawings, this does not require or imply that the operations must be performed in this particular order, or that all illustrated operations must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps.

[0241] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) that contain a computer-usable computer program.

[0242] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program commands. These computer program commands can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the commands executed by the processor of the computer or other programmable data processing device generate commands for implementing the processes in the flowchart and / or block diagram. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0243] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising a command device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.

[0244] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0245] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present application.

[0246] Obviously, those skilled in the art may make various changes and modifications to this application without departing from the spirit and scope of this application. Thus, if these modifications and variations of this application fall within the scope of the claims of this application and their equivalents, this application is intended to include these modifications and variations.

Claims

1. A resource management method, characterized in that: Applied to any node in the blockchain system, including: In response to a resource creation instruction triggered for a target business scenario, a target logical contract is obtained; the resource creation instruction carries at least the resource creator address and creation quantity of a target new resource, the target new resource being a new data resource applied to the target business scenario, and the target logical contract represents the processing logic of the target new resource; Registering the resource information of the target new resource and the mapping relationship between the target new resource and the target logical contract in a new resource management contract; the new resource management contract is used to manage multiple new resources in the blockchain system; Invoking the target logic contract to create a first conversion quantity of the basic resource into a target new resource that matches the creation quantity; the basic resource is a data resource already existing in the blockchain system, and the multiple new resources are created based on the same basic resource; the first conversion quantity is determined based on the creation quantity and the processing logic of the target new resource; The new resource management contract is called to modify the holding quantity of the target new resource of the resource creator address based on the creation quantity.

2. The method according to claim 1, characterized in that The method further comprises: In response to a resource transaction instruction triggered for a target new resource, calling the target logical contract to verify whether the recipient address carried in the resource transaction instruction is included in a prohibited transaction list; the prohibited transaction list is pre-configured in the target logical contract; When the recipient's address is not included in the prohibited transaction list, calling the new resource management contract to transfer the target new resource that meets the transaction quantity carried in the resource transaction instruction from the resource creator address to the recipient's address; When the recipient address is included in the prohibited transaction list, prohibited transaction information is returned.

3. The method according to claim 1, characterized in that Before obtaining the target logical contract in response to the resource creation instruction triggered for the target business scenario, the method further includes: In response to a resource transaction instruction triggered for the target business scenario, triggering a resource creation instruction for a target new resource corresponding to the target business scenario; the creation quantity carried in the resource creation instruction is determined based on the transaction quantity of the target new resource carried in the resource transaction instruction; Before calling the target logical contract to create the first converted quantity of basic resources into target new resources that meet the created quantity, the method further includes: Determining that the recipient address carried in the resource transaction instruction is not on the prohibited transaction list; After creating the first converted quantity of basic resources into target new resources that meet the created quantity, the method further includes: Call the new resource management contract to transfer the target new resource that meets the transaction quantity from the resource creator address to the recipient address; The new resource management contract is called, and based on the transaction quantity, the total creation amount included in the resource information is modified.

4. The method according to any one of claims 1 to 3, characterized in that The method further comprises: In response to a redemption instruction triggered for a target new resource, calling the target logical contract to verify whether the redeemer's address carried in the resource redemption instruction is included in an allowed transaction list; the allowed transaction list is pre-configured in the target logical contract; When the redeeming party address is included in the allowed transaction list, calling the target logic contract and performing a redemption operation based on the processing logic of the target new resource; When the redeeming party address is included in the prohibited transaction list, a transaction-not-allowed information is returned.

5. The method according to claim 4, characterized in that The calling of the target logic contract and performing a redemption operation based on the transaction logic of the target new resource include: Calling the target logical contract to calculate the second conversion quantity of the basic resource that needs to be transferred to the redeemer address in order to redeem the target new resource with the redemption quantity carried in the resource redemption instruction; Calling the new resource management contract to destroy the target new resource that meets the redemption quantity and is located at the redeemer's address, and modifying the total creation quantity included in the resource information based on the redemption quantity; The digital asset contract is called to transfer the basic resources corresponding to the second conversion quantity from the resource creator address to the redeemer address.

6. The method according to any one of claims 1 to 3, characterized in that Before calling the target logical contract to create the first converted quantity of basic resources into target new resources that meet the created quantity, the method further includes: Write the calling address of the target logical contract and the resource creator address into the digital asset contract used to manage basic resources, so that the target logical contract obtains the operation authority of the basic resources located at the resource creator address; The calling of the target logical contract to create the first converted quantity of basic resources into target new resources that meet the created quantity includes: Invoke the target logic contract to determine a first conversion quantity of the basic resource required to create the target new resource that meets the creation quantity; Based on the operation permission, obtain basic resources that meet the first conversion quantity from the resource creator address; The acquired basic resources are used to create target new resources that meet the specified creation quantity.

7. The method according to claim 6, characterized in that The calling of the target logical contract to determine a first conversion quantity of the basic resource required to create the target new type of resource that meets the creation quantity includes: Calling the target logic contract, and calculating, based on the processing logic of the target new resource, a first conversion quantity of the basic resource required to create the target new resource that meets the creation quantity; The acquiring, based on the operation permission, basic resources that meet the first conversion quantity from the resource creator address includes: Based on the operation permission, the basic resources that meet the first conversion quantity are transferred from the resource creator address to the calling address of the target logical contract.

8. A resource management device, characterized in that: Applied to any node in the blockchain system, including: an acquisition unit, configured to acquire a target logical contract in response to a resource creation instruction triggered for a target business scenario; the resource creation instruction carries at least a resource creator address and a creation quantity of a target new resource, the target new resource being a new data resource applied to the target business scenario; and the target logical contract representing a processing logic for the target new resource; A registration unit, configured to register resource information of the target new resource and a mapping relationship between the target new resource and the target logical contract in a new resource management contract; the new resource management contract is configured to manage multiple new resources in the blockchain system; a creation unit, configured to call the target logic contract and create a first conversion quantity of the basic resource into a target new resource that meets the creation quantity; the basic resource is a data resource already existing in the blockchain system, and the multiple new resources are created based on the same basic resource; the first conversion quantity is determined based on the creation quantity and the processing logic of the target new resource; The resource transfer unit is used to call the new resource management contract and modify the holding quantity of the target new resource of the resource creator address based on the creation quantity.

9. The device according to claim 8, characterized in that The device further comprises a verification unit: The verification unit is configured to, in response to a resource transaction instruction triggered for a target new resource, call the target logical contract and verify whether the recipient address carried in the resource transaction instruction is included in a prohibited transaction list; the prohibited transaction list is pre-configured in the target logical contract; The resource transfer unit is configured to, when the recipient's address is not included in the prohibited transaction list, call the new resource management contract to transfer the target new resource that meets the transaction quantity carried in the resource transaction instruction from the resource creator address to the recipient's address; The verification unit is further configured to return transaction prohibition information when the recipient's address is included in the transaction prohibition list.

10. The device according to claim 8, characterized in that Before the acquisition unit acquires the target logical contract in response to the resource creation instruction triggered for the target business scenario, the creation unit is further configured to: In response to a resource transaction instruction triggered for the target business scenario, triggering a resource creation instruction for a target new resource corresponding to the target business scenario; the creation quantity carried in the resource creation instruction is determined based on the transaction quantity of the target new resource carried in the resource transaction instruction; The creation unit calls the target logical contract to create the first converted quantity of basic resources into target new resources that meet the creation quantity. The verification unit is configured to determine whether the recipient address carried by the resource transaction instruction is on a prohibited transaction list. After the creation unit creates the first converted quantity of basic resources into target new resources that meet the creation quantity, the resource transfer unit is further configured to: Call the new resource management contract to transfer the target new resource that meets the transaction quantity from the resource creator address to the recipient address; The new resource management contract is called, and based on the transaction quantity, the total creation amount included in the resource information is modified.

11. The device according to any one of claims 8 to 10, characterized in that The device further comprises a redemption unit: The verification unit is configured to, in response to a redemption instruction triggered for a target new resource, call the target logical contract to verify whether the redeemer's address carried in the resource redemption instruction is included in an allowed transaction list; the allowed transaction list is pre-configured in the target logical contract; The redemption unit is configured to call the target logic contract and perform a redemption operation based on the processing logic of the target new resource when the redeeming party address is included in the allowed transaction list; The verification unit is configured to return transaction-not-allowed information when the redeeming party address is included in the prohibited transaction list.

12. The device according to claim 11, characterized in that When the redemption unit calls the target logical contract and performs a redemption operation based on the transaction logic of the target new resource, it is used to: Calling the target logical contract to calculate the second conversion quantity of the basic resource that needs to be transferred to the redeemer address in order to redeem the target new resource with the redemption quantity carried in the resource redemption instruction; Calling the new resource management contract to destroy the target new resource that meets the redemption quantity and is located at the redeemer's address, and modifying the total creation quantity included in the resource information based on the redemption quantity; The resource transfer unit is configured to call the digital asset contract to transfer the basic resources corresponding to the second conversion quantity from the resource creator address to the redeemer address.

13. A computer device, characterized in that: The method comprises a processor and a memory, wherein the memory stores program codes, and when the program codes are executed by the processor, the processor executes the steps of the method according to any one of claims 1 to 7.

14. A computer-readable storage medium, characterized in that The method comprises a program code, and when the program code is run on a computer device, the program code is used to enable the computer device to execute the steps of the method according to any one of claims 1 to 7.

15. A computer program product, characterized in that The method comprises computer instructions, which, when executed by a processor, implement the steps of the method according to any one of claims 1 to 7.