Tree structure-based resource management method, device, equipment, medium and product
By constructing a tree-structured resource management method, and utilizing the hierarchical allocation and cross-node dispatching of public and internal reserved resource pools, the problem of insufficient flexibility in traditional resource management systems is solved, and efficient, flexible allocation and optimized configuration of resources are achieved.
Patent Information
- Application Number
- CN202411395477.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-08
- Publication Date
- 2025-12-26
- Estimated Expiration
- 2044-10-08
AI Technical Summary
Traditional quota resource management systems cannot achieve flexible control, resulting in inflexible resource management, delayed information feedback, and resource waste, failing to meet the resource allocation needs in a rapidly changing market environment.
A tree-based resource management method is adopted to construct a resource tree. The tree nodes include a public resource pool and an internal reserved resource pool. Through hierarchical allocation and cross-node allocation, flexible allocation and optimized configuration of resources are achieved.
It improves the flexibility and efficiency of resource allocation, ensures that key users or tasks receive stable resource support, reduces resource idleness and waste, and enhances the system's response speed and adaptability.
Smart Images

Figure CN119444425B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computer software, and particularly relates to a resource management method and device based on a tree structure, equipment, medium and product. BACKGROUND
[0002] In the current financial industry, financial product quota resource management is a complex and crucial task that needs to balance efficiency and fairness. Traditional quota resource management systems often use a fixed allocation and regular update mode, which leads to problems such as incomplete information and decision lag when marketing personnel handle quota resource allocation, and customers experience poor experience due to failed quota resource allocation when they rush to purchase quota resources. It can be seen that the traditional quota resource management system cannot achieve flexible control of quota resources, and in a rapidly changing market environment, it may lead to inflexible quota resource management, delayed information feedback, and resource waste. SUMMARY
[0003] The main purpose of the present application is to provide a resource management method and device based on a tree structure, equipment, medium and product, aiming to solve the technical problem of low flexibility of resource management.
[0004] To achieve the above purpose, the present application provides a resource management method based on a tree structure, comprising:
[0005] According to the structure information input from the outside, a resource tree is constructed, wherein the resource tree is a tree structure, the tree nodes of the resource tree are composed of a public resource pool and an internal reserved resource pool, the public resource pool is a shared resource pool of all tree nodes, and the internal reserved resource pool is an exclusive resource pool of at least one designated user, the tree nodes include root nodes and branch nodes;
[0006] When receiving an external input resource allocation instruction, the resource allocation instruction is allocated from the root public resource pool and the root internal reserved resource pool of the root node downward according to the resource allocation instruction, wherein the resource allocation instruction includes the root public resource pool allocated to the lower level public resource pool according to the hierarchy, the root internal reserved resource pool allocated to the lower level internal reserved resource pool according to the hierarchy, the public resource pool of the branch node allocated to the upper level public resource pool according to the hierarchy, the internal reserved resource pool of the branch node allocated to the upper level internal reserved resource pool according to the hierarchy, and the public resource pool and the internal reserved resource pool between the tree nodes are allocated to each other;
[0007] When receiving the external input resource occupation application, the application user, the application resource and the applied occupation tree node of the resource occupation application are acquired, it is judged whether the user reserved resource in the occupation tree node meets the application resource, if the user reserved resource does not meet the application resource, it is checked whether the upper public resource meets the application resource, wherein the user reserved resource is the resource reserved for the application user in the internal reserved resource pool, and the upper public resource is the resource in the public resource pool of the upper node of the occupation tree node.
[0008] In an embodiment, after the step of allocating downward from the root public resource pool and the root internal reserved resource pool of the root node according to the resource allocation instruction, further comprising:
[0009] Determining the internal reserved resource pool allocation strategy of all tree nodes, and reserving the internal reserved resource of the tree node to the application user specified by the internal reserved resource pool allocation strategy.
[0010] In an embodiment, the step of judging whether the user reserved resource in the occupation tree node meets the application resource, if the user reserved resource does not meet the application resource, checking whether the upper public resource meets the application resource, comprises:
[0011] Judging whether the remaining reserved resource in the occupation tree node is less than the application resource, wherein the internal reserved resource of the occupation tree node includes the remaining reserved resource and the internal reserved resource occupied by the application user;
[0012] If the remaining reserved resource in the occupation tree node is less than the application resource, it is determined that the user reserved resource in the occupation tree node does not meet the application resource, and according to the order of the resource tree, it is checked whether there is a target node with remaining public resource greater than the application resource in the occupation tree node and the upper node of the occupation tree node, wherein the public resource of the target node includes the remaining public resource and the occupied public resource;
[0013] If there is a target node with remaining public resource greater than the application resource, it is determined that the upper public resource meets the application resource, and the remaining public resource in the target node is occupied.
[0014] In an embodiment, after the step of checking whether there is a target node with remaining public resource greater than the application resource in the occupation tree node and the upper node of the occupation tree node according to the order of the resource tree, further comprising:
[0015] If there is no target node with remaining public resource greater than the application resource, it is determined that the upper public resource does not meet the application resource, and the public resource and the internal reserved resource not occupied by other tree nodes are allocated to the internal reserved resource pool of the occupation tree node according to the preset allocation strategy.
[0016] In an embodiment, the tree structure based resource management method further comprises:
[0017] When receiving the revocation application of the resource occupation application, a mode of occupation of the resource occupation application is determined, the mode of occupation including an internal reserved resource pool occupation mode and a public resource pool occupation mode;
[0018] If the internal reserved resource pool occupation mode exists in the mode of occupation, then the internal reserved resources occupied by the resource occupation application are updated according to the occupied resources in the resource occupation application in the internal reserved resource pool occupation mode;
[0019] If the public resource pool occupation mode exists in the mode of occupation, then the public resources occupied by the resource occupation application are updated according to the occupied resources in the resource occupation application in the public resource pool occupation mode.
[0020] In an embodiment, the resource management method based on a tree structure further includes:
[0021] When the target resources of the tree node need to be occupied, the occupation record of the tree node is locked, the target resources in the tree node are occupied, and the occupation record of the tree node is updated after the occupation is successful, wherein the target resources include the public resources and the internal reserved resources of the tree node.
[0022] In addition, to achieve the above object, the application further provides a resource management device based on a tree structure, which includes:
[0023] The construction module constructs the resource tree according to the structure information input from outside, wherein the resource tree is a tree structure, the tree nodes of the resource tree are composed of public resource pools and internal reserved resource pools, the public resource pool is a shared resource pool of all tree nodes, the internal reserved resource pool is an exclusive resource pool of at least one designated user, and the tree nodes include root nodes and branch nodes;
[0024] The allocation module allocates from the root public resource pool and the root internal reserved resource pool of the root node downward according to the resource allocation instruction input from outside when receiving the resource allocation instruction, wherein the resource allocation instruction includes allocation of the root public resource pool to the public resource pools of the next level according to the hierarchy, allocation of the root internal reserved resource pool to the internal reserved resource pools of the next level according to the hierarchy, allocation of the public resource pool of the branch node to the public resource pool of the previous level according to the hierarchy, allocation of the internal reserved resource pool of the branch node to the internal reserved resource pool of the previous level according to the hierarchy, and mutual allocation of the public resource pool and the internal reserved resource pool between the tree nodes;
[0025] The occupation module, when receiving an external input resource occupation application, acquires an application user, an application resource and an applied occupation tree node of the resource occupation application, judges whether the user reserved resource in the occupation tree node meets the application resource, if the user reserved resource does not meet the application resource, checks whether the upper-level open resource meets the application resource, wherein the user reserved resource is a resource reserved for the application user in the internal reserved resource pool, and the upper-level open resource is a resource in the open resource pool of the upper-level node of the occupation tree node.
[0026] In addition, to achieve the above-mentioned purpose, the application further provides a resource management device based on a tree structure, which comprises a memory, a processor and a computer program stored in the memory and executable on the processor, and the computer program is configured to implement the steps of the resource management method based on the tree structure as described above.
[0027] In addition, to achieve the above-mentioned purpose, the application further provides a medium, which is a computer readable storage medium, and the medium stores a computer program, and the computer program is executed by the processor to implement the steps of the resource management method based on the tree structure as described above.
[0028] In addition, to achieve the above-mentioned purpose, the application further provides a product, which is a computer program product, and the computer program product comprises a computer program, and the computer program is executed by the processor to implement the steps of the resource management method based on the tree structure as described above.
[0029] The one or more technical solutions provided by the application have at least the following technical effects:
[0030] The application constructs a resource tree, wherein the resource tree is a tree structure, the tree nodes of the resource tree are composed of a public resource pool and an internal reserved resource pool, the public resource pool is a shared resource pool of all tree nodes, the flexibility of resource allocation is enhanced, and resource allocation is allowed to be flexibly adjusted among different levels and nodes according to actual needs; the internal reserved resource pool is an exclusive resource pool of at least one designated user, the specificity and security of resource use are increased, and stable resource support is ensured for critical users or tasks. The tree nodes include a root node and branch nodes; when receiving an externally input resource allocation instruction, the resource is allocated downward from the root public resource pool and the root internal reserved resource pool of the root node according to the resource allocation instruction, the step-by-step refined allocation of the resource from the top layer to the base layer is realized, and meanwhile, cross-level and cross-node resource allocation is supported, the resource utilization efficiency and response speed are improved. Among them, the resource allocation instruction includes the allocation of the root public resource pool to the public resource pool of the next level according to the level, the allocation of the root internal reserved resource pool to the internal reserved resource pool of the next level according to the level, and the support for resource coordination among nodes of the same level to meet more complex resource demand scenarios. The public resource pool of the branch node is allocated to the public resource pool of the upper level according to the level, the internal reserved resource pool of the branch node is allocated to the internal reserved resource pool of the upper level according to the level, the reverse backflow and reallocation of the resource are realized, and the flexibility and adaptability of the system are enhanced. In addition, the mutual allocation of the public resource pool and the internal reserved resource pool between the tree nodes is also realized, the optimal configuration of the resource in the global range is promoted, and the resource idling and waste are reduced. When receiving an externally input resource occupation application, the application user, the application resource and the occupied tree node applied for are obtained, it is judged whether the internal reserved resource of the internal reserved resource pool in the occupied tree node reserved for the application user meets the application resource, the accuracy and efficiency of the resource application processing are improved. If the user reserved resource of the internal reserved resource pool in the occupied tree node does not meet the application resource, the resource is requested from the public resource pool of the upper node of the occupied tree node, the timely response and satisfaction of the resource demand are ensured, and meanwhile, the stability and reliability of the system are maintained. BRIEF DESCRIPTION OF DRAWINGS
[0031] The accompanying drawings, which are incorporated into and form a part of the specification, illustrate an embodiment consistent with the present application and, together with the description, serve to explain the principles of the application.
[0032] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the accompanying drawings needed to be used in the embodiments or prior art description will be briefly introduced. Obviously, for those skilled in the art, other drawings can also be obtained based on these drawings without any creative effort.
[0033] Figure 1 Flowchart of the embodiment one of the resource management method based on tree structure of the present application;
[0034] Figure 2 A scene diagram for a resource tree of the resource management method based on a tree structure of the present application;
[0035] Figure 3 A scene diagram for the present application based on a tree structure of the resource management method;
[0036] Figure 4 A module structure diagram for the present application based on a tree structure of the resource management device;
[0037] Figure 5 A device structure diagram for the present application based on a tree structure of the resource management method.
[0038] The purpose of the present application, the function characteristics and the advantages will be further explained in combination with the embodiments and with reference to the drawings. DETAILED DESCRIPTION
[0039] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application, and are not used to limit the present application.
[0040] In order to better understand the technical solutions of the present application, the specific embodiments will be described in detail below with reference to the drawings and the specific embodiments.
[0041] The embodiment provides a resource management method based on a tree structure. The method can construct a resource tree according to externally input structure information, and the tree integrates a public resource pool and an internal reserved resource pool. By clearly defining an internal reserved resource allocation strategy of each tree node, the method ensures that critical resources can be accurately reserved for users meeting specific strategy conditions, thereby guaranteeing the resource priority of important customers and promoting the optimized allocation of resources. Users can monitor the resource use state in real time, and realize the dynamic allocation of the resource pool according to respective strategies, thereby maximizing the resource utilization rate and realizing the flexible segmentation and efficient use of resources. In addition, the method follows the principle of minimum range occupation, preferentially uses internal reserved resources, and then allocates resources according to the hierarchical order of users in the resource tree, which greatly improves the liquidity and use efficiency of resources. During resource occupation, the system only locks necessary resources, thereby significantly reducing invalid occupation. By accurately evaluating and verifying whether the remaining reserved resources of the tree node meet the user application demand, the problem of excessive configuration or idle waste of resources is effectively prevented. Once the internal reserved resources are insufficient, the system can intelligently search and allocate the remaining public resources in the upper node that meets the conditions in the resource tree structure, to maximize the satisfaction of user application, which not only improves the resource utilization rate, but also enhances the response speed and adaptive ability of the system, thereby bringing significant convenience and benefits to resource management and user service. Meanwhile, by locking the occupation record, the method effectively avoids data conflicts and inconsistency caused by concurrent operation, thereby ensuring the data integrity and consistency in the resource allocation process. For the revocation of the resource occupation application, the system can also be flexibly handled, to ensure that the resources can be efficiently recycled and redistributed, thereby further improving the flexibility and efficiency of resource management.
[0042] It should be noted that the execution subject of the embodiment can be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone and the like, or an electronic device, a terminal system and the like capable of realizing the above functions. The embodiment and the following embodiments are described below by taking a system as an example.
[0043] Based on this, the embodiment provides a resource management method based on a tree structure, which is described below with reference to Figure 1 , Figure 1 FIG. 1 is a flowchart of a resource management method based on a tree structure according to the embodiment.
[0044] In the embodiment, the resource management method based on a tree structure includes steps S10-S30:
[0045] S10, constructing a resource tree according to the externally input structure information, wherein the resource tree is a tree structure, the tree nodes of the resource tree are composed of a public resource pool and an internal reserved resource pool, the public resource pool is a shared resource pool of all tree nodes, the internal reserved resource pool is an exclusive resource pool of at least one designated user, and the tree nodes include a root node and branch nodes;
[0046] It should be noted that the resource tree is a tree structure, which is used for managing and allocating resources. In this structure, each node represents a resource allocation unit, and the nodes are connected through hierarchical relationships to form a tree structure, and the parent-child relationship reflects the hierarchy and affiliation of the organization. The public resource pool is a resource collection shared by each node in the resource tree. These resources can be used by the node and all its superior and inferior nodes. The internal reserved resource pool is an exclusive resource collection of a specific node in the resource tree. These resources are usually reserved for designated users or customers, and other users cannot directly access them. The tree node is the basic unit of the resource tree, and each node contains a certain amount of resources (public resource pool and internal reserved resource pool). The nodes are connected to each other through hierarchical relationships to form the entire resource tree. The tree nodes include a root node and branch nodes. The root node is the starting point of the resource tree and is the top node of the entire resource tree. The root node usually represents the top layer of the entire organization or system and is responsible for the allocation and management of total resources. The branch nodes are other nodes in the resource tree except the root node, which are derived from the root node or other branch nodes and represent more subdivided resource allocation units.
[0047] It should be noted that the tree nodes of the resource tree can be enterprise servers, and multiple servers are connected through hierarchical relationships to form a tree structure, and the parent-child relationship reflects the hierarchy and affiliation of the servers. The public resource pool can be a public database on the server, and the public business data in the public database can be used by the server and all its superior and inferior servers. The internal reserved resource pool can be a private database on the server, and the private business data in the private database can usually only be accessed by designated users or customers, and other users cannot directly access them. The public business data and the private business data are both text data. The root node can be a total server, and the branch nodes can be sub-servers subordinate to the total server. When the business data needs to be stored on the servers in the resource tree according to the storage strategy, the business data can be allocated from the total server to the sub-servers layer by layer according to the storage strategy and stored in the public database or the private database in the sub-servers. By constructing a server resource tree, the flexibility and security of business data access can be enhanced, the number of interactions between devices can be reduced, and the efficiency of interactions between devices can be improved.
[0048] In this step, according to the externally input structure information, a tree-shaped resource tree is constructed by defining the hierarchical and associated relationship between nodes (the specific construction process includes determining the root node, and then adding child nodes according to the input structure description, each node clearly identifies its position in the tree and the connection relationship with other nodes). Each tree node of the resource tree contains two resource pools: a public resource pool and an internal reserved resource pool. The public resource pool is open and can be shared by all nodes in the tree according to certain rules; while the internal reserved resource pool is independently set for each node and is only used by the node and its eligible child nodes. Such design not only guarantees the flexibility and sharing of resources, but also takes into account the resource priority and protection of specific users.
[0049] In step S20, when receiving the externally input resource allocation instruction, the resource allocation instruction is used to allocate resources from the root public resource pool and the root internal reserved resource pool of the root node downwards, wherein the resource allocation instruction includes allocating the root public resource pool to the public resource pool of the next level according to the hierarchy, allocating the root internal reserved resource pool to the internal reserved resource pool of the next level according to the hierarchy, allocating the public resource pool of the branch node to the public resource pool of the upper level according to the hierarchy, allocating the internal reserved resource pool of the branch node to the internal reserved resource pool of the upper level according to the hierarchy, and allocating the public resource pool and the internal reserved resource pool between the nodes in the tree to each other;
[0050] It should be noted that the resource allocation instruction is a command for guiding how resources are allocated in the resource tree. The resource allocation instruction can include allocating resources from the root node to the branch node, allocating resources by the branch node to the upper and lower levels, or transferring resources between different nodes.
[0051] When receiving the externally input resource allocation instruction, the system allocates resources from the total resource pool of the root node (including the root public resource pool and the root internal reserved resource pool) according to the resource allocation instruction. When the total resource is only allocated in the root public resource pool or the root internal reserved resource pool, the total resource needs to be allocated in the root public resource pool and the root internal reserved resource pool according to the resource allocation instruction, so as to facilitate the subsequent allocation. Then, the total public resource is allocated from the root public resource pool of the root node to the lower-level public resource pool according to the hierarchical relationship. Similarly, the root internal reserved resource is also allocated from the root internal reserved resource pool of the root node to the lower-level internal reserved resource pool according to the hierarchical relationship, so as to ensure that a specific user or task can obtain the reserved resource. The allocation of the public resource pool and the internal reserved resource pool of the branch node mentioned in the resource allocation instruction to the upper-level node is relatively special, and is usually used for resource recycling or reallocation. For example, when a certain branch node completes its task and releases the resource, the resource may flow back to the corresponding resource pool of the upper-level node according to the hierarchical relationship. In addition to the allocation between layers, the instruction may also contain the mutual allocation of resources between different nodes in the same layer. This case is usually based on certain strategies or needs, such as load balancing, resource sharing, etc. After determining the source, allocation direction and quantity of the resource, the system will perform the allocation operation. This may include updating the state of the resource pool, modifying the connection relationship between nodes, and notifying the relevant user or task that the resource has been allocated. Further, the entire allocation process can be recorded in detail for subsequent monitoring. The system can also monitor the use of resources to ensure that the resources are reasonably utilized, and dynamically adjust if necessary.
[0052] In step S30, when receiving the externally input resource occupation application, the application user, the application resource and the applied occupation tree node of the resource occupation application are obtained, and it is judged whether the user reserved resource in the occupation tree node meets the application resource. If the user reserved resource does not meet the application resource, it is checked whether the upper-level public resource meets the application resource, wherein the user reserved resource is the resource reserved for the application user in the internal reserved resource pool, and the upper-level public resource is the resource in the public resource pool of the upper-level node of the occupation tree node.
[0053] It should be noted that the resource occupation application is a request initiated by a user or a system, which is used to request to occupy the resource in a specific resource tree node. The resource occupation application contains application user, application resource amount, applied occupation tree node, and specific time of application, expected start time and end time, priority information and other application information.
[0054] When receiving the resource occupation application from the external input, the system will first determine the application user, the amount of application resources, the applied occupation tree node and any related additional information (such as time range, priority, etc.) accurately by analyzing the application content. Then, the system will check the applied occupation tree node in detail to see if the internal reserved resource pool reserves enough internal reserved resources for the application user. If the internal reserved resources are not enough to meet the application requirements, the system will further intelligently traverse the resource tree structure to explore the available resources of the upper node public resource pool of the upper node, follow the principle of minimum range occupation, and strive to reasonably and efficiently complete the resource allocation on the premise of minimizing the resource occupation range. In this process, the system will give priority to the use of internal reserved resources, and then the public resource occupation based on the position sequence of the user in the resource tree. Once enough resources are found to meet the application, the system will immediately perform resource locking operation and occupation registration to ensure that the resources are used exclusively for the user within the specified time period. If the resources cannot meet the application, the system will automatically reject the application and feedback the rejection reason and suggested measures to the user through appropriate channels.
[0055] Exemplarily, assuming that the present embodiment is applied in a bank institution, each tree node represents a bank institution, and referring to Figure 2 , Figure 2is a resource tree allocation scenario diagram, which clearly shows the flow and allocation process of resources among different levels of institutions. The diagram is divided into three main levels: primary institutions, secondary institutions and leaf institutions, which are head office, branch and network institutions in this embodiment. The primary institution, as the top-level institution, is responsible for the overall resource scheduling and management. Its public resource pool and internal reserved resource pool have a large number of public resources and internal reserved resources. Public resources are resources that can be applied by all subordinate institutions, while internal reserved resources are resources specifically used for internal allocation or special circumstances. The primary institution transfers resources to subordinate institutions through resource allocation. The secondary institutions in the diagram are the hub connecting the primary institutions and the leaf institutions. They receive resources from the primary institutions and further allocate them to their own sub-institutions or subordinate leaf institutions. Each secondary institution (such as institution 2-1 and institution 2-2) also has a public resource pool and an internal reserved resource pool to meet its own needs and allocate resources downward. Depending on the level of the institution tree between the primary institution and the leaf institution, there may be multiple levels of institutions. Here, to avoid repetition, only secondary institutions are used as an example. The leaf institutions are at the bottom of the organizational structure, and they can only receive resources from the superior institutions, but cannot allocate or allocate any resources. Each leaf institution (such as institution n-1 and institution n-n) also has a public resource pool and an internal reserved resource pool to receive resources from the superior institutions. The arrows in the diagram are bidirectional, indicating that resources can flow in both directions, i.e. downward allocation and upward recycling. In addition, each institution can have multiple branches, i.e. a primary institution can allocate resources to multiple secondary institutions, and a secondary institution can allocate resources to multiple leaf institutions.
[0056] The embodiment constructs a resource tree, wherein the resource tree is a tree structure, and the tree nodes of the resource tree are composed of public resource pools and internal reserved resource pools. The public resource pools are shared resource pools of all tree nodes, which enhances the flexibility of resource allocation and allows flexible allocation of resources among different levels and nodes according to actual needs. The internal reserved resource pools are exclusive resource pools of at least one designated user, which increases the specificity and security of resource use and ensures that critical users or tasks obtain stable resource support. The tree nodes include root nodes and branch nodes. When receiving an externally input resource allocation instruction, the resource allocation instruction is allocated from the root public resource pool and the root internal reserved resource pool of the root node downward, which realizes the step-by-step refined allocation of resources from the top layer to the base layer, supports cross-level and cross-node resource allocation, and improves resource utilization efficiency and response speed. The resource allocation instruction includes allocation of the root public resource pool to the public resource pool of the next level according to the level, allocation of the root internal reserved resource pool to the internal reserved resource pool of the next level according to the level, and support for resource coordination among nodes of the same level to meet more complex resource demand scenarios. The public resource pool of the branch node is allocated to the public resource pool of the upper level according to the level, and the internal reserved resource pool of the branch node is allocated to the internal reserved resource pool of the upper level according to the level, which realizes the reverse flow and reallocation of resources and enhances the flexibility and adaptability of the system. In addition, the public resource pool and the internal reserved resource pool between the tree nodes are allocated to each other, which promotes the optimal allocation of resources in the global range, reduces resource idling and waste. When receiving an externally input resource occupation application, the application user, the application resource and the occupied tree node of the application are obtained, and it is judged whether the internal reserved resource of the occupied tree node reserved for the application user meets the application resource, which improves the accuracy and efficiency of resource application processing. If the user reserved resource of the internal reserved resource pool of the occupied tree node does not meet the application resource, the resource of the public resource pool of the upper node of the occupied tree node is requested, which ensures the timely response and satisfaction of resource demand, and maintains the stability and reliability of the system.
[0057] In a possible implementation, the step in step S20 can include step T10:
[0058] Step T10, determining the internal reserved resource pool allocation strategy of all tree nodes, and reserving the internal reserved resource of the tree node for the application user specified by the internal reserved resource pool allocation strategy.
[0059] It should be noted that the internal reserved resource pool allocation strategy is a rule and method for allocating internal reserved resources to different customers or purposes. The strategy can be set based on customer importance, historical performance, business needs and other factors.
[0060] After the resource tree is constructed, an internal reserved resource pool allocation strategy needs to be determined for each tree node. This allocation strategy specifies which customers can obtain internal reserved resources and the specific ways and conditions of resource allocation. The formulation of this allocation strategy can be based on various factors such as the customer's historical purchase record, the priority of important customers, the needs of business development, etc. According to these factors, a flexible and specific resource allocation rule can be set for each institution. The internal reserved resources that are not reserved for designated applicants are theoretically unoccupiable. Only after the internal reserved resources of the corresponding node are reserved for the designated applicant according to the determined internal reserved resource pool allocation strategy, can they be occupied by the designated applicant. The reservation process is dynamic, meaning that the reservation of resources will be adjusted in real time according to actual conditions (such as customer demand, sales strategy, etc.). Further, when implementing the reservation, the system can check whether the designated applicant meets the conditions for resource reservation (such as whether it is a high-value customer, whether it has participated in a specific promotional activity, etc.). If the conditions are met, the corresponding resources will be reserved in the applicant's account for subsequent use. Further, the system will record the use of internal reserved resources in real time, so that management personnel can keep track of resource allocation and occupation at any time, providing data support for subsequent quota resource management and marketing strategies.
[0061] Exemplarily, referring to Figure 3 , Figure 3 is a schematic diagram of an internal reserved resource pool. As can be seen from the diagram, the internal reserved resource pool has been reserved for three customers, namely Customer 1, Customer 2, and Customer 3. Taking Customer 1 as an example, when Customer 1 applies to occupy the tree node to which the internal reserved resource pool belongs, the Customer 1 reserved resources in the internal reserved resource pool will be allocated to Customer 1 first. If the Customer 1 reserved resources are less than the resources applied by Customer 1, resources will be applied from the public resource pool in the tree node to which the internal reserved resource pool belongs.
[0062] This embodiment significantly improves the refinement and flexibility of resource management. By specifying the internal reserved resource pool allocation strategy for each tree node, it ensures that critical resources can be accurately reserved for designated users who meet the strategy conditions, ensuring the resource priority of important customers and promoting the effective allocation of resources. The dynamic adjustment mechanism of this strategy makes resource allocation more flexible and enables a rapid response to market demand changes.
[0063] Based on Embodiment One of the present application, in Embodiment Two of the present application, the same or similar content as in the above-mentioned Embodiment One can be referred to in the foregoing description, and will not be described again hereinafter. On this basis, the step of step S30 further includes steps A10-A30:
[0064] Step A10, judging whether the remaining reserved resource in the occupied tree node is less than the application resource, wherein the internal reserved resource of the occupied tree node includes the remaining reserved resource and the internal reserved resource occupied by the application user;
[0065] It should be noted that the occupied tree node refers to the tree node applied by the resource occupation application. For a certain occupied tree node, the remaining reserved resource refers to the part of the internal resource reserved for a specific application user in the node, which is subtracted from the internal resource actually occupied by the user. The application resource is the amount of resource requested by the user in the application process.
[0066] Firstly, the amount of remaining resource reserved for the application user in the occupied tree node is calculated, which is obtained by subtracting the internal reserved resource actually occupied by the user in the node from the total internal reserved resource preset for the user or dynamically adjusted according to the strategy, so as to accurately obtain the amount of resource remaining for the user to continue to apply. This calculation process ensures that the system can real-time master the resource occupation condition and the remaining available resource of each user in each tree node. Then, the remaining reserved resource is compared with the application resource amount of the user, that is, the calculated amount of remaining reserved resource is directly compared with the amount of resource that the user hopes to occupy this time. If the amount of remaining reserved resource is greater than or equal to the application resource amount of the user, it indicates that the internal reserved resource in the node can meet the current application demand of the user; if the amount of remaining reserved resource is less than the application resource amount of the user, it indicates that the internal reserved resource in the node is insufficient to support the application, and the system will need to further explore the public resource pool of the upper node or take other measures to meet the user application.
[0067] Step A20, if the remaining reserved resource in the occupied tree node is less than the application resource, it is determined that the user reserved resource in the occupied tree node does not meet the application resource, and whether there is a target node with remaining public resource greater than the application resource is checked in the occupied tree node and the upper node of the occupied tree node in the order of the resource tree, wherein the public resource of the target node includes the remaining public resource and the occupied public resource.
[0068] It should be noted that the upper node is a node at a higher level relative to the current node in the resource tree structure, which is the parent node or ancestor node of the current node. For a certain tree node, the remaining public resource refers to the part of the total public resource of the node, which is subtracted from the resource allocated to other users or purposes.
[0069] If the remaining reserved resource is less than the application resource, the system traverses the occupied tree node and its upper nodes in the order of the level of the resource tree, and for each tree node, the system calculates the remaining public resource, that is, the total public resource minus the allocated resource. In the traversal process, the system checks whether there is a target node with remaining public resource greater than the remaining application resource.
[0070] In one possible implementation, the steps in step A20 can include step A201:
[0071] Step A201, if there is no target node with remaining public resources greater than the application resources, it is determined that the upper public resources do not meet the application resources, and other tree nodes unoccupied public resources and internal reserved resources are allocated to the internal reserved resource pool of the occupied tree node according to the preset allocation strategy.
[0072] It should be noted that the preset allocation strategy is a set of rules or algorithms pre-set in the system or application, which is used to guide the allocation of resources among different nodes or users. The preset allocation strategy can be based on multiple factors, such as priority, historical usage, business demand, etc. In the resource tree, in addition to the internal reserved resources, each node may have some public resources that are not occupied by any user or purpose, and this part of the unoccupied public resources can be flexibly used according to the preset allocation strategy.
[0073] If there is no target node with remaining public resources greater than the application resources throughout the traversal process, the system will check the resource usage of other nodes in the entire resource tree, especially focusing on the unoccupied public resources. These resources may be distributed in different nodes, but are currently not occupied by any user or purpose. Based on the preset allocation strategy, the system will decide how to reallocate these unoccupied public resources and possibly internal reserved resources (if the strategy allows) according to certain rules or algorithms. This strategy may consider multiple factors, such as node priority, resource urgency, user historical performance, etc. According to the results of the preset allocation strategy, the system will reallocate some or all of the unoccupied public resources and possibly some internal reserved resources to the internal reserved resource pool of the occupied tree node. The purpose of this is to meet the user's application resource demand and ensure that the user can obtain sufficient resources to complete their business or operation. After the resource reallocation is completed, the system will update the resource state information of the relevant nodes, including the internal reserved resource pool of the occupied tree node, the unoccupied public resources of other nodes, etc., to ensure the data consistency and accuracy of the entire resource tree system.
[0074] In this embodiment, if the system does not find a node that meets the conditions after traversal, it will intelligently start the preset allocation strategy to flexibly allocate the unoccupied resources of other nodes to the internal reserved pool of the occupied tree node. This strategy considers priority, historical situation and business demand to ensure the rationality and efficiency of resource allocation. Through dynamic reallocation of resources, not only the user's remaining resource demand is met, but also the overall optimization and balance of the resource tree system are promoted, and the flexibility and user satisfaction of the system are improved.
[0075] Step A30, if there is a remaining public resource greater than the target node of the application resource, it is determined that the upper public resource meets the application resource, and the remaining public resource in the target node is occupied.
[0076] When the upper node meeting the condition is found (i.e. its remaining public resource is greater than the application resource), the system will occupy the remaining public resource equal to the application resource in the node to meet the user's application resource demand. In the occupation process, the system will ensure that it does not exceed the remaining resource limit of any node to ensure the stability and sustainability of the entire resource tree system.
[0077] The embodiment significantly enhances the flexibility and efficiency of resource allocation. First, by accurately calculating and judging whether the remaining reserved resources of the tree node meet the user's application, resource over-allocation or idling is effectively avoided. When the remaining reserved resources are insufficient, the system intelligently finds and occupies the remaining public resources of the upper node that meets the condition in the resource tree structure, thereby ensuring that the user's application is maximally satisfied. This process not only improves resource utilization, but also enhances the response speed and adaptive ability of the system, bringing great convenience and benefit to resource management and user service.
[0078] Based on the first or second embodiment of the application, in the third embodiment of the application, the same or similar contents as the above first or second embodiment can be referred to the above introduction, and will not be described in detail. The resource management method based on tree structure further includes steps B10-B30:
[0079] In a feasible implementation manner, the resource management method based on tree structure further includes step C10:
[0080] Step C10, when the target resource of the tree node needs to be occupied, the occupation record of the tree node is locked, the target resource in the tree node is occupied, and the occupation record of the tree node is updated after the occupation is successful, wherein the target resource includes the public resource and the internal reserved resource of the tree node.
[0081] It should be noted that the occupation record is a set of information for recording the current occupation state of the tree node resource. It may contain detailed information such as which resource has been occupied, who has occupied it, and the occupation time. Locking is a mechanism in concurrent control, which is used to prevent multiple users or processes from modifying the same data item at the same time, so as to avoid data inconsistency. In this embodiment, locking the occupation record is to ensure that there is no other operation interference when updating the record. Resource occupation refers to the process of user or system requesting and successfully obtaining available resources in the tree node. After successfully occupying the resources, these resources will no longer be available to other requests until they are released.
[0082] Before attempting to occupy resources in a tree node, the system first locks the occupancy record of the node. This is to prevent data races or inconsistencies when updating the record. The locking operation ensures that no other process or thread can modify the occupancy record of the node until the current operation is completed. After the occupancy record is locked, the system checks whether there are enough available resources in the tree node to meet the request. If the resources are sufficient, the resources are marked as occupied and allocated to the requester. This involves updating the internal state of the tree node to reflect the latest allocation of resources. If the resources are insufficient, the occupancy request may fail, or the system may take other measures such as waiting for resource release or requesting more resources. After the resources are successfully occupied, the system updates the occupancy record of the tree node to reflect this change. The update operation may include recording the current state of the resources (such as occupied), the occupant information, the occupancy time, etc. After the update is completed, the occupancy record is unlocked so that other processes or threads can access and modify it.
[0083] In this embodiment, the security and accuracy of resource occupation are significantly improved. By locking the occupancy record, the problem of data conflict and inconsistency under concurrent operation is effectively avoided, ensuring the data integrity and consistency in the process of resource allocation. At the same time, the occupancy record is updated in real time, not only providing accurate feedback on resource occupation for users, but also providing reliable basis for subsequent resource management and scheduling of the system. This mechanism not only improves the efficiency and success rate of resource occupation, but also enhances the concurrent processing capability and user experience of the system.
[0084] Step B10, when receiving the revocation application of the resource occupation application, determine the occupation mode of the resource occupation application, the occupation mode includes internal reserved resource pool occupation mode and public resource pool occupation mode;
[0085] It should be noted that the revocation application of the resource occupation application is a request issued by the user or the system, aiming to cancel the previously submitted resource occupation application and release the occupied resources for re-allocation. The occupation mode is the allocation mechanism or way used when occupying resources, which determines how resources are occupied by a specific application. The occupation mode mentioned in this embodiment includes internal reserved resource pool occupation mode and public resource pool occupation mode. The internal reserved resource pool occupation mode is a way of resource occupation, in which resources are reserved for specific users and stored in the internal reserved resource pool. This mode is usually used to ensure that critical users or businesses can obtain priority resource support. The public resource pool occupation mode is another way of resource occupation, in which resources are allocated to users from a public resource pool that is open to all users, and the allocation is based on first-come-first-served or other preset rules.
[0086] When the system receives a revocation application for a certain resource occupation application, the system needs to identify the occupation mode used by the resource occupation application. This is done by checking the information recorded when the resource occupation application is recorded, which can come from the occupation record in step C10, indicating how the resource is occupied (i.e. through internal reservation resource pool or public resource pool).
[0087] Step B20, if there is an internal reservation resource pool occupation mode in the occupation mode, update the internal reservation resources occupied by the resource occupation application according to the occupied resources in the internal reservation resource pool occupation mode in the resource occupation application;
[0088] If the resource occupation application contains an internal reservation resource pool occupation mode, the system will further check how much resource the application occupies in the internal reservation resource pool. Then, the system will subtract the amount of resources occupied by the application from the occupied resources in the internal reservation resource pool. This means that the resources originally reserved for the application are released and returned to the available state for other user or application.
[0089] Step B30, if there is a public resource pool occupation mode in the occupation mode, update the public resources occupied by the resource occupation application according to the occupied resources in the public resource pool occupation mode in the resource occupation application.
[0090] If the resource occupation application involves a public resource pool occupation mode, the system will take similar operations. The system will check how much resource the application occupies in the public resource pool, and subtract this amount of resources from the occupied public resources. This also achieves the release of resources, so that these resources can re-enter the public resource pool for subsequent application.
[0091] Through this embodiment, the system can flexibly handle the revocation of resource occupation applications, ensuring efficient recycling and reallocation of resources. When a revocation application occurs, the system first identifies the occupation mode of the resource, distinguishing between different processing methods of internal reservation and public resource pool. For internal reservation resources, the system accurately releases the reserved resources of a specific user, maintaining the fairness and effectiveness of the resource reservation mechanism. For public resources, the system returns the resources to the resource pool in a timely manner, ensuring the liquidity and accessibility of resources. This mechanism not only improves the flexibility and response speed of resource management, but also effectively promotes the optimal allocation and efficient use of resources.
[0092] It should be noted that the above examples are only for understanding the present application and do not constitute a limitation on the tree structure-based resource management method of the present application. Further simple transformations based on this technical concept are within the scope of protection of the present application.
[0093] The present application also provides a tree structure-based resource management device, please refer to Figure 4The tree structure-based resource management device comprises:
[0094] The configuration module 10 configures a resource tree according to externally input structure information, wherein the resource tree is a tree structure, the tree nodes of the resource tree are composed of public resource pools and internal reserved resource pools, the public resource pools are shared resource pools of all the tree nodes, the internal reserved resource pools are exclusive resource pools of at least one designated user, and the tree nodes include a root node and branch nodes;
[0095] The allocation module 20 allocates resources downward from the root public resource pool and the root internal reserved resource pool of the root node according to a resource allocation instruction when the resource allocation instruction is received, wherein the resource allocation instruction comprises allocation of the root public resource pool to a lower-level public resource pool according to a hierarchy, allocation of the root internal reserved resource pool to a lower-level internal reserved resource pool according to the hierarchy, allocation of the public resource pool of the branch node to an upper-level public resource pool according to the hierarchy, allocation of the internal reserved resource pool of the branch node to an upper-level internal reserved resource pool according to the hierarchy, and mutual allocation of the public resource pools and the internal reserved resource pools between the tree nodes;
[0096] The occupation module 30 acquires an application user, an application resource and an applied occupation tree node of a resource occupation application when the resource occupation application is received, judges whether the user reserved resource in the occupation tree node meets the application resource, checks whether the upper-level public resource meets the application resource if the user reserved resource does not meet the application resource, wherein the user reserved resource is a resource reserved for the application user in the internal reserved resource pool, and the upper-level public resource is a resource in the public resource pool of the upper-level node of the occupation tree node.
[0097] The tree structure-based resource management device provided by the application adopts the tree structure-based resource management method in the above embodiment, and can solve the technical problem of low flexibility of resource management. Compared with the prior art, the tree structure-based resource management device provided by the application has the same beneficial effects as the tree structure-based resource management method provided by the above embodiment, and other technical features in the tree structure-based resource management device are the same as the features disclosed in the above embodiment, and thus will not be described here.
[0098] The application provides a tree structure-based resource management device, which comprises at least one processor and a memory in communication connection with the at least one processor, wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the tree structure-based resource management method in the above embodiment one.
[0099] The following refers to Figure 5This document illustrates a structural diagram of a tree-based resource management device suitable for implementing embodiments of this application. The tree-based resource management device in these embodiments may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Description), PMPs (Portable Media Players), and in-vehicle terminals (e.g., in-vehicle navigation terminals), as well as fixed terminals such as digital TVs and desktop computers. Figure 5 The tree-based resource management device shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.
[0100] like Figure 5 As shown, the tree-based resource management device may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 1002 or a program loaded from storage device 1003 into random access memory (RAM) 1004. The RAM 1004 also stores various programs and data required for the operation of the tree-based resource management device. The processing unit 1001, ROM 1002, and RAM 1004 are interconnected via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to I / O interface 1006: input devices 1007 including, for example, touchscreens, touchpads, keyboards, mice, image sensors, microphones, accelerometers, gyroscopes, etc.; output devices 1008 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 1003 including, for example, magnetic tapes, hard disks, etc.; and communication devices 1009. Communication device 1009 allows the tree-based resource management device to communicate wirelessly or wiredly with other devices to exchange data. Although a tree-based resource management device with various systems is shown in the figure, it should be understood that it is not required to implement or possess all the systems shown. More or fewer systems can be implemented alternatively.
[0101] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product comprising a computer program carried on a computer readable medium, the computer program containing program codes for executing the method shown in the flowchart. In such embodiments, the computer program can be downloaded and installed from a network through a communication device, or installed from the storage device 1003, or installed from the ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiments disclosed in the present application are executed.
[0102] The tree structure-based resource management device provided in the present application adopts the tree structure-based resource management method in the above-mentioned embodiments, and can solve the technical problem of low flexibility of resource management. Compared with the prior art, the tree structure-based resource management device provided in the present application has the same beneficial effects as the tree structure-based resource management method provided in the above-mentioned embodiments, and other technical features in the tree structure-based resource management device are the same as the features disclosed in the above-mentioned embodiments, which will not be repeated here.
[0103] It should be understood that parts of the present application can be realized by hardware, software, firmware or a combination thereof. In the description of the above-mentioned embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0104] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto, and any person skilled in the art can easily think of changes or replacements within the technical scope disclosed in the present application, which should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
[0105] The present application provides a medium, which is a computer readable storage medium, having computer readable program instructions (i.e. computer programs) stored thereon, the computer readable program instructions being used to execute the tree structure-based resource management method in the above-mentioned embodiments.
[0106] The computer readable storage medium provided in the present application may, for example, be a U disk, but is not limited to an electric, magnetic, optical, electromagnetic, infrared, or semiconductor system or device, or any combination of the above. More specific examples of the computer readable storage medium may include, but are not limited to, an electric connection with one or more conductive wires, a portable computer disk, a hard disk, a random access memory (RAM), a read only memory (ROM), an erasable programmable read only memory (EPROM or flash memory), an optical fiber, a portable compact disk read only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present embodiment, the computer readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system or device. The program code contained on the computer readable storage medium can be transmitted by any suitable medium, including but not limited to an electric wire, an optical cable, an RF (Radio Frequency), and the like, or any suitable combination of the above.
[0107] The computer readable storage medium described above may be contained in the tree structure-based resource management device, or may exist separately without being assembled into the tree structure-based resource management device.
[0108] The computer readable storage medium described above carries one or more programs, which, when executed by the tree structure-based resource management device, cause the tree structure-based resource management device to:
[0109] construct a resource tree according to externally input structure information, wherein the resource tree is a tree structure, the tree nodes of the resource tree are composed of public resource pools and internally reserved resource pools, the public resource pools are shared resource pools of all tree nodes, the internally reserved resource pools are exclusive resource pools of at least one designated user, the tree nodes include a root node and branch nodes;
[0110] when a resource allocation instruction is received, allocate from the root public resource pool and the root internally reserved resource pool of the root node according to the resource allocation instruction, wherein the resource allocation instruction includes allocation of the root public resource pool to a lower-level public resource pool according to a hierarchy, allocation of the root internally reserved resource pool to a lower-level internally reserved resource pool according to the hierarchy, allocation of the public resource pool of a branch node to an upper-level public resource pool according to the hierarchy, allocation of the internally reserved resource pool of the branch node to an upper-level internally reserved resource pool according to the hierarchy, and mutual allocation of the public resource pools and the internally reserved resource pools between the tree nodes;
[0111] When receiving the resource occupation application of the external input, the application user, the application resource and the applied occupation tree node of the resource occupation application are acquired, whether the user reserved resource in the occupation tree node meets the application resource is judged, if the user reserved resource does not meet the application resource, whether the upper public resource meets the application resource is checked, wherein the user reserved resource is the resource reserved for the application user in the internal reserved resource pool, and the upper public resource is the resource in the public resource pool of the upper node of the occupation tree node.
[0112] Computer program code for carrying out operations of the present application can be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider).
[0113] The flow diagrams and the block diagrams in the drawings are illustrations of architectures, functionalities, and operations of possible implementations of systems, methods, and computer program products according to various embodiments of present application. In this regard, each block in the flow diagrams or block diagrams can represent a module, a procedure, or a part of code, which comprises one or more executable instructions for implementing the specified logical functions. It should also be noted that in some alternative implementations, the functions noted in the blocks can occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently or the blocks may
[0114] The modules involved in the embodiments of the present application can be implemented in the manner of software or in the manner of hardware. Among them, the name of the module does not constitute a limitation to the unit itself in some cases.
[0115] The readable storage medium provided by the application is a computer readable storage medium, and the computer readable storage medium stores computer readable program instructions (i.e. computer programs) for executing the above-mentioned tree structure-based resource management method, and can solve the technical problem of low resource management flexibility. Compared with the prior art, the beneficial effects of the computer readable storage medium provided by the application are the same as those of the tree structure-based resource management method provided by the above-mentioned embodiments, and will not be repeated here.
[0116] The application also provides a product, which is a computer program product, comprising a computer program, and the computer program is executed by a processor to implement the steps of the tree structure-based resource management method as described above.
[0117] The computer program product provided by the application can solve the technical problem of low resource management flexibility. Compared with the prior art, the beneficial effects of the computer program product provided by the application are the same as those of the tree structure-based resource management method provided by the above-mentioned embodiments, and will not be repeated here.
[0118] The above is only some embodiments of the application, and does not limit the patent scope of the application, and any equivalent structural transformation made by using the content of the application specification and drawings, or direct / indirect application in other related technical fields is included in the patent protection scope of the application.
Claims
1. A method for resource management based on tree structure, characterized in that, The tree structure-based resource management method comprises: constructing a resource tree according to externally input structure information, wherein the resource tree is a tree structure, tree nodes of the resource tree are composed of public resource pools and internal reserved resource pools, the public resource pools are shared resource pools of all the tree nodes, the internal reserved resource pools are exclusive resource pools of at least one designated user, and the tree nodes include a root node and branch nodes; when receiving externally input resource allocation instructions, allocating from a root public resource pool and a root internal reserved resource pool of the root node according to the resource allocation instructions, wherein the resource allocation instructions comprise allocation of the root public resource pool to lower-level public resource pools according to a hierarchy, allocation of the root internal reserved resource pool to lower-level internal reserved resource pools according to the hierarchy, allocation of a public resource pool of the branch nodes to upper-level public resource pools according to the hierarchy, allocation of an internal reserved resource pool of the branch nodes to upper-level internal reserved resource pools according to the hierarchy, and mutual allocation of the public resource pools and the internal reserved resource pools between the tree nodes; when receiving externally input resource occupation applications, obtaining an application user, an application resource and an occupied tree node of the resource occupation applications, judging whether a user reserved resource in the occupied tree node meets the application resource, if the user reserved resource does not meet the application resource, checking whether an upper-level public resource meets the application resource, wherein the user reserved resource is a resource reserved for the application user in the internal reserved resource pool, and the upper-level public resource is a resource in a public resource pool of an upper-level node of the occupied tree node.
2. The tree structure based resource management method of claim 1, wherein, The tree structure-based resource management method further comprises, after the step of allocating from the root public resource pool and the root internal reserved resource pool of the root node according to the resource allocation instructions: determining internal reserved resource pool allocation strategies of all the tree nodes, and reserving the internal reserved resources of the tree nodes for the designated users of the internal reserved resource pool allocation strategies.
3. The tree structure based resource management method of claim 1, wherein, The step of judging whether the user reserved resource in the occupied tree node meets the application resource, if the user reserved resource does not meet the application resource, checking whether an upper-level public resource meets the application resource, comprises: judging whether a remaining reserved resource in the occupied tree node is less than the application resource, wherein the internal reserved resource of the occupied tree node comprises the remaining reserved resource and an internal reserved resource already occupied by the application user; if the remaining reserved resource in the occupied tree node is less than the application resource, determining that the user reserved resource in the occupied tree node does not meet the application resource, and checking, in the occupied tree node and an upper-level node of the occupied tree node according to an order of the resource tree, whether there is a target node having a remaining public resource greater than the application resource, wherein the public resource of the target node comprises the remaining public resource and an occupied public resource; if there is the target node having the remaining public resource greater than the application resource, determining that the upper-level public resource meets the application resource, and occupying the remaining public resource in the target node.
4. The tree structure based resource management method of claim 3, wherein, The step of checking whether there is a target node with remaining public resources greater than application resources in the occupation tree node and the upper node of the occupation tree node in the order of the resource tree comprises the following steps: If there is no target node with remaining public resources greater than application resources, it is determined that the upper public resources do not meet the application resources, and other tree nodes unoccupied public resources and internal reserved resources are allocated to the internal reserved resource pool of the occupation tree node according to a preset allocation strategy.
5. The tree structure based resource management method of claim 1, wherein, The resource management method based on the tree structure further comprises: When receiving the revocation application of the resource occupation application, the occupation mode of the resource occupation application is determined, and the occupation mode comprises an internal reserved resource pool occupation mode and a public resource pool occupation mode; If the internal reserved resource pool occupation mode exists in the occupation mode, the internal reserved resources occupied by the resource occupation application are updated according to the occupation resources in the internal reserved resource pool occupation mode in the resource occupation application; If the public resource pool occupation mode exists in the occupation mode, the public resources occupied by the resource occupation application are updated according to the occupation resources in the public resource pool occupation mode in the resource occupation application.
6. The tree structure based resource management method of claim 1, wherein, The resource management method based on the tree structure further comprises: When the target resource of the tree node needs to be occupied, the occupation record of the tree node is locked, the target resource in the tree node is occupied, and the occupation record of the tree node is updated after the occupation is successful, wherein the target resource comprises public resources and internal reserved resources of the tree node.
7. A resource management apparatus based on a tree structure, characterized by comprising: The resource management device based on the tree structure comprises: A construction module constructs a resource tree according to external input structure information, wherein the resource tree is a tree structure, the tree nodes of the resource tree are composed of public resource pools and internal reserved resource pools, the public resource pool is a shared resource pool of all the tree nodes, the internal reserved resource pool is an exclusive resource pool of at least one designated user, and the tree nodes comprise root nodes and branch nodes; When receiving an external input resource allocation instruction, the allocation module allocates from the root public resource pool and the root internal reserved resource pool of the root node downward according to the resource allocation instruction, wherein the resource allocation instruction comprises allocation of the root public resource pool to the public resource pool of the next level according to the hierarchy, allocation of the root internal reserved resource pool to the internal reserved resource pool of the next level according to the hierarchy, allocation of the public resource pool of the branch node to the public resource pool of the upper level according to the hierarchy, allocation of the internal reserved resource pool of the branch node to the internal reserved resource pool of the upper level according to the hierarchy, and mutual allocation of the public resource pool and the internal reserved resource pool between the tree nodes. The occupying module, when receiving an external input resource occupation application, acquires an application user, an application resource and an applied occupation tree node of the resource occupation application, judges whether a user reserved resource in the occupation tree node meets the application resource, if the user reserved resource does not meet the application resource, checks whether a superior public resource meets the application resource, wherein the user reserved resource is a resource reserved for the application user in an internal reserved resource pool, and the superior public resource is a resource in a public resource pool of a superior node of the occupation tree node.
8. A resource management device based on a tree structure, characterized by comprising: The tree structure-based resource management device comprises a memory, a processor and a computer program stored on the memory and executable on the processor, and the computer program is configured to implement the steps of the tree structure-based resource management method in any one of claims 1 to 6.
9. A medium characterized by, The medium is a computer readable storage medium, and the computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement the steps of the tree structure-based resource management method in any one of claims 1 to 6.
10. A product characterized by, The product is a computer program product, and the computer program product comprises a computer program, and the computer program is executed by a processor to implement the steps of the tree structure-based resource management method in any one of claims 1 to 6.
Citation Information
Patent Citations
Resource scheduling method and device
CN113448726A
Resource statistical method and device based on resource tree permission, medium and electronic equipment
CN114691671A