Computing resource management method and device, computer equipment, readable storage medium and program product
By dividing multiple sub-resource pools in the computing resource management system, determining the target sub-resource pool according to the user type, and performing resource deduction updates when the subscription resource amount meets the conditions, the problem of insufficient flexibility in traditional resource allocation is solved, and multi-dimensional management and flexible resource allocation are realized.
Patent Information
- Application Number
- CN202510593930.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-09
- Publication Date
- 2025-06-10
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In computing power scheduling, the traditional linear resource allocation method leads to low flexibility in computing resource allocation and is difficult to meet the resource needs of different user types.
By obtaining order information, including order resource type, user type and order resource quantity, determine the target total resource pool and target sub-resource pool, and when the order resource quantity meets the preset conditions, the resource quantity of the target total resource pool and target sub-resource pool is deducted and updated.
The resource limit on different types of users is realized, the resource shortage caused by unreasonable resource allocation is avoided, and the flexibility of computing resource allocation is improved.
Smart Images

Figure CN120123102A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of resource management, and particularly to a computing resource management method, device, computer device, readable storage medium, and program product. Background Art
[0002] In computing power scheduling, as the use of computing resources becomes more and more frequent and the total resource volume is fixed, the situation of unreasonable resource allocation has gradually become a problem restricting its further development.
[0003] In traditional technologies, a linear resource allocation method is adopted, which has the problem of low flexibility in computing resource allocation. Summary of the Invention
[0004] Based on this, it is necessary to provide a computing resource management method, device, computer device, readable storage medium, and program product that can improve the flexibility of computing resource allocation for the above technical problems.
[0005] In a first aspect, this application provides a computing resource management method, which includes: obtaining order information, where the order information includes the ordered resource type, user type, and ordered resource volume; determining a target total resource pool from multiple total resource pools according to the ordered resource type, where the multiple total resource pools respectively correspond to different computing resource types; determining a target sub-resource pool from multiple sub-resource pools of the target total resource pool according to the user type, where the multiple sub-resource pools respectively correspond to different user types; when the ordered resource volume meets a preset condition, deducting and updating the resource volume of the target total resource pool and the resource volume of the target sub-resource pool according to the ordered resource volume.
[0006] In one embodiment, the user type includes an individual type or a team type, and the target total resource pool includes a first sub-resource pool and a second sub-resource pool; determining a target sub-resource pool from multiple sub-resource pools of the target total resource pool according to the user type includes: when the user type is an individual type, using the first sub-resource pool as the target sub-resource pool; when the user type is a team type, using the second sub-resource pool as the target sub-resource pool.
[0007] In one embodiment, when the ordered resource volume meets a preset condition, deducting and updating the resource volume of the target total resource pool and the resource volume of the target sub-resource pool according to the ordered resource volume includes: determining whether the ordered resource volume is less than or equal to the remaining resource volume of the target sub-resource pool; if the ordered resource volume is less than or equal to the remaining resource volume of the target sub-resource pool, then determining whether the ordered resource volume is less than or equal to the remaining resource volume of the target total resource pool; if the ordered resource volume is less than or equal to the remaining resource volume of the target total resource pool, then deducting and updating the resource volume of the target total resource pool and the resource volume of the target sub-resource pool according to the ordered resource volume.
[0008] In one embodiment, the method further includes: if the ordered resource quantity is greater than the remaining resource quantity of the target sub-resource pool, and / or the ordered resource quantity is greater than the remaining resource quantity of the target total resource pool, marking the order information corresponding order as an invalid order.
[0009] In one embodiment, the method further includes: summing up the used resource quantities of all sub-resource pools in the target total resource pool to obtain the total used resource quantity; obtaining the remaining resource quantity of the target total resource pool according to the total resource quantity and the total used resource quantity of the target total resource pool.
[0010] In one embodiment, the method further includes: when receiving order settlement information, releasing and updating the resource quantity of the target total resource pool and the resource quantity of the target sub-resource pool respectively according to the ordered resource quantity.
[0011] In a second aspect, the present application further provides a computing resource management device, which includes:
[0012] A receiving module, configured to obtain order information, where the order information includes an ordered resource type, a user type, and an ordered resource quantity;
[0013] A first determination module, configured to determine a target total resource pool from multiple total resource pools according to the ordered resource type, where the multiple total resource pools respectively correspond to different computing resource types;
[0014] A second determination module, configured to determine a target sub-resource pool from multiple sub-resource pools of the target total resource pool according to the user type, where the multiple sub-resource pools respectively correspond to different user types;
[0015] An update module, configured to, when the ordered resource quantity meets a preset condition, deduct and update the resource quantity of the target total resource pool and the resource quantity of the target sub-resource pool respectively according to the ordered resource quantity.
[0016] In one embodiment, the user type includes an individual type or a team type, and the target total resource pool includes a first sub-resource pool and a second sub-resource pool; the second determination module is specifically configured to use the first sub-resource pool as the target sub-resource pool when the user type is the individual type; and use the second sub-resource pool as the target sub-resource pool when the user type is the team type.
[0017] In one embodiment, the update module is specifically configured to determine whether the ordered resource quantity is less than or equal to the remaining resource quantity of the target sub-resource pool; if the ordered resource quantity is less than or equal to the remaining resource quantity of the target sub-resource pool, then determine whether the ordered resource quantity is less than or equal to the remaining resource quantity of the target total resource pool; if the ordered resource quantity is less than or equal to the remaining resource quantity of the target total resource pool, then update and deduct the resource quantities of the target total resource pool and the target sub-resource pool respectively according to the ordered resource quantity.
[0018] In one embodiment, the device further includes a marking module, configured to mark the order corresponding to the order information as an invalid order if the ordered resource quantity is greater than the remaining resource quantity of the target sub-resource pool, and / or the ordered resource quantity is greater than the remaining resource quantity of the target total resource pool.
[0019] In one embodiment, the device further includes a third determination module, configured to sum up the used resource quantities of all sub-resource pools in the target total resource pool to obtain the total used resource quantity; and obtain the remaining resource quantity of the target total resource pool according to the total resource quantity and the total used resource quantity of the target total resource pool.
[0020] In one embodiment, the update module is further configured to, when receiving order settlement information, update and release the resource quantities of the target total resource pool and the target sub-resource pool respectively according to the ordered resource quantity.
[0021] In a third aspect, the present application further provides a computer device, including a memory and a processor, where the memory stores a computer program, and when the processor executes the computer program, the steps of the method described in any one of the above first aspects are implemented.
[0022] In a fourth aspect, the present application further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the method described in any one of the above first aspects are implemented.
[0023] In a fifth aspect, the present application further provides a computer program product, including a computer program, and when the computer program is executed by a processor, the steps of the method described in any one of the above first aspects are implemented.
[0024] The above-mentioned computing resource management method, device, computer equipment, readable storage medium and program product receive order information including an ordered resource type, user type, and ordered resource quantity; determine a target total resource pool from multiple total resource pools according to the ordered resource type, where the multiple total resource pools respectively correspond to different computing resource types, and determine a target sub-resource pool from multiple sub-resource pools of the target total resource pool according to the user type, where the multiple sub-resource pools respectively correspond to different user types. Then, when the ordered resource quantity meets a preset condition, the resource quantity of the target total resource pool and the resource quantity of the target sub-resource pool are deducted and updated according to the ordered resource quantity. In this way, the target total resource pool is divided into multiple sub-resource pools, and different user types correspond to different sub-resource pools, realizing the limitation of the resource quantity applied by different types of users, avoiding the situation where some types of users apply for too much resource quantity and other types of users cannot obtain the resource quantity, realizing multi-dimensional management, and thus improving the flexibility of computing resource allocation. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following will briefly introduce the drawings required for use in the description of the embodiments of the present application or related technologies. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other related drawings can also be obtained based on these drawings.
[0026] Figure 1 It is an application environment diagram of the computing resource management method in an embodiment;
[0027] Figure 2 It is a flowchart of the computing resource management method in an embodiment;
[0028] Figure 3 It is a flowchart of the computing resource management method in another embodiment;
[0029] Figure 4 It is a signaling interaction flowchart of the computing resource management method in an embodiment;
[0030] Figure 5 It is a structural block diagram of the computing resource management device in an embodiment;
[0031] Figure 6 It is an internal structure diagram of the computer equipment in an embodiment. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0032] In order to make the objectives, technical solutions and advantages of the present application more clearly understood, the present application 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 application and are not used to limit the present application.
[0033] The computing resource management method provided by the embodiments of the present application can be applied to an application environment as Figure 1 shown. Among them, the terminal 102 communicates with the server 104 through a network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or can be placed in the cloud or on other network servers. Among them, the terminal 102 can be, but is not limited to, various personal computers, laptop computers, smart phones, tablet computers, Internet of Things devices, and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart vehicle-mounted devices, projection devices, etc. The portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The head-mounted device can be a virtual reality (VR) device, an augmented reality (AR) device, smart glasses, etc. The server 104 can be an independent physical server, a server cluster or a distributed system composed of multiple physical servers, or a cloud server providing computing services.
[0034] In an exemplary embodiment, as Figure 2 shown, a computing resource management method is provided. Taking the terminal in Figure 1 as an example, the method includes the following steps 201 to 204. Among them:
[0035] Step 201, obtain order information, where the order information includes the ordered resource type, user type, and ordered resource quantity.
[0036] Among them, the ordered resource type refers to the type of computing resource that the user needs to order. For example, CPU resources, memory resources, hard disk resources, network resources, etc. It should be noted that one order information can include multiple different ordered resource types, that is, the user needs to order multiple types of computing resources. For example, the user needs to order CPU resources, memory resources, and hard disk resources at the same time. In the present application, the number of ordered resource types in the order information is not limited.
[0037] User type refers to the category of users applying for computing resources, such as individual type, team type, special type, etc. Individual type refers to users who apply for and use computing resources in their personal names. Such users may be independent developers, researchers, etc., and they use computing services based on personal needs (such as small projects, learning, experiments). Team type refers to users who apply for computing resources in the name of an organization or team. Such users may be enterprises, large project teams, etc., and they usually require a large amount of computing resources, high-concurrency storage, and stable network services to meet business needs. Special type refers to user categories with specific permissions, uses, or identities.
[0038] The ordered resource quantity refers to the quantity of computing resources that the user needs to order, such as the number of CPU cores, storage capacity, etc. It can be understood that an order information can also include multiple different ordered resource quantities, and multiple ordered resource types correspond one-to-one with multiple ordered resource quantities.
[0039] In a possible implementation, the terminal displays a login interface, and the login interface includes multiple different user type options; after detecting a trigger operation for one of the user type options, the terminal displays a resource purchase interface, and the resource purchase interface includes multiple different computing resource type options, multiple resource quantity options corresponding to the multiple different computing resource type options, and a submission option. The user can select the required computing resource type and the corresponding resource quantity based on the multiple different computing resource type options and multiple resource quantity options. After detecting a trigger operation for the submission option, the terminal generates order information based on the selected computing resource type, the corresponding resource quantity, and the user type triggered during login.
[0040] In another possible implementation, the terminal displays an order filling interface, and the user can input the ordered resource type, user type, and ordered resource quantity based on this order filling interface; the terminal generates order information based on the ordered resource type, user type, and ordered resource quantity input by the user in the order filling interface.
[0041] In yet another possible implementation, directly receive the order information sent by other terminals.
[0042] Step 202, determine the target total resource pool from multiple total resource pools according to the ordered resource type, where the multiple total resource pools respectively correspond to different computing resource types.
[0043] Among them, the computing resource types include CPU resources, memory resources, hard disk resources, network resources, etc. The multiple total resource pools include a CPU total resource pool, a memory total resource pool, a hard disk total resource pool, a network total resource pool, etc.
[0044] It can be understood that when the ordered resource type is CPU resources, the target total resource pool determined from multiple total resource pools is the CPU total resource pool; when the ordered resource type is memory resources, the target total resource pool determined from multiple total resource pools is the memory total resource pool; when the ordered resource type is hard disk resources, the target total resource pool determined from multiple total resource pools is the hard disk total resource pool; when the ordered resource type is network resources, the target total resource pool determined from multiple total resource pools is the network total resource pool.
[0045] It can be understood that when there are multiple ordered resource types in the order information, the number of target total resource pools determined from multiple total resource pools is also multiple.
[0046] Step 203: Determine the target sub-resource pool from multiple sub-resource pools of the target total resource pool according to the user type, where the multiple sub-resource pools respectively correspond to different user types.
[0047] Each total resource pool includes multiple sub-resource pools, so the target total resource pool includes multiple sub-resource pools. For example, it includes three sub-resource pools, which respectively correspond to the individual type, the team type, and the special type. The sizes of each sub-resource pool are different. For example, the sub-resource pool corresponding to the individual type is smaller than the sub-resource pool corresponding to the team type, and the sub-resource pool corresponding to the team type is smaller than the sub-resource pool corresponding to the special type.
[0048] Optionally, each sub-resource pool is bound with an identifier, and a mapping table is stored in the terminal. The mapping table includes the one-to-one correspondence between multiple user types and multiple identifiers, so that the terminal can determine the target sub-resource pool from multiple sub-resource pools of the target total resource pool according to the user type and the mapping table.
[0049] It can be understood that when there are multiple ordered resource types in the order information, for each target total resource pool, the terminal determines the target sub-resource pool from multiple sub-resource pools of the target total resource pool according to the user type, so that multiple target sub-resource pools can be obtained.
[0050] Step 204: When the ordered resource quantity meets the preset condition, deduct and update the resource quantity of the target total resource pool and the resource quantity of the target sub-resource pool respectively according to the ordered resource quantity.
[0051] Whether the ordered resource quantity meets the preset condition can be determined by using the threshold judgment method or by the remaining resource quantity of the resource pool. Preferably, it is determined by the remaining resource quantity of the resource pool.
[0052] The resource quantity of the target total resource pool includes the total resource quantity of the target total resource pool, the total used resource quantity of the target total resource pool, and the remaining resource quantity of the target total resource pool.
[0053] The resource quantity of the target sub-resource pool includes the total resource quantity of the target sub-resource pool, the used resource quantity of the target sub-resource pool, and the remaining resource quantity of the target sub-resource pool.
[0054] Deduction update means subtracting the ordered resource quantity from the remaining resource quantity of the target total resource pool and the remaining resource quantity of the target sub-resource pool, and adding the ordered resource quantity to the total used resource quantity of the target total resource pool and the total used resource quantity of the target sub-resource pool to update the resource quantity of the target total resource pool and the resource quantity of the target sub-resource pool.
[0055] It can be understood that when the order information includes multiple ordered resource quantities, when each ordered resource quantity meets the preset conditions, for each ordered resource quantity, the resource quantity of the target total resource pool and the resource quantity of the target sub-resource pool are respectively deducted and updated according to the ordered resource quantity.
[0056] In the above computing resource management method, by receiving order information including the ordered resource type, user type, and ordered resource quantity; determining the target total resource pool from multiple total resource pools according to the ordered resource type, where multiple total resource pools respectively correspond to different computing resource types, and determining the target sub-resource pool from multiple sub-resource pools of the target total resource pool according to the user type, where multiple sub-resource pools respectively correspond to different user types. Then, when the ordered resource quantity meets the preset conditions, the resource quantity of the target total resource pool and the resource quantity of the target sub-resource pool are respectively deducted and updated according to the ordered resource quantity. In this way, the target total resource pool is divided into multiple sub-resource pools, and different user types correspond to different sub-resource pools, realizing the limitation of the resource quantity applied by different types of users, avoiding the situation that some types of users apply for too much resource quantity resulting in other types of users being unable to apply for the resource quantity, realizing multi-dimensional management, and thus improving the flexibility of computing resource allocation.
[0057] In an exemplary embodiment, the user type includes an individual type or a team type, and the target total resource pool includes a first sub-resource pool and a second sub-resource pool; determining the target sub-resource pool from multiple sub-resource pools of the target total resource pool according to the user type includes: when the user type is an individual type, taking the first sub-resource pool as the target sub-resource pool; when the user type is a team type, taking the second sub-resource pool as the target sub-resource pool.
[0058] Among them, the total resource quantity of the first sub-resource pool can be less than the total resource quantity of the second sub-resource pool.
[0059] For the individual type, the ordered resource quantity in the order information needs to be less than or equal to the total resource quantity of the first sub-resource pool. If the ordered resource quantity in the order information is greater than the total resource quantity of the first sub-resource pool, the order corresponding to the order information is marked as an invalid order.
[0060] For the team type, the quantity of ordered resources in the order information should be less than or equal to the total resources of the second sub-resource pool. If the quantity of ordered resources in the order information is greater than the total resources of the second sub-resource pool, the order corresponding to the order information is marked as an invalid order.
[0061] In this embodiment, when the user type is individual type, the first sub-resource pool is used as the target sub-resource pool; when the user type is team type, the second sub-resource pool is used as the target sub-resource pool. In this way, the target sub-resource pool is determined according to the user type, and then the resources of the target total resource pool and the target sub-resource pool are deducted and updated according to the quantity of ordered resources, realizing the multi-dimensional management of computing resources, and further improving the flexibility of computing resource allocation.
[0062] In one of the embodiments, as Figure 3 shown, another computing resource management method is provided, including:
[0063] Judge whether the quantity of ordered resources is less than or equal to the remaining resources of the target sub-resource pool.
[0064] If the quantity of ordered resources is greater than the remaining resources of the target sub-resource pool, the order corresponding to the order information is marked as an invalid order.
[0065] If the quantity of ordered resources is less than or equal to the remaining resources of the target sub-resource pool, then judge whether the quantity of ordered resources is less than or equal to the remaining resources of the target total resource pool.
[0066] If the quantity of ordered resources is less than or equal to the remaining resources of the target total resource pool, then the resources of the target total resource pool and the target sub-resource pool are deducted and updated according to the quantity of ordered resources respectively.
[0067] If the quantity of ordered resources is greater than the remaining resources of the target total resource pool, the order corresponding to the order information is marked as an invalid order.
[0068] Among them, the remaining resources of the target sub-resource pool is the total resources of the target sub-resource pool minus the used resources of the target sub-resource pool.
[0069] The method for obtaining the remaining resources of the target total resource pool includes: summing up the used resources of all sub-resource pools in the target total resource pool to obtain the total used resources; according to the total resources of the target total resource pool and the total used resources, obtaining the remaining resources of the target total resource pool.
[0070] It can be understood that the normal operation of the terminal also requires computing resources. A part of the resources in each total resource pool is fixedly occupied, and the amount of resources occupied can be called the fixed usage resource amount. Therefore, the total resource amount of the target total resource pool is the sum of the total used resource amount, the remaining resource amount of the target total resource pool, and the fixed usage resource amount. Thus, based on the total resource amount and the total used resource amount of the target total resource pool, the remaining resource amount of the target total resource pool is obtained, including: obtaining the remaining resource amount of the target total resource pool based on the total resource amount, the total used resource amount, and the fixed usage resource amount of the target total resource pool.
[0071] Deduct and update the resource amount of the target total resource pool and the resource amount of the target sub-resource pool according to the ordered resource amount respectively, including: adding the ordered resource amount to the total used resource amount of the target total resource pool and the total used resource amount of the target sub-resource pool respectively to obtain the updated total used resource amount of the target total resource pool and the updated total used resource amount of the target sub-resource pool; and / or subtracting the ordered resource amount from the remaining resource amount of the target total resource pool and the remaining resource amount of the target sub-resource pool respectively to obtain the updated remaining resource amount of the target total resource pool and the updated remaining resource amount of the target sub-resource pool.
[0072] In an example, the total resource amount of the memory total resource pool is 80M, and the fixed usage resource amount of the memory total resource pool is 10M; the total resource amount of the first sub-resource pool of the memory total resource pool is 30M, and the total resource amount of the second sub-resource pool of the memory total resource pool is 50M. The total used resource amount of the first sub-resource pool is 5M, and the total used resource amount of the second sub-resource pool is 10M; the total used resource amount of the memory total resource pool is 15M.
[0073] Order information A is received. The user type in the order information A is the team type, the ordered resource type is the memory total resource pool, and the ordered resource amount is 40M. At this time, the target total resource pool is the memory total resource pool, and the target sub-resource pool is the second sub-resource pool; the remaining resource amount of the second sub-resource pool is 40M, and the remaining resource amount of the memory total resource pool is 55. Therefore, the ordered resource amount in the order information A meets the preset conditions, and the total used resource amount of the memory total resource pool is updated to 55, and the total used resource amount of the second sub-resource pool is updated to 50M.
[0074] When the order corresponding to order information A has not been settled, that is, when the above resources are still in use, order information B is received. In order information B, the user type is individual, the ordered resource type is the total memory resource pool, and the ordered resource quantity is 20M. At this time, the target total resource pool is the total memory resource pool, and the target sub-resource pool is the first sub-resource pool; the remaining resource quantity of the first sub-resource pool is 25M, and the remaining resource quantity of the total memory resource pool is 15M. Therefore, since the ordered resource quantity in order information B is greater than the remaining resource quantity of the total memory resource pool and does not meet the preset conditions, the order corresponding to order information B is marked as an invalid order.
[0075] In one embodiment, the method further includes: outputting a withholding result, where the withholding result includes withholding success information or withholding failure information. The withholding success information is the information output when the ordered resource quantity meets the preset conditions, and the withholding failure information is the information output when the ordered resource quantity does not meet the preset conditions.
[0076] It can be understood that the above total resource pool, first sub-resource pool, and second sub-resource pool are all virtual resource pools, which are a definition for resource abstraction independent of the business and are mainly used to quantify the quantity of resources. Therefore, the above deduction and update of the target total resource pool and target sub-resource pool are actually withholding, which does not really allocate the resources in the resource pool to the user but is an abstraction. Outputting the withholding result aims to inform the user whether the resource order is successful or failed. A successful order means that corresponding resources will be allocated to the user for use subsequently, and a failed order means that no corresponding resources will be allocated to the user subsequently.
[0077] In one embodiment, the method further includes: when receiving order settlement information, releasing and updating the resource quantity of the target total resource pool and the resource quantity of the target sub-resource pool according to the ordered resource quantity. After the release and update are completed, the order corresponding to the order information is marked as ended.
[0078] Among them, the order settlement information is sent when the user no longer needs the ordered resources.
[0079] In a possible implementation manner, the terminal displays an order settlement interface, which includes an order settlement option. After detecting a trigger operation on the order settlement option, the order settlement information is obtained.
[0080] In another possible implementation manner, the terminal directly receives the order settlement information sent by other terminals.
[0081] Optionally, the resource amounts of the target total resource pool and the target sub - resource pool are respectively released and updated according to the ordered resource amount, including: subtracting the ordered resource amount from the total used resource amount of the target total resource pool and the used resource amount of the target sub - resource pool respectively to obtain the updated total used resource amount of the target total resource pool and the updated used resource amount of the target sub - resource pool; and / or, adding the ordered resource amount to the remaining resource amount of the target total resource pool and the remaining resource amount of the target sub - resource pool respectively to obtain the updated remaining resource amount of the target total resource pool and the updated remaining resource amount of the target sub - resource pool.
[0082] In one embodiment, as Figure 4 shown, a signaling interaction process schematic diagram of a computing resource management method is provided. This method is applied to a first terminal and a second terminal. The first terminal is the front - end and is deployed with a user center, and the second terminal is the back - end and is deployed with a resource center. The front - end is responsible for creating an interface for direct user interaction, and the back - end is responsible for updating the resource amounts of the virtual resource pool.
[0083] In the virtual resource pool creation stage, the resource center creates a virtual resource pool based on the virtual resource pool creation request sent by the user center. During the creation of the virtual resource pool, multiple different types of total resource pools are created, and each total resource pool is divided into multiple sub - resource pools of different sizes, with each sub - resource pool corresponding to a different user type. The stored data set includes the fixed used resource amount of each total resource pool, the total resource amount of each total resource pool, the used resource amount of each total resource pool, the total resource amount of each sub - resource pool, and the used resource amount of each sub - resource pool.
[0084] In the resource management stage, the resource center receives the order information sent by the user center. The resource center performs deduction and update based on the order information, that is, determines the target total resource pool from multiple total resource pools according to the ordered resource type in the order information, determines the target sub - resource pool from multiple sub - resource pools of the target total resource pool according to the user type in the order information. When the ordered resource amount in the order information meets the preset conditions, the resource amounts of the target total resource pool and the target sub - resource pool are respectively deducted and updated according to the ordered resource amount. It can be understood that when there are multiple ordered resource types in the order information and the ordered resource amounts corresponding to the multiple ordered resource types all meet the preset conditions, the deduction and update are performed sequentially, and a pre - deduction success pre - deduction result is sent to the user center; if at least one of the ordered resource amounts corresponding to the multiple ordered resource types does not meet the preset conditions, the order corresponding to the order information is marked as an invalid order, and a pre - deduction failure pre - deduction result is sent to the user center.
[0085] When the resource center receives the order settlement information sent by the user center, it releases and updates the resource amounts of the target total resource pool and the target sub - resource pool respectively according to the ordered resource amounts. It can be understood that when there are multiple ordered resource types in the order information, the release and update are performed sequentially, and the order corresponding to the order information is marked as completed.
[0086] It should be understood that although the steps in the flowcharts involved in the above - described embodiments are shown sequentially according to the arrows, these steps are not necessarily executed sequentially in the order indicated by the arrows. Unless there is a clear indication in this article, the execution of these steps has no strict order limit, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above - described embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily executed at the same moment, but can be executed at different moments. 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.
[0087] Based on the same inventive concept, an embodiment of the present application also provides a computing resource management device for implementing the above - mentioned computing resource management method. The solution provided by this device to solve the problem is similar to the solution described in the above method. Therefore, the specific limitations in one or more embodiments of the following computing resource management devices can refer to the limitations on the computing resource management method in the above text, and will not be repeated here.
[0088] In an exemplary embodiment, as Figure 5 shown, a computing resource management device is provided. The computing resource management device 500 includes: a receiving module 501, a first determination module 502, a second determination module 503, and an update module 504, where:
[0089] The receiving module 501 is used to obtain order information, where the order information includes the ordered resource type, user type, and ordered resource amount;
[0090] The first determination module 502 is used to determine a target total resource pool from multiple total resource pools according to the ordered resource type, where the multiple total resource pools correspond to different computing resource types respectively;
[0091] The second determination module 503 is used to determine a target sub - resource pool from multiple sub - resource pools of the target total resource pool according to the user type, where the multiple sub - resource pools correspond to different user types respectively;
[0092] An update module 504, configured to, when the ordered resource quantity meets a preset condition, deduct and update the resource quantity of the target total resource pool and the resource quantity of the target sub-resource pool respectively according to the ordered resource quantity.
[0093] In one embodiment, the user type includes an individual type or a team type, and the target total resource pool includes a first sub-resource pool and a second sub-resource pool; the second determination module 503 is specifically configured to use the first sub-resource pool as the target sub-resource pool when the user type is the individual type; and use the second sub-resource pool as the target sub-resource pool when the user type is the team type.
[0094] In one embodiment, the update module 504 is specifically configured to determine whether the ordered resource quantity is less than or equal to the remaining resource quantity of the target sub-resource pool; if the ordered resource quantity is less than or equal to the remaining resource quantity of the target sub-resource pool, then determine whether the ordered resource quantity is less than or equal to the remaining resource quantity of the target total resource pool; if the ordered resource quantity is less than or equal to the remaining resource quantity of the target total resource pool, then deduct and update the resource quantity of the target total resource pool and the resource quantity of the target sub-resource pool respectively according to the ordered resource quantity.
[0095] In one embodiment, the device further includes a marking module, configured to mark the order corresponding to the order information as an invalid order if the ordered resource quantity is greater than the remaining resource quantity of the target sub-resource pool, and / or the ordered resource quantity is greater than the remaining resource quantity of the target total resource pool.
[0096] In one embodiment, the device further includes a third determination module, configured to sum up the used resource quantities of all sub-resource pools in the target total resource pool to obtain the total used resource quantity; and obtain the remaining resource quantity of the target total resource pool according to the total resource quantity of the target total resource pool and the total used resource quantity.
[0097] In one embodiment, the update module 504 is further configured to, when receiving order settlement information, release and update the resource quantity of the target total resource pool and the resource quantity of the target sub-resource pool respectively according to the ordered resource quantity.
[0098] Each module in the above computing resource management device can be implemented in whole or in part by software, hardware, and their combination. The above modules can be embedded in the processor in the computer device in the form of hardware or be independent of it, or can be stored in the memory in the computer device in the form of software, so as to facilitate the processor to call and execute the operations corresponding to the above respective modules.
[0099] In an exemplary embodiment, a computer device is provided. The computer device can be a terminal, and its internal structure diagram can be as Figure 6As shown in the figure. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit, and an input device. Among them, the processor, the memory, and the input / output interface are connected through a system bus, and the communication interface, the display unit, and the input device are connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and external devices. The communication interface of the computer device is used to communicate with external terminals in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, near field communication (NFC), or other technologies. When the computer program is executed by the processor, it implements a computing resource management method. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device can be a touch layer covering the display screen, or a button, a trackball, or a touchpad provided on the computer device housing, or an external keyboard, touchpad, or mouse, etc.
[0100] Those skilled in the art can understand that Figure 6 the structure shown in the figure is only a block diagram of some structures related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine some components, or have different component arrangements.
[0101] In an exemplary embodiment, a computer device is provided, including a memory and a processor. A computer program is stored in the memory. When the processor executes the computer program, the following steps are implemented:
[0102] Obtain order information, where the order information includes the ordered resource type, user type, and ordered resource quantity; determine a target total resource pool from multiple total resource pools according to the ordered resource type, where the multiple total resource pools respectively correspond to different computing resource types; determine a target sub-resource pool from multiple sub-resource pools of the target total resource pool according to the user type, where the multiple sub-resource pools respectively correspond to different user types; when the ordered resource quantity meets a preset condition, deduct and update the resource quantity of the target total resource pool and the resource quantity of the target sub-resource pool according to the ordered resource quantity.
[0103] In one embodiment, the user type includes an individual type or a team type, and the target total resource pool includes a first sub-resource pool and a second sub-resource pool; when the processor executes the computer program, the following steps are further implemented: when the user type is the individual type, the first sub-resource pool is used as the target sub-resource pool; when the user type is the team type, the second sub-resource pool is used as the target sub-resource pool.
[0104] In one embodiment, when the processor executes the computer program, the following steps are further implemented: determining whether the ordered resource quantity is less than or equal to the remaining resource quantity of the target sub-resource pool; if the ordered resource quantity is less than or equal to the remaining resource quantity of the target sub-resource pool, determining whether the ordered resource quantity is less than or equal to the remaining resource quantity of the target total resource pool; if the ordered resource quantity is less than or equal to the remaining resource quantity of the target total resource pool, deducting and updating the resource quantity of the target total resource pool and the resource quantity of the target sub-resource pool respectively according to the ordered resource quantity.
[0105] In one embodiment, when the processor executes the computer program, the following steps are further implemented: if the ordered resource quantity is greater than the remaining resource quantity of the target sub-resource pool, and / or, the ordered resource quantity is greater than the remaining resource quantity of the target total resource pool, marking the order corresponding to the order information as an invalid order.
[0106] In one embodiment, when the processor executes the computer program, the following steps are further implemented: summing up the used resource quantities of all sub-resource pools in the target total resource pool to obtain the total used resource quantity; obtaining the remaining resource quantity of the target total resource pool according to the total resource quantity of the target total resource pool and the total used resource quantity.
[0107] In one embodiment, when the processor executes the computer program, the following steps are further implemented: when receiving the order settlement information, releasing and updating the resource quantity of the target total resource pool and the resource quantity of the target sub-resource pool respectively according to the ordered resource quantity.
[0108] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the method described in any one of the above method embodiments are implemented.
[0109] In one embodiment, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps of the method described in any one of the above method embodiments are implemented.
[0110] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, database, or other medium used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The databases involved in the embodiments provided in this application can include at least one of relational databases and non-relational databases. Non-relational databases can include distributed databases based on blockchain, etc., without limitation. The processors involved in the embodiments provided in this application can be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, data processing logics based on quantum computing, artificial intelligence (AI) processors, etc., without limitation.
[0111] The technical features of the above embodiments can be combined arbitrarily. For the sake of concise description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope recorded in this application.
[0112] The above-described embodiments merely represent several implementation manners of the present application. The description thereof is relatively specific and detailed, but it should not be construed as a limitation on the patent scope of the present application. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all fall within the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the appended claims.
Claims
1. A computing resource management method, characterized in that: The method comprises: Obtaining order information, wherein the order information includes the type of ordered resources, the type of user, and the amount of ordered resources; Determining a target total resource pool from a plurality of total resource pools according to the ordered resource type, wherein the plurality of total resource pools correspond to different computing resource types respectively; Determining a target sub-resource pool from a plurality of sub-resource pools of the target total resource pool according to the user type, wherein the plurality of sub-resource pools correspond to different user types respectively; When the ordered resource amount meets a preset condition, the resource amount of the target total resource pool and the resource amount of the target sub-resource pool are deducted and updated respectively according to the ordered resource amount.
2. The method according to claim 1, characterized in that The user type includes an individual type or a team type, and the target total resource pool includes a first sub-resource pool and a second sub-resource pool; and determining a target sub-resource pool from a plurality of sub-resource pools of the target total resource pool according to the user type includes: When the user type is an individual type, taking the first sub-resource pool as the target sub-resource pool; When the user type is a team type, the second sub-resource pool is used as the target sub-resource pool.
3. The method according to claim 1, characterized in that When the ordered resource amount meets a preset condition, the resource amount of the target total resource pool and the resource amount of the target sub-resource pool are respectively deducted and updated according to the ordered resource amount, including: Determining whether the ordered resource amount is less than or equal to the remaining resource amount of the target sub-resource pool; If the ordered resource amount is less than or equal to the remaining resource amount of the target sub-resource pool, determining whether the ordered resource amount is less than or equal to the remaining resource amount of the target total resource pool; If the ordered resource amount is less than or equal to the remaining resource amount of the target total resource pool, the resource amount of the target total resource pool and the resource amount of the target sub-resource pool are deducted and updated respectively according to the ordered resource amount.
4. The method according to claim 3, characterized in that The method further comprises: If the ordered resource quantity is greater than the remaining resource quantity of the target sub-resource pool, and / or the ordered resource quantity is greater than the remaining resource quantity of the target total resource pool, the order corresponding to the order information is marked as an invalid order.
5. The method according to claim 3, characterized in that: The method further comprises: Sum the used resource amounts of all sub-resource pools in the target total resource pool to obtain the total used resource amount; The remaining amount of resources in the target total resource pool is obtained according to the total amount of resources in the target total resource pool and the total amount of resources already used.
6. The method according to claim 1, characterized in that The method further comprises: When the order settlement information is received, the resource quantity of the target total resource pool and the resource quantity of the target sub-resource pool are released and updated respectively according to the ordered resource quantity.
7. A computing resource management device, characterized in that: The device comprises: A receiving module, used to obtain order information, wherein the order information includes the type of ordered resources, the type of user, and the amount of ordered resources; A first determination module is used to determine a target total resource pool from a plurality of total resource pools according to the ordered resource type, wherein the plurality of total resource pools correspond to different computing resource types respectively; A second determination module is used to determine a target sub-resource pool from a plurality of sub-resource pools of the target total resource pool according to the user type, wherein the plurality of sub-resource pools correspond to different user types respectively; The updating module is used to deduct and update the resource amount of the target total resource pool and the resource amount of the target sub-resource pool according to the ordered resource amount when the ordered resource amount meets a preset condition.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
User level resource control method and device applied to database and terminal device
CN113656171A
User environment delivery method and device for SaaS (Software as Service) and medium
CN114546597A
Method and device for executing computing task on cloud system and storage medium
CN118921372A
Resource assignment system
US20180041449A1