Resource pool allocation method and device
By filtering and allocating devices with target CDPs that match the operating system, node type and system level, the problem of inaccurate resource pool allocation in the prior art is solved, and more efficient and flexible resource allocation is achieved.
Patent Information
- Application Number
- CN202411722180.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-28
- Publication Date
- 2025-03-21
AI Technical Summary
In the resource pool allocation in the prior art, the indicator threshold setting is inappropriate, resulting in a decrease in the accuracy of system resource allocation and the inability to adapt to dynamically changing load requirements.
By analyzing resource allocation requests, filter out the target CDP corresponding to the operating system, node type, and system level, and allocate resources according to the number of devices and priorities. If the number of target CDP devices does not meet the needs, gradually filter other CDPs until the conditions are met.
It improves the accuracy of resource pool allocation, can flexibly respond to resource pool changes, quickly adjust the allocation strategy, and ensure the accuracy of resource allocation.
Smart Images

Figure CN119668847A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a method and device for allocating a resource pool. Background Art
[0002] Database resource pool management technology is developing towards automation, intelligence and efficiency, and it is particularly important to reasonably allocate resources in the resource pool.
[0003] At present, multiple indicator data sets corresponding to multiple database resource pools are generally obtained based on demand parameters, and the target database resource pools whose comprehensive performance values meet the requirements are screened out according to the indicator threshold for allocation. However, if the indicator threshold is not set appropriately, it may lead to overly conservative or overly loose resource allocation in the system, which cannot adapt to dynamically changing load requirements, and ultimately reduce the accuracy of resource pool allocation.
[0004] Therefore, how to improve the accuracy of resource pool allocation has become an urgent problem to be solved in this field. Summary of the invention
[0005] The present application provides a method and device for allocating a resource pool, aiming to improve the accuracy of resource pool allocation.
[0006] In order to achieve the above objectives, this application provides the following technical solutions:
[0007] A method for allocating a resource pool, comprising:
[0008] When receiving a resource allocation request, analyzing the resource allocation request to obtain an operating system, a system level, at least one node type, and a number of devices corresponding to each node type;
[0009] Filtering a list of machine models corresponding to the operating system from a database resource pool; the list of machine models includes multiple machine models;
[0010] Filter out a CDP corresponding to the machine model list, the node type and the system level from all CDPs in the database resource pool, and mark it as a target CDP;
[0011] Determine whether the number of devices in the target CDP meets the number of devices corresponding to each of the node types;
[0012] If the number of devices in the target CDP meets the number of devices corresponding to each node type, setting the priority of each type;
[0013] The devices in the target CDP are allocated according to the priority of each of the models and the node type.
[0014] Optionally, the filtering out a CDP corresponding to the machine model list, the node type, and the system level from all CDPs in the database resource pool, and marking it as a target CDP includes:
[0015] Determine whether the system level is an important level system;
[0016] If the system level is the important level system, screening out the CDP containing the high-performance device from all the CDPs in the database resource pool;
[0017] Filtering out a CDP corresponding to the model list and the node type from the CDPs containing high-performance devices, and marking it as a target CDP;
[0018] If the system level is not the important level system, screening out CDPs containing common devices from all CDPs in the database resource pool;
[0019] From the CDPs containing common devices, a CDP corresponding to the model list and the node type is screened out and marked as a target CDP.
[0020] Optionally, the determining whether the number of devices in the target CDP satisfies the number of devices corresponding to each of the node types includes:
[0021] For each of the node types, selecting the number of devices corresponding to the node type from the target CDP and marking it as the target number of devices;
[0022] Determine whether the number of target devices is not less than the number of devices corresponding to the node type;
[0023] If the target device quantity is less than the device quantity corresponding to the node type, determining that the device quantity in the target CDP does not satisfy the device quantity corresponding to each of the node types;
[0024] If the target device quantity is not less than the device quantity corresponding to the node type, determining that the target device quantity satisfies the device quantity corresponding to the node type;
[0025] When the number of all target devices is not less than the number of devices corresponding to all node types, it is determined that the number of devices in the target CDP satisfies the number of devices corresponding to each of the node types.
[0026] Optionally, also include:
[0027] If the number of devices in the target CDP does not meet the number of devices corresponding to each of the node types, filter out other CDPs corresponding to the model list, the node type and the system level from all CDPs in the database resource pool except the target CDP;
[0028] The other CDP is used as the target CDP, and the step of determining whether the number of devices in the target CDP satisfies the number of devices corresponding to each of the node types is returned to execute until the number of devices in the target CDP satisfies the number of devices corresponding to each of the node types.
[0029] Optionally, allocating devices in the target CDP according to the priority of each model and the node type includes:
[0030] Obtain the node type corresponding to each of the models;
[0031] For each node type corresponding to the model, determine whether the node type corresponding to the model includes the node type;
[0032] If the node type corresponding to the machine model includes the node type, the devices in the target CDP are allocated according to the priority of the machine model.
[0033] Optionally, also include:
[0034] Obtaining the number of allocated devices and the total number of devices in the database resource pool;
[0035] Calculating the ratio between the number of allocated devices and the total number of devices to obtain a resource pool allocation rate;
[0036] When the resource pool allocation rate is greater than a preset threshold, alarm information is generated and fed back based on the resource pool allocation rate.
[0037] A resource pool allocation device, comprising:
[0038] An analyzing unit, configured to analyze the resource allocation request when receiving the resource allocation request, and obtain an operating system, a system level, at least one node type, and a number of devices corresponding to each node type;
[0039] A first screening unit, configured to screen out a list of machine models corresponding to the operating system from a database resource pool; the list of machine models includes multiple machine models;
[0040] A second screening unit, configured to screen out a CDP corresponding to the machine model list, the node type and the system level from all CDPs in the database resource pool, and mark the CDP as a target CDP;
[0041] A judging unit, configured to judge whether the number of devices in the target CDP satisfies the number of devices corresponding to each of the node types;
[0042] A setting unit, configured to set the priority of each model if the number of devices in the target CDP meets the number of devices corresponding to each node type;
[0043] An allocating unit is used to allocate devices in the target CDP according to the priority of each model and the node type.
[0044] Optionally, the second screening unit is specifically used for:
[0045] Determine whether the system level is an important level system;
[0046] If the system level is the important level system, screening out the CDP containing the high-performance device from all the CDPs in the database resource pool;
[0047] Filtering out a CDP corresponding to the model list and the node type from the CDPs containing high-performance devices, and marking it as a target CDP;
[0048] If the system level is not the important level system, screening out CDPs containing common devices from all CDPs in the database resource pool;
[0049] From the CDPs containing common devices, a CDP corresponding to the model list and the node type is screened out and marked as a target CDP.
[0050] Optionally, the judging unit is specifically configured to:
[0051] For each of the node types, selecting the number of devices corresponding to the node type from the target CDP and marking it as the target number of devices;
[0052] Determine whether the number of target devices is not less than the number of devices corresponding to the node type;
[0053] If the target device quantity is less than the device quantity corresponding to the node type, determining that the device quantity in the target CDP does not satisfy the device quantity corresponding to each of the node types;
[0054] If the target device quantity is not less than the device quantity corresponding to the node type, determining that the target device quantity satisfies the device quantity corresponding to the node type;
[0055] When the number of all target devices is not less than the number of devices corresponding to all node types, it is determined that the number of devices in the target CDP satisfies the number of devices corresponding to each of the node types.
[0056] Optionally, also include:
[0057] A third screening unit is used for screening out other CDPs corresponding to the model list, the node type and the system level from all CDPs except the target CDP in the database resource pool if the number of devices in the target CDP does not meet the number of devices corresponding to each of the node types;
[0058] The return unit is used to take the other CDP as the target CDP and return to the step of determining whether the number of devices in the target CDP meets the number of devices corresponding to each of the node types, until the number of devices in the target CDP meets the number of devices corresponding to each of the node types.
[0059] The technical solution provided by the present application, when receiving a resource allocation request, analyzes the resource allocation request to obtain the operating system, system level, at least one node type and the number of devices corresponding to each node type; filters out the model list corresponding to the operating system from the database resource pool; filters out the CDP corresponding to the model list, node type and system level from all CDPs in the database resource pool, and marks it as the target CDP; if the number of devices in the target CDP meets the number of devices corresponding to each node type, set the priority of each model; allocate the devices in the target CDP according to the priority and node type of each model. Splitting the resource allocation request into multiple conditions and matching the CDP according to these conditions can flexibly respond to changes in the resource pool. When the equipment changes, the allocation strategy can be quickly adjusted to ensure accurate allocation of resources, thereby improving the allocation accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0061] Figure 1 A flowchart of a resource pool allocation method provided in an embodiment of the present application;
[0062] Figure 2 A flowchart of a method for determining a target CDP provided in an embodiment of the present application;
[0063] Figure 3 A flowchart of a method for determining the number of devices provided in an embodiment of the present application;
[0064] Figure 4 A flow chart of a device allocation method provided in an embodiment of the present application;
[0065] Figure 5 A flowchart of a method for generating alarm information provided in an embodiment of the present application;
[0066] Figure 6 A schematic diagram of the architecture of a resource pool allocation device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0067] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0068] In this application, the terms "comprises", "comprising" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprising a ..." does not exclude the presence of other identical elements in the process, method, article or device comprising the element.
[0069] like Figure 1 FIG. 1 is a flowchart of a method for allocating a resource pool provided in an embodiment of the present application, comprising the following steps:
[0070] S101: When a resource allocation request is received, the resource allocation request is analyzed to obtain an operating system, a system level, at least one node type, and the number of devices corresponding to each node type.
[0071] When a resource allocation request is received, the resource allocation request is analyzed, that is, the resource allocation request is split into an operating system, a system level, at least one node type, and the number of devices corresponding to each node type.
[0072] For example, by analyzing the resource allocation request, it is found that the operating system is KylinV10 SP1, the system level is: important level system, at least one node type is: computing node, data node, management node, and the number of devices corresponding to each node type is: 2 computing nodes, 3 data nodes, and 3 management nodes.
[0073] S102: Filter out a list of machine models corresponding to the operating system from the database resource pool.
[0074] The model list includes multiple models, for example, an ARM model and an X86 model.
[0075] For example, the resource pool database contains the following data: Model A: Supports Linux, Windows Server 2016 and later versions. Model B: Supports Windows Server 2019 and later versions. Model C: Supports Unix, Windows Server 2012 and later versions. If you need to filter out models that support "Windows Server 2019", filter out the model list corresponding to the operating system from the database resource pool, including "Model A" and "Model B".
[0076] It should be noted that the database resource pool architecture is from large to small: availability zone, CDP, TOR, cabinet. In principle, the expansion of the database resource pool is built with CDP as the smallest unit, and the physical machine resources provided in the resource pool.
[0077] CDP is the basic management unit of the database resource pool. A resource pool consists of one or more CDPs. The operation status of CDP is set to the following four types (under construction, running, recycling, offline), as follows:
[0078] 1) Under Construction: The CDP equipment has been purchased and is in the initial construction stage. It cannot provide computing resource services yet.
[0079] 2) In operation: The CDP can provide relevant computing resource services and whether it can supplement the relevant information of the physical equipment life cycle, for example, it is more than one year away from expiration.
[0080] 3) Recycling: The physical equipment in this CDP is in the offline recycling process.
[0081] 4) Offline: The CDP can no longer provide computing resource services, and the related physical equipment has been offline.
[0082] It can be seen that the resource pool is managed vertically in the dimensions of availability zone, CDP, TOR, and cabinet to ensure that devices in different physical areas are independent of each other. At the same time, different databases are assigned different network addresses for application access through the virtual private cloud gateway to ensure database network isolation.
[0083] In addition, the high availability of the equipment is ensured through the allocation algorithm of different TORs. The same node type of the same system is required to be distributed in different TORs.
[0084] S103: Filter out a CDP corresponding to the machine model list, node type and system level from all CDPs in the database resource pool, and mark it as a target CDP.
[0085] It can be understood that the purpose of filtering out CDPs corresponding to the model list, node type and system level from all CDPs in the database resource pool is to find data protection devices (or other types of CDPs) that meet the hardware model, node role and system level requirements.
[0086] It should be noted that the CDP corresponding to the machine model list, node type and system level is screened out from all CDPs in the database resource pool, and the screened out CDP is the running CDP.
[0087] Optionally, in another embodiment of the present application, the specific implementation of step S103 is as follows: Figure 2 As shown, the following steps are included:
[0088] S201: Determine whether the system level is an important level system.
[0089] If the system level is an important level system, step S202 is executed; if the system level is not an important level system, step S204 is executed.
[0090] Specifically, assuming that the system level is an A-level system and the importance level system is an A-level system, it is determined whether the system level is an important level system. Obviously, the system level is an important level system, so step S202 is continued.
[0091] S202: Filter out CDPs containing high-performance devices from all CDPs in the database resource pool.
[0092] For example, there are three CDPs, namely the first CDP (including high-performance devices), the second CDP (excluding high-performance devices), and the third CDP (including high-performance devices). The CDPs including high-performance devices are selected from all CDPs in the database resource pool as the first CDP and the third CDP.
[0093] S203: Filter out a CDP corresponding to the model list and the node type from the CDPs containing high-performance devices, and mark it as a target CDP.
[0094] It is understandable that the CDP containing high-performance devices is matched again with the model list. For each high-performance CDP device, it is checked whether the hardware model it supports is consistent with the device in the model list, and whether the node type of the CDP device matches the target node type.
[0095] S204: Filter out CDPs containing common devices from all CDPs in the database resource pool.
[0096] For example, there are three CDPs, namely the first CDP (including high-performance devices), the second CDP (excluding high-performance devices but including ordinary devices), and the third CDP (excluding high-performance devices but including ordinary devices). The CDPs including high-performance devices are selected from all CDPs in the database resource pool as the second CDP and the third CDP.
[0097] S205: Filter out a CDP corresponding to the model list and the node type from the CDPs containing common devices, and mark it as a target CDP.
[0098] It should be noted that the specific implementation of step S203 of step S205 may refer to step S101 accordingly, and will not be repeated here.
[0099] S104: Determine whether the number of devices in the target CDP satisfies the number of devices corresponding to each node type.
[0100] If the number of devices in the target CDP meets the number of devices corresponding to each node type, step S105 is executed.
[0101] It can be understood that judging whether the number of devices in the target CDP satisfies the number of devices corresponding to each node type is to judge whether the number of devices in the target CDP is not less than the number required for each node type. If it is not less than, it means that the number of devices in the target CDP satisfies the number of devices corresponding to each node type. If it is less than, it means that the number of devices in the target CDP does not satisfy the number of devices corresponding to each node type.
[0102] Optionally, in another embodiment of the present application, the specific implementation of step S104 is as follows: Figure 3 As shown, the following steps are included:
[0103] S301: For each node type, select the number of devices corresponding to the node type from the target CDP and mark it as the target number of devices.
[0104] For example, there are three node types, namely computing nodes, data nodes, and management nodes. For the three nodes, the device quantities corresponding to the computing nodes, data nodes, and management nodes are respectively selected from the target CDP.
[0105] S302: Determine whether the number of target devices is not less than the number of devices corresponding to the node type.
[0106] If the target device quantity is less than the device quantity corresponding to the node type, step S303 is executed; if the target device quantity is not less than the device quantity corresponding to the node type, step S304 is executed.
[0107] Specifically, assuming that the number of target devices is 5 and the number of devices corresponding to the node type is 2, determine whether the number of target devices is not less than the number of devices corresponding to the node type. Obviously, the number of target devices is not less than the number of devices corresponding to the node type. Therefore, continue to execute step S304.
[0108] S303: Determine that the number of devices in the target CDP does not satisfy the number of devices corresponding to each node type.
[0109] S304: Determine whether the target device quantity satisfies the device quantity corresponding to the node type.
[0110] S305: When the number of all target devices is not less than the number of devices corresponding to all node types, determine that the number of devices in the target CDP satisfies the number of devices corresponding to each node type.
[0111] For example, the first target device number is the number of devices corresponding to the computing nodes (5 devices), and the second target device number is the number of devices corresponding to the management nodes (6 devices). The number of devices corresponding to the computing nodes is 3, and the number of devices corresponding to the management nodes is 2. It can be seen that the number of all target devices is not less than the number of devices corresponding to all node types. Therefore, it is determined that the number of devices in the target CDP meets the number of devices corresponding to each node type.
[0112] Optionally, after step S104, if the number of devices in the target CDP does not meet the number of devices corresponding to each node type, in order to ensure the normal allocation of subsequent resources, it is necessary to select other CDPs and allocate resources through other CDPs. Therefore, another embodiment of the present application provides a method for determining other CDPs, including:
[0113] If the number of devices in the target CDP does not meet the number of devices corresponding to each node type, other CDPs corresponding to the model list, node type and system level are filtered out from all CDPs except the target CDP in the database resource pool.
[0114] It is understandable that if the number of devices in the target CDP does not meet the number of devices corresponding to each node type and needs to be reallocated, other CDPs corresponding to the model list, node type and system level are filtered out from all CDPs in the database resource pool except the target CDP.
[0115] The other CDPs are used as target CDPs, and the process returns to step S104 until the number of devices in the target CDP meets the number of devices corresponding to each node type.
[0116] S105: Setting the priority of each model.
[0117] It is understandable that the priority of each model is set. Specifically, the node type corresponding to each model is first obtained, and the model with a small number of node types is set to a high priority, and the model with a large number of node types is set to a low priority.
[0118] For example, model 1 can be used as a computing node, management node, and data node, while model 2 can only be used as a computing node and a management node. Therefore, model 1 is relatively more versatile. In order to reasonably schedule resource pool resources, model 2 is used first and model 1 is used sparingly.
[0119] S106: Allocate devices in the target CDP according to the priority and node type of each model.
[0120] The target CDP includes multiple models, and each model includes multiple devices.
[0121] For example, model one can be used as a computing node, management node, and data node, while model two can only be used as a computing node and a management node. For computing nodes and management nodes, the priority of model two is 1, and the priority of model one is 2; for data nodes, the priority of model one is 1 (because only this model can be used).
[0122] Optionally, in another embodiment of the present application, the specific implementation of step S106 is as follows: Figure 4 As shown, the following steps are included:
[0123] S401: Obtain the node type corresponding to each model.
[0124] S402: For each node type corresponding to the machine model, determine whether the node type corresponding to the machine model includes the node type.
[0125] If the node type corresponding to the model includes the node type, step S403 is executed.
[0126] For example, model 1 can be used as a computing node, a management node, and a data node. The node type is a computing node. It is determined whether the node type corresponding to the model includes the node type. Obviously, the node type corresponding to the model includes the node type. Therefore, step S403 is continued.
[0127] S403: Allocate devices in the target CDP according to the priority of the models.
[0128] It can be understood that the devices in the target CDP are allocated according to the priority of the models, that is, the devices included in the models with high priority are allocated.
[0129] It should be noted that after the resource allocation is completed and the resource demander has finished using the resources, they can apply to return the resources to the domestic database resource pool. The resource pool will reinstall the operating system and reallocate the IP addresses of the recovered devices, and then re-allocate the resources in the form of unallocated resources.
[0130] In addition, the database resource pool can perform automated installation and implementation delivery of multiple databases. Taking a certain database as an example, after allocating resources according to application requirements, the following steps will be performed in sequence: obtaining version information, producing resource numbers, saving the IP addresses of each node, defining installation parameters, producing installation files, downloading media, producing configuration files, and installing and implementing. These steps are all automated implementation processes, which can improve efficiency and avoid manual operation risks through automated installation.
[0131] Optionally, after resource allocation, it is necessary to monitor the resource allocation situation and generate an alarm when the resource allocation rate is found to be too high, so as to ensure a quick response when the resource allocation rate is too high to avoid system overload or performance degradation. Therefore, another embodiment of the present application provides a method for generating alarm information, such as Figure 5 As shown, the following steps are included:
[0132] S501: Obtain the number of allocated devices and the total number of devices in the database resource pool.
[0133] S502: Calculate the ratio between the number of allocated devices and the total number of devices to obtain a resource pool allocation rate.
[0134] The specific form of calculating the ratio between the number of allocated devices and the total number of devices is shown in formula (1).
[0135] Resource pool allocation ratio = number of allocated devices / total number of devices (1)
[0136] S503: When the resource pool allocation ratio is greater than a preset threshold, alarm information is generated and fed back based on the resource pool allocation ratio.
[0137] Optionally, the preset threshold includes but is not limited to 90%.
[0138] Specifically, the specific form of generating the alarm information is shown in Table 1.
[0139] Table 1
[0140]
[0141] As can be seen from Table 1, when the allocation rate of the domestic database resource pool exceeds 90% and when the resource pool allocation rate reaches the safety threshold, an alarm is required for the original capacity to prompt the initiation of resource pool procurement and capacity expansion.
[0142] In summary, by splitting resource allocation requests into multiple conditions and matching the corresponding CDPs according to these conditions, we can more flexibly respond to dynamic changes in resource pools. When the devices in the resource pool change, we can quickly adjust the allocation strategy according to the new matching conditions to ensure the accuracy of resource allocation results, thereby improving the accuracy of resource pool allocation.
[0143] like Figure 6 As shown, it is a schematic diagram of the architecture of a resource pool allocation device provided in an embodiment of the present application, and the allocation device includes: an analysis unit 100, a first screening unit 200, a second screening unit 300, a judgment unit 400, a setting unit 500 and an allocation unit 600.
[0144] The analyzing unit 100 is used to analyze the resource allocation request when receiving the resource allocation request, and obtain the operating system, the system level, at least one node type and the number of devices corresponding to each node type.
[0145] The first screening unit 200 is used to screen out a model list corresponding to the operating system from the database resource pool; the model list includes multiple models.
[0146] The second screening unit 300 is used to screen out the CDP corresponding to the machine model list, node type and system level from all CDPs in the database resource pool, and mark it as the target CDP;
[0147] The second screening unit 300 is specifically used to: determine whether the system level is an important level system; if the system level is an important level system, screen out CDPs containing high-performance devices from all CDPs in the database resource pool; from the CDPs containing high-performance devices, screen out CDPs corresponding to the model list and node type, and mark them as target CDPs; if the system level is not an important level system, screen out CDPs containing ordinary devices from all CDPs in the database resource pool; from the CDPs containing ordinary devices, screen out CDPs corresponding to the model list and node type, and mark them as target CDPs.
[0148] The judging unit 400 is used to judge whether the number of devices in the target CDP satisfies the number of devices corresponding to each node type.
[0149] The judgment unit 400 is specifically used for: for each node type, selecting the number of devices corresponding to the node type from the target CDP and marking it as the target number of devices; judging whether the target number of devices is not less than the number of devices corresponding to the node type; if the target number of devices is less than the number of devices corresponding to the node type, determining that the number of devices in the target CDP does not satisfy the number of devices corresponding to each node type; if the target number of devices is not less than the number of devices corresponding to the node type, determining that the target number of devices satisfies the number of devices corresponding to the node type; when all target numbers of devices are not less than the numbers of devices corresponding to all node types, determining that the number of devices in the target CDP satisfies the number of devices corresponding to each node type.
[0150] The setting unit 500 is used to set the priority of each model if the number of devices in the target CDP meets the number of devices corresponding to each node type.
[0151] The allocation unit 600 is used to allocate devices in the target CDP according to the priority and node type of each model.
[0152] The allocation unit 600 is specifically used to: obtain the node type corresponding to each model; for each node type corresponding to the model, determine whether the node type corresponding to the model includes the node type; if the node type corresponding to the model includes the node type, allocate the device in the target CDP according to the priority of the model.
[0153] In summary, by splitting resource allocation requests into multiple conditions and matching the corresponding CDPs according to these conditions, we can more flexibly respond to dynamic changes in resource pools. When the devices in the resource pool change or new device types appear, the system can quickly adjust the allocation strategy according to the new matching conditions to ensure the accuracy of resource allocation results, thereby improving the accuracy of resource pool allocation.
[0154] Preferably, combined Figure 6 As shown in the figure, the distributing device further comprises: a third screening unit and a returning unit.
[0155] A third screening unit is used to screen out other CDPs corresponding to the model list, node type and system level from all CDPs except the target CDP in the database resource pool if the number of devices in the target CDP does not meet the number of devices corresponding to each node type;
[0156] The return unit is used to take other CDPs as target CDPs and return to the step of determining whether the number of devices in the target CDP meets the number of devices corresponding to each node type, until the number of devices in the target CDP meets the number of devices corresponding to each node type.
[0157] Preferably, combined Figure 6As shown in the figure, the distribution device further includes: an acquisition unit, a calculation unit and a generation unit.
[0158] An acquisition unit, used to acquire the number of allocated devices and the total number of devices in the database resource pool;
[0159] A calculation unit, used for calculating the ratio between the number of allocated devices and the total number of devices to obtain a resource pool allocation rate;
[0160] The generating unit is used to generate and feed back alarm information based on the resource pool allocation rate when the resource pool allocation rate is greater than a preset threshold.
[0161] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can refer to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system or system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can refer to the partial description of the method embodiment. The system and system embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative work.
[0162] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0163] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for allocating a resource pool, characterized in that: include: When receiving a resource allocation request, analyzing the resource allocation request to obtain an operating system, a system level, at least one node type, and a number of devices corresponding to each node type; Filtering a list of machine models corresponding to the operating system from a database resource pool; the list of machine models includes multiple machine models; Filter out a CDP corresponding to the machine model list, the node type and the system level from all CDPs in the database resource pool, and mark it as a target CDP; Determine whether the number of devices in the target CDP meets the number of devices corresponding to each of the node types; If the number of devices in the target CDP meets the number of devices corresponding to each node type, setting the priority of each type; The devices in the target CDP are allocated according to the priority of each of the models and the node type.
2. The method according to claim 1, characterized in that The step of selecting a CDP corresponding to the machine model list, the node type, and the system level from all CDPs in the database resource pool and marking the CDP as a target CDP includes: Determine whether the system level is an important level system; If the system level is the important level system, screening out the CDP containing the high-performance device from all the CDPs in the database resource pool; Filtering out a CDP corresponding to the model list and the node type from the CDPs containing high-performance devices, and marking it as a target CDP; If the system level is not the important level system, screening out CDPs containing common devices from all CDPs in the database resource pool; From the CDPs containing common devices, a CDP corresponding to the model list and the node type is screened out and marked as a target CDP.
3. The method according to claim 1, characterized in that The determining whether the number of devices in the target CDP satisfies the number of devices corresponding to each of the node types includes: For each of the node types, selecting the number of devices corresponding to the node type from the target CDP and marking it as the target number of devices; Determine whether the number of target devices is not less than the number of devices corresponding to the node type; If the target device quantity is less than the device quantity corresponding to the node type, determining that the device quantity in the target CDP does not satisfy the device quantity corresponding to each of the node types; If the target device quantity is not less than the device quantity corresponding to the node type, determining that the target device quantity satisfies the device quantity corresponding to the node type; When the number of all target devices is not less than the number of devices corresponding to all node types, it is determined that the number of devices in the target CDP satisfies the number of devices corresponding to each of the node types.
4. The method according to claim 1, characterized in that Also includes: If the number of devices in the target CDP does not meet the number of devices corresponding to each of the node types, filter out other CDPs corresponding to the model list, the node type and the system level from all CDPs in the database resource pool except the target CDP; The other CDP is used as the target CDP, and the step of determining whether the number of devices in the target CDP satisfies the number of devices corresponding to each of the node types is returned to execute until the number of devices in the target CDP satisfies the number of devices corresponding to each of the node types.
5. The method according to claim 1, characterized in that The allocating devices in the target CDP according to the priority of each model and the node type includes: Obtain the node type corresponding to each of the models; For each node type corresponding to the model, determine whether the node type corresponding to the model includes the node type; If the node type corresponding to the machine model includes the node type, the devices in the target CDP are allocated according to the priority of the machine model.
6. The method according to claim 1, characterized in that Also includes: Obtaining the number of allocated devices and the total number of devices in the database resource pool; Calculating the ratio between the number of allocated devices and the total number of devices to obtain a resource pool allocation rate; When the resource pool allocation rate is greater than a preset threshold, alarm information is generated and fed back based on the resource pool allocation rate.
7. A resource pool allocation device, characterized in that: include: An analyzing unit, configured to analyze the resource allocation request when receiving the resource allocation request, and obtain an operating system, a system level, at least one node type, and a number of devices corresponding to each node type; A first screening unit, configured to screen out a list of machine models corresponding to the operating system from a database resource pool; the list of machine models includes multiple machine models; A second screening unit, configured to screen out a CDP corresponding to the machine model list, the node type and the system level from all CDPs in the database resource pool, and mark the CDP as a target CDP; A judging unit, configured to judge whether the number of devices in the target CDP satisfies the number of devices corresponding to each of the node types; A setting unit, configured to set the priority of each model if the number of devices in the target CDP meets the number of devices corresponding to each node type; An allocating unit is used to allocate devices in the target CDP according to the priority of each model and the node type.
8. The device according to claim 7, characterized in that The second screening unit is specifically used for: Determine whether the system level is an important level system; If the system level is the important level system, screening out the CDP containing the high-performance device from all the CDPs in the database resource pool; Filtering out a CDP corresponding to the model list and the node type from the CDPs containing high-performance devices, and marking it as a target CDP; If the system level is not the important level system, screening out CDPs containing common devices from all CDPs in the database resource pool; From the CDPs containing common devices, a CDP corresponding to the model list and the node type is screened out and marked as a target CDP.
9. The device according to claim 7, characterized in that The judging unit is specifically used for: For each of the node types, selecting the number of devices corresponding to the node type from the target CDP and marking it as the target number of devices; Determine whether the number of target devices is not less than the number of devices corresponding to the node type; If the target device quantity is less than the device quantity corresponding to the node type, determining that the device quantity in the target CDP does not satisfy the device quantity corresponding to each of the node types; If the target device quantity is not less than the device quantity corresponding to the node type, determining that the target device quantity satisfies the device quantity corresponding to the node type; When the number of all target devices is not less than the number of devices corresponding to all node types, it is determined that the number of devices in the target CDP satisfies the number of devices corresponding to each of the node types.
10. The device according to claim 7, characterized in that Also includes: A third screening unit is used for screening out other CDPs corresponding to the model list, the node type and the system level from all CDPs except the target CDP in the database resource pool if the number of devices in the target CDP does not meet the number of devices corresponding to each of the node types; The return unit is used to take the other CDP as the target CDP and return to the step of determining whether the number of devices in the target CDP meets the number of devices corresponding to each of the node types, until the number of devices in the target CDP meets the number of devices corresponding to each of the node types.