Resource processing method, resource processing device, computer equipment and storage medium
Through automated resource processing methods, resource types are distinguished and allocated, solving the resource recovery problem caused by low efficiency of manual operations, and achieving efficient resource recovery processing and quantity guarantee.
Patent Information
- Application Number
- CN202010935427.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-09-08
- Publication Date
- 2025-09-09
- Estimated Expiration
- 2040-09-08
AI Technical Summary
Resource recovery and processing in existing resource management platforms mainly rely on manual operations, which is inefficient.
Through automated resource processing methods, the target account's resource volume to be recovered and the combination of allocated resources are determined, the first and second category resources are distinguished, and automatic recovery processing is performed based on the difference in resource volume, including the reasonable allocation of the first and second category resources.
The automation of resource recycling processing is realized, efficiency is improved, and the amount of resource recycling is effectively guaranteed.
Smart Images

Figure CN114153589B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a resource processing method, a resource processing device, a computer equipment, and a computer-readable storage medium. Background Art
[0002] With the development of computer technology, resource management platforms can automatically allocate and manage resources for users. However, resource management platforms need to recycle certain resources as management fees. Currently, resource recycling is usually done manually, but this method is inefficient. Summary of the Invention
[0003] The embodiments of the present application provide a resource processing method, a resource processing device, a computer device, and a storage medium, which can realize automatic resource recycling and effectively improve the efficiency of resource recycling.
[0004] In one aspect, an embodiment of the present application provides a resource processing method, the method comprising:
[0005] In response to satisfying the resource recycling condition, determining the amount of resources to be recycled corresponding to the target account;
[0006] Determining the resource amount of the first type of resources in the allocated resource combination corresponding to the target account, and comparing the resource amount of the first type of resources with the resource amount to be reclaimed to obtain a comparison result;
[0007] When the comparison result indicates that the amount of the first type of resources is less than the amount of resources to be reclaimed, determining a second type of resources from the allocated resource combination corresponding to the target account;
[0008] The first category of resources and the second category of resources in the allocated resource combination are recycled according to the amount of resources to be recycled and the amount of resources of the first category.
[0009] In one aspect, an embodiment of the present application provides a resource processing device, the device comprising:
[0010] a determining unit configured to: determine, in response to satisfying a resource recovery condition, an amount of resources to be recovered corresponding to a target account; and determine an amount of first-category resources in the allocated resource combination corresponding to the target account;
[0011] a processing unit, configured to compare the amount of the first type of resources with the amount of the resources to be recovered to obtain a comparison result;
[0012] The processing unit is further used to: when the comparison result indicates that the resource amount of the first category of resources is less than the resource amount to be recovered, determine the second category of resources from the allocated resource combination corresponding to the target account; and recycle the first category of resources and the second category of resources in the allocated resource combination based on the resource amount to be recovered and the resource amount of the first category of resources.
[0013] In one embodiment, the processing unit is specifically configured to:
[0014] Determine a resource quantity difference based on the amount of resources to be recycled and the amount of the first type of resources; recycle the second type of resources in the allocated resource combination based on the resource quantity difference; and recycle the first type of resources in the allocated resource combination.
[0015] In one embodiment, the processing unit is specifically used to: query the allocation ratio of various resources in the second type of resources in the allocated resource combination, and determine the resource recovery amount of the various resources based on the resource quantity difference and the allocation ratio; and recycle the various resources according to the resource recovery amount of the various resources.
[0016] In one embodiment, the determining unit is further configured to determine an amount of recycled resources obtained by recycling the second type of resources;
[0017] The processing unit is further configured to allocate the first type of resources to the target account according to the amount of recovered resources, and update the allocated resource combination according to the allocation result;
[0018] The processing unit is specifically configured to recycle the first type of resources in the updated allocated resource combination according to the amount of resources to be reclaimed.
[0019] In one embodiment, the processing unit is specifically configured to:
[0020] Determine the current resource amount of the first type of resources in the updated allocated resource combination; when the current resource amount is less than the amount of resources to be reclaimed, update the amount of resources to be reclaimed according to the current resource amount; and recycle all the first type of resources in the updated allocated resource combination.
[0021] In one embodiment, the determining unit is further configured to determine the remaining unrecovered resource amount corresponding to the target account based on the to-be-recovered resource amount and the current resource amount;
[0022] The device further comprises a recording unit for recording the remaining unrecovered resource amount;
[0023] The processing unit is further configured to recycle resources matching the remaining unrecycled resource amount in a next resource recycling phase corresponding to the target account.
[0024] In one embodiment, the determining unit is specifically configured to:
[0025] Query the remaining unrecovered resources of the previous resource recovery stage corresponding to the target account in the query record, and query the amount of resources required to be recovered in the current resource recovery stage corresponding to the target account; determine the amount of resources to be recovered corresponding to the target account based on the remaining unrecovered resources in the previous resource recovery stage and the amount of resources required to be recovered in the current resource recovery stage.
[0026] In one embodiment, the device further includes a transceiver unit configured to:
[0027] Receive a detailed query request sent by a client, where the detailed query request is sent by the client when it detects a detailed query instruction input by a user, and the detailed query request carries a query identifier; respond to the detailed query request and return detailed data matching the query identifier to the client, so that the client displays the detailed data in a user interface.
[0028] On the one hand, an embodiment of the present application provides a computer device, comprising: a processor, a communication interface and a memory, wherein the processor, the communication interface and the memory are interconnected, wherein the memory stores executable program code, and the processor is used to call the executable program code to execute the above-mentioned resource processing method.
[0029] Accordingly, an embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores instructions, which, when executed on a computer, enable the computer to execute the above-mentioned resource processing method.
[0030] Accordingly, embodiments of the present application further provide a computer program product or computer program, comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the resource processing method described above.
[0031] The embodiment of the present application determines the amount of resources to be recovered corresponding to the target account and the amount of the first category of resources in the allocated resource combination corresponding to the target account when it is detected that the resource recovery conditions are met; when the amount of the first category of resources is less than the amount of resources to be recovered, the first category of resources in the allocated resource combination and the second category of resources are recovered based on the amount of resources to be recovered and the amount of the first category of resources, thereby realizing automatic resource recovery and effectively improving the efficiency of resource recovery; in addition, the amount of resource recovery can also be effectively guaranteed. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0033] Figure 1 This is a flowchart of a resource processing method provided in an embodiment of the present application;
[0034] Figure 2 This is a schematic diagram of the architecture of a resource processing system provided by an embodiment of the present application;
[0035] Figure 3 This is a schematic diagram of the architecture of another resource processing method provided in an embodiment of the present application;
[0036] Figure 4 This is a schematic diagram of the architecture of another resource processing method provided in an embodiment of the present application;
[0037] Figure 5 is a schematic diagram of a user interface provided in an embodiment of the present application;
[0038] Figure 6 is a schematic diagram of another user interface provided in an embodiment of the present application;
[0039] Figure 7 is a schematic diagram of another user interface provided in an embodiment of the present application;
[0040] Figure 8 This is a schematic diagram of the structure of a resource processing device provided in an embodiment of the present application;
[0041] Figure 9 It is a structural diagram of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0042] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0043] With the development of computer technology, resource management platforms can automatically allocate and manage resources for users, but resource management platforms need to recycle certain resources as management fees. Currently, resource recycling is usually carried out through manual operations, but the manual resource recycling method is inefficient. Based on this, the embodiment of the present application provides a resource processing method to realize automatic resource recycling, thereby effectively improving the efficiency of resource recycling; in addition, it effectively guarantees the amount of resource recycling.
[0044] The resource processing method described in the embodiments of the present application can be executed by a computer device with data processing capabilities, and the computer device can be a resource management platform, and the resource management platform can be a server or an intelligent terminal. The server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The intelligent terminal can be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a laptop computer, a desktop computer, etc., but is not limited to this.
[0045] See also Figure 1 , is a flow chart of a resource processing method provided in an embodiment of the present application. The resource processing method includes but is not limited to the following steps:
[0046] S101: In response to satisfying a resource recycling condition, determining the amount of resources to be recycled corresponding to a target account.
[0047] In an embodiment of the present application, when it is detected that a resource recovery condition is met, the amount of resources to be recovered corresponding to the target account is determined in response to the resource recovery condition being met. Meeting the resource recovery condition may mean that the current time is the time for scheduled resource recovery, or it may mean that a resource recovery instruction input by an operator is detected. In one embodiment, the resources corresponding to all accounts in a pre-stored account list are recovered uniformly (or at the same time), and the target account may be any account in the pre-stored account list. In one embodiment, the resources corresponding to the accounts in the pre-stored account list are recovered separately (or at different times). If the current time is the time for scheduled resource recovery corresponding to a certain account, or it is detected that the operator has input a resource recovery instruction for a certain account, then the certain account is the target account, that is, the account in the pre-stored account list that currently needs to recover resources.
[0048] The resources may be hardware resources (such as storage resources, etc.), virtual resources (such as funds, electronic resources, etc.), or software resources (such as computing resources, etc.), etc. The amount of resources to be recovered is the total amount of resources that need to be recovered corresponding to the target account.
[0049] In one embodiment, the amount of resources to be recycled is determined based on the remaining unrecycled resources in the previous resource recycling phase corresponding to the target account and the amount of resources required to be recycled in the current resource recycling phase corresponding to the target account. Specifically, the remaining unrecycled resources in the previous resource recycling phase corresponding to the target account are queried, and the amount of resources required to be recycled in the current resource recycling phase corresponding to the target account is queried; the remaining unrecycled resources in the previous resource recycling phase and the amount of resources required to be recycled in the current resource recycling phase are added together to obtain the amount of resources to be recycled corresponding to the target account.
[0050] It should be noted that the resource amount described in the embodiments of the present application is related to the type of resource. For example, when the resource is a storage resource, the resource amount may refer to the total size of the storage space (such as 1G); when the resource is a virtual resource, the resource amount may refer to the total value of the virtual resource (such as 200 yuan).
[0051] S102: Determine the resource amount of the first type of resources in the allocated resource combination corresponding to the target account.
[0052] In an embodiment of the present application, the allocated resource combination is a combination of various resources that have been allocated to the target account. The types of the various resources can be the same or different; the allocation ratio of the various resources can be adjusted. The first category of resources is a resource with real-time and stability. Real-time can mean that the first category of resources can be recovered or allocated in real time (such as being automatically recovered or allocated immediately), or it can mean that the value of the first category of resources (such as net value) can be confirmed in real time. Stability can mean that the unit resource amount of the first category of resources remains unchanged. For example, when the resource is a storage resource, the unchanged unit resource amount can mean that the size of the unit storage unit remains unchanged, such as 1 unit storage unit fixedly includes 5 sub-storage units, and the size of each sub-storage unit is fixed to 10M. When the resource is a virtual resource, the unchanged unit resource amount can mean that the net value of the virtual resource remains unchanged.
[0053] The resource amount of the first type of resources is the total amount of the first type of resources allocated to the target account. When the resource amount of the first type of resources is 0, it means that the first type of resources are not currently allocated to the target account.
[0054] S103. Compare the amount of the first-category resources with the amount of resources to be reclaimed to obtain a comparison result. If the comparison result indicates that the amount of the first-category resources is less than the amount of resources to be reclaimed, execute steps S104 to S105. If the comparison result indicates that the amount of the first-category resources is greater than or equal to the amount of resources to be reclaimed, execute step S106.
[0055] S104: When the comparison result indicates that the amount of the first-category resources is less than the amount of resources to be reclaimed, determine a second-category resource from the allocated resource combination corresponding to the target account.
[0056] In an embodiment of the present application, the second type of resources are resources with delay and variability. Delay may mean that the recovery or allocation of the second type of resources has a certain delay (such as requiring confirmation from the operator before recovery or allocation, or automatically recovery or allocation after a period of time), or it may mean that the value of the second type of resources requires delayed confirmation (such as confirmation the next day). Variability may mean that the unit resource amount of the second type of resources is changing. For example, when the resource is a storage resource, the change in the unit resource amount may mean that the size of the unit storage unit is changing, such as 1 unit storage unit changes from including 5 sub-storage units to including 3 sub-storage units, and the size of each sub-storage unit remains unchanged; when the resource is a virtual resource, the change in the unit resource amount may mean that the net value of the virtual resource is changing.
[0057] Because the amount of the first category of resources in the allocated resource combination corresponding to the target account is less than the amount of resources to be reclaimed, the amount of the first category of resources currently allocated to the target account is insufficient for reclaim. In this case, the second category of resources can be further determined from the allocated resource combination corresponding to the target account to facilitate the subsequent simultaneous reclaim of the first category of resources and the second category of resources currently allocated to the target account, thereby ensuring that as many resources as possible can be reclaimed. In one embodiment, determining the second category of resources from the allocated resource combination corresponding to the target account includes determining various resources in the second category of resources currently allocated to the target account, determining the amount of each resource, and so on.
[0058] S105: Reclaim the first-category resources and the second-category resources in the allocated resource combination according to the amount of resources to be reclaimed and the amount of resources of the first-category resources.
[0059] In an embodiment of the present application, the amount of resources to be recycled is subtracted from the amount of the first type of resources currently allocated to the target account to obtain a resource amount difference; then, the second type of resources in the allocated resource combination are recycled based on the resource amount difference; and the first type of resources in the allocated resource combination are recycled. By recycling the first type of resources and the second type of resources currently allocated to the target account at the same time, as many resources as possible can be recycled. It should be noted that the resource recycling method described in the embodiment of the present application is related to the type of resource. For example, when the resource is a storage resource, recycling the resource may mean no longer allocating storage space of the corresponding size to the target account; when the resource is a virtual resource, recycling the resource may mean selling the corresponding share of virtual resources.
[0060] In one embodiment, the method for recycling the second type of resources in the allocated resource combination according to the resource quantity difference is: query the allocation ratio of various resources in the second type of resources in the allocated resource combination corresponding to the target account, and determine the resource recycling quantity corresponding to the various resources respectively according to the resource quantity difference and the allocation ratio; finally, recycle the various resources respectively according to the resource recycling quantity of the various resources.
[0061] In method 1, the resource recovery amount may refer to the amount of resources recovered. For example, if the resource amount difference is 50, and the allocation ratios of resource 1, resource 2, and resource 3 are 1:2:2, then the resource recovery amounts corresponding to resource 1, resource 2, and resource 3 are 10, 20, and 20, respectively, and resource 1, resource 2, and resource 3 are recycled according to the resource recovery amounts of 10, 20, and 20, respectively. The amount of the second-category resources recovered in this way will not change, and is consistent with the resource amount difference described above. If all the first-category resources in the allocated resource combination are recycled, the total amount of the recovered first-category resources and second-category resources will be consistent with the amount of resources to be recycled. This completes resource recovery.
[0062] Method 2: The resource recovery amount may refer to the number of resource recovery. For example, when the resource is a storage resource, the resource recovery amount may refer to the number of unit storage units recovered; when the resource is a virtual resource, the resource amount may refer to the number of shares (or shares) of the recovered virtual resource. At this time, it is necessary to determine the resource recovery amount of the various resources based on the resource amount difference, the allocation ratio, and the reference unit resource amount of the various resources (such as the unit resource amount in the previous stage). For example, the resource amount difference is 50, the allocation ratio of resource 1, resource 2, and resource 3 is 1:2:2, and the reference unit resource amounts corresponding to resource 1, resource 2, and resource 3 are 2, 4, and 5, respectively. Then, the resource recovery amounts corresponding to resource 1, resource 2, and resource 3 are 5, 5, and 4, respectively, and resource 1, resource 2, and resource 3 are recycled according to the amounts of 5, 5, and 4, respectively. Because the unit resource quantity of the second type of resources is variable and has a time delay, the resource quantity of the second type of resources recovered in this way may vary. Based on the recycling of all the first type of resources in the allocated resource combination, the total resource quantity of the first type and second type of resources recovered may not be consistent with the resource quantity to be recycled. If it is less than, you can continue to recycle the remaining unrecovered resources, or recycle the remaining unrecovered resources during the next resource recycling of the target account. If it is greater than, you can reallocate the over-recovered resources to the target account, or use the over-recovered resources to offset the target account's resources during the next resource recycling. This completes resource recycling.
[0063] In one embodiment, after reclaiming the second type of resources in the allocated resource combination based on the resource quantity difference, the amount of reclaimed resources obtained by reclaiming the second type of resources is determined; the first type of resources are allocated to the target account based on the reclaimed amount of resources, and the allocated resource combination is updated based on the allocation result, that is, the target account's currently allocated resources are updated. In this case, the first type of resources in the allocated resource combination are reclaimed by reclaiming the first type of resources in the updated allocated resource combination based on the amount of resources to be reclaimed.
[0064] For the above-mentioned method 1, the amount of the second-category resources recovered according to method 1 will not change, and is consistent with the resource amount difference mentioned above. At this time, all the first-category resources in the updated allocated resource combination need to be recycled to ensure that the total amount of the recovered first-category resources and second-category resources is consistent with the amount of resources to be recycled.
[0065] For the above-mentioned method 2, since the unit resource amount of the second type of resources is variable and the second type of resources has a time delay, the resource amount of the second type of resources actually recovered according to method 2 may change, and may not be consistent with the resource amount difference mentioned above. The specific processing method at this time may be: determine the current resource amount of the first type of resources in the updated allocated resource combination. When the current resource amount is less than the resource amount to be recovered, it means that the resource amount of the second type of resources actually recovered is less than the resource amount difference mentioned above; at this time, the resource amount to be recovered can be updated to the current resource amount, and all the first type of resources in the updated allocated resource combination can be recycled. The resource amount actually recovered by the above-mentioned method is less than the initial resource amount to be recovered. At this time, the remaining unrecovered resource amount corresponding to the target account can be determined based on the initial resource amount to be recovered and the current resource amount; the remaining unrecovered resource amount is recorded, and the resources matching the remaining unrecovered resource amount are recovered in the next resource recovery phase corresponding to the target account.
[0066] If the current resource amount is greater than or equal to the amount of resources to be reclaimed, the actual amount of Category 2 resources reclaimed is greater than or equal to the difference in resource amounts described above. At this point, Category 1 resources matching the amount of resources to be reclaimed can be directly reclaimed. If any Category 1 resources remain after the reclaim, they can be offset against the remaining resources in the next reclaim of the target account.
[0067] S106. When the comparison result indicates that the amount of the first type of resources is greater than or equal to the amount of resources to be reclaimed, the first type of resources in the allocated resource combination are processed according to the amount of resources to be reclaimed, and sufficient resources are reclaimed by reclaiming the first type of resources currently allocated to the target account.
[0068] In a feasible embodiment, when the client detects a detailed query instruction input by the user, it generates a detailed query request, and the detailed query request carries a query identifier, and the query identifier includes the identifier of the account to be queried (such as the target account) and the content to be queried (such as the resource recycling details in February). After receiving the detailed query request sent by the client, the client returns detailed data that matches the above query identifier to the client in response to the detailed query request. The client displays the detailed data in the user interface. Among them, the detailed data may include resource recycling details, including one or more of the following: resource recycling stage identifier, the amount of resources to be recycled, identifiers of various recycled resources (such as names, codes, etc.), the resource recycling amount of various resources, the amount of recycled resources, the remaining amount of unrecycled resources, and so on.
[0069] The embodiment of the present application determines the amount of resources to be recycled corresponding to the target account and the amount of the first category of resources in the allocated resource combination corresponding to the target account when it is detected that the resource recycling conditions are met; when the amount of the first category of resources is less than the amount of resources to be recycled, the first category of resources in the allocated resource combination and the second category of resources are recycled according to the amount of resources to be recycled and the amount of the first category of resources, thereby realizing automatic resource recycling and effectively improving the efficiency of resource recycling; in addition, when the first category of resources are not enough to be recycled, a certain amount of the second category of resources can be recycled, so that as many resources as possible can be recycled, effectively ensuring the amount of resource recycling.
[0070] To better understand the resource processing method described in the embodiments of the present application, examples are provided below with reference to specific application scenarios and accompanying drawings.
[0071] In one embodiment, the resource processing method can be applied to the application scenario of storage resource management. The server is used to store data and manage storage resources. Figure 2 As shown, the server is configured with at least two storage devices, including storage device 1 and storage device 2. Users can apply for storage resources from the server for cloud data storage. The server can automatically allocate storage resources from storage device 1 and storage resources from storage device 2 to the user, and can associate the storage resource allocation combination (including the space size of the allocated storage resources, the storage area where the allocated storage resources are located, etc.) with the user's account, so that even after the user logs in to the account on different terminals, the server can query the user's storage resource allocation status.
[0072] Among them, the storage resources in the storage device 1 are first-class storage resources. The first-class storage resources are storage resources with real-time and stability. Real-time means that the first-class storage resources can be recycled or allocated in real time (such as being automatically recycled or allocated immediately). Stability means that the size of the unit storage unit of the first-class storage resources remains unchanged. For example, one unit storage unit is fixed to include 5 sub-storage units, and the space size of each sub-storage unit is fixed to 10M, that is, the space size of the unit storage unit is fixed to 50M).
[0073] The storage resources in the storage device 2 are second-category storage resources. The second-category storage resources are resources with delay and variability. Delay means that the recovery or allocation of the second-category storage resources has a certain delay (such as requiring confirmation from the operator before recovery or allocation, or automatically recovered or allocated after a period of time). Variability may mean that the size of the unit storage unit of the second-category storage resources is variable. Since the space size of the storage device 2 is fixed, when the number of users who use the storage space of the storage device 2 increases or decreases, if the current size of the unit storage unit and the number of unit storage units allocated to each user remain unchanged, the storage space of the storage device 2 may be insufficient or surplus. At this time, the size of the unit storage unit can be reduced or increased to ensure that each user can be allocated a specific number of unit storage units and maximize the use of the storage space of the storage device 2.
[0074] For example, if storage device 2 has a 600MB capacity and is allocated to two users, with each user allocated a fixed 5 unit storage cells, then the capacity of each unit storage cell is 60MB. Each sub-storage cell is fixed at 10MB, so each unit storage cell now contains 6 sub-storage cells. If two more users are added, the storage space of storage device 2 needs to be allocated to four users. While maintaining the fixed allocation of 5 unit storage cells to each user, if each unit storage cell still contains 6 sub-storage cells, then the storage space of storage device 2 is insufficient. In this case, the number of sub-storage cells in each unit storage cell can be reduced from 6 to 3.
[0075] The server can also automatically adjust the allocation of storage resources based on the data stored by the user. Figure 2As shown, storage device 2 also includes a first sub-storage device and a second sub-storage device. The first sub-storage device has a faster data read and write speed, but its storage space is smaller; while the second sub-storage device has a slower data read and write speed, but its storage space is larger. When the data stored by the user requires a faster read and write speed, the server can, based on the storage resource allocation combination corresponding to the user, increase the allocated size of the storage resources in the first sub-storage device and reduce the allocated size of the storage resources in the second sub-storage device while keeping the total space size of the storage resources unchanged. When the data stored by the user requires a larger storage space, the server can, based on the storage resource allocation combination corresponding to the user, increase the allocated size of the storage resources in the second sub-storage device and reduce the allocated size of the storage resources in the first sub-storage device while keeping the total space size of the storage resources unchanged.
[0076] The server needs to charge a certain fee to perform the storage resource allocation operation, which can be to recycle a certain amount of storage resources (for example, recycle 10M of storage resources every month) as the storage resource management fee. The recycled storage resources can be allocated to users, thereby earning revenue for the service provider. Since the first type of storage resources are real-time and stable, the first type of storage resources can be recycled first. Specifically, when it is detected that the storage resource recycling conditions are met, the space size of the storage resources to be recycled corresponding to the target account is determined, and the space size of the first type of storage resources in the allocated storage resource combination corresponding to the target account is determined. When the space size of the first type of storage resources is greater than or equal to the space size of the storage resources to be recycled, the first type of storage resources that match the space size of the storage resources to be recycled are directly recycled.
[0077] When the space size of the first type of storage resources is smaller than the space size of the storage resources to be reclaimed, the first type of storage resources and the second type of storage resources that match the space size of the storage resources to be reclaimed need to be reclaimed. In one embodiment, the difference between the space size of the first type of storage resources and the space size of the storage resources to be reclaimed is determined, and then the second type of storage resources that match the difference are reclaimed, and all the first type of storage resources in the allocated storage resource combination are reclaimed. In another embodiment, the difference between the space size of the first type of storage resources and the space size of the storage resources to be reclaimed is determined, and then the number of unit storage units of the second type of storage resources that need to be reclaimed is determined based on the difference and the reference space size of the unit storage unit of the second type of storage resources, and the second type of storage resources are reclaimed according to the number. Since the space size of the unit storage unit of the second type of storage resources is variable and the second type of storage resources have a delay, the space size of the second type of storage resources actually reclaimed in this way may become less or more.
[0078] After reclaiming all first-category storage resources in the allocated storage resource combination, the total size of the reclaimed first-category storage resources and second-category storage resources may not match the size of the storage resources to be reclaimed. If so, the remaining unreclaimed storage resources can be reclaimed, or the remaining unreclaimed storage resources can be reclaimed during the next storage resource recycling of the target account. If so, the excess reclaimed storage resources can be reallocated to the target account, or offset against the excess reclaimed storage resources during the next storage resource recycling of the target account.
[0079] In one embodiment, after the second-category storage resources are recycled, the space size of the recycled storage resources obtained by recycling the second-category storage resources is determined, and the first-category storage resources that match the space size of the recycled storage resources are allocated to the target account. Then, the first-category storage resources in the allocated storage resource combination are recycled according to the space size of the storage resources to be recycled. Since the space size of the second-category storage resources actually recycled may vary, the difference may not be consistent with the above-mentioned difference. The specific processing method at this time may include: if the space size of the first-category storage resources currently allocated to the target account is smaller than the space size of the storage resources to be recycled, then all the first-category storage resources currently allocated to the target account are recycled, and the space size of the remaining unrecycled storage resources is recorded, and the storage resources that match the space size of the remaining unrecycled storage resources are recycled in the next storage resource recycling phase corresponding to the target account.
[0080] If the amount of first-class storage resources currently allocated to the target account is greater than or equal to the amount of storage resources to be reclaimed, the first-class storage resources matching the amount of storage resources to be reclaimed can be reclaimed directly. If there are any remaining first-class storage resources after the reclaim, they can be used to offset the remaining storage resources the next time the target account's storage resources are reclaimed.
[0081] By adopting the above method, automatic recycling of storage resources can be realized, effectively improving the efficiency of storage resource recycling. In addition, when the first type of storage resources are not enough to be recycled, a certain amount of the second type of storage resources can be recycled, so that as many storage resources as possible can be recycled, effectively ensuring the amount of storage resources recycled.
[0082] In another embodiment, the resource processing method described in the embodiments of this application can be applied to the application scenario of virtual resource transactions. With the development of internet finance, virtual resource management platforms can provide users with investment advisory services. Specifically, they offer a combination of various virtual resources for users to purchase, and automatically help users subscribe to and redeem virtual resources, or adjust their virtual resource portfolios based on market fluctuations, thereby achieving a certain rate of return. While providing these services, the management platform needs to charge a certain service fee. The virtual resource portfolio purchased by the management platform for users can include first-category virtual resources and second-category virtual resources. First-category virtual resources are those that exhibit both real-time and stability. Real-time means that the value of first-category virtual resources can be confirmed in real time; stability means that the net value of first-category virtual resources remains unchanged. Second-category virtual resources are those that exhibit both latency and volatility. Latency means that the value of second-category virtual resources requires delayed confirmation (e.g., confirmation the next day); volatility means that the net value of second-category virtual resources fluctuates.
[0083] Since the first type of virtual resources are real-time and stable, the first type of virtual resources can be recycled first. Specifically, when it is detected that the resource recovery conditions (i.e., fee deduction conditions) are met, the amount of resources to be recovered corresponding to the target account (i.e., fees to be deducted) is determined, and the amount of resources of the first type of resources in the allocated resource portfolio (i.e., investment advisory product portfolio) corresponding to the target account (i.e., the value of the first type of virtual resources) is determined. When the value of the first type of virtual resources is greater than or equal to the fees to be deducted, the first type of virtual resources in the investment advisory product portfolio that matches the fees to be deducted are directly traded, and the transaction funds obtained from the transaction processing can be used to offset the fees to be deducted. When the value of the first type of virtual resources is less than the fees to be deducted, the second type of virtual resources are determined from the investment advisory product portfolio corresponding to the target account, and the first type of virtual resources and the second type of virtual resources in the investment advisory product portfolio are traded based on the fees to be deducted and the value of the first type of virtual resources; the transaction funds obtained from the transaction processing can be used to offset the fees to be deducted.
[0084] In one embodiment, the second category of virtual resources in the investment advisory product portfolio includes one or more resources. Based on the fees to be deducted and the value of the first category of virtual resources, the transaction processing method for the first category of virtual resources and the second category of virtual resources in the investment advisory product portfolio can be: subtracting the fees to be deducted from the value of the first category of virtual resources to obtain a difference; querying the allocation ratio of various virtual resources in the second category of virtual resources in the investment advisory product portfolio, and determining the transaction amount of the various virtual resources based on the difference and the allocation ratio; querying the reference net value of the various virtual resources (such as the net value of the previous trading day), and determining the transaction quantity of the various virtual resources based on the reference net value of the various virtual resources and the transaction amount; and performing transaction processing on the various virtual resources according to the transaction quantity of the various virtual resources.
[0085] Furthermore, since the redemption settlement rules for various resources may differ, the transaction funds obtained from each transaction may arrive at different times. In this case, the following processing method may be used: after any transaction funds obtained from the transaction processing arrive, the first type of virtual resources are purchased for the target account using the transaction funds. After all transaction funds obtained from the transaction processing have arrived and it is detected that the first type of virtual resources have been purchased for the target account using the transaction funds, the transaction processing of the first type of virtual resources in the current investment advisory product portfolio is carried out according to the fees to be deducted.
[0086] Since the net value of the second type of virtual resources is variable and the transaction of the second type of virtual resources is confirmed with a delay, the actual funds obtained from the transaction of the second type of virtual resources may not be consistent with the difference mentioned above. The specific processing method at this time may include: determining the total value of the current total number of first type virtual resources corresponding to the target account, when the total value is less than the fees to be deducted, updating the fees to be deducted according to the total value, and performing transaction processing on the current total number of first type virtual products. In this method, the final funds obtained from the transaction processing are less than the fees to be deducted. At this time, the remaining undeducted fees can be recorded, and the undeducted fees can be deducted the next time the fees are deducted from the target account. When the total value is greater than or equal to the fees to be deducted, the first type of virtual resources in the current investment advisory product portfolio that matches the fees to be deducted are processed for transaction processing, and the transaction funds obtained from the transaction processing can be used to offset the fees to be deducted.
[0087] In the above method, after the transaction funds obtained from any second-category virtual resource transaction are received, the received transaction funds are first used to purchase the first-category virtual resources, and finally the first-category virtual resources of corresponding value are traded to deduct management fees. This allows for unified collection of management fees even when the arrival time of various resources is different. Compared with multiple collections, this ensures the accuracy of fee collection and avoids errors. It should be noted that in feasible implementation methods, the transaction funds obtained from various second-category virtual resource transactions can also be directly used to deduct management fees.
[0088] In a feasible embodiment, upon detecting a detailed query instruction input by a user, the client generates a detailed query request. The detailed query request carries a query identifier, which includes an identifier of the account to be queried (e.g., the target account) and the content to be queried (e.g., the detailed payment details for February). After receiving the detailed query request from the client, the server responds to the detailed query request and returns detailed data matching the query identifier to the client. The client displays this detailed data in the user interface.
[0089] The detailed data may include at least one of fee details and virtual resource transaction details. The fee details include one or more of the following: the remaining fees to be deducted in the previous fee deduction phase, the fees to be deducted in the current fee deduction phase, the total fees to be deducted in the current fee deduction phase, the fees already deducted in the current fee deduction phase, and the remaining undeducted fees in the current fee deduction phase. The virtual resource transaction details include: one or more of the name, identification code, transaction quantity, transaction unit price, and transaction total price of various second-category virtual resources traded. In a feasible implementation, the virtual resource transaction details also include: one or more of the name, identification code, transaction (buy and / or sell) quantity, transaction unit price, and transaction total price of the first-category virtual resources.
[0090] In order to better understand the implementation of the resource processing method described in the embodiment of the present application in the application scenario of virtual resource transactions, the resource processing method is explained below using funds in virtual resources as an example.
[0091] First, some of the terms related to funds involved in the embodiments of this application are introduced. Investment advisory: The financial management platform provides investment portfolio solutions for users to purchase, and adjusts the positions within the portfolio according to market changes. Investment advisory fee accrual: The financial management platform provides investment advisory services to users and charges a certain service fee. Investment advisory portfolio: An investment advisory product is a combination of multiple products, which can include money market funds, index funds (such as stock funds, bond funds), etc. Batch running: A batch processing program that initiates accrual. Accrual system: A system for calculating and deducting investment advisory fees. Investment advisory system: A system that provides users with investment advisory portfolios and adjustments within portfolios. Sales system: A system for subscribing to and redeeming a single fund. Among them, money market funds do not have net value changes and can be confirmed in real time. Index funds have net value changes and require delayed confirmation. Batch running, accrual system, investment advisory system, and sales system can all be included in the financial management platform.
[0092] With the development of internet finance, wealth management platforms can offer investment advisory services to users. These services include offering a portfolio of money market funds and index funds for users to purchase, and assisting users in subscribing to and redeeming these funds, as well as adjusting fund positions based on market fluctuations, to achieve a specific rate of return. While providing these services, wealth management platforms charge a certain investment advisory fee.
[0093] In one embodiment, the following investment advisory fee accrual scheme can be adopted: a money fund and index fund are included in an investment advisory portfolio, and a certain proportion of money fund shares must be purchased. Therefore, when the investment advisory fee needs to be accrued, the corresponding share of the money fund is redeemed. Since the net value of the money fund remains unchanged, it can be confirmed in real time, so the deduction can be successful at that time. Taking the quarterly fee accrual as an example, Figure 3 As shown, the following steps may be specifically included:
[0094] The batch runner determines whether the current day is a fee accrual date, such as the first trading day of a quarter. The batch runner retrieves all users who have purchased the investment advisory portfolio and iterates through each user to initiate a fee deduction from the accrual system. Upon receiving the fee deduction request, the accrual system first queries the user's current fee accrual amount and inquires with the investment advisory system about the money market fund in the user's investment advisory portfolio. After obtaining the fee accrual amount and the money market fund, the accrual system initiates a redemption of the corresponding money market fund units with the sales system. After the transaction funds obtained from redeeming a certain number of money market fund units are transferred to the wealth management platform account, the sales system returns the redemption result, including the success or failure of the redemption and the amount of redeemed funds. Once the transaction funds are received, the accrual system deducts the corresponding accrual fee and returns the deduction result, including the success or failure of the deduction and the amount deducted.
[0095] In the above solution, since the net asset value of money market funds does not change and can be confirmed in real time, the deduction for accruing fees is based on the money market fund shares, making the system relatively simple to implement. However, in order to accrue fees through money market fund redemptions, this solution requires that the user's investment portfolio must contain money market funds at a certain proportion to at least successfully accrue fees. This places certain restrictions on the product portfolios and investment strategies offered by the wealth management platform, and also limits the ability to allocate positions based on these strategies.
[0096] Based on this, the embodiment of the present application proposes a provisioning scheme that supports the deduction of index fund shares. When the money fund shares in the investment advisory portfolio are insufficient, other corresponding index funds can be redeemed to deduct the provisioning fees. This breaks through the restriction that the above scheme must have a certain proportion of money funds in the investment advisory portfolio, making the financial management platform more flexible in providing product portfolios and investment strategies. This is conducive to ensuring investment returns, protecting users' investment returns, and improving the platform's investment advisory capabilities. Taking the quarterly provisioning of fees as an example, Figure 4 As shown, the following steps may be specifically included:
[0097] Batch Run determines whether today is a fee accrual date, such as the first trading day of a quarter. Batch Run retrieves all users who have purchased the investment advisory portfolio and iterates through each user, initiating fee deductions from the accrual system. Upon receiving the deduction request, the accrual system first queries the user's current fee accrual amount (e.g., 20), generates a deduction order, and freezes the corresponding accrual amount. Upon receiving the deduction request, the accrual system does not directly initiate fund redemption. Instead, it initiates a fee deduction and redemption request to the investment advisory system.
[0098] After receiving a redemption request with fee deductions, the investment advisory system redeems the funds within the user's corresponding investment advisory portfolio according to the strategy. Specifically, if the number of money market fund shares within the investment advisory portfolio is sufficient to cover the accrued fees, the process of redeeming the corresponding shares of the money market fund is initiated. If the number of money market fund shares within the investment advisory portfolio is insufficient to cover the accrued fees, the difference is then allocated to each index fund according to the allocation ratio of each index fund when the index fund was purchased. Yesterday's net asset value of each index fund is queried, and the shares of each index fund to be redeemed are calculated based on the redemption amount and yesterday's net asset value. After calculating the shares to be redeemed for each index fund, the investment advisory system goes to the sales system to redeem the corresponding shares of each index fund.
[0099] Because index funds require at least T+1 confirmation, you can mark "Initiate Fee Deduction" as complete at this point and wait for the index fund redemption to be credited to your account before the actual deduction is made. After any index fund redemption is credited to your account, the investment advisory system will use the entire amount to purchase a money market fund within the advisory portfolio for subsequent fee accrual. After each index fund redemption is credited to your account, the investment advisory system queries the accrual system for the previously initiated fee deduction order, which will be returned to you by the accrual system, including the frozen amount. The investment advisory system will compare the frozen amount with the actual total amount of index fund redemptions and the value of the money market fund in the investment advisory portfolio. This is because the redeemed shares are calculated using yesterday's net value when the index fund redemption is initiated, and the redemption amount is confirmed based on the latest net value. If the net value of the index fund falls, the actual redemption amount may be less than the difference mentioned above, that is, the sum of the actual total amount of redemptions and the value of the money market fund in the investment advisory portfolio is less than the previously frozen amount, that is, less than the amount of fees to be accrued; conversely, if the net value of the index fund rises, the actual redemption amount may be more than the difference mentioned above, that is, the sum of the actual amount of redemptions and the value of the money market fund in the investment advisory portfolio may be more than the previously frozen amount.
[0100] If the sum of the actual total amount of index fund redemptions received and the value of the money market fund in the investment advisory portfolio (e.g., 18) is less than the frozen amount (e.g., 20), the investment advisory system will initiate a frozen amount update request (i.e., the current accrual fee) to the accrual system. This frozen amount update request requests that the frozen amount in the deduction order be updated to the sum of the actual total amount of index fund redemptions received and the value of the money market fund in the investment advisory portfolio (e.g., 18). The remaining 2 yuan will be deducted when the next fee is accrued. After the frozen amount is updated, the investment advisory system initiates a fee deduction request to the accrual system (i.e., deducting the updated frozen amount of 18). After receiving the fee deduction request, the accrual system initiates a money market fund redemption request to the sales system. This money market fund redemption request requests the redemption of the money market fund that matches the updated frozen amount (e.g., redeeming a money market fund with a value of 18). Because the actual total amount of index fund redemptions received has been used to purchase money market funds and the accrual fee deducted during the current fee deduction phase has been updated, the money market fund shares in the investment advisory portfolio are now sufficient for redemption. After the redemption is successful, the investment advisory system will deduct the accrued fees, and the deduction will be finally completed.
[0101] If the total amount of index fund redemptions received plus the value of the money market fund in the investment advisory portfolio (e.g., 22) is greater than or equal to the frozen amount (e.g., 20), the investment advisory system will directly initiate a fee deduction request to the provisioning system. After receiving the fee deduction request, the provisioning system will initiate a redemption request to the sales system for the money market fund that matches the frozen amount. After the redemption is successful, the investment advisory system will deduct the provisioning fee, and the deduction will be completed. If there are any remaining money market fund shares after the deduction is completed, the remaining money market fund shares can be used to offset the next fee accrual; or the remaining money market fund shares can be redeemed and the redemption amount can be used to purchase index funds for the user.
[0102] In the above scheme, after redemptions from any index fund are credited to the account, the redemption proceeds are first used to purchase a money market fund, and ultimately the corresponding redemption of the money market fund shares is used to deduct the accrual fee. This approach allows for unified collection of accrual fees even when the funds arrive at different times. This ensures accurate collection and avoids errors compared to multiple collections. It should be noted that, in feasible implementations, the redemption proceeds from the index fund can also be directly used to offset the accrual fee.
[0103] In a feasible implementation, after the fee deduction is completed, detailed data can be displayed to the user when the user needs it. The detailed data includes fee details and product withdrawal details. The fees include investment advisory service fees (i.e. accrued fees), handling fees, etc. Figure 5 As shown, when a user clicks on the displayed investment advisory fee column, the corresponding product withdrawal details are displayed in the user interface. The product withdrawal details include the product name (or identification code (such as product code)) and the transaction amount. Figure 6 As shown, when a user clicks on the displayed investment advisory fee column, the corresponding fee details and product withdrawal details are displayed in the user interface. The fee details include one or more of the following: the remaining fees deducted in the previous quarter, the fees to be deducted in the current quarter, the sum of the remaining fees deducted in the previous quarter and the fees to be deducted in the current quarter (i.e., the total service fee), the fees successfully deducted in the current quarter, and the remaining undeducted fees in the current quarter. The product withdrawal details include the product name (or identification code), transaction quantity, product net value (i.e., product transaction unit price), etc.
[0104] In a feasible embodiment, Figure 7 As shown, when a user click operation on the displayed transfer service fee column is detected, relevant information about the product transfer is displayed in the user interface, and the relevant information includes one or more of the following: amount received, product name, transfer application submission time, destination of the received funds, time of fund arrival, handling fee, investment advisory service fee, current status of product withdrawal, etc.
[0105] See also Figure 8 , is a schematic diagram of the structure of a resource processing device provided in an embodiment of the present application. The resource processing device described in the embodiment of the present application corresponds to the computer device described above, and the resource processing device includes:
[0106] The determining unit 801 is configured to: determine the amount of resources to be reclaimed corresponding to a target account in response to satisfying a resource reclaim condition; and determine the amount of the first type of resources in the allocated resource combination corresponding to the target account;
[0107] The processing unit 802 is configured to compare the amount of the first type of resources with the amount of the resources to be reclaimed to obtain a comparison result;
[0108] The processing unit 802 is also used to: when the comparison result indicates that the resource amount of the first category of resources is less than the resource amount to be recovered, determine the second category of resources from the allocated resource combination corresponding to the target account; and based on the resource amount to be recovered and the resource amount of the first category of resources, recycle the first category of resources and the second category of resources in the allocated resource combination.
[0109] In one embodiment, the processing unit 802 is specifically configured to:
[0110] Determine a resource quantity difference based on the amount of resources to be recycled and the amount of the first type of resources; recycle the second type of resources in the allocated resource combination based on the resource quantity difference; and recycle the first type of resources in the allocated resource combination.
[0111] In one embodiment, the processing unit 802 is specifically used to: query the allocation ratio of various resources in the second type of resources in the allocated resource combination, and determine the resource recovery amount of the various resources based on the resource quantity difference and the allocation ratio; and recycle the various resources according to the resource recovery amount of the various resources.
[0112] In one embodiment, the determining unit 801 is further configured to determine an amount of recycled resources obtained by recycling the second type of resources;
[0113] The processing unit 802 is further configured to allocate the first type of resources to the target account according to the amount of recovered resources, and update the allocated resource combination according to the allocation result;
[0114] The processing unit 802 is specifically configured to recycle the first type of resources in the updated allocated resource combination according to the amount of resources to be reclaimed.
[0115] In one embodiment, the processing unit 802 is specifically configured to:
[0116] Determine the current resource amount of the first type of resources in the updated allocated resource combination; when the current resource amount is less than the amount of resources to be reclaimed, update the amount of resources to be reclaimed according to the current resource amount; and recycle all the first type of resources in the updated allocated resource combination.
[0117] In one embodiment, the determining unit 801 is further configured to determine the remaining unreclaimed resource amount corresponding to the target account based on the to-be-reclaimed resource amount and the current resource amount;
[0118] The device further includes a recording unit 803 for recording the remaining unrecovered resources;
[0119] The processing unit 802 is further configured to reclaim resources matching the remaining unreclaimed resource amount in a next resource reclaim phase corresponding to the target account.
[0120] In one embodiment, the determining unit 801 is specifically configured to:
[0121] Query the remaining unrecovered resources of the previous resource recovery stage corresponding to the target account in the query record, and query the amount of resources required to be recovered in the current resource recovery stage corresponding to the target account; determine the amount of resources to be recovered corresponding to the target account based on the remaining unrecovered resources in the previous resource recovery stage and the amount of resources required to be recovered in the current resource recovery stage.
[0122] In one embodiment, the apparatus further includes a transceiver unit 804 configured to:
[0123] Receive a detailed query request sent by a client, where the detailed query request is sent by the client when it detects a detailed query instruction input by a user, and the detailed query request carries a query identifier; respond to the detailed query request and return detailed data matching the query identifier to the client, so that the client displays the detailed data in a user interface.
[0124] It can be understood that the functions of each functional unit of the resource processing device in the embodiment of the present application can be specifically implemented according to the method in the above method embodiment. The specific implementation process can refer to the relevant description of the above method embodiment and will not be repeated here.
[0125] The embodiment of the present application determines the amount of resources to be recovered corresponding to the target account and the amount of the first category of resources in the allocated resource combination corresponding to the target account when it is detected that the resource recovery conditions are met; when the amount of the first category of resources is less than the amount of resources to be recovered, the first category of resources in the allocated resource combination and the second category of resources are recovered based on the amount of resources to be recovered and the amount of the first category of resources, thereby realizing automatic resource recovery and effectively improving the efficiency of resource recovery; in addition, the amount of resource recovery can also be effectively guaranteed.
[0126] See also Figure 9 , is a schematic diagram of the structure of a computer device provided in an embodiment of the present application. The computer device described in the embodiment of the present application includes: a processor 901, a communication interface 902, and a memory 903. The processor 901, communication interface 902, and memory 903 may be connected via a bus or other means. The embodiment of the present application uses a bus connection as an example.
[0127] Among them, the processor 901 (or CPU (Central Processing Unit)) is the computing core and control core of the computer device. It can parse various instructions within the computer device and process various data of the computer device. For example, the CPU can be used to parse the power on and off instructions sent by the user to the computer device and control the computer device to perform power on and off operations; for another example, the CPU can transmit various interactive data between the internal structures of the computer device, etc. The communication interface 902 can optionally include a standard wired interface or a wireless interface (such as Wi-Fi, mobile communication interface, etc.), which is controlled by the processor 901 to send and receive data. The memory 903 (Memory) is a memory device in the computer device for storing programs and data. It can be understood that the memory 903 here can include both the built-in memory of the computer device and the extended memory supported by the computer device. The memory 903 provides storage space, which stores the operating system of the computer device, which may include but is not limited to: Android system, iOS system, Windows Phone system, etc., and this application is not limited to this.
[0128] In the embodiment of the present application, the processor 901 performs the following operations by running the executable program code in the memory 903:
[0129] In response to satisfying a resource recovery condition, determining the amount of resources to be recovered corresponding to the target account; determining the amount of first-category resources in the allocated resource combination corresponding to the target account, and comparing the amount of the first-category resources with the amount of resources to be recovered to obtain a comparison result; when the comparison result indicates that the amount of the first-category resources is less than the amount of resources to be recovered, determining the second-category resources from the allocated resource combination corresponding to the target account; and recovering the first-category resources and the second-category resources in the allocated resource combination based on the amount of resources to be recovered and the amount of the first-category resources.
[0130] In one embodiment, when the processor 901 recycles the first category of resources and the second category of resources in the allocated resource combination based on the amount of resources to be recycled and the amount of resources of the first category of resources, it is specifically used to: determine the resource amount difference based on the amount of resources to be recycled and the amount of resources of the first category of resources; recycle the second category of resources in the allocated resource combination based on the resource amount difference; and recycle the first category of resources in the allocated resource combination.
[0131] In one embodiment, when the processor 901 recycles the second type of resources in the allocated resource combination according to the resource quantity difference, it is specifically used to: query the allocation ratio of various resources in the second type of resources in the allocated resource combination, and determine the resource recovery amount of the various resources according to the resource quantity difference and the allocation ratio; and recycle the various resources according to the resource recovery amount of the various resources.
[0132] In one embodiment, after the processor 901 reclaims the second type of resources in the allocated resource combination based on the resource quantity difference, it is further configured to: determine the amount of reclaimed resources obtained by reclaiming the second type of resources; allocate the first type of resources to the target account based on the amount of reclaimed resources, and update the allocated resource combination based on the allocation result. Specifically, when the processor 901 reclaims the first type of resources in the allocated resource combination, it is specifically configured to: reclaim the first type of resources in the updated allocated resource combination based on the amount of resources to be reclaimed.
[0133] In one embodiment, when the processor 901 recycles the first type of resources in the updated allocated resource combination according to the amount of resources to be recycled, it is specifically used to: determine the current resource amount of the first type of resources in the updated allocated resource combination; when the current resource amount is less than the amount of resources to be recycled, update the amount of resources to be recycled according to the current resource amount; and recycle all the first type of resources in the updated allocated resource combination.
[0134] In one embodiment, the processor 901 is also used to: determine the remaining unrecovered resource amount corresponding to the target account based on the amount of resources to be recovered and the current amount of resources; record the remaining unrecovered resource amount, and recover resources matching the remaining unrecovered resource amount in the next resource recovery phase corresponding to the target account.
[0135] In one embodiment, when the processor 901 determines the amount of resources to be recovered corresponding to the target account, it is specifically used to: query the remaining unrecovered resources of the previous resource recovery stage corresponding to the target account, and query the amount of resources required to be recovered in the current resource recovery stage corresponding to the target account; determine the amount of resources to be recovered corresponding to the target account based on the remaining unrecovered resources in the previous resource recovery stage and the amount of resources required to be recovered in the current resource recovery stage.
[0136] In one embodiment, after the processor 901 recycles the first category of resources and the second category of resources in the allocated resource combination based on the amount of resources to be recycled and the amount of resources of the first category of resources, it is also used to: receive a detailed query request sent by the client through the communication interface 902, the detailed query request is sent by the client when the client detects a detailed query instruction input by the user, and the detailed query request carries a query identifier; respond to the detailed query request and return detailed data matching the query identifier to the client through the communication interface 902, so that the client displays the detailed data in the user interface.
[0137] In a specific implementation, the processor 901, communication interface 902, and memory 903 described in the embodiment of the present application may execute an implementation method described in a resource processing method provided in an embodiment of the present application, or may execute an implementation method described in a resource processing device provided in an embodiment of the present application. The specific implementation method may be referred to the previous description and will not be repeated here.
[0138] The embodiment of the present application determines the amount of resources to be recovered corresponding to the target account and the amount of the first category of resources in the allocated resource combination corresponding to the target account when it is detected that the resource recovery conditions are met; when the amount of the first category of resources is less than the amount of resources to be recovered, the first category of resources in the allocated resource combination and the second category of resources are recovered based on the amount of resources to be recovered and the amount of the first category of resources, thereby realizing automatic resource recovery and effectively improving the efficiency of resource recovery; in addition, the amount of resource recovery can also be effectively guaranteed.
[0139] The present application also provides a computer-readable storage medium having instructions stored therein. When executed on a computer, the computer executes the resource processing method described in the present application. The specific implementation method can be found in the previous description and will not be repeated here.
[0140] The present application also provides a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the resource processing method described in the present application. The specific implementation method is described above and will not be repeated here.
[0141] It should be noted that for the aforementioned various method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that this application is not limited by the order of the actions described, because according to this application, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by this application.
[0142] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable storage medium, which may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0143] The above disclosure is only part of the embodiments of the present application, and certainly cannot be used to limit the scope of rights of the present application. Therefore, equivalent changes made according to the claims of the present application are still within the scope covered by the present application.
Claims
1. A resource processing method, characterized in that: The method comprises: In response to satisfying the resource recycling condition, determining the amount of resources to be recycled corresponding to the target account based on the remaining unrecycled amount of resources corresponding to the target account in the previous resource recycling phase and the amount of resources required to be recycled in the current resource recycling phase corresponding to the target account; Determining the amount of first-category resources in the allocated resource combination corresponding to the target account, and comparing the amount of the first-category resources with the amount of resources to be reclaimed to obtain a comparison result; the first-category resources are storage resources with real-time and stability characteristics; When the comparison result indicates that the amount of the first type of resources is less than the amount of resources to be reclaimed, determining a second type of resources from the allocated resource combination corresponding to the target account; the second type of resources are storage resources with delay, and the unit resource amount of the second type of resources is variable; Determining a resource quantity difference based on the quantity of the resources to be recovered and the quantity of the first type of resources; querying the allocation ratio and reference unit resource amount of various resources in the second type of resources in the allocated resource combination, and determining the resource recovery amount of the various resources based on the resource amount difference, the allocation ratio, and the reference unit resource amount, where the resource recovery amount refers to the number of recovered unit storage units; Recycling the various resources according to their respective recycling amounts; Recycling the first type of resources in the allocated resource combination; When the unit resource quantity of the second type of resources changes and the total resource quantity of the recovered first type of resources and the second type of resources is inconsistent with the resource quantity to be recovered, if the total resource quantity is less than the resource quantity to be recovered, the remaining unrecovered resources will continue to be recovered, or the remaining unrecovered resources will be recovered when the resources of the target account are recovered next time; if the total resource quantity is greater than the resource quantity to be recovered, the excess recovered resources will be reallocated to the target account, or the excess recovered resources will be offset when the resources of the target account are recovered next time.
2. The method according to claim 1, wherein The method further comprises: determining the amount of recovered resources obtained by recycling the second type of resources; Allocating the first type of resources to the target account according to the amount of recovered resources, and updating the allocated resource combination according to the allocation result; The recycling of the first type of resources in the allocated resource combination includes: The first type of resources in the updated allocated resource combination are recycled according to the amount of resources to be recycled.
3. The method according to claim 2, wherein The recycling of the first type of resources in the updated allocated resource combination according to the amount of resources to be recycled includes: determining a current resource amount of the first type of resources in the updated allocated resource combination; When the current amount of resources is less than the amount of resources to be recovered, updating the amount of resources to be recovered according to the current amount of resources; All of the first-category resources in the updated allocated resource combination are recycled.
4. The method according to claim 3, wherein The method further comprises: Determining the remaining unrecovered resources corresponding to the target account based on the to-be-recovered resources amount and the current resources amount; The remaining unrecovered resource amount is recorded, and resources matching the remaining unrecovered resource amount are recovered in the next resource recovery phase corresponding to the target account.
5. The method according to any one of claims 1 to 4, wherein The method further comprises: receiving a detailed query request sent by a client, wherein the detailed query request is sent by the client when detecting a detailed query instruction input by a user, and the detailed query request carries a query identifier; In response to the detail query request, detailed data matching the query identifier is returned to the client, so that the client displays the detailed data in a user interface.
6. A resource processing device, characterized in that: The device comprises: a determining unit configured to: in response to satisfying a resource recycling condition, determine the amount of resources to be recycled corresponding to the target account based on the remaining unrecycled resources in the previous resource recycling phase corresponding to the target account and the amount of resources to be recycled in the current resource recycling phase corresponding to the target account; and determine the amount of first-category resources in the allocated resource combination corresponding to the target account; the first-category resources being storage resources with real-time and stability characteristics; a processing unit, configured to compare the amount of the first type of resources with the amount of the resources to be recovered to obtain a comparison result; The processing unit is further configured to, when the comparison result indicates that the amount of the first type of resources is less than the amount of resources to be reclaimed, determine a second type of resources from the combination of allocated resources corresponding to the target account; the second type of resources being storage resources with a delay, and the unit resource amount of the second type of resources being variable; The processing unit is further configured to: determine a resource amount difference based on the amount of resources to be recycled and the amount of resources of the first category of resources; query an allocation ratio and a reference unit resource amount of each resource in the second category of resources in the allocated resource combination, and determine a resource recycling amount of each resource based on the resource amount difference, the allocation ratio, and the reference unit resource amount, wherein the resource recycling amount refers to the number of recycled unit storage units; recycle each resource according to its resource recycling amount; and recycle the first category of resources in the allocated resource combination; when the unit resource amount of the second category of resources changes and the total amount of recycled first and second category resources is inconsistent with the amount of resources to be recycled, if the total amount of resources is less than the amount of resources to be recycled, continue to recycle the remaining unrecycled resources, or recycle the remaining unrecycled resources during the next recycling of resources of the target account; and if the total amount of resources is greater than the amount of resources to be recycled, reallocate the excess recycled resources to the target account, or offset the excess recycled resources during the next recycling of resources of the target account.
7. A computer device, characterized in that: include: A processor, a communication interface and a memory, wherein the processor, the communication interface and the memory are connected to each other, wherein the memory stores an executable program code, and the processor is used to call the executable program code to execute the resource processing method according to any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that The computer-readable storage medium stores instructions, which, when executed on a computer, enable the computer to execute the resource processing method according to any one of claims 1 to 5.
9. A computer program product, characterized in that The computer program product includes computer instructions, which are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the resource processing method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Cash resource processing method, system, computer device and storage medium
CN108648083A