Block chain resource processing method, related device and medium
By receiving resource disclosure requests on the blockchain and integrating multiple on-chain resources, forming target resources and exposing them to the target objects, the problem of resource combination and disclosure on the blockchain is solved, and the convenience of resource processing is improved.
Patent Information
- Application Number
- CN202311630772.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-29
- Publication Date
- 2025-05-30
AI Technical Summary
It is difficult for the prior art to combine and disclose multiple virtual resources on the blockchain, which affects the convenience of resource processing.
By receiving resource disclosure requests, multiple on-chain resources recorded in the blockchain are integrated into target resources, and the target resources are disclosed to the target objects on the blockchain, so that the target objects can exchange target resources through object resources in the resource pool and perform transaction processing.
It realizes the combination and disclosure of multiple resources on the blockchain, improves the convenience of resource processing, and enables the target resources to be split and redeemed back to the original on-chain resources at any time.
Smart Images

Figure CN120075237A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of blockchain technology, and particularly to a blockchain transaction processing method, related device, and medium. Background Art
[0002] Currently, for combined resources composed of multiple virtual resources, they can often only be publicly issued under the blockchain. Often, due to problems such as lack of compatibility protocols, it is impossible to combine and publicly disclose multiple resources on the blockchain, which will affect the convenience of resource processing. Summary of the Invention
[0003] Embodiments of the present disclosure provide a blockchain resource processing method, related device, and medium, which can improve the convenience of resource processing.
[0004] According to one aspect of the present disclosure, there is provided a blockchain resource processing method, the method comprising:
[0005] Receiving a resource disclosure request for integrating a plurality of on-chain resources recorded in a blockchain into a target resource, so that a target object performs transaction processing based on the target resource; the resource disclosure request includes resource storage addresses of at least two on-chain resources to be integrated;
[0006] Based on the resource storage addresses, incorporating the on-chain resources in the resource pool corresponding to the resource storage addresses into a resource storage space;
[0007] If it is determined that the on-chain resources in the resource storage space meet a predetermined condition, integrating the on-chain resources in the resource storage space into the target resource;
[0008] Disclosing the target resource to the target object on the blockchain, so that the target object exchanges object resources in the resource pool of the target object for the target resource and performs transaction processing based on the target resource.
[0009] According to one aspect of the present disclosure, there is provided a blockchain resource processing device, the device comprising:
[0010] A receiving unit, configured to receive a resource disclosure request for integrating a plurality of on-chain resources recorded in a blockchain into a target resource, so that a target object performs transaction processing based on the target resource; the resource disclosure request includes resource storage addresses of at least two on-chain resources to be integrated;
[0011] An incorporating unit, configured to incorporate the on-chain resources in the resource pool corresponding to the resource storage addresses into a resource storage space based on the resource storage addresses;
[0012] An integration unit, configured to integrate the on-chain resources in the resource storage space into the target resources if it is determined that the on-chain resources in the resource storage space meet a predetermined condition;
[0013] A disclosure unit, configured to disclose the target resources to the target object on the blockchain, so that the target object can exchange the object resources in the resource pool of the target object for the target resources, and perform transaction processing based on the target resources.
[0014] Optionally, the inclusion unit is specifically configured to:
[0015] Determine the resource pool corresponding to the resource storage address based on the comparison between the resource storage address and the blockchain addresses of multiple resource pools recorded on the blockchain;
[0016] Perform a first verification on the resource pool corresponding to the resource storage address;
[0017] If it is determined that the first verification passes, include the on-chain resources in the resource pool corresponding to the resource storage address in the resource storage space.
[0018] Optionally, the performing a first verification on the resource pool corresponding to the resource storage address includes:
[0019] Determine the total number of the on-chain resources in the resource pool corresponding to the resource storage address;
[0020] If it is determined that the total number is greater than a predetermined resource number, determine that the first verification passes;
[0021] If it is determined that the total number is less than or equal to the predetermined resource number, determine that the first verification fails.
[0022] Optionally, the on-chain resources in the resource storage space include a first resource, a second resource, and a third resource;
[0023] The determining that the on-chain resources in the resource storage space meet a predetermined condition includes:
[0024] Determine the first number of the first resource, the second number of the second resource, and the third number of the third resource in the resource storage space;
[0025] If it is determined that the first number is greater than or equal to a first threshold, the second number is greater than or equal to a second threshold, and the third number is greater than or equal to a third threshold, determine that the on-chain resources in the resource storage space meet the predetermined condition.
[0026] Optionally, the first threshold, the second threshold, and the third threshold are determined as follows:
[0027] Determine the first resource type of the first resource, the second resource type of the second resource, the third resource type of the third resource, and the total amount of resources indicated by the resource disclosure request;
[0028] Determine the first proportion of the first resource based on the first resource type, determine the second proportion of the second resource based on the second resource type, and determine the third proportion of the third resource based on the third resource type;
[0029] Determine the first threshold based on the first proportion and the total amount of resources, determine the second threshold based on the second proportion and the total amount of resources, and determine the third threshold based on the third proportion and the total amount of resources.
[0030] Optionally, the blockchain resource processing device further includes a swapping unit, and the swapping unit is configured to:
[0031] Determine the resource swapping ratio between the object resource and the target resource;
[0032] Exchange the fifth number of the target resources based on the fourth number of the object resources and the resource swapping ratio.
[0033] Optionally, the blockchain resource processing device further includes a transaction processing unit, and the transaction processing unit is configured to:
[0034] Determine the blockchain address of a first object, where the first object is the object to which the target object will transfer the target resource;
[0035] Perform a second verification on the first object based on the blockchain address;
[0036] If it is determined that the second verification passes, transfer the target resource to the first object.
[0037] Optionally, the performing a second verification on the first object based on the blockchain address includes:
[0038] Obtain a predetermined address mapping table, where the predetermined address mapping table contains candidate blockchain addresses of multiple objects;
[0039] If it is determined that there is no candidate blockchain address in the predetermined address mapping table that is the same as the blockchain address, determine the maximum amount of target resources that the first object is allowed to hold at the current time and the amount of resources to be transferred determined by the target object to be transferred to the first object;
[0040] If it is determined that the amount of the resource to be transferred is less than or equal to the maximum target resource amount, it is determined that the second verification passes.
[0041] Optionally, the predetermined address mapping table is determined in the following manner:
[0042] For each of the objects, determine the credit rating of the object and the creation timestamp of the resource pool of the object;
[0043] Based on the credit rating and the creation timestamp, determine the object score of the object;
[0044] Determine the blockchain address of the object whose object score is less than a preset threshold as the candidate blockchain address;
[0045] Based on the candidate blockchain address and the object identifier of the object whose object score is less than a preset threshold, construct the predetermined address mapping table.
[0046] Optionally, the determining the object score of the object based on the credit rating and the creation timestamp includes:
[0047] For each of the objects, based on the credit rating, determine the first score of the object;
[0048] For each of the objects, based on the creation timestamp, determine the second score of the object;
[0049] Based on the weighted sum of the first score and the second score, determine the object score of the object.
[0050] Optionally, the transaction processing unit is used for:
[0051] Determine the blockchain address for publishing the target resource;
[0052] Transfer a predetermined number of the target resources to the blockchain address to obtain the on-chain resources corresponding to the target resources.
[0053] Optionally, the blockchain resource processing device further includes a transfer unit, and the transfer unit is used for:
[0054] Receive a predetermined number of the target resources transferred by the target object;
[0055] Determine the composition number of each of the on-chain resources among the predetermined number of the target resources, and transfer each of the on-chain resources to the target object based on the composition number;
[0056] Clear the predetermined number of the target resources.
[0057] Optionally, the transfer unit is used for:
[0058] Receive a predetermined number of the target resources transferred by the target object;
[0059] Determine a first exchange number of the object resources based on the predetermined number of the target resources and the resource exchange ratio between the target resources and the object resources;
[0060] Transfer the first exchange number of the object resources to the target object, and clear the predetermined number of the target resources.
[0061] Optionally, the transferring the predetermined number of the target resources to the blockchain address includes:
[0062] Determine the associated resource growth data of the target resources;
[0063] Based on the associated resource growth data, transfer the predetermined number of the target resources to the blockchain address.
[0064] Optionally, the predetermined number is determined by the following method:
[0065] Obtain a preset number comparison table, where the number comparison table includes multiple resource growth intervals, and each resource growth interval corresponds to a candidate ratio;
[0066] In the number comparison table, determine the resource growth interval where the associated resource growth data is located as the target interval;
[0067] Determine the predetermined number based on the candidate ratio corresponding to the target interval and the total number of the target resources.
[0068] Optionally, the blockchain resource processing device further includes a blockchain uploading unit, and the blockchain uploading unit is configured to:
[0069] Generate a resource processing transaction for the transaction processing based on the target resources;
[0070] Record the resource processing transaction on the blockchain.
[0071] According to an aspect of the present disclosure, there is provided an electronic device, including a memory and a processor, where the memory stores a computer program, and when the processor executes the computer program, the blockchain resource processing method as described above is implemented.
[0072] According to an aspect of the present disclosure, there is provided a computer-readable storage medium, where the storage medium stores a computer program, and when the computer program is executed by a processor, the blockchain resource processing method as described above is implemented.
[0073] According to one aspect of the present disclosure, there is provided a computer program product, which includes a computer program that is read and executed by a processor of a computer device, so that the computer device executes the blockchain resource processing method as described above.
[0074] In the embodiments of the present disclosure, multiple on-chain resources are combined and disclosed on the blockchain according to the received resource disclosure request. Specifically, the resource disclosure request is used to integrate multiple on-chain resources recorded in the blockchain into a target resource, so that a target object performs transaction processing based on the target resource. The resource disclosure request includes resource storage addresses of at least two on-chain resources to be integrated. After receiving the resource disclosure request, first, based on the resource storage addresses, the on-chain resources in the resource pool corresponding to the resource storage addresses are incorporated into the resource storage space, realizing centralized management of multiple on-chain resources. Then, if it is determined that the on-chain resources in the resource storage space meet a predetermined condition, the on-chain resources in the resource storage space are integrated into a target resource, realizing the combination of multiple types of resources on the blockchain. Further, the target resource is disclosed to the target object on the blockchain, realizing the issuance of the combined and packaged target resource on the blockchain under a common blockchain protocol, so that the target object can exchange the object resources in the resource pool of the target object for the target resource and perform transaction processing based on the target resource, enabling the target resource to be split at any time and exchanged back to the original on-chain resources, improving the convenience of resource processing.
[0075] Other features and advantages of the present disclosure will be described in the following specification, and part of them will be obvious from the specification or learned by implementing the present disclosure. The objectives and other advantages of the present disclosure can be achieved and obtained through the structures specifically pointed out in the specification, claims, and drawings. Description of the Drawings
[0076] The drawings are used to provide a further understanding of the technical solutions of the present disclosure, and constitute a part of the specification. They are used together with the embodiments of the present disclosure to explain the technical solutions of the present disclosure and do not constitute a limitation to the technical solutions of the present disclosure.
[0077] Figure 1 is a system architecture diagram of the application of the blockchain resource processing method according to an embodiment of the present disclosure;
[0078] Figures 2A - 2G shows a schematic diagram of the application of the blockchain resource processing method in a resource exchange scenario according to an embodiment of the present disclosure;
[0079] Figure 3 is a flowchart of the blockchain resource processing method according to an embodiment of the present disclosure;
[0080] Figure 4It is a flowchart of incorporating on-chain resources in a resource pool corresponding to a resource storage address into a resource storage space according to an embodiment of the present disclosure;
[0081] Figure 5 It is a schematic diagram of a resource pool and a resource pool address according to an embodiment of the present disclosure;
[0082] Figure 6 It is a flowchart of performing a first verification on a resource pool corresponding to a resource storage address according to an embodiment of the present disclosure;
[0083] Figure 7 It is a flowchart of determining that on-chain resources in a resource storage space meet a predetermined condition according to an embodiment of the present disclosure;
[0084] Figure 8 It is a flowchart of determining a first threshold, a second threshold, and a third threshold according to an embodiment of the present disclosure;
[0085] Figure 9 It is a flowchart of exchanging object resources in a resource pool of a target object for a target resource according to an embodiment of the present disclosure;
[0086] Figure 10 It is a flowchart of recording a transaction on a blockchain according to an embodiment of the present disclosure;
[0087] Figure 11 It is a flowchart of performing transaction processing based on a target resource according to an embodiment of the present disclosure;
[0088] Figure 12 It is a flowchart of performing a second verification on a first object based on a blockchain address according to an embodiment of the present disclosure;
[0089] Figure 13 It is a schematic diagram of an implementation process of performing a second verification on a first object based on a blockchain address according to an embodiment of the present disclosure;
[0090] Figure 14 It is a flowchart of determining a predetermined address mapping table according to an embodiment of the present disclosure;
[0091] Figure 15 It is a flowchart of determining an object score of an object based on a credit rating and a creation timestamp according to an embodiment of the present disclosure;
[0092] Figures 16A - 16B It is a schematic diagram of an implementation process of determining a predetermined address mapping table according to an embodiment of the present disclosure;
[0093] Figure 17 It is a flowchart of performing transaction processing based on a target resource according to another embodiment of the present disclosure;
[0094] Figure 18 is a flowchart for transaction processing based on target resources according to another embodiment of the present disclosure;
[0095] Figure 19 is a flowchart for transaction processing based on target resources according to another embodiment of the present disclosure;
[0096] Figure 20 is a flowchart for transferring a predetermined number of target resources to a blockchain address according to an embodiment of the present disclosure;
[0097] Figure 21 is a flowchart for determining a predetermined number according to an embodiment of the present disclosure;
[0098] Figure 22 is a schematic diagram of a number comparison table according to an embodiment of the present disclosure;
[0099] Figure 23 is a schematic diagram of implementation details of a blockchain resource processing method according to an embodiment of the present disclosure;
[0100] Figure 24 is a module diagram of a blockchain resource processing device according to an embodiment of the present disclosure;
[0101] Figure 25 is a terminal structure diagram of a blockchain resource processing method according to an embodiment of the present disclosure;
[0102] Figure 26 is a server structure diagram of a blockchain resource processing method according to an embodiment of the present disclosure. Detailed implementation manners
[0103] In order to make the objectives, technical solutions and advantages of the present disclosure clearer, the present disclosure will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present disclosure and are not used to limit the present disclosure.
[0104] Before further elaborating on the embodiments of the present disclosure, the nouns and terms involved in the embodiments of the present disclosure are described. The nouns and terms involved in the embodiments of the present disclosure are applicable to the following explanations:
[0105] Artificial Intelligence (AI) uses digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, including theories, methods, technologies, and application systems that can perceive the environment, acquire knowledge, and use knowledge to achieve the best results. In other words, artificial intelligence is a comprehensive technology in computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can react in a way similar to human intelligence. Artificial intelligence also studies the design principles and implementation methods of various intelligent machines to enable them to have the functions of perception, reasoning, and decision-making. Artificial intelligence technology is an interdisciplinary subject with a wide range of fields, including both hardware-level and software-level technologies. The basic technologies of artificial intelligence generally include sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, pre-trained model technology, operation / interaction systems, mechatronics, etc. Among them, pre-trained models, also known as large models or foundation models, can be widely applied to downstream tasks in various directions of artificial intelligence after fine-tuning. Artificial intelligence software technology mainly includes several major directions such as computer vision technology, speech processing technology, natural language processing technology, and machine learning / deep learning. With the research and progress of artificial intelligence technology, artificial intelligence technology has been studied and applied in many fields, such as common smart homes, smart wearable devices, virtual assistants, smart speakers, smart marketing, driverless, autonomous driving, drones, robots, smart healthcare, smart customer service, etc. It is believed that with the development of technology, artificial intelligence technology will be applied in more fields and play an increasingly important role.
[0106] Blockchain: Blockchain is a new application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, and encryption algorithms. Essentially, it is a decentralized database, a series of data blocks generated by using cryptographic methods. Each data block contains information about a batch of transactions, which is used to verify the validity (anti-counterfeiting) of the information and link to the previous block.
[0107] Currently, for composite resources composed of multiple virtual resources, they can often only be publicly issued under the blockchain. However, due to issues such as the lack of compatible protocols, it is often impossible to combine and publicly display multiple resources on the blockchain, which will affect the convenience of resource processing.
[0108] System architecture and scenario description applied in the embodiments of the present disclosure
[0109] Figure 1 It is the system architecture diagram to which the blockchain resource processing method according to the embodiments of the present disclosure is applied. It includes an object terminal 140, the Internet 130, a gateway 120, a blockchain server 110, a resource issuing agency server 170, etc.
[0110] The object terminal 140 includes various forms such as a desktop computer, a laptop, a PDA (Personal Digital Assistant), a mobile phone, a vehicle-mounted terminal, a home theater terminal, a dedicated terminal, etc. Additionally, it can be a single device or a collection composed of multiple devices. The object terminal 140 can communicate with the Internet 130 in a wired or wireless manner to exchange data. Among them, the object terminal 140 includes a transaction processing system, which is used for the object to exchange various types of virtual resources in the blockchain server 110 according to actual needs.
[0111] See Figure 1 the blockchain server 110 shown in the figure. It includes a consensus network 160. The consensus network 160 refers to a network that conducts consensus on transactions to be chained and then chains them on the blockchain. It includes multiple consensus nodes. The consensus nodes are the blockchain nodes. The consensus nodes or blockchain nodes can be servers in the blockchain network or object terminals accessing the blockchain network. Here, the specific form of the consensus nodes or blockchain nodes is not limited.
[0112] Furthermore, the blockchain server 110 also includes a smart contract 150 with a resource storage space, resource contract 1, resource contract 2, and a resource pool of the target object. The smart contract 150 with a resource storage space is used to receive a resource disclosure request sent by the resource issuing institution server 170, integrate the virtual resources in resource contract 1 and resource contract 2 together, and disclose the integrated virtual resources to the target object, so that the target object can exchange the integrated virtual resources with the virtual resources in the resource pool.
[0113] The gateway 120 is also called an internetwork connector and a protocol converter. The gateway realizes network interconnection at the transport layer and is a computer system or device that acts as a converter. Between two systems using different communication protocols, data formats, or languages, and even with completely different architectures, the gateway is a translator. At the same time, the gateway can also provide filtering and security functions. The message sent by the object terminal 140 to the blockchain server 110 needs to be sent to the corresponding blockchain server 110 through the gateway 120. The message sent by the blockchain server 110 to the object terminal 140 also needs to be sent to the corresponding object terminal 140 through the gateway 120.
[0114] The embodiments of the present disclosure can be applied in various scenarios, such as Figures 2A - 2G the resource exchange scenario shown in the figure, etc.
[0115] Such as Figure 2AAs shown, when the target object accesses the transaction processing system, the transaction processing system will display a content page. On the content page, there is a prompt field "You have 1000 general virtual resources. Please select a resource processing method", and four interactive controls are displayed. Among them, the interactive controls are, in sequence, a resource verification control for executing a resource verification process, a resource exchange control for executing a resource exchange process, a resource splitting control for executing a resource splitting process, and other controls. At this time, the target object clicks the resource exchange control to enter the resource exchange process.
[0116] As Figure 2B shown, after the target object clicks the resource exchange control and enters the resource exchange process. The transaction processing system will display a selection page for combined resources. On the selection page for combined resources, there is a prompt field "Hello! The following are the combined resources you can exchange. Please select", and multiple combined resources are displayed. Among them, each combined resource is determined by a resource public request sent by the resource issuing institution server 170. Specifically, the combined resources include combined resource 1, combined resource 2, combined resource 3, and combined resource 4. In combined resource 1, type A resources account for 20%, and type B resources account for 80%; in combined resource 2, type A resources account for 20%, type B resources account for 60%, and type C resources account for 20%; in combined resource 3, type A resources account for 50%, type B resources account for 25%, and type C resources account for 25%; in combined resource 4, type C resources account for 50%, and type B resources account for 50%. At this time, the target object selects combined resource 1 and clicks the "OK" button.
[0117] As Figure 2C shown, after the target object selects combined resource 1 and clicks the "OK" button, a prompt field "Hello! The exchange ratio of general resources to combined resource 1 is 1:2; please enter the number of general resources to be exchanged" will be displayed on the content page of the transaction processing system. At the same time, an input box for the number of general resources is also displayed on the page. At this time, the target object enters "200" in the input box for the number of general resources and clicks the "OK" button.
[0118] As Figure 2D shown, after the target object enters "200" in the input box for the number of general resources and clicks the "OK" button, a pop-up window will be displayed on the page. The pop-up window shows a prompt field "400 combined resources 1 have been exchanged". At this time, the target object clicks the "OK" button to confirm the exchange of 200 general virtual resources for 400 combined resources 1.
[0119] As Figure 2EAs shown, after exchanging 200 general virtual resources for 400 combined resources 1, when the target object needs to perform resource exchange again at a certain time point, it will log in to the transaction processing system. At this time, the transaction processing system displays a prompt field "You have 800 general virtual resources and 400 combined resources 1. Please select the resource processing method", and also displays a resource verification control for executing the resource verification process, a resource exchange control for executing the resource exchange process, a resource splitting control for executing the resource splitting process, and so on. At this time, the target object clicks the resource splitting control.
[0120] As Figure 2F shown, after the target object clicks the resource splitting control, the transaction processing system will display a content page. In the content page, a prompt field is displayed "Hello! 0.2 of type A resources and 0.8 of type B resources are contained in 1 combined resource 1; please enter the number of combined resources 1 to be split", and at the same time, an input box for the number of combined resources is also displayed on the page. At this time, the target object enters "200" in the input box for the number of combined resources and clicks the "OK" button.
[0121] As Figure 2G shown, after the target object enters "200" in the input box for the number of combined resources and clicks the "OK" button, a pop-up window will be displayed on the page. The pop-up window displays a prompt field "The splitting is successful. You currently have 800 general resources, 200 combined resources 1; 40 type A resources; 160 type B resources". At this time, the target object clicks the "OK" button to confirm the various virtual resources currently held by itself.
[0122] General description of the embodiments of the present disclosure
[0123] According to an embodiment of the present disclosure, a blockchain resource processing method is provided.
[0124] This blockchain resource processing method is generally applied to business scenarios with relatively intensive resource exchanges, such as Figures 2A - 2G the resource exchange scenario shown. The embodiment of the present disclosure provides a solution for integrating multiple on-chain resources based on a smart contract and publicly issuing the integrated resources, which can combine and publicly display multiple resources on the blockchain and improve the convenience of resource processing.
[0125] In the embodiment of the present disclosure, this blockchain resource processing method is executed by a smart contract with resource processing functions in the blockchain.
[0126] As Figure 3 shown, the blockchain resource processing method according to an embodiment of the present disclosure may include:
[0127] Step 310: Receive a resource disclosure request;
[0128] Step 320: Based on the resource storage address, incorporate the on-chain resources in the resource pool corresponding to the resource storage address into the resource storage space;
[0129] Step 330: If it is determined that the on-chain resources in the resource storage space meet the predetermined conditions, integrate the on-chain resources in the resource storage space into the target resource;
[0130] Step 340: Disclose the target resource to the target object on the blockchain, so that the target object can exchange the object resources in the target object's resource pool for the target resource and perform transaction processing based on the target resource.
[0131] The following is a detailed description of steps 310-340.
[0132] In step 310, a resource disclosure request is received.
[0133] The resource disclosure request is used to integrate multiple on-chain resources recorded in the blockchain into the target resource, so that the target object can perform transaction processing based on the target resource.
[0134] The resource disclosure request includes the resource storage addresses of at least two on-chain resources to be integrated.
[0135] On-chain resources refer to the virtual resources stored in each smart contract on the blockchain. The resource types of the virtual resources stored in different smart contracts may be the same or different.
[0136] The target resource refers to the virtual resource integrated from multiple on-chain resources. In a fixed number of target resources, there will be certain differences in the proportion of each on-chain resource.
[0137] The target object refers to a person or relevant institution that has a resource pool on the blockchain and can perform resource processing.
[0138] The resource storage address is used to indicate the storage location of the on-chain resource. Generally, the resource storage address refers to the contract address of the smart contract storing the on-chain resource.
[0139] In the specific implementation of this embodiment, when a resource issuing institution wants to issue a target resource to a target object, it will first send a resource disclosure request to the blockchain server, and indicate the specific composition of the target resource, the number of target resources, etc. through the resource disclosure request. Further, after the blockchain server receives the resource disclosure request, the smart contract with resource processing capabilities in the blockchain server determines the on-chain resources to be integrated and the resource storage addresses of the on-chain resources, and then performs resource processing based on the resource storage addresses of the on-chain resources, the number of target resources, and the proportion of each on-chain resource in the target resource.
[0140] In step 320, based on the resource storage address, the on-chain resources in the resource pool corresponding to the resource storage address are incorporated into the resource storage space.
[0141] The resource pool refers to the virtual space on the blockchain for storing virtual resources.
[0142] The resource storage space refers to the virtual space in the smart contract for implementing resource processing that stores various on-chain resources.
[0143] In the specific implementation of this embodiment, first, the resource pool addresses of all resource pools on the blockchain are determined. Then, based on the comparison between the resource pool address and the resource storage address, the resource pool corresponding to the resource storage address is determined. Further, a certain number of on-chain resources are extracted from the resource pool corresponding to the resource storage address and stored in the resource storage space.
[0144] To save space, the specific implementation process of incorporating the on-chain resources in the resource pool corresponding to the resource storage address into the resource storage space based on the resource storage address in the embodiments of the present disclosure will be described in detail below. It will not be elaborated here.
[0145] In step 330, if it is determined that the on-chain resources in the resource storage space meet the predetermined conditions, the on-chain resources in the resource storage space are integrated into the target resource.
[0146] The predetermined conditions are used to measure whether the on-chain resources in the resource storage space meet the requirements for resource integration.
[0147] In the specific implementation of this embodiment, first, it is judged according to the predetermined conditions whether the quantity and types of each on-chain resource in the resource storage space meet the requirements. Then, if it is determined that the on-chain resources in the resource storage space meet the predetermined conditions, the multiple on-chain resources are integrated according to the proportion of each on-chain resource in 1 target resource indicated in the resource disclosure request to obtain a certain number of target resources. Among them, the on-chain resources and the number of on-chain resources included in each target resource are equal.
[0148] In step 340, the target resource is publicly disclosed to the target object on the blockchain, enabling the target object to exchange the object resources in the target object's resource pool for the target resource and perform transaction processing based on the target resource.
[0149] Object resources refer to the virtual resources owned by the target object, which are generally the most common and general virtual resources.
[0150] Transaction processing refers to operations such as resource exchange and resource storage of the target object on the blockchain.
[0151] In the specific implementation of this embodiment, after integrating multiple on-chain resources into the target resource, the smart contract with resource storage space publicly issues the target resource to the target object on the blockchain. Further, according to actual needs, the target object exchanges the object resources in its resource pool for the target resource according to the exchange ratio of the target resource and the object resources it holds, so as to increase the diversity of the virtual resources it holds. In addition, the target object can also use the obtained target resources for various forms of transaction processing such as resource re-exchange or resource splitting.
[0152] To save space, the specific implementation process of the target object exchanging the object resources in its resource pool for the target resource and performing transaction processing based on the target resource in the embodiments of the present disclosure will be described in detail below and will not be elaborated here.
[0153] Through the above steps 310-340, in the embodiments of the present disclosure, various on-chain resources are combined and publicly disclosed on the blockchain according to the received resource public request. Specifically, the resource public request is used to integrate multiple on-chain resources recorded in the blockchain into the target resource, enabling the target object to perform transaction processing based on the target resource. The resource public request includes the resource storage addresses of at least two on-chain resources to be integrated. After receiving the resource public request, first, based on the resource storage addresses, the on-chain resources in the resource pool corresponding to the resource storage addresses are incorporated into the resource storage space to achieve centralized management of various on-chain resources. Then, if it is determined that the on-chain resources in the resource storage space meet the predetermined conditions, the on-chain resources in the resource storage space are integrated into the target resource, realizing the combination of various types of resources on the blockchain. Further, the target resource is publicly disclosed to the target object on the blockchain, realizing the issuance of the combined and packaged target resource on the blockchain under the common blockchain protocol, enabling the target object to exchange the object resources in its resource pool for the target resource and perform transaction processing based on the target resource, so that the target resource can be split at any time and exchanged back to the original on-chain resources, improving the convenience of resource processing.
[0154] The above is the overall description of steps 310 - 340. Since step 310 has been described in detail in the above overall description, the following will elaborate on the specific implementation of steps 320, 330, and 340.
[0155] Detailed description of step 320
[0156] In step 320, based on the resource storage address, the on-chain resources in the resource pool corresponding to the resource storage address are incorporated into the resource storage space.
[0157] Please refer to Figure 4 , in some embodiments, the process of incorporating on-chain resources into the resource storage space based on the blockchain address includes but is not limited to the following steps 410 - 430:
[0158] Step 410, based on the comparison between the resource storage address and the blockchain addresses of multiple resource pools recorded on the blockchain, determine the resource pool corresponding to the resource storage address;
[0159] Step 420, perform a first verification on the resource pool corresponding to the resource storage address;
[0160] Step 430, in response to the queue meeting a predetermined condition, pack the local transactions to be uploaded to the chain in the queue and send them to the second consensus node.
[0161] The following will elaborate on steps 410 - 430 in detail.
[0162] In step 410, based on the comparison between the resource storage address and the blockchain addresses of multiple resource pools recorded on the blockchain, determine the resource pool corresponding to the resource storage address.
[0163] The blockchain address is used to indicate the location of the resource pool in the blockchain.
[0164] In the embodiments of the present disclosure, different resource pools can be maintained by different resource contracts in the blockchain. The resource contract is a smart contract recorded on the blockchain.
[0165] In the specific implementation of this embodiment, first obtain the blockchain addresses of multiple resource pools recorded on the blockchain, and then compare the blockchain address of each resource pool with the resource storage address to determine the consistency between the blockchain address and the resource storage address. Further, if the blockchain address and the resource storage address are inconsistent, it indicates that the blockchain address and the resource storage address indicate different resource pools. If the blockchain address and the resource storage address are consistent, it indicates that the blockchain address and the resource storage address indicate the same resource pool, and the resource pool with the consistent blockchain address and resource storage address is used as the resource pool corresponding to the resource storage address.
[0166] In step 420, a first verification is performed on the resource pool corresponding to the resource storage address.
[0167] The first verification is used to measure whether the on-chain resources in the resource pool corresponding to the resource storage address are sufficient.
[0168] In the specific implementation of this embodiment, the resource amount of the on-chain resources stored in the resource pool corresponding to the resource storage address can be verified, so that sufficient on-chain resources can be extracted from the resource pool based on the resource public request.
[0169] To save space, the specific implementation process of performing the first verification on the resource pool corresponding to the resource storage address in the embodiments of the present disclosure will be described in detail below. It will not be elaborated here.
[0170] In step 430, if it is determined that the first verification passes, the on-chain resources in the resource pool corresponding to the resource storage address are incorporated into the resource storage space.
[0171] In the specific implementation of this embodiment, if it is determined that the first verification passes, it indicates that the on-chain resources in the resource pool corresponding to the resource storage address meet the requirements. Based on this, under the authorization and permission, the on-chain resources in the resource pool corresponding to the resource storage address are incorporated into the resource storage space.
[0172] As Figure 5 shown, the resource pools recorded on the blockchain include Resource Pool 1, Resource Pool 2, Resource Pool 3, and Resource Pool 4. Among them, the resource pool address of Resource Pool 1 is Axc14, and the resource amount of the on-chain resources in Resource Pool 1 is 80. The resource pool address of Resource Pool 2 is few52, and the resource amount of the on-chain resources in Resource Pool 2 is 75. The resource pool address of Resource Pool 3 is kla13, and the resource amount of the on-chain resources in Resource Pool 3 is 83. The resource pool address of Resource Pool 4 is bxr99, and the resource amount of the on-chain resources in Resource Pool 4 is 55.
[0173] It should be noted that the resource pool address of each resource pool is the blockchain address of the resource pool.
[0174] Through the above steps 410-430, in the embodiments of the present disclosure, based on the comparison between the resource storage address indicated in the resource public request and the blockchain addresses of each resource pool on the blockchain, it is possible to relatively conveniently determine the resource pool where the on-chain resources to be integrated in the resource public request are located. Further, verifying the resource amount of the resource pool where the on-chain resources are located and incorporating the on-chain resources of the resource pool into the resource storage space in the case of passing the verification can improve the reliability of resource processing.
[0175] When integrating multiple on-chain resources into a target resource in a resource disclosure request, each on-chain resource needs to reach a certain number to enable resource integration. If the on-chain resources in the resource pool corresponding to the resource storage address are insufficient, it often leads to the inability to integrate multiple on-chain resources into the target resource, and the proportion of each on-chain resource in the target resource will be significantly different from that required by the resource disclosure request, resulting in the target resource not meeting the requirements of resource disclosure. Based on this, the embodiments of the present disclosure provide a solution for first verifying the resource quantity of the resource pool corresponding to the resource storage address before integrating multiple on-chain resources into the target resource, which can enable the extraction and integration of on-chain resources when the on-chain resources in each resource pool meet the requirements, so as to improve the reliability of resource processing.
[0176] Please refer to Figure 6 , in some embodiments, the process of first verifying the resource pool corresponding to the resource storage address includes but is not limited to the following steps 610-630:
[0177] Step 610: Determine the total number of on-chain resources in the resource pool corresponding to the resource storage address;
[0178] Step 620: If it is determined that the total number is greater than the predetermined resource number, determine that the first verification passes;
[0179] Step 630: If it is determined that the total number is less than or equal to the predetermined resource number, determine that the first verification fails.
[0180] The following describes steps 610-630 in detail.
[0181] In step 610, determine the total number of on-chain resources in the resource pool corresponding to the resource storage address.
[0182] The total number is used to indicate the total resource quantity of the on-chain resources stored in the resource pool corresponding to the resource storage address at the current time.
[0183] In the specific implementation of this embodiment, with authorization, a preset function is called to perform resource statistics on the on-chain resources in the resource pool corresponding to the resource storage address, and the total number of on-chain resources in the resource pool corresponding to the resource storage address is obtained. Among them, the preset function can be the sum function, etc.
[0184] In step 620, if it is determined that the total number is greater than the predetermined resource number, determine that the first verification passes.
[0185] The predetermined resource number is used to limit the minimum resource quantity of the on-chain resources that the resource pool corresponding to the resource storage address should store at the current time.
[0186] In the embodiments of the present disclosure, the number of predetermined resources may be determined according to a resource disclosure request, or may be obtained through consensus confirmation by multiple consensus nodes of a blockchain server, or may be limited by a smart contract, without limitation.
[0187] For example, if a smart contract limits that the minimum amount of on-chain resources that a resource pool corresponding to a resource storage address should store at the current time is 100, then the number of predetermined resources is 100.
[0188] In the specific implementation of this embodiment, first, for the resource pool corresponding to the resource storage address, the total number and the number of predetermined resources are compared. If the total number is greater than the number of predetermined resources, it indicates that the on-chain resources of the resource pool corresponding to the resource storage address are sufficient to meet the resource integration requirements of the resource disclosure request. Based on this, it is determined that the first verification passes.
[0189] In step 630, if it is determined that the total number is less than or equal to the number of predetermined resources, it is determined that the first verification fails.
[0190] In the specific implementation of this embodiment, if the total number is less than or equal to the number of predetermined resources, it indicates that the on-chain resources of the resource pool corresponding to the resource storage address are less and cannot meet the resource integration requirements of the resource disclosure request. Based on this, it is determined that the first verification fails.
[0191] For example, for resource pool 1 that stores on-chain resource A, the number of predetermined resources is 60. Based on this, since the actual amount of resources in resource pool 1 is 80, and 80 is greater than 60, the on-chain resource A stored in resource pool 1 can meet the resource integration requirements of the resource disclosure request. Based on this, it is determined that the first verification passes.
[0192] Through the above steps 610-630, in the embodiments of the present disclosure, before integrating multiple on-chain resources into a target resource, a first verification is performed on the amount of resources in the resource pool corresponding to the resource storage address, and the total number of on-chain resources in the resource pool is compared with the number of predetermined resources. When the total number is greater than the number of predetermined resources, it is determined that the first verification passes, which can enable the extraction and integration of on-chain resources when the on-chain resources in each resource pool meet the requirements, thereby improving the reliability of resource processing.
[0193] Detailed description of step 330
[0194] In step 330, if it is determined that the on-chain resources in the resource storage space meet the predetermined conditions, the on-chain resources in the resource storage space are integrated into a target resource.
[0195] In the specific implementation of this embodiment, since the target resource is integrated from multiple on-chain resources, the resource storage space often contains various types of on-chain resources. Based on this, corresponding conditions are set for each type of on-chain resource. Only when all the on-chain resources in the resource storage space meet the predetermined conditions, it is determined that the on-chain resources in the resource storage space meet the resource integration requirements, and then the on-chain resources in the resource storage space are integrated into the target resource.
[0196] In the embodiments of the present disclosure, the on-chain resources in the resource storage space include a first resource, a second resource, and a third resource. Among them, the first resource is stored in the first resource contract, the second resource is stored in the second resource contract, and the third resource is stored in the third resource contract. The first resource, the second resource, and the third resource may be of the same type or different types.
[0197] It should be noted that the first resource contract, the second resource contract, and the third resource contract are all smart contracts recorded on the blockchain, and the first resource contract, the second resource contract, and the third resource contract all contain methods for implementing resource management.
[0198] Please refer to Figure 7 , in some embodiments, the process of determining that the on-chain resources in the resource storage space meet the predetermined conditions includes but is not limited to the following steps 710-720:
[0199] Step 710: Determine the first number of the first resources, the second number of the second resources, and the third number of the third resources in the resource storage space;
[0200] Step 720: If it is determined that the first number is greater than or equal to the first threshold, the second number is greater than or equal to the second threshold, and the third number is greater than or equal to the third threshold, then it is determined that the on-chain resources in the resource storage space meet the predetermined conditions.
[0201] The following describes steps 710-720 in detail.
[0202] In step 710, determine the first number of the first resources, the second number of the second resources, and the third number of the third resources in the resource storage space.
[0203] The first number is used to indicate the resource quantity of the first resources contained in the resource storage space.
[0204] The second number is used to indicate the resource quantity of the second resources contained in the resource storage space.
[0205] The third number is used to indicate the resource quantity of the third resources contained in the resource storage space.
[0206] In the specific implementation of this embodiment, first, the resource identifiers of the first resource, the second resource, and the third resource are determined, where the resource identifier is used to distinguish different on-chain resources. Then, according to the resource identifier, the first resource, the second resource, and the third resource are queried in the resource storage space, and the number of the queried first resource, second resource, and third resource is counted to obtain the first number of the first resource, the second number of the second resource, and the third number of the third resource.
[0207] In step 720, if it is determined that the first number is greater than or equal to the first threshold, the second number is greater than or equal to the second threshold, and the third number is greater than or equal to the third threshold, it is determined that the on-chain resources in the resource storage space meet the predetermined conditions.
[0208] The first threshold is used to measure whether the first resource in the resource storage space meets the resource integration requirements.
[0209] The second threshold is used to measure whether the second resource in the resource storage space meets the resource integration requirements.
[0210] The third threshold is used to measure whether the third resource in the resource storage space meets the resource integration requirements.
[0211] In the specific implementation of this embodiment, first, the first number is compared with the first threshold, the second number is compared with the second threshold, and the third number is compared with the third threshold. If the first number is greater than or equal to the first threshold, it indicates that the first resource in the resource storage space meets the resource integration requirements. If the second number is greater than or equal to the second threshold, it indicates that the second resource in the resource storage space meets the resource integration requirements. If the third number is greater than or equal to the third threshold, it indicates that the third resource in the resource storage space meets the resource integration requirements. Since all on-chain resources need to meet the predetermined requirements during resource integration. Based on this, only when the first number is greater than or equal to the first threshold, the second number is greater than or equal to the second threshold, and the third number is greater than or equal to the third threshold, it is determined that the on-chain resources in the resource storage space meet the predetermined conditions. Otherwise, it is determined that the on-chain resources in the resource storage space do not meet the predetermined conditions.
[0212] For example, the first threshold, the second threshold, and the third threshold are all set to 100. If the first number of the first resource is 110, the second number of the second resource is 105, and the third number of the third resource is 95. It is considered that the first resource and the second resource meet the requirements, but the third resource does not meet the requirements. Therefore, it is determined that the on-chain resources in the resource storage space do not meet the predetermined conditions. At this time, 5 third resources also need to be extracted from the third resource contract storing the third resource to the resource storage space so that the on-chain resources in the resource storage space meet the resource integration conditions.
[0213] Through the above steps 710-720, in the embodiments of the present disclosure, corresponding judgment thresholds are set for each on-chain resource in the resource storage space, and the actual number of each on-chain resource is compared with the threshold to determine whether the actual number of on-chain resources meets the requirements of resource integration. Only when the actual number of all on-chain resources is not less than the threshold, it is considered that the on-chain resources in the resource storage space meet the predetermined conditions, and the threshold comparison method can be used to determine the timing of integrating on-chain resources into the target resource, improving the accuracy and timeliness of resource processing.
[0214] Since the importance of on-chain resources of different resource types in resource exchange is different, when more important on-chain resources account for a larger proportion in the target resource, it often brings better results to resource exchange. Based on this, the embodiments of the present disclosure provide a solution for determining the thresholds of each on-chain resource based on the resource type, which can effectively adjust the proportion of each on-chain resource in the target resource and improve the rationality of resource allocation of the target resource.
[0215] Please refer to Figure 8 , in some embodiments, the first threshold, the second threshold, and the third threshold are determined in the following manner:
[0216] Step 810: Determine the first resource type of the first resource, the second resource type of the second resource, the third resource type of the third resource, and the total amount of resources indicated by the resource disclosure request;
[0217] Step 820: Determine the first proportion of the first resource based on the first resource type, determine the second proportion of the second resource based on the second resource type, and determine the third proportion of the third resource based on the third resource type;
[0218] Step 830: Determine the first threshold based on the first proportion and the total amount of resources, determine the second threshold based on the second proportion and the total amount of resources, and determine the third threshold based on the third proportion and the total amount of resources.
[0219] The following will describe steps 810-830 in detail.
[0220] In step 810, determine the first resource type of the first resource, the second resource type of the second resource, the third resource type of the third resource, and the total amount of resources indicated by the resource disclosure request.
[0221] The first resource type is used to indicate the resource type of the first resource.
[0222] The second resource type is used to indicate the resource type of the second resource.
[0223] The third resource type is used to indicate the resource type of the third resource.
[0224] The total amount of resources is used to indicate the total number of resources of the target resources.
[0225] In the specific implementation of this embodiment, since the resource types of each on-chain resource on the blockchain are identified in the resource contract storing the on-chain resource. Based on this, with authorization, obtain the resource types of each on-chain resource from the resource contract, obtaining the first resource type of the first resource, the second resource type of the second resource, and the third resource type of the third resource.
[0226] Furthermore, since the resource disclosure request indicates the total amount of resources of the target resources, the total amount of resources can be directly extracted from the resource disclosure request.
[0227] In step 820, determine the first proportion of the first resource based on the first resource type, determine the second proportion of the second resource based on the second resource type, and determine the third proportion of the third resource based on the third resource type.
[0228] The first proportion is used to indicate the proportion of the first resource in the target resources.
[0229] The second proportion is used to indicate the proportion of the second resource in the target resources.
[0230] The third proportion is used to indicate the proportion of the third resource in the target resources.
[0231] In the specific implementation of this embodiment, first call the preset proportion comparison table, where the preset proportion comparison table indicates multiple resource types and the preset proportions corresponding to each resource type. Then, query the preset proportions of each resource type in the preset proportion comparison table, obtaining the preset proportion of the first resource type, the preset proportion of the second resource type, and the preset proportion of the third resource type. Further, add the preset proportion of the first resource type, the preset proportion of the second resource type, and the preset proportion of the third resource type to obtain the total proportion. Finally, divide the preset proportion of the first resource type by the total proportion to obtain the first proportion of the first resource; divide the preset proportion of the second resource type by the total proportion to obtain the second proportion of the second resource; divide the preset proportion of the third resource type by the total proportion to obtain the third proportion of the third resource.
[0232] In step 830, determine the first threshold based on the first proportion and the total amount of resources, determine the second threshold based on the second proportion and the total amount of resources, and determine the third threshold based on the third proportion and the total amount of resources.
[0233] In the specific implementation of this embodiment, first multiply the first proportion by the total amount of resources and use the product result as the first threshold. Then, multiply the second proportion by the total amount of resources and use the product result as the second threshold. Finally, multiply the third proportion by the total amount of resources and use the product result as the third threshold.
[0234] Through the above steps 810-830, the embodiments of the present disclosure determine the proportion of each on-chain resource based on the resource type, and determine the threshold size of each on-chain resource according to the total amount and proportion of the target resource, which can effectively adjust the proportion of each on-chain resource in the target resource and improve the rationality of resource allocation of the target resource.
[0235] Detailed description of step 340
[0236] In step 340, the target resource is disclosed to the target object on the blockchain, so that the target object can exchange the object resources in the resource pool of the target object for the target resource and perform transaction processing based on the target resource.
[0237] In the specific implementation of this embodiment, after integrating multiple on-chain resources into the target resource, the target resource is publicly issued on the blockchain, so that the target object can view and exchange the target resource, realize the circulation and exchange of resources on the blockchain, and enable the target object to perform transaction processing based on the target resource.
[0238] Please refer to Figure 9 , in some embodiments, the process of exchanging the target resource with the object resources in the resource pool of the target object includes but is not limited to the following steps 910-920:
[0239] Step 910, determine the resource exchange ratio between the object resource and the target resource;
[0240] Step 920, exchange the fifth number of target resources based on the fourth number of object resources and the resource exchange ratio.
[0241] The following describes steps 910-920 in detail.
[0242] In step 910, determine the resource exchange ratio between the object resource and the target resource.
[0243] The resource exchange ratio is used to indicate the number of target resources that an object resource can exchange for or the number of object resources that a target resource can exchange for.
[0244] In the specific implementation of this embodiment, since the exchange ratios of virtual resources of various resource types are often publicly disclosed on relevant platforms to make the resource exchange process more transparent. Based on this, with authorization, the resource exchange ratio between the object resource and the target resource is found on the relevant platform.
[0245] For example, the public platform indicates that the resource exchange ratio between the target resource and the object resource is 1:2; the resource exchange ratio between the target resource and on-chain resource A is 1:4; the resource exchange ratio between the object resource and on-chain resource A is 1:2.
[0246] In step 920, based on the fourth number of object resources and the resource exchange ratio, exchange for the fifth number of target resources.
[0247] The fourth number is used to indicate the number of resources of the object resources used by the target object for resource exchange.
[0248] The fifth number is used to indicate the number of resources of the target resources exchanged by the target object.
[0249] In the specific implementation of this embodiment, first, determine the number of target resources that can be exchanged for one object resource according to the resource exchange ratio. Then, multiply the number of target resources that can be exchanged for one object resource determined by the fourth number to obtain a product result, and use the product result as the fifth number.
[0250] For example, when the resource exchange ratio of the object resource and the target resource is 1:2.5, 1 object resource can be exchanged for 2.5 target resources. When the target object provides 50 object resources, according to the resource exchange ratio, the target object can exchange 50 object resources for 125 target resources. At this time, the fourth number is 50, and the fifth number is 125.
[0251] Through the above steps 910-920, the embodiments of the present disclosure perform resource exchange according to the resource exchange ratio of the object resources and the target resources, so that the target object can clearly determine the number of target resources that can be exchanged, making the resource exchange process more transparent, and improving the rationality and efficiency of resource exchange.
[0252] Since after the target resources are disclosed to the target object on the blockchain, when the target object uses the target resources for transaction processing, corresponding transaction data is often generated. If the transaction processing of the target resources is not recorded on the blockchain in time, it will often lead to a reduction in resource security and affect the transaction processing security of the blockchain system. Based on this, the embodiments of the present disclosure provide a solution for recording the transaction processing based on the target resources, which can improve the storage timeliness and non-volatility of transaction data, and thus improve the transaction processing security of the blockchain system.
[0253] Please refer to Figure 10 , in some embodiments, after the target resources are disclosed to the target object on the blockchain, the blockchain resource processing method further includes but is not limited to the following steps 1010-1020:
[0254] Step 1010, generate a resource processing transaction for the transaction processing based on the target resources;
[0255] Step 1020, record the resource processing transaction on the blockchain.
[0256] The following is a detailed description of steps 1010 - 1020.
[0257] In step 1010, for the transaction processing based on the target resource, a resource processing transaction is generated.
[0258] The resource processing transaction is used to indicate the data generated by the transaction processing based on the target resource. The resource processing transaction is used to indicate the transaction processing time, the number of target resources involved, the objects associated with the transaction, and so on.
[0259] In the specific implementation of this embodiment, for the transaction processing based on the target resource, first, the transaction processing time is used as the transaction timestamp, and the resource number of the target resources involved in the transaction processing, the blockchain addresses of the objects, etc. are used as the transaction association information. Then, the transaction timestamp and the transaction association information are integrated into a resource processing transaction.
[0260] For example, when performing transaction processing based on the target resource, if the target object transfers 5 target resources to object A. Then the resource processing transaction can be expressed as event[transfer(from the blockchain address of the target object to the blockchain address of object A, 5 target resources)].
[0261] In step 1020, the resource processing transaction is recorded on the blockchain.
[0262] In the specific implementation of this embodiment, first, the consensus nodes in the consensus network package the resource processing transaction into a block, and after the block is consensus - confirmed, the block is recorded on the blockchain to implement the on - chain processing of the resource processing transaction.
[0263] Through the above steps 1010 - 1020, in the embodiments of the present disclosure, after publicly disclosing the target resource to the target object on the blockchain, for the transaction processing based on the target resource, a resource processing transaction is generated. Taking transactions as units, multiple resource processing transactions are packaged into a block to perform on - chain processing of the resource processing transaction, which can timely record the transaction processing of the target resource on the blockchain, improve the storage timeliness and non - volatility of transaction data, and further improve the transaction processing security of the blockchain system.
[0264] Detailed description of transaction processing based on target resources in an embodiment of the present disclosure
[0265] After the target resource is made public on the blockchain, the target object can use the obtained target resource for various types of transaction processing according to actual needs. For example, the target resource can be used to achieve resource exchange, resource accumulation, and so on. However, the transaction processing based on the target resource will, to a certain extent, affect the resource security on the blockchain and the transaction processing security of the entire system. Based on this, the present disclosure provides a solution for managing the transaction processing based on the target resource, which can improve the processing security of the target resource and thus reduce the transaction processing risk of the blockchain system.
[0266] Please refer to Figure 11 , in some embodiments, the process of performing transaction processing based on the target resource includes but is not limited to the following steps 1110-1130:
[0267] Step 1110: Determine the blockchain address of the first object;
[0268] Step 1120: Perform a second verification on the first object based on the blockchain address;
[0269] Step 1130: If it is determined that the second verification passes, transfer the target resource to the first object.
[0270] The following is a detailed description of steps 1110-1130.
[0271] In step 1110, the blockchain address of the first object is determined.
[0272] The first object is the object to which the target object will transfer the target resource.
[0273] In the specific implementation of this embodiment, when the target object wants to transfer the target resource to another object, it often initiates a resource transfer request, which indicates the amount of the target resource to be transferred and the blockchain address of the first object that will receive the target resource. Based on this, the blockchain address of the first object can be determined according to the received resource transfer request.
[0274] In step 1120, a second verification is performed on the first object based on the blockchain address.
[0275] The second verification is used to measure whether the first object can own the target resource and whether the target resource that the target object wants to transfer to the first object exceeds the number of resources that the first object can own.
[0276] To save space, the specific implementation process of performing the second verification on the first object based on the blockchain address in the embodiments of the present disclosure will be described in detail below. It will not be elaborated here.
[0277] In step 1130, if it is determined that the second verification passes, the target resource is transferred to the first object.
[0278] In the specific implementation of this embodiment, if it is determined that the second verification passes, it indicates that the first object is an object capable of receiving the target resource, and the target object is allowed to transfer the target resource to the first object. Based on this, the target resource is transferred to the first object.
[0279] Through the above steps 1110-1130, in the embodiment of the present disclosure, after verifying the first object, when the first object meets the requirements, the target object can transfer the target resource to the first object, realizing the circulation and exchange of the target resource between objects, improving the convenience of using the target resource for transaction processing, enabling the target resource to be used in multiple application scenarios, and improving the utilization rate of the target resource.
[0280] Since in a blockchain system, not every object can hold the target resource. If the target object arbitrarily transfers the target resource, it often causes problems such as low resource security, which is not conducive to the management of blockchain resources. Based on this, the embodiment of the present disclosure provides a solution for verifying the first object that receives the target resource, which can effectively restrict the transfer of the target resource by the target object and improve the security of the target resource.
[0281] Please refer to Figure 12 , in some embodiments, the process of performing the second verification on the first object based on the blockchain address includes but is not limited to the following steps 1210-1230:
[0282] Step 1210, obtain a predetermined address mapping table;
[0283] Step 1220, if it is determined that there is no candidate blockchain address in the predetermined address mapping table that is the same as the blockchain address, determine the maximum amount of the target resource that the first object is allowed to hold at the current time and the amount of the resource to be transferred determined by the target object to be transferred to the first object;
[0284] Step 1230, if it is determined that the amount of the resource to be transferred is less than or equal to the maximum amount of the target resource, determine that the second verification passes.
[0285] The following is a detailed description of steps 1210-1230.
[0286] In step 1210, obtain a predetermined address mapping table.
[0287] The predetermined address mapping table contains candidate blockchain addresses of multiple objects. The candidate blockchain address is the address of the object on the blockchain. The candidate blockchain address can be the resource pool address of the object's resource pool or the contract address of the smart contract recorded on the blockchain.
[0288] Multiple objects in the predetermined address mapping table are objects that are predetermined not to be able to hold the target resource.
[0289] When implementing this embodiment specifically, in order to improve the call efficiency of the predetermined address mapping table, the predetermined address mapping table can be stored in a certain smart contract of the blockchain system. When it is necessary to call the predetermined address mapping table, with authorization, the predetermined address mapping table is extracted from the smart contract.
[0290] In step 1220, if it is determined that there is no candidate blockchain address in the predetermined address mapping table that is the same as the blockchain address, then determine the maximum amount of target resources that the first object is allowed to hold at the current time, and the amount of resources to be transferred that the target object determines to transfer to the first object.
[0291] The maximum amount of target resources is used to indicate the maximum value of the target resources that the first object can hold at the current time.
[0292] The amount of resources to be transferred is used to indicate the amount of resources of the target resources that the target object will transfer to the first object.
[0293] When implementing this embodiment specifically, first compare the candidate blockchain address in the predetermined address mapping table with the blockchain address. If it is determined that there is no candidate blockchain address in the predetermined address mapping table that is the same as the blockchain address, it indicates that the first object is not an object that is not allowed to hold the target resource as defined in the predetermined address mapping table, and the first object has the qualification to hold the target resource. Further, determine whether the target resources that the first object can hold at the current time reach the upper limit. Based on this, determine the maximum amount of target resources that the first object is allowed to hold at the current time, and the amount of resources to be transferred that the target object determines to transfer to the first object.
[0294] As Figure 13 shown, the blockchain address of the first object is Qw12fg. There are 6 objects in the predetermined address mapping table, namely object D, object F, object C, object M, object N, and object P in sequence. Specifically, the object identifier of object D is K77, and the candidate blockchain address is Qw12fg; the object identifier of object F is K88, and the candidate blockchain address is Mkp483; the object identifier of object C is K79, and the candidate blockchain address is Yor48w; the object identifier of object M is K33, and the candidate blockchain address is Pp70ec; the object identifier of object N is K74, and the candidate blockchain address is Ky43n8; the object identifier of object P is K53, and the candidate blockchain address is Taw146. Based on this, query the blockchain address of the first object in the predetermined address mapping table, and it is found that the blockchain addresses of object D and the first object are the same, indicating that object D and the first object are the same object. Therefore, the first object is an object that is not allowed to hold the target resource as defined in the predetermined address mapping table, and it is determined that the second verification fails.
[0295] In step 1230, if it is determined that the amount of resources to be transferred is less than or equal to the maximum target resource amount, it is determined that the second verification passes.
[0296] In the specific implementation of this embodiment, first, the amount of resources to be transferred is compared with the maximum target resource amount to determine whether the target resources held by the first object will reach the upper limit after the target object transfers the target resources to the first object. Then, if the amount of resources to be transferred is greater than the maximum target resource amount, it indicates that the target resources held by the first object will reach the upper limit after the target object transfers the target resources to the first object. Therefore, it is not allowed for the target object to transfer the target resources to the first object, and thus it is determined that the second verification fails. If the amount of resources to be transferred is less than or equal to the maximum target resource amount, it indicates that the target resources held by the first object will not reach the upper limit after the target object transfers the target resources to the first object. Therefore, it is allowed for the target object to transfer the target resources to the first object, and thus it is determined that the second verification passes.
[0297] Through the above steps 1210-1230, in the embodiment of the present disclosure, the first object receiving the target resources is preliminarily verified according to the blockchain address of the first object and the predetermined address mapping table. After determining that the first object is not an object that is not allowed to hold the target resources as defined in the predetermined address mapping table, the quantity of the target resources that the first object can hold is verified. After determining that the first object has the permission to possess the target resources and determining that the target resources held by the first object will not reach the upper limit after the target object transfers the target resources to the first object, the resource transfer operation of the target object is allowed, which can effectively restrict the transfer of the target resources by the target object and improve the security of resource processing.
[0298] Since in the blockchain system, the credit situation of each object and the length of time the object has joined the blockchain often affect the evaluation of the object. The better the credit of the object and the longer the time the object has joined the blockchain, the smaller the probability that the object has risks, and the smaller the possibility that granting the object the permission to possess the target resources will affect the blockchain system. Based on this, the present disclosure provides a solution for constructing a predetermined address mapping table based on the credit level of the object and the creation time of the object's resource pool, which can improve the rationality of constructing the predetermined address mapping table.
[0299] Please refer to Figure 14 , in some embodiments, the predetermined address mapping table is determined in the following manner:
[0300] Step 1410: For each object, determine the credit level of the object and the creation timestamp of the object's resource pool;
[0301] Step 1420: Based on the credit level and the creation timestamp, determine the object score of the object;
[0302] Step 1430: Determine the blockchain addresses of the objects with object scores less than a preset threshold as candidate blockchain addresses;
[0303] Step 1440: Based on the candidate blockchain addresses and the object identifiers of the objects with object scores less than a preset threshold, construct a predetermined address mapping table.
[0304] The following will describe steps 1410 - 1440 in detail.
[0305] In step 1410, for each object, determine the credit level of the object and the creation timestamp of the object's resource pool.
[0306] The credit level is used to indicate the credit quality of the object for performing various transaction processes in the blockchain system.
[0307] The creation timestamp of the resource pool is used to indicate the time point when the object's resource pool is created.
[0308] In the specific implementation of this embodiment, since the credit levels and creation timestamps of each object are often publicly available on relevant platforms or stored in the background logs of the blockchain server. Based on this, with authorized permission, the credit level and creation timestamp of the object can be queried from the public information of the relevant platform, or the credit level and creation timestamp of the object can be extracted from the background logs of the blockchain server.
[0309] In step 1420, based on the credit level and creation timestamp, determine the object score of the object.
[0310] The object score is used to indicate the comprehensive scoring situation of the object based on the object's credit situation and the time of joining the blockchain.
[0311] In the specific implementation of this embodiment, the scoring results of the object in terms of credit level and the scoring results of the object in terms of creation timestamp can be calculated respectively according to the credit level and creation timestamp. Then, the scoring results of the object in terms of credit level and the scoring results of the object in terms of creation timestamp are integrated into the object score of the object.
[0312] To save space, the specific implementation process of determining the object score of the object based on the credit level and creation timestamp in the embodiments of the present disclosure will be described in detail below. It will not be elaborated here.
[0313] In step 1430, determine the blockchain addresses of the objects with object scores less than a preset threshold as candidate blockchain addresses.
[0314] The preset threshold is used to measure whether the object score of the object meets the requirements.
[0315] In the specific implementation of this embodiment, first, for each object, the object score of the object is compared with a preset threshold. If the object score is greater than or equal to the preset threshold, it indicates that the probability of the object having a risk is small, and the possibility of affecting the blockchain system by granting the object the permission to own the target resource is small. Therefore, the blockchain address of the object is not used as a candidate blockchain address. If the object score is less than the preset threshold, it indicates that the probability of the object having a risk is large, and the possibility of affecting the blockchain system by granting the object the permission to own the target resource is large. Therefore, the blockchain address of the object is used as a candidate blockchain address.
[0316] In step 1440, based on the candidate blockchain addresses and the object identifiers of the objects whose object scores are less than the preset threshold, a predetermined address mapping table is constructed.
[0317] The object identifier is used to identify the identity information of the object, and the object identifiers of different objects are different. The object identifier can be a string of random numbers or a string generated according to specific rules.
[0318] In the specific implementation of this embodiment, first, on the premise of being authorized and permitted, the object identifiers of the objects whose object scores in the blockchain records are less than the preset threshold are obtained. Then, the candidate blockchain addresses and object identifiers of each object are stored in a predetermined table in a one-to-one correspondence relationship to obtain a predetermined address mapping table.
[0319] Through the above steps 1410 - 1440, the embodiment of the present disclosure constructs a predetermined address mapping table based on the credit level of the object and the creation time of the object's resource pool, taking into account the influence of the object's credit level and the time of joining the blockchain on risk judgment, and can more accurately determine the object score of the object. Thus, objects with risks are screened out according to the object score, and a predetermined address mapping table is constructed based on the blockchain addresses and object identifiers of the objects with risks, thereby improving the rationality of constructing the predetermined address mapping table.
[0320] Please refer to Figure 15 , in some embodiments, the process of determining the object score of an object based on the credit level and the creation timestamp includes but is not limited to the following steps 1510 - 1530:
[0321] Step 1510, for each object, based on the credit level, determine the first score of the object;
[0322] Step 1520, for each object, based on the creation timestamp, determine the second score of the object;
[0323] Step 1530, based on the weighted sum of the first score and the second score, determine the object score of the object.
[0324] The following provides a detailed description of steps 1510 - 1530.
[0325] In step 1510, for each object, a first score of the object is determined based on the credit rating.
[0326] In the specific implementation of this embodiment, first, a preset comparison table is obtained. Among them, the preset comparison table indicates the candidate scores corresponding to each credit rating. Then, the candidate score corresponding to the credit rating of the object is searched for in the preset comparison table, and the queried candidate score is used as the first score.
[0327] For example, in the preset comparison table, the credit ratings are divided into A, B, C, D, and E. Among them, the candidate score for credit rating A is 90; the candidate score for credit rating B is 80; the candidate score for credit rating C is 70; the candidate score for credit rating D is 60; the candidate score for credit rating E is 50.
[0328] In step 1520, for each object, a second score of the object is determined based on the creation timestamp.
[0329] In the specific implementation of this embodiment, the specific implementation process of determining the second score of the object based on the creation timestamp is similar to the specific implementation process of the above step 1510. To save space, it will not be elaborated here.
[0330] In step 1530, an object score of the object is determined based on the weighted sum of the first score and the second score.
[0331] In the specific implementation of this embodiment, first, a first weight and a second weight are determined. Among them, the first weight is used to indicate the importance of the credit rating in determining the object score, and the second weight is used to indicate the importance of the creation timestamp in determining the object score. Then, the first weight is multiplied by the first score to obtain a first product; the second weight is multiplied by the second score to obtain a second product; the first product and the second product are added together to obtain an added result, thereby achieving the weighted sum of the first score and the second score. Finally, the added result is used as the object score of the object.
[0332] It should be noted that the first weight and the second weight are determined according to actual needs without limitation, and the sum of the first weight and the second weight is 1.
[0333] Such as Figure 16AAs shown, both the first weight and the second weight are 0.5. The objects recorded in the blockchain include Object A, Object B, Object C, Object D, Object E, and Object F. Specifically, the first score of Object A is 88 and the second score is 80, and the object score of Object A is determined to be 84. The first score of Object B is 80 and the second score is 84, and the object score of Object B is determined to be 82. The first score of Object C is 76 and the second score is 82, and the object score of Object C is determined to be 79. The first score of Object D is 78 and the second score is 88, and the object score of Object D is determined to be 80. The first score of Object E is 90 and the second score is 73, and the object score of Object E is determined to be 83. The first score of Object F is 70 and the second score is 80, and the object score of Object F is determined to be 75.
[0334] As Figure 16B shown, according to the object scores, each object is sorted from largest to smallest according to the object scores, and the object sequence obtained is [Object A, Object E, Object B, Object D, Object C, Object F]. The objects ranked in the last three positions in the object sequence are determined as objects at risk, and the blockchain addresses of Object D, Object C, and Object F are used as candidate blockchain addresses. Based on this, it is determined that the predetermined address mapping table includes the object identifier K77 of Object D and the candidate blockchain address Qw12fg, the object identifier K88 of Object F and the candidate blockchain address Mkp483, and the object identifier K79 of Object C and the candidate blockchain address Yor48w.
[0335] Through the above steps 1510 - 1530, in the embodiments of the present disclosure, by comprehensively determining the object branch according to the credit rating and the creation timestamp of the resource pool, the accuracy of determining the object score of the object can be improved, so that objects with better credit ratings and earlier creation times of the resource pool are granted the right to hold the target resource, while objects with poor credit ratings and later creation times of the resource pool are not granted the right to hold the target resource, thereby improving the security of resource processing.
[0336] Detailed description of transaction processing based on target resources in another embodiment of the present disclosure
[0337] After the target resource is made public on the blockchain, the target object can exchange the object resources in its own resource pool for the target resource. However, after holding the target resource for a certain period of time, the target object often wants to exchange the target resource for other types of resources according to actual needs. To meet this requirement, in addition to achieving it through resource exchange with other objects, the target object can also achieve it through resource exchange with the smart contract that makes the target resource public. Based on this, the present disclosure provides a solution for resource exchange through the smart contract that makes the target resource public, which can improve the flexibility of resource exchange.
[0338] Please refer to Figure 17, in some embodiments, the process of the target object performing a transaction based on the target resource includes but is not limited to the following steps 1710-1720:
[0339] Step 1710, determine the blockchain address for publishing the target resource;
[0340] Step 1720, transfer a predetermined number of target resources to the blockchain address to obtain the on-chain resources corresponding to the target resources.
[0341] The following is a detailed description of steps 1710-1720.
[0342] In step 1710, determine the blockchain address for publishing the target resource.
[0343] In the specific implementation of this embodiment, the blockchain address for publishing the target resource refers to the contract address of the smart contract for publishing the target resource, and the contract address of this smart contract is recorded in the blockchain. Based on this, with authorization, the target object will send an address acquisition request to the blockchain system. After the identity verification of the target object, the blockchain system will provide the contract address of the smart contract for publishing the target resource as the blockchain address to the target object.
[0344] In step 1720, transfer a predetermined number of target resources to the blockchain address to obtain the on-chain resources corresponding to the target resources.
[0345] In the specific implementation of this embodiment, when the target object obtains the blockchain address for publishing the target resource according to the address acquisition request, it transfers a predetermined number of target resources stored in its own resource pool to the blockchain address to realize the return of the target resources, and obtains on-chain resources with the same resource value as the predetermined number of target resources from the blockchain address for publishing the target resource.
[0346] For example, one target resource consists of 0.5 on-chain resource A, 2 on-chain resource B, and 1.5 on-chain resource C. When the target object transfers 10 target resources to the smart contract for publishing the target resource, it can obtain 5 on-chain resource A, 20 on-chain resource B, and 15 on-chain resource C from the smart contract for publishing the target resource.
[0347] Through the above steps 1710-1720, in the embodiments of the present disclosure, when the target object exchanges a certain number of target resources from the smart contract for publishing the target resource, it can relatively conveniently return a predetermined number of target resources to the smart contract for publishing the target resource at a certain time point according to actual needs, and obtain equivalent on-chain resources from the smart contract for publishing the target resource, realizing the flexible transformation of the resources held by the target object, and improving the convenience of exchanging target resources for on-chain resources.
[0348] In the embodiments of the present disclosure, by exchanging resources with the smart contract of the disclosed target resources, the target object can exchange the target resources into on-chain resources or object resources. The following will be combined with Figure 18 、 Figure 19 to describe in detail two different resource exchange scenarios.
[0349] Please refer to Figure 18 , in some embodiments, for the transaction processing of the target object based on the target resources, the blockchain resource processing method further includes but is not limited to the following steps 1810-1830:
[0350] Step 1810: Receive a predetermined number of target resources transferred by the target object;
[0351] Step 1820: Determine the composition number of each on-chain resource among the predetermined number of target resources, and transfer each on-chain resource to the target object based on the composition number;
[0352] Step 1830: Clear the predetermined number of target resources.
[0353] The following will describe steps 1810-1830 in detail.
[0354] In step 1810, receive a predetermined number of target resources transferred by the target object.
[0355] In the specific implementation of this embodiment, when the target object wants to exchange the target resources for the corresponding on-chain resources, the target object will call the smart contract of the disclosed target resources and transfer a predetermined number of target resources to the smart contract of the disclosed target resources. Based on the resource transfer operation of the target object, the smart contract of the disclosed target resources will receive a predetermined number of target resources transferred by the target object.
[0356] In step 1820, determine the composition number of each on-chain resource among the predetermined number of target resources, and transfer each on-chain resource to the target object based on the composition number.
[0357] The composition number is used to indicate the number of on-chain resources contained in the predetermined number of target resources.
[0358] In the specific implementation of this embodiment, since the proportion of each on-chain resource in a target resource has been determined when integrating multiple on-chain resources into the target resource. Based on this, according to the product result of the proportion of each on-chain resource in a target resource and the predetermined number of target resources returned by the target object to the smart contract of the disclosed target resources, the composition number of each on-chain resource can be determined. Further, according to the composition number of each on-chain resource, various types of on-chain resources are transferred to the resource pool of the target object.
[0359] In step 1830, a predetermined number of target resources are cleared.
[0360] When this embodiment is specifically implemented, a predetermined method in the smart contract can be used to clear the predetermined number of target resources transferred by the target object, so as to terminate the circulation of the predetermined number of target resources.
[0361] Through the above steps 1810-1830, in the embodiment of the present disclosure, after the target object exchanges a certain number of target resources from the smart contract that discloses the target resources, it can more conveniently return a predetermined number of target resources to the smart contract of the disclosed target resources at a certain time point according to actual needs. Furthermore, the smart contract of the disclosed target resource contract transfers a certain number of on-chain resources to the target object according to the composition of the on-chain resources in the target resources, so that the target object can obtain equivalent on-chain resources from the smart contract of the disclosed target resources, realizing the flexible transformation of the resources held by the target object and improving the convenience of exchanging target resources for on-chain resources.
[0362] Please refer to Figure 19 , in some embodiments, for the transaction processing of the target object based on the target resources, the blockchain resource processing method further includes but is not limited to the following steps 1910-1930:
[0363] Step 1910: Receive a predetermined number of target resources transferred by the target object;
[0364] Step 1920: Determine the first exchange number of object resources based on the predetermined number of target resources and the resource exchange ratio between the target resources and the object resources;
[0365] Step 1930: Transfer the first exchange number of object resources to the target object and clear the predetermined number of target resources.
[0366] The following is a detailed description of steps 1910-1930.
[0367] In step 1910, receive a predetermined number of target resources transferred by the target object.
[0368] When this embodiment is specifically implemented, the specific implementation process of step 1910 is similar to the specific implementation process of the above step 1810. For the sake of brevity, it will not be elaborated here.
[0369] In step 1920, determine the first exchange number of object resources based on the predetermined number of target resources and the resource exchange ratio between the target resources and the object resources.
[0370] The resource exchange ratio is used to indicate the object resources that can be exchanged for a target resource or the target resources that can be exchanged for one object resource.
[0371] The first exchange quantity is used to indicate the quantity of object resources that can be obtained by exchanging a predetermined quantity of target resources.
[0372] In the specific implementation of this embodiment, the specific implementation process of step 1920 is similar to that of step 920 above. For the sake of brevity, it will not be elaborated here.
[0373] In step 1930, transfer the first exchange quantity of object resources to the target object and clear the predetermined quantity of target resources.
[0374] In the specific implementation of this embodiment, the specific implementation process of step 1930 is similar to that of steps 1820 - 1830 above. The difference is that in step 1820, the on-chain resources are transferred to the target object, while in step 1930, the object resources are transferred to the target object, and the types of resources obtained by exchanging the target resources are different. For the sake of brevity, it will not be elaborated here.
[0375] Through the above steps 1910 - 1930, in the embodiment of the present disclosure, after the target object exchanges a certain quantity of target resources from the smart contract that discloses the target resources, it can conveniently return a predetermined quantity of target resources to the smart contract that discloses the target resources at a certain time point according to actual needs, and obtain object resources with equal value from the smart contract that discloses the target resources, realizing the flexible transformation of the resources held by the target object, and improving the convenience of exchanging target resources into object resources.
[0376] Since the target object returning the target resources to the smart contract that discloses the target resources at different times will have a certain impact on the overall resource growth of the target object, if the timing of returning the target resources to the smart contract that discloses the target resources to exchange for object resources or on-chain resources is randomly selected, it will often cause the reduction of the overall resource growth of the target object. Based on this, the embodiment of the present disclosure provides a solution for determining the quantity of target resources to be returned to the smart contract that discloses the target resources based on the actual resource growth brought by the target resources, which can improve the rationality of returning the target resources to the smart contract that discloses the target resources to exchange for object resources or on-chain resources.
[0377] Please refer to Figure 20 , in some embodiments, the process of transferring a predetermined quantity of target resources to a blockchain address includes but is not limited to the following steps 2010 - 2020:
[0378] Step 2010, determine the associated resource growth data of the target resources;
[0379] Step 2020: Transfer a predetermined number of target resources to a blockchain address based on the associated resource growth data.
[0380] The following provides a detailed description of steps 2010 - 2020.
[0381] In step 2010, determine the associated resource growth data of the target resources.
[0382] The associated resource growth data is used to indicate the resource growth brought by the target resources to the target object. In the embodiments of the present disclosure, the associated resource growth data may include, but is not limited to, the resource growth amount or the percentage of resource growth brought by the target resources to the target object.
[0383] In the specific implementation of this embodiment, first, with the authorization and permission of the target object, query the total resource growth amount brought by various types of resources owned by the target object on the relevant platform, and query the resource growth amount brought by the target resources owned by the target object. Then, divide the resource growth amount by the total resource growth amount to obtain a division result, and use the division result as the percentage of resource growth brought by the target resources to the target object. Finally, use the resource growth amount and the percentage of resource growth as the associated resource growth data of the target resources.
[0384] In step 2020, transfer a predetermined number of target resources to a blockchain address based on the associated resource growth data.
[0385] In the specific implementation of this embodiment, first, based on the associated resource growth data, determine the predetermined number corresponding to the associated resource growth data through a look-up table method or a function substitution method. Then, transfer a predetermined number of target resources to a blockchain address.
[0386] It should be noted that the look-up table method refers to finding the predetermined number corresponding to the current associated resource growth data from a pre-constructed mapping table of associated resource growth data and predetermined numbers. The function substitution method refers to substituting the associated resource growth data as an independent variable into a pre-constructed function and using the output of the pre-constructed function as the predetermined number.
[0387] Through the above steps 2010 - 2020, in the embodiments of the present disclosure, the number of target resources returned to the smart contract of the public target resources is determined based on the actual resource growth brought by the target resources, enabling the target object to return the target resources to the smart contract of the public target resources at a more appropriate time and exchange for object resources or on-chain resources, thereby improving the rationality of resource conversion.
[0388] Please refer to Figure 21, in some embodiments, the associated resource growth data is the percentage of the resource growth brought by the target resource. The process of transferring a predetermined number of target resources to a blockchain address includes but is not limited to the following steps 2110-2130:
[0389] Step 2110, obtain a preset number comparison table;
[0390] Step 2120, in the number comparison table, determine the resource growth interval where the associated resource growth data is located as the target interval;
[0391] Step 2130, determine the predetermined number based on the candidate ratio corresponding to the target interval and the total number of target resources.
[0392] The following is a detailed description of steps 2110-2130.
[0393] In step 2110, a preset number comparison table is obtained.
[0394] The number comparison table is used to indicate the corresponding relationship between each resource growth interval and the candidate ratio of the target resources to be increased or decreased.
[0395] The number comparison table contains multiple resource growth intervals, and each resource growth interval corresponds to a candidate ratio.
[0396] The resource growth interval is used to indicate the fluctuation range of the resource growth brought by the target resource.
[0397] The candidate ratio is used to indicate the proportion of the target resources that should be reduced in the total target resources.
[0398] In the specific implementation of this embodiment, in order to improve the call efficiency of the preset number comparison table, the preset number comparison table can be stored in a certain smart contract of the blockchain system. When the preset number comparison table needs to be called, with authorization, the preset number comparison table is extracted from the smart contract.
[0399] In step 2120, in the number comparison table, determine the resource growth interval where the associated resource growth data is located as the target interval.
[0400] In the specific implementation of this embodiment, search for the resource growth interval where the associated resource growth data is located among the multiple resource growth intervals in the number comparison table, and determine the resource growth interval where the associated resource growth data is located as the target interval.
[0401] In step 2130, determine the predetermined number based on the candidate ratio corresponding to the target interval and the total number of target resources.
[0402] In the specific implementation of this embodiment, first determine the total number of target resources in the resource pool of the object to obtain the total number of target resources. Then, multiply the candidate ratio by the total number to obtain a product result, and use the product result as the predetermined number.
[0403] As Figure 22 shown, the number comparison table can indicate the candidate ratio of the percentage of resource growth brought by the target resource in each resource growth interval. Specifically, when the resource growth interval is 0 to 20%, the candidate ratio is 20%. When the resource growth interval is 21% to 40%, the candidate ratio is 40%. When the resource growth interval is 41% to 60%, the candidate ratio is 60%. When the resource growth interval is greater than 60%, the candidate ratio is 100%. When the resource growth interval is -10% to 0, the candidate ratio is 40%. When the resource growth interval is -15% to -11%, the candidate ratio is 60%. When the resource growth interval is -20% to -16%, the candidate ratio is 80%. When the resource growth interval is less than -20%, the candidate ratio is 100%.
[0404] Based on this, if the total number of target resources in the resource pool of the target object is 100 and the percentage of resource growth brought by the target resource is 50%, the predetermined number is determined to be 60% × 100 = 60.
[0405] Through the above steps 2010-2020, the embodiments of the present disclosure can determine the resource growth interval where the associated resource growth data is located as the target interval in the number comparison table by means of table lookup and ratio conversion, and determine the predetermined number according to the candidate ratio corresponding to the target interval and the total number of target resources, which can simplify the determination process of the predetermined number and improve the determination efficiency and accuracy of the predetermined number.
[0406] Detailed description of the implementation details of the blockchain resource processing method in an embodiment of the present disclosure
[0407] Next, with reference to Figure 23 A specific implementation process of the blockchain resource processing method according to the embodiments of the present disclosure will be described in detail.
[0408] Step 2301: The resource issuing institution server logs in to the resource pool of the resource issuing institution;
[0409] Step 2302: The resource issuing institution server sends a resource disclosure request to the resource processing contract;
[0410] Step 2303: The resource processing contract determines the storage threshold of each on-chain resource;
[0411] Step 2304: The resource processing contract performs a first verification on the resource pools in Resource Contract 1, Resource Contract 2, and Resource Contract 3;
[0412] Step 2305: Resource Contract 1 transfers the first resource to the resource issuer's resource pool;
[0413] Step 2306: Resource Contract 2 transfers the second resource to the resource issuer's resource pool;
[0414] Step 2307: Resource Contract 3 transfers the third resource to the resource issuer's resource pool;
[0415] Step 2308: The resource issuer's resource pool transfers the first resource, the second resource, and the third resource to the resource processing contract;
[0416] Step 2309: If the first resource, the second resource, and the third resource meet the requirements, the resource processing contract integrates the first resource, the second resource, and the third resource into the target resource;
[0417] Step 2310: The resource processing contract discloses the target resource to the target object through the object terminal;
[0418] Step 2311: The target object requests to exchange for the target resource;
[0419] Step 2312: A certain number of object resources are transferred from the object's resource pool to the resource processing contract;
[0420] Step 2313: The resource processing contract determines the number of target resources to be transferred to the target object;
[0421] Step 2314: The resource processing contract transfers the target resource to the target object;
[0422] Step 2315: The target object requests to return the resources of Resource Contract 1, the resources of Resource Contract 2, and the resources of Resource Contract 3 according to the target resource;
[0423] Step 2316: The target object returns a certain number of target resources;
[0424] Step 2317: The resource processing contract returns an equal proportion of the resources of Resource Contract 1, the resources of Resource Contract 2, and the resources of Resource Contract 3 to the object's resource pool;
[0425] Step 2318: The target object requests to transfer a certain number of target resources to other objects through the resource exchange contract to obtain object resources.
[0426] The specific implementation processes of the above steps 2301-2302 are similar to the above step 310. The specific implementation process of the above step 2303 is similar to the above steps 810-830. The specific implementation process of the above step 2304 is similar to the above steps 610-630. The specific implementation processes of the above steps 2305-2308 are similar to the above step 320. The specific implementation process of the above step 2309 is similar to the above steps 710-720. The specific implementation process of the above step 2310 is similar to the above step 340. The specific implementation processes of the above steps 2311-2314 are similar to the above steps 910-920. The specific implementation processes of the above steps 2315-2317 are similar to the above steps 1710-1720 and steps 1810-1830. The specific implementation process of the above step 2318 is similar to the above steps 1110-1130. For the sake of brevity, no further elaboration will be provided.
[0427] Description of the devices and equipment in the embodiments of the present disclosure
[0428] It can be understood that although each step in the above various flowcharts is sequentially shown according to the indication of the arrow, these steps are not necessarily executed sequentially in the order indicated by the arrow. Unless there is a clear description in this embodiment, the execution of these steps has no strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the above flowchart may include multiple steps or multiple stages. These steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be executed alternately or in turn with at least a part of other steps or steps or stages in other steps.
[0429] It should be noted that in each specific implementation manner of the present application, when it comes to relevant processing that needs to be performed according to data related to the characteristics of the target object, such as target object attribute information or attribute information set, etc., the permission or consent of the target object will be obtained first. Moreover, the collection, use, and processing of these data will all comply with relevant laws, regulations, and standards. In addition, when the embodiment of the present application needs to obtain the target object attribute information, the separate permission or separate consent of the target object will be obtained through methods such as popping up a window or jumping to a confirmation page. After clearly obtaining the separate permission or separate consent of the target object, the necessary target object-related data for the normal operation of the embodiment of the present application will be obtained.
[0430] Figure 24 It is a schematic structural diagram of the blockchain resource processing device 2400 provided for the embodiments of the present disclosure. The blockchain resource processing device 2400 includes:
[0431] A receiving unit 2410, configured to receive a resource disclosure request, where the resource disclosure request is used to integrate multiple on-chain resources recorded in a blockchain into a target resource, so that a target object processes transactions based on the target resource; the resource disclosure request includes resource storage addresses of at least two on-chain resources to be integrated;
[0432] An inclusion unit 2420, configured to include the on-chain resources in the resource pool corresponding to the resource storage address into the resource storage space based on the resource storage address;
[0433] An integration unit 2430, configured to integrate the on-chain resources in the resource storage space into a target resource if it is determined that the on-chain resources in the resource storage space meet a predetermined condition;
[0434] A disclosure unit 2440, configured to disclose the target resource to the target object on the blockchain, so that the target object exchanges the object resources in the resource pool of the target object for the target resource and processes transactions based on the target resource.
[0435] Optionally, the inclusion unit 2420 is specifically configured to:
[0436] Determine the resource pool corresponding to the resource storage address based on a comparison between the resource storage address and the blockchain addresses of multiple resource pools recorded on the blockchain;
[0437] Perform a first verification on the resource pool corresponding to the resource storage address;
[0438] If it is determined that the first verification passes, include the on-chain resources in the resource pool corresponding to the resource storage address into the resource storage space.
[0439] Optionally, performing the first verification on the resource pool corresponding to the resource storage address includes:
[0440] Determine the total number of on-chain resources in the resource pool corresponding to the resource storage address;
[0441] If it is determined that the total number is greater than a predetermined resource number, determine that the first verification passes;
[0442] If it is determined that the total number is less than or equal to the predetermined resource number, determine that the first verification fails.
[0443] Optionally, the on-chain resources in the resource storage space include a first resource, a second resource, and a third resource;
[0444] Determining that the on-chain resources in the resource storage space meet a predetermined condition includes:
[0445] Determine the first number of the first resource, the second number of the second resource, and the third number of the third resource in the resource storage space;
[0446] If it is determined that the first quantity is greater than or equal to the first threshold, the second quantity is greater than or equal to the second threshold, and the third quantity is greater than or equal to the third threshold, it is determined that the on-chain resources in the resource storage space meet the predetermined conditions.
[0447] Optionally, the first threshold, the second threshold, and the third threshold are determined in the following manner:
[0448] Determine the first resource type of the first resource, the second resource type of the second resource, the third resource type of the third resource, and the total amount of resources indicated by the resource disclosure request;
[0449] Determine the first proportion of the first resource based on the first resource type, determine the second proportion of the second resource based on the second resource type, and determine the third proportion of the third resource based on the third resource type;
[0450] Determine the first threshold based on the first proportion and the total amount of resources, determine the second threshold based on the second proportion and the total amount of resources, and determine the third threshold based on the third proportion and the total amount of resources.
[0451] Optionally, the blockchain resource processing device further includes a swapping unit, and the swapping unit is configured to:
[0452] Determine the resource swapping ratio between the object resource and the target resource;
[0453] Exchange the fifth quantity of target resources based on the fourth quantity of object resources and the resource swapping ratio.
[0454] Optionally, the blockchain resource processing device 2400 further includes a transaction processing unit (not shown), and the transaction processing unit (not shown) is configured to:
[0455] Determine the blockchain address of the first object, where the first object is the object to which the target object will transfer the target resources;
[0456] Perform a second verification on the first object based on the blockchain address;
[0457] If it is determined that the second verification passes, transfer the target resources to the first object.
[0458] Optionally, performing a second verification on the first object based on the blockchain address includes:
[0459] Obtain a predetermined address mapping table, where the predetermined address mapping table contains candidate blockchain addresses of multiple objects;
[0460] If it is determined that there is no candidate blockchain address in the predetermined address mapping table that is the same as the blockchain address, determine the maximum amount of target resources that the first object is allowed to hold at the current time and the amount of resources to be transferred that the target object determines to transfer to the first object;
[0461] If it is determined that the amount of resources to be transferred is less than or equal to the maximum target resource amount, it is determined that the second verification passes.
[0462] Optionally, the predetermined address mapping table is determined in the following manner:
[0463] For each object, determine the credit rating of the object and the creation timestamp of the resource pool of the object;
[0464] Based on the credit rating and the creation timestamp, determine the object score of the object;
[0465] Determine the blockchain address of the object whose object score is less than the preset threshold as the candidate blockchain address;
[0466] Based on the candidate blockchain address and the object identifier of the object whose object score is less than the preset threshold, construct a predetermined address mapping table.
[0467] Optionally, determining the object score of the object based on the credit rating and the creation timestamp includes:
[0468] For each object, determine the first score of the object based on the credit rating;
[0469] For each object, determine the second score of the object based on the creation timestamp;
[0470] Based on the weighted sum of the first score and the second score, determine the object score of the object.
[0471] Optionally, the transaction processing unit (not shown) is used for:
[0472] Determine the blockchain address for publishing the target resources;
[0473] Transfer a predetermined number of target resources to the blockchain address to obtain the on-chain resources corresponding to the target resources.
[0474] Optionally, the blockchain resource processing device 2400 further includes a transfer unit (not shown), and the transfer unit (not shown) is used for:
[0475] Receive a predetermined number of target resources transferred by the target object;
[0476] Determine the composition number of each on-chain resource among the predetermined number of target resources, and transfer each on-chain resource to the target object based on the composition number;
[0477] Clear the predetermined number of target resources.
[0478] Optionally, the transfer unit (not shown) is used for:
[0479] Receive a predetermined number of target resources transferred by the target object;
[0480] Determine the first exchange quantity of the object resources based on a predetermined number of target resources and the resource exchange ratio between the target resources and the object resources;
[0481] Transfer the first exchange quantity of object resources to the target object, and clear the predetermined number of target resources.
[0482] Optionally, transferring the predetermined number of target resources to a blockchain address includes:
[0483] Determine the associated resource growth data of the target resources;
[0484] Based on the associated resource growth data, transfer the predetermined number of target resources to the blockchain address.
[0485] Optionally, the predetermined number is determined by the following method:
[0486] Obtain a preset quantity comparison table, where the quantity comparison table includes multiple resource growth intervals, and each resource growth interval corresponds to a candidate ratio;
[0487] In the quantity comparison table, determine the resource growth interval where the associated resource growth data is located as the target interval;
[0488] Based on the candidate ratio corresponding to the target interval and the total number of target resources, determine the predetermined number.
[0489] Optionally, the blockchain resource processing device 2400 further includes an on-chain unit (not shown), and the on-chain unit (not shown) is used for:
[0490] Generate a resource processing transaction for the transaction processing based on the target resources;
[0491] Record the resource processing transaction on the blockchain.
[0492] Refer to Figure 25 , Figure 25 is a structural block diagram of a part of a terminal for implementing the blockchain resource processing method according to an embodiment of the present disclosure. The terminal includes components such as a Radio Frequency (RF) circuit 2510, a memory 2515, an input unit 2530, a display unit 2540, a sensor 2550, an audio circuit 2560, a wireless fidelity (WiFi) module 2570, a processor 2580, and a power supply 2590. Those skilled in the art can understand that Figure 25 The shown terminal structure does not constitute a limitation on a mobile phone or a computer, and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0493] The RF circuit 2510 can be used for receiving and transmitting information during information reception, call, or specifically, after receiving the downlink information from the base station, it is processed by the processor 2580. Additionally, the uplink data designed is transmitted to the base station.
[0494] The memory 2515 can be used for storing software programs and modules. The processor 2580 executes various functional applications and data processing of the target terminal by running the software programs and modules stored in the memory 2515.
[0495] The input unit 2530 can be used for receiving input digital or character information and generating key signal inputs related to the settings and function controls of the target terminal. Specifically, the input unit 2530 can include a touch panel 2531 and other input devices 2532.
[0496] The display unit 2540 can be used for displaying input information, provided information, and various menus of the target terminal. The display unit 2540 can include a display panel 2541.
[0497] The audio circuit 2560, speaker 2561, and microphone 2562 can provide an audio interface.
[0498] In this embodiment, the processor 2580 included in the terminal can execute the blockchain resource processing method of the previous embodiment.
[0499] The terminals of the embodiments of the present disclosure include but are not limited to mobile phones, computers, intelligent voice interaction devices, intelligent home appliances, vehicle-mounted terminals, aircraft, etc. The embodiments of the present invention can be applied to various scenarios, including but not limited to data security, blockchain, data storage, information technology, etc.
[0500] Figure 26 It is a partial structural block diagram of a server for implementing the blockchain resource processing method of the embodiments of the present disclosure. The server can vary greatly due to configuration or performance differences and can include one or more central processing units (CPUs) 2622 (for example, one or more processors) and a memory 2632, and one or more storage media 2130 (for example, one or more mass storage devices) for storing application programs 2642 or data 2644. Among them, the memory 2632 and the storage medium 2630 can be transient storage or persistent storage. The programs stored in the storage medium 2630 can include one or more modules (not shown in the figure), and each module can include a series of instruction operations on the server. Further, the central processing unit 2622 can be configured to communicate with the storage medium 2630 and execute a series of instruction operations in the storage medium 2630 on the server.
[0501] The server may also include one or more power supplies 2626, one or more wired or wireless network interfaces 2650, one or more input / output interfaces 2658, and / or one or more operating systems 2641, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, and so on.
[0502] The central processing unit 2622 in the server can be used to execute the blockchain resource processing method of the embodiments of the present disclosure.
[0503] The embodiments of the present disclosure also provide a computer-readable storage medium, which is used to store program codes, and the program codes are used to execute the blockchain resource processing methods of the foregoing various embodiments.
[0504] The embodiments of the present disclosure also provide a computer program product, which includes a computer program. The processor of the computer device reads and executes the computer program, so that the computer device executes to implement the above-mentioned blockchain resource processing method.
[0505] In the embodiments of the present disclosure, the terms "first", "second", "third", "fourth", etc. (if any) in the specification and the above-mentioned drawings are used to distinguish similar objects, and do not have to be used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that the embodiments of the present disclosure described here can be implemented in an order other than those illustrated or described here. In addition, the terms "include" and "comprise" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units does not have to be limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or are inherent to these processes, methods, products, or devices.
[0506] In the embodiments of the present disclosure, the term "module" or "unit" refers to a computer program with a predetermined function or a part of a computer program, which works together with other related parts to achieve a predetermined goal, and can be fully or partially implemented by using software, hardware (such as a processing circuit or a memory), or a combination thereof. Similarly, a processor (or multiple processors or memories) 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 function of the module or unit.
[0507] It should be understood that in this disclosure, "at least one (item)" means one or more, and "a plurality" means two or more. "And / or" is used to describe the association relationship of associated objects and indicates that there can be three relationships. For example, "A and / or B" can mean: only A exists, only B exists, and both A and B exist simultaneously. Here, A and B can be singular or plural. The character " / " generally indicates that the associated objects before and after are in an "or" relationship. "At least one (of the following)" or its similar expressions refer to any combination of these items, including any combination of single items or plural items. For example, at least one (of) a, b, or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.
[0508] It should be understood that in the description of the embodiments of this disclosure, the meaning of "a plurality (or multiple items)" is more than two. Understandings such as "greater than", "less than", "exceeding", etc. do not include the present number, and understandings such as "above", "below", "within", etc. include the present number.
[0509] In several embodiments provided by this disclosure, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of units is only a logical function division. In actual implementation, there can be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling or direct coupling or communication connection between each other can be through some interfaces, and the indirect coupling or communication connection of devices or units can be in electrical, mechanical, or other forms.
[0510] The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they can be located in one place, or can be distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0511] In addition, the functional units in each embodiment of this disclosure can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.
[0512] When an integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present disclosure, in essence, or the part that contributes to the prior art, or all or part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods of the various embodiments of the present disclosure. The foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROM), random access memories (RAM), magnetic disks, or optical discs that can store program codes.
[0513] It should also be understood that the various embodiments provided by the present disclosure can be combined arbitrarily to achieve different technical effects.
[0514] The above is a specific description of the embodiments of the present disclosure, but the present disclosure is not limited to the above embodiments. Those skilled in the art can also make various equivalent deformations or substitutions without departing from the spirit of the present disclosure, and these equivalent deformations or substitutions are all included within the scope defined by the claims of the present disclosure.
Claims
1. A method for processing blockchain resources, characterized in that, the method includes: Receiving a resource disclosure request, which is used to integrate multiple on-chain resources recorded in the blockchain into a target resource, so that a target object can perform transaction processing based on the target resource; the resource disclosure request includes resource storage addresses of at least two on-chain resources to be integrated; Based on the resource storage addresses, incorporating the on-chain resources in the resource pool corresponding to the resource storage addresses into the resource storage space; If it is determined that the on-chain resources in the resource storage space meet a predetermined condition, integrating the on-chain resources in the resource storage space into the target resource; Disclosing the target resource to the target object on the blockchain, so that the target object can exchange the target resource with object resources in the resource pool of the target object and perform transaction processing based on the target resource.
2. The method according to claim 1, characterized in that, the incorporating the on-chain resources in the resource pool corresponding to the resource storage addresses into the resource storage space based on the resource storage addresses includes: Determining the resource pool corresponding to the resource storage address based on a comparison between the resource storage address and the blockchain addresses of multiple resource pools recorded on the blockchain; Performing a first verification on the resource pool corresponding to the resource storage address; If it is determined that the first verification passes, incorporating the on-chain resources in the resource pool corresponding to the resource storage address into the resource storage space.
3. The method according to claim 2, characterized in that, the performing a first verification on the resource pool corresponding to the resource storage address includes: Determining the total number of the on-chain resources in the resource pool corresponding to the resource storage address; If it is determined that the total number is greater than a predetermined resource number, determining that the first verification passes; If it is determined that the total number is less than or equal to the predetermined resource number, determining that the first verification fails.
4. The method according to claim 1, characterized in that, the on-chain resources in the resource storage space include a first resource, a second resource, and a third resource; the determining that the on-chain resources in the resource storage space meet a predetermined condition includes: Determining a first number of the first resource, a second number of the second resource, and a third number of the third resource in the resource storage space; If it is determined that the first number is greater than or equal to a first threshold, the second number is greater than or equal to a second threshold, and the third number is greater than or equal to a third threshold, determining that the on-chain resources in the resource storage space meet the predetermined condition.
5. The method according to claim 4, characterized in that, the first threshold, the second threshold, and the third threshold are determined by the following method: Determining a first resource type of the first resource, a second resource type of the second resource, a third resource type of the third resource, and the total amount of resources indicated by the resource disclosure request; Determine the first proportion of the first resource based on the first resource type, determine the second proportion of the second resource based on the second resource type, and determine the third proportion of the third resource based on the third resource type; Determine the first threshold based on the first proportion and the total amount of resources, determine the second threshold based on the second proportion and the total amount of resources, and determine the third threshold based on the third proportion and the total amount of resources.
6. The method according to claim 1, wherein, the target object exchanges the target resource with the object resources in the resource pool of the target object, including: determine the resource exchange ratio between the object resources and the target resource; exchange the fifth number of the target resources based on the fourth number of the object resources and the resource exchange ratio.
7. The method according to claim 1, wherein, the transaction processing based on the target resource includes: determine the blockchain address of the first object, where the first object is the object to which the target object will transfer the target resource; perform a second verification on the first object based on the blockchain address; if it is determined that the second verification passes, then transfer the target resource to the first object.
8. The method according to claim 7, wherein, the performing a second verification on the first object based on the blockchain address includes: obtain a predetermined address mapping table, where the predetermined address mapping table contains candidate blockchain addresses of multiple objects; if it is determined that there is no candidate blockchain address in the predetermined address mapping table that is the same as the blockchain address, then determine the maximum amount of target resources that the first object is allowed to hold at the current time and the amount of resources to be transferred that the target object determines to transfer to the first object; if it is determined that the amount of resources to be transferred is less than or equal to the maximum amount of target resources, then determine that the second verification passes.
9. The method according to claim 8, wherein, the predetermined address mapping table is determined by the following method: for each of the objects, determine the credit rating of the object and the creation timestamp of the resource pool of the object; determine the object score of the object based on the credit rating and the creation timestamp; determine the blockchain address of the object whose object score is less than a preset threshold as the candidate blockchain address; construct the predetermined address mapping table based on the candidate blockchain address and the object identifier of the object whose object score is less than the preset threshold.
10. The method according to claim 9, wherein, the determining the object score of the object based on the credit rating and the creation timestamp includes: for each of the objects, determine the first score of the object based on the credit rating; for each of the objects, determine the second score of the object based on the creation timestamp; determine the object score of the object based on the weighted sum of the first score and the second score.
11. The method according to claim 1, wherein, the transaction processing based on the target resource includes: Determine the blockchain address for publishing the target resource; Transfer a predetermined number of the target resources to the blockchain address to obtain the on-chain resources corresponding to the target resources.
12. The method according to claim 11, wherein, after publicly disclosing the target resource to the target object on the blockchain, the method further includes: Receiving a predetermined number of the target resources transferred by the target object; Determine the composition number of each of the on-chain resources among the predetermined number of the target resources, and transfer each of the on-chain resources to the target object based on the composition number; Clear the predetermined number of the target resources.
13. The method according to claim 11, wherein, after publicly disclosing the target resource to the target object on the blockchain, the method further includes: Receiving a predetermined number of the target resources transferred by the target object; Based on the predetermined number of the target resources and the resource exchange ratio between the target resources and the object resources, determine the first exchange number of the object resources; Transfer the first exchange number of the object resources to the target object, and clear the predetermined number of the target resources.
14. The method according to claim 11, wherein, The transferring a predetermined number of the target resources to the blockchain address includes: Determine the associated resource growth data of the target resources; Based on the associated resource growth data, transfer a predetermined number of the target resources to the blockchain address.
15. The method according to claim 14, wherein, The predetermined number is determined by the following method: Obtain a preset number comparison table, which contains multiple resource growth intervals, and each resource growth interval corresponds to a candidate ratio; In the number comparison table, determine the resource growth interval where the associated resource growth data is located as the target interval; Based on the candidate ratio corresponding to the target interval and the total number of the target resources, determine the predetermined number.
16. The method according to claim 1, wherein, after performing transaction processing based on the target resources, the method further includes: Generate a resource processing transaction for the transaction processing based on the target resources; Record the resource processing transaction on the blockchain.
17. A blockchain resource processing device, wherein, The device includes: A receiving unit, configured to receive a resource disclosure request, which is used to integrate multiple on-chain resources recorded in the blockchain into a target resource, so that a target object can perform transaction processing based on the target resource; the resource disclosure request includes resource storage addresses of at least two on-chain resources to be integrated; An inclusion unit, configured to include the on-chain resources in the resource pool corresponding to the resource storage address into the resource storage space based on the resource storage address; An integration unit, configured to, if it is determined that the on-chain resources in the resource storage space meet a predetermined condition, integrate the on-chain resources in the resource storage space into the target resource; A disclosure unit, configured to disclose the target resource to the target object on the blockchain, so that the target object can exchange the object resources in the resource pool of the target object for the target resource, and perform transaction processing based on the target resource.
18. An electronic device, comprising a memory and a processor, where the memory stores a computer program, characterized in that when the processor executes the computer program, the blockchain resource processing method according to any one of claims 1 to 16 is implemented.
19. A computer-readable storage medium, where the storage medium stores a computer program, characterized in that when the computer program is executed by a processor, the blockchain resource processing method according to any one of claims 1 to 16 is implemented.
20. A computer program product, comprising a computer program, where the computer program is read and executed by a processor of a computer device, so that the computer device executes the blockchain resource processing method according to any one of claims 1 to 16.