Allocation method and device of computing resources, electronic equipment and storage medium
By constructing a shared computing resource pool and dynamically dividing resource groups according to tenant identifiers, combined with resource isolation and distributed scheduling strategies, the problems of resource contention and utilization imbalance in multi-tenant scenarios are solved, and the refined management and stable operation of computing resources are realized.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-31
- Publication Date
- 2026-03-27
AI Technical Summary
In existing technologies, actuarial computing systems in multi-tenant scenarios suffer from resource contention and utilization imbalances. This includes CPU contention and memory quota overruns caused by a lack of resource isolation in a fully centralized mode, and high resource redundancy and hardware resource idle rates in a fully decentralized mode.
Construct a shared computing resource pool, dynamically divide resource groups according to tenant identifiers, and dynamically adjust resource quotas under different business cycle states based on tenant identifiers and resource policy evaluation results. Implement resource isolation control, impose hardware restrictions on computing resources through resource isolation mechanisms, and execute distributed scheduling and load balancing strategies.
It enables refined management of computing resources, ensures hardware-level isolation of computing environments between tenants, avoids resource contention and data interference, improves overall resource utilization, and ensures stable operation of multi-tenant businesses under different business cycles.
Smart Images

Figure CN121743031A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the technical field of computer, and particularly relates to a computing resource allocation method and device, electronic equipment and storage medium. BACKGROUND
[0002] As the core supporting technology of insurance actuarial computing system, computing resource management is widely used in group business scenarios of multiple legal entities. With the increasing complexity of insurance business and the growing demand for group operation, the traditional monolithic architecture resource allocation system has been difficult to meet the multi-tenant collaborative computing demand. In related technologies, a monolithic deployment-based actuarial computing technology system is constructed through the collaborative work of a physical server cluster and a database system. Specifically, the system covers the whole process from model deployment to task execution, including resource static allocation, task sequential execution, data isolation and other key links. The completely centralized mode adopts a monolithic distributed deployment architecture, the completely decentralized mode relies on the independent system environment of the subsidiary company, and the unified and decentralized mode realizes multi-legal entity sharing through the group unified procurement system.
[0003] However, the existing technical solution directly adopts a static resource allocation strategy and does not establish a collaborative mechanism of dynamic resource scheduling and hardware-level isolation, which may lead to the dual dilemmas of resource contention and utilization imbalance. Specifically, in the completely centralized mode, the computing tasks of tenants are distinguished by data identification, but there is a lack of resource isolation boundary. When multiple subsidiaries simultaneously initiate computing requests, there is a risk of CPU contention with a 100% core usage cap, and the memory quota breaks through the constraint condition of 8G binding 1 core, thereby causing parameter retrieval errors and abnormal computing results. In the completely decentralized or unified and decentralized mode, since a shared computing pool architecture is not constructed, the resource environments of each tenant are in a physically isolated state, resulting in the problems of resource redundancy and high hardware resource idle rate. This systematic contradiction of uneven resource allocation and lack of isolation mechanism directly affects the continuity of group business and the cost control ability. SUMMARY
[0004] The present disclosure provides a computing resource allocation method and device, electronic equipment and storage medium. Its main purpose is to at least solve one of the technical problems in the related art to some extent.
[0005] According to a first aspect of the present disclosure, a computing resource allocation method is provided, comprising: constructing a shared computing resource pool and dynamically dividing resource groups according to tenant identification; based on the tenant identification and resource policy evaluation results, dynamically adjusting resource quotas in different business cycle states, and implementing resource isolation control based on the adjusted resource quotas; hardware limiting the computing resources allocated to the tenants through the resource isolation mechanism; A task allocation and load balancing strategy based on distributed scheduling is performed to allocate the computing tasks to corresponding computing nodes.
[0006] Optionally, the shared computing resource pool is constructed, and resource groups are dynamically divided according to tenant identities, including: A plurality of computing nodes are aggregated into a unified shared computing resource pool, wherein each computing node contributes its computing core and memory resources; Logical isolated resource groups are dynamically divided from the shared computing resource pool based on the tenant identities; Each resource group is allocated a dedicated computing resource quota, and the computing resource quota includes the number of computing cores and the memory capacity.
[0007] Optionally, the resource quota is dynamically adjusted in different business cycle states based on the tenant identities and the resource policy evaluation results, including: Based on the load of the shared computing resource pool, high-load periods and low-load periods are identified; In the high-load period, a hard isolation mode is configured for each resource group, the computing resource quota is locked, and resource boundary control is performed; In the low-load period, over-allocated computing resources are executed to respond to the computing demand of the resource group, and the over-allocated computing resource quota exceeds the upper limit of the original computing resource quota.
[0008] Optionally, the computing resources allocated to the tenant are limited by a resource isolation mechanism, including: Based on the control group, a process-level computing resource usage upper limit is set to limit the computing resource usage rate of a single process; A tenant-level memory quota is configured, and the memory quota is bound with the number of computing cores; A resource isolation boundary between tenants is established, and the resource usage of tenant processes is monitored in real time.
[0009] Optionally, the task allocation and load balancing strategy based on distributed scheduling is performed to allocate the computing tasks to corresponding computing nodes, including: According to the task priority, the computing task is allocated to the computing node with the most available computing resources; A single computing task is split into a plurality of sub-tasks, and each sub-task is bound with an independent process for execution.
[0010] Optionally, it further includes: The resource usage state of each resource group is continuously monitored, and when the preset resource recovery condition is met, the over-allocated resources are released and returned to the shared computing resource pool.
[0011] According to a second aspect of the present disclosure, a computing resource allocation apparatus is provided, comprising: a partition unit configured to construct a shared computing resource pool and dynamically partition resource groups according to tenant identifiers; an adjustment unit configured to dynamically adjust resource quotas in different business cycle states based on the tenant identifiers and resource policy evaluation results, and implement resource isolation control based on the adjusted resource quotas; a restriction unit configured to limit the computing resources allocated to tenants by a resource isolation mechanism; an allocation unit configured to implement a task allocation and load balancing strategy based on distributed scheduling to allocate computing tasks to corresponding computing nodes.
[0012] Optionally, the partition unit is further configured to: aggregate a plurality of computing nodes into a unified shared computing resource pool, wherein each computing node contributes its computing core and memory resources; dynamically partition logically isolated resource groups from the shared computing resource pool based on the tenant identifiers; allocate exclusive computing resource quotas to each resource group, the computing resource quotas including the number of computing cores and memory capacity.
[0013] Optionally, the adjustment unit is further configured to: identify high-load periods and low-load periods based on the load of the shared computing resource pool; configure a hard isolation mode for each resource group during the high-load periods, lock its computing resource quota, and perform resource boundary control; during the low-load periods, perform over-issuing allocation of computing resources to respond to the computing needs of the resource groups, and over-allocate the computing resource quota beyond the original upper limit of the computing resource quota.
[0014] Optionally, the restriction unit is further configured to: set a process-level computing resource usage upper limit based on the control group to limit the computing resource usage of the process; configure a tenant-level memory quota and bind the memory quota with the number of computing cores; establish resource isolation boundaries between tenants and monitor tenant process resource usage in real time.
[0015] Optionally, the allocation unit is further configured to: allocate the computing tasks to the computing node with the most available computing resources according to the task priority; split a single computing task into multiple sub-tasks and bind an independent process to each sub-task for execution.
[0016] Optionally, further comprising: The monitoring unit is configured to continuously monitor the resource usage state of each resource group, and when a preset resource recovery condition is met, release the over-allocated resources and return the resources to the shared computing resource pool.
[0017] According to a third aspect of the present disclosure, an electronic device is provided, comprising: at least one processor; and a memory connected to the at least one processor in communication; 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 perform the method of the first aspect.
[0018] According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to perform the method of the first aspect.
[0019] According to a fifth aspect of the present disclosure, a computer program product is provided, comprising a computer program which, when executed by a processor, implements the method of the first aspect.
[0020] The method and device for allocating computing resources, the electronic device and the storage medium provided by the present disclosure can solve the problems in the prior art, such as resource contention, calculation parameter error and result error when multiple tenants simultaneously initiate computing tasks due to lack of effective resource isolation and dynamic allocation in the completely centralized mode, and idle waste and difficulty in meeting the needs of multi-tenant simultaneous operation and resource collaborative allocation due to the inability of resources to be shared in the completely decentralized or combined mode, and achieve the technical effects of fine management of computing resources, guarantee of hardware-level isolation of computing environment between tenants to avoid resource contention and data interference, improvement of overall resource utilization, and ensuring stable operation of multi-tenant business in different business cycles.
[0021] It should be understood that the contents described in this part are not intended to identify the key or important features of the embodiments of the present disclosure, nor are they used to limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description. BRIEF DESCRIPTION OF DRAWINGS
[0022] The accompanying drawings are used to better understand the present scheme and do not limit the present disclosure. Among them: Figure 1 A flowchart of a method for allocating computing resources according to an embodiment of the present disclosure is shown in FIG. 1. Figure 2 A structural diagram of an apparatus for allocating computing resources according to an embodiment of the present disclosure is shown in FIG. 2. Figure 3 A schematic block diagram of an example electronic device according to an embodiment of the present disclosure is shown in FIG. 3. DETAILED DESCRIPTION
[0023] Exemplary embodiments of the present disclosure are described herein with reference to the accompanying drawings, which are provided to assist in a comprehensive understanding of the present disclosure by those of ordinary skill in the art, and they should be considered in their entirety. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions are omitted for clarity and conciseness.
[0024] A method and apparatus for allocating computing resources, an electronic device, and a storage medium according to an embodiment of the present disclosure are described below with reference to the accompanying drawings.
[0025] Figure 1 A flowchart of a method for allocating computing resources according to an embodiment of the present disclosure is shown in FIG. 1.
[0026] As shown in FIG. 1, the method includes the following steps: Figure 1 Step 101, a shared computing resource pool is constructed, and resource groups are dynamically divided according to tenant identifiers.
[0027] In an embodiment of the present disclosure, to meet the needs of unified management and efficient deployment of computing resources in a multi-tenant scenario, a shared computing resource pool is first constructed. The shared computing resource pool forms a unified resource set by integrating multiple groups of schedulable computing resources, thereby realizing centralized management and control of dispersed computing resources and breaking the limitations of traditional resource dispersed deployment. On this basis, resource groups are dynamically divided according to tenant identifiers. The tenant identifiers are used to uniquely distinguish different tenants. The dynamic division process can be based on tenant attributes or business needs associated with the tenant identifiers, so that each resource group is exclusively associated with a corresponding tenant, ensuring that each tenant can obtain computing resource support based on the resource group associated with itself, laying the foundation for subsequent accurate allocation and isolation of resources. As an implementation, all computing nodes can be included in the shared computing resource pool, and a fixed number of server cores can be bound to each tenant according to the tenant identifier, thereby forming a resource group corresponding to each tenant as a baseline configuration of tenant computing resources.
[0028] The centralized management and control of the computing resources is realized by constructing a shared computing resource pool, and the tenant-specific resource allocation is ensured by dynamically dividing the resource groups in combination with the tenant identification, thereby effectively solving the problems of difficult coordination and low management efficiency of resources in the traditional decentralized deployment mode, and improving the uniformity of computing resource management and the adaptability to the multi-tenant demand.
[0029] In step 102, the resource quota is dynamically adjusted in different business cycle states based on the tenant identification and the resource policy evaluation result, and the resource isolation control is implemented based on the adjusted resource quota.
[0030] In an embodiment of the present disclosure, in order to adapt to the resource demand differences of multi-tenants in different business stages, the resource quota corresponding to each tenant is dynamically adjusted based on the tenant identification (used for uniquely associating the target tenant) determined in the foregoing steps and the preset resource policy evaluation result (comprehensively considering factors such as tenant business priority and historical resource usage), so as to match the actual computing demand in different business cycle states; after the resource quota adjustment is completed, the resource isolation control is implemented based on the adjusted quota boundary, the resource usage constraint is set to ensure that the computing tasks of each tenant only run within its quota range, and the mutual interference of resource usage between tenants is avoided. As an implementation manner, the resource policy can include differentiated rules in busy time and idle time, for example, the number of cores of the tenant resource group is locked in the busy time state such as month-end to guarantee the stability of the business, and the overuse of idle resources is allowed in the idle time, and the resource isolation control can be realized by hardware-level limiting technology (such as setting the upper limit of single-process CPU usage rate, binding CPU and memory quota).
[0031] By dynamically adjusting the resource quota in combination with the tenant identification and the resource policy, the accurate matching of resource allocation and business cycle demand is realized, and the problems of insufficient resources in busy time and idle resources in idle time in the traditional static allocation mode are avoided; at the same time, the resource isolation control implemented based on the adjusted quota effectively prevents the resource contention between tenants, guarantees the independence and stability of the computing tasks of each tenant, and further improves the rationality and security of resource allocation in the multi-tenant scenario.
[0032] In step 103, the computing resources allocated to the tenant are limited by the resource isolation mechanism.
[0033] In the embodiments of this disclosure, to ensure the independent operation of each tenant's computing tasks in a multi-tenant scenario and avoid mutual interference caused by resource usage exceeding limits, a resource isolation mechanism is used to impose hardware-level restrictive constraints on the computing resources allocated to each tenant. This clearly defines the range of hardware resources each tenant can use (such as the upper limit of usage for critical computing hardware like CPU and memory), ensuring that a tenant's computing tasks can only be executed within its allocated hardware resource quota and cannot occupy the hardware resources of other tenants. As one implementation method, this isolation mechanism can be implemented using technologies that support hardware-level resource management. For example, Linux cgroups technology can be used, with its cpulimit module setting a hard upper limit on the CPU usage of a single process (e.g., 100% / core), while its memory subsystem limits the memory usage quota of tenant processes according to a preset ratio (e.g., 1 core bound to 8GB of memory), thereby constructing a hardware-level resource isolation boundary.
[0034] By limiting resources at the hardware level, the problems of resource contention and mutual interference between computing environments among tenants in the shared mode of existing technologies are effectively solved. This ensures the independence and stability of each tenant's computing tasks, while preventing the risk of computing parameter errors or data leakage caused by resource out-of-bounds access, and further enhances the resource security and operational reliability of the multi-tenant system.
[0035] Step 104: Execute the task allocation and load balancing strategy based on distributed scheduling to allocate computing tasks to the corresponding computing nodes.
[0036] In the embodiments of this disclosure, to achieve efficient execution of multi-tenant computing tasks and rational utilization of computing node resources, and to avoid overall operational efficiency degradation caused by excessive load on a single node or idle resources, a task allocation and load balancing strategy based on distributed scheduling is implemented. During the scheduling process, this strategy comprehensively considers the real-time operating status of each computing node (such as current load and available resources) and the attributes of the computing tasks (such as task size and priority), rationally allocating each tenant's computing tasks to the corresponding computing nodes. This ensures that task execution requirements match node resource supply, while balancing the load pressure on each node and avoiding local node overload. As one implementation method, this strategy may include priority scheduling logic (such as prioritizing task allocation to nodes with no running tasks and the most available cores), a load balancing mechanism (adjusting task allocation based on node CPU and memory load), and task splitting processing (splitting a single task into sub-tasks based on the number of resource cores and binding them to independent processes for execution), to further optimize task execution efficiency and node resource utilization.
[0037] The task allocation and load balancing strategy distributedly scheduled effectively solves the problems of uneven node load and low task execution efficiency in the traditional scheduling mode, guarantees the efficient progress of the computing tasks of each tenant, fully excavates the resource potential of each computing node, avoids resource waste, and improves the operation stability and global resource utilization efficiency of the entire shared computing resource pool.
[0038] The allocation method of the computing resource provided by the present disclosure solves the problems of resource contention, computing parameter error and result error when multiple tenants simultaneously initiate computing tasks due to the lack of effective resource isolation and dynamic allocation in the completely centralized mode, and the problems of idle waste and the difficulty in meeting the requirements of multi-tenant simultaneous operation and resource collaborative allocation due to the unshareable resources in the completely decentralized or combined mode, achieves the technical effects of realizing fine management of computing resources, guaranteeing hardware-level isolation of computing environments between tenants to avoid resource contention and data interference, improving overall resource utilization, and ensuring stable operation of the business of multiple tenants in different business cycles.
[0039] Under the technical solution framework disclosed in step 101, the construction of the shared computing resource pool and the dynamic division of the resource group according to the tenant identifier include but are not limited to: aggregating multiple computing nodes into a unified shared computing resource pool, wherein each computing node contributes its computing core and memory resources; dynamically dividing a logically isolated resource group from the shared computing resource pool based on the tenant identifier; and allocating a dedicated computing resource quota to each resource group, wherein the computing resource quota includes the number of computing cores and the memory capacity.
[0040] Specifically, in the process of constructing a shared computing resource pool and dynamically dividing resource groups according to tenant identification, first, a plurality of independent computing nodes (each computing node can be composed of a server with a certain hardware configuration) are aggregated, so that each computing node unifies its computing core (such as a CPU physical core or a logical core) and memory resource (such as a physical memory built-in a server) into the control range of the shared computing resource pool, the resource inventory and available state of each computing node are collected in real time by a resource detection component to form a globally schedulable resource pool; then, based on a tenant identification (such as a tenant number or a unique code corresponding to a tenant name) for uniquely identifying the identity of a tenant, a logically partitioned resource group is divided in the shared computing resource pool, each resource group is only bound to the corresponding tenant identification, and is isolated from the resource groups of other tenants at the resource scheduling logic level to avoid mutual confusion during resource calling; finally, according to the business needs (such as daily computing task volume and business complexity) of the tenant, a dedicated computing resource quota is allocated to each resource group, which explicitly includes the number of computing cores (such as allocating 2 cores, 8 cores, etc. of different numbers of computing cores according to the business scale of the tenant) and the corresponding memory capacity (such as matching the memory in a preset proportion according to the number of computing cores to ensure the adaptation of data storage and operation needs during the computing process), and the quota parameters are recorded to a resource configuration table as the basis for subsequent resource allocation and use monitoring. As a specific implementation, for different subsidiaries (as different tenants) under an insurance group, a resource group of a smaller subsidiary can be allocated a 4-core computing core and a 32G memory quota, and a resource group of a larger subsidiary can be allocated a 16-core computing core and a 128G memory quota, and each subsidiary resource group can only use the resources within its own quota.
[0041] By aggregating the core and memory resources of multiple computing nodes, the centralized integration of dispersed hardware resources is achieved, and the idle resources of a single node are avoided; based on the logical isolation of the resource group division according to the tenant identification, the exclusive property of the resources of each tenant is ensured to prevent misuse of resources between tenants; and the quota allocation including the number of cores and the memory capacity sets a clear boundary for resource use, effectively solving the problem of disordered resource management in the traditional mode, and improving the accuracy and controllability of resource allocation in the multi-tenant scenario.
[0042] Under the technical solution framework disclosed in step 102, the dynamic adjustment of the resource quota in different business cycle states based on the tenant identification and the resource policy evaluation result includes but is not limited to: identifying high-load periods and low-load periods based on the load of the shared computing resource pool; in the high-load period, configuring a hard isolation mode for each resource group, locking its computing resource quota and performing resource boundary control; in the low-load period, performing over-allocation of computing resources to respond to the computing needs of the resource group, and over-allocating the computing resource quota beyond the original upper limit of the computing resource quota.
[0043] Specifically, in the process of dynamically adjusting the resource quota based on the tenant identification and the resource policy evaluation result, first, the monitoring module of the shared computing resource pool collects the load indicators of the overall resource pool in real time, such as CPU usage, memory occupancy, and task queue length, sets a preset load threshold (for example, when the CPU usage exceeds 80% or the memory occupancy exceeds 75%, it is determined as high load, and when it is lower than 40%, it is determined as low load), and combines the tenant business attributes associated with the tenant identification (such as the fixed business cycle of monthly settlement and quarterly settlement in the insurance business) to comprehensively identify the high-load period (such as the last 5 working days of the month during the monthly settlement) and the low-load period (such as Monday to Friday before 9 am during the non-settlement period) of the shared computing resource pool; in the identified high-load period, according to the resource policy evaluation result (evaluating the priority and task urgency of the tenant business), configure a hard isolation mode for each resource group, lock the computing resource quota of each resource group (such as 4 cores and 32G for tenant A, and 16 cores and 128G for tenant B) through the resource scheduling system, and start the resource boundary control mechanism to prohibit any resource group from occupying computing resources exceeding its own quota, and additionally reserve 10%-20% of emergency resources for the resource group of the high-priority tenant (such as the core business subsidiary) to prevent business interruption caused by cross-tenant resource preemption; in the low-load period, perform the over-allocation of computing resources based on the "idle time reuse" rule in the resource policy, query the historical computing demand of each resource group according to the tenant identification, and allocate resources exceeding the original quota limit to the resource group with additional computing demand (such as the tenant initiating a temporary actuarial task) (such as allocating 6 cores to tenant A with an original quota of 4 cores), and at the same time, track the usage status of the over-allocated resources in real time through the resource monitoring module, and when the load of the shared computing resource pool rises to near the high-load threshold, automatically recover the over-allocated resources to ensure the stability of the overall load of the resource pool.
[0044] By accurately identifying the high and low load periods of the shared computing resource pool, the resource quota adjustment is more in line with the actual business demand; the hard isolation mode in the high-load period effectively avoids resource contention between tenants, ensuring the stable operation of critical businesses during peak periods; the over-allocation in the low-load period fully utilizes the idle resources, solving the problem of resource waste in the traditional mode, and significantly improving the overall resource utilization of the shared computing resource pool.
[0045] Under the technical scheme framework disclosed in step 103, the hardware limitation of the computing resources allocated to the tenant through the resource isolation mechanism includes but is not limited to: setting a process-level computing resource usage limit based on the control group to limit the computing resource usage rate of a single process; configuring a tenant-level memory quota and binding the memory quota with the number of computing cores; establishing a resource isolation boundary between tenants and monitoring the resource usage of tenant processes in real time.
[0046] Specifically, when the computing resources allocated to the tenants are hardware-limited by the resource isolation mechanism, first, a process-level resource management system is built based on control groups (such as Linux cgroups technology), and the cpulimit function module of the control group is used to set a hard upper limit for the CPU usage rate of each computing process of the tenant, so as to ensure that the usage rate of CPU resources by a single process during running does not exceed the preset threshold (for example, 100% / core, that is, a single process occupies at most the full computing capacity of a CPU core), avoiding excessive occupation of CPU resources by a single process and affecting the running of other processes; then, a dedicated tenant-level memory quota is configured according to the number of computing cores of the tenant resource group, and a fixed binding relationship between the memory quota and the number of computing cores is established (for example, according to the proportion of 8G physical memory corresponding to 1 core computing core, if the tenant resource group is allocated with 4 core computing cores, the memory quota is 32G), and the memory quota is set as a hard limit by the memory subsystem of the control group, preventing the tenant process from using memory resources exceeding the quota and causing memory overflow or preemption of other tenant memory; subsequently, the resource isolation boundary between tenants is established by the process grouping mechanism of the control group, and all computing processes of the same tenant are grouped into a dedicated control group, so that the control groups of different tenants are independent of each other at the system kernel level, and the tenant process can only access the resources in the control group itself and cannot perceive or occupy the hardware resources of other tenant control groups; at the same time, a resource monitoring module is started to collect data such as CPU usage rate and memory occupation of processes in each tenant control group in real time, and if it is detected that a process approaches or exceeds the resource limit threshold, the corresponding limiting strategy (such as CPU resource throttling, memory usage warning or process memory limitation) is triggered immediately, so as to ensure that the resource usage is always within the hardware limit range.
[0047] The process-level CPU limitation realized by the control group effectively avoids the problem of excessive occupation of CPU resources by a single process; the binding configuration of the memory quota and the computing core ensures that the memory demand of the tenant computing task is adapted to the CPU resources, preventing waste or shortage of memory resources; the control group isolation boundary between tenants blocks the possibility of mutual interference of resources at the kernel level, and in combination with the real-time monitoring mechanism, the independence and stability of the computing resource usage of each tenant are further guaranteed, completely solving the problems of resource contention and data leakage in the traditional shared mode, and improving the security and controllability of the computing resource usage in the multi-tenant scenario.
[0048] Under the technical scheme framework disclosed in step 104, the task allocation and load balancing strategy based on distributed scheduling is executed to allocate the computing task to the corresponding computing node, including but not limited to: according to the task priority, the computing task is allocated to the computing node with the most available computing resources; a single computing task is split into multiple sub-tasks, and each sub-task is bound to an independent process for execution.
[0049] Specifically, in the execution of the task allocation and load balancing strategy based on distributed scheduling to allocate computing tasks, first, the priority information of the computing tasks to be allocated is obtained by the distributed resource scheduler, which can be pre-set in combination with tenant business attributes (such as the priority of the core business measurement task in insurance actuarial is higher than that of the regular data statistical task) and the urgency of the task; at the same time, the scheduler collects the available resource data of each computing node in the shared computing resource pool through the real-time communication module, including the number of available computing cores, the remaining memory capacity and the number of current running tasks, filters out the computing node with the most available computing resources (for example, node A has 8-core CPU and 64G memory available, and node B has 4-core CPU and 32G memory available, so node A is preferred), and allocates high-priority computing tasks to such nodes first to ensure the rapid execution of high-priority tasks. For a single computing task with large data volume or complex computing steps (such as the full-amount policy actuarial task of an insurance group), the scheduler splits it into multiple independent sub-tasks (for example, 5-10 sub-tasks according to the sub-company or policy type of the policy) according to the computing logic and data sharding rules of the task, and each sub-task matches a certain computing resource requirement (such as 2-core CPU and 16G memory for a single sub-task); then, an independent system process is bound for each sub-task to ensure that each sub-task has exclusive process resources during execution, and the process is fixedly associated with the hardware resources (such as specified CPU cores and memory blocks) of the allocated computing node, avoiding computing interference between sub-tasks due to process sharing, and at the same time, the process monitoring module tracks the running state of each sub-task process to ensure that the sub-tasks proceed as expected on the corresponding computing nodes.
[0050] By allocating tasks according to priority to the node with the most available resources, the execution efficiency of high-priority tasks is ensured, and the delay of core business due to insufficient resources is avoided; splitting a single task into sub-tasks and binding independent processes not only improves the parallel processing speed of complex tasks, but also avoids resource contention and execution interference between sub-tasks, further optimizing the utilization efficiency of computing node resources, effectively solving the problems of low task execution efficiency and uneven node load in the traditional scheduling mode.
[0051] Under the technical solution framework disclosed in the foregoing embodiments, the embodiments of the present disclosure further include: continuously monitoring the resource usage state of each resource group, and when the preset resource recovery condition is met, releasing the over-allocated resources and returning them to the shared computing resource pool.
[0052] Specifically, in the process of over-allocating resources, the real-time use data of over-allocated resources of each resource group is continuously collected by the resource monitoring module deployed in the shared computing resource pool, including the use rate of over-allocated CPU cores, the occupancy rate of over-allocated memory, and the progress of the computing task currently executed by the resource group; at the same time, resource recovery conditions are preset, which can include three types of triggering scenarios: first, the average use rate of over-allocated resources of the resource group is continuously below a threshold (such as 20%) for a preset time period (such as 10 minutes), indicating that the over-allocated resources are not effectively utilized; second, all computing tasks of the resource group that depend on over-allocated resources have been executed, and there is no task to be processed in the task queue; third, the overall load of the shared computing resource pool rebounds to a preset warning value (such as the average use rate of CPU reaching 60%), and resources need to be recovered to cope with potential high load demand. When any of the recovery conditions is met, the resource scheduler sends an over-allocated resource recovery instruction to the corresponding resource group, first stops the subsequent allocation of over-allocated resources to the resource group, and then releases the over-allocated CPU cores and memory resources occupied by the resource group through the process management mechanism, ensuring that the release process does not affect the normal computing tasks within the original quota of the resource group; finally, the released over-allocated resources are re-labeled as available resources of the shared computing resource pool, and the resource pool's resource inventory statistics are updated to provide the scheduler with the ability to allocate resources to other resource groups that need them. For example, during a low-load period when an insurance business is not settling, a resource group of a subsidiary uses 4-core CPU to complete a temporary actuarial task, and the monitoring module detects that the use rate of its over-allocated resources has dropped to 15%, triggering the recovery process and releasing the 4-core over-allocated CPU and returning it to the shared computing resource pool.
[0053] By continuously monitoring the use status of over-allocated resources, it is ensured that the idle over-allocated resources or changes in the load of the shared pool can be identified in a timely manner; and based on the preset conditions, the over-allocated resources are released and returned to the shared pool, which not only avoids the waste caused by long-term idling of over-allocated resources, but also prevents the shared computing resource pool from running out of resources when the load rebounds due to the failure to recover over-allocated resources in a timely manner, ensuring the dynamic balance of the shared resource pool and further improving the recycling efficiency of the overall resources.
[0054] It should be noted that the embodiments of the present disclosure can include multiple steps, which are numbered for ease of description, but these numbers do not limit the execution time slots or execution order between the steps; the steps can be implemented in any order, and the embodiments of the present disclosure do not limit this.
[0055] Corresponding to the above-mentioned method of allocating computing resources, the present disclosure also proposes a device for allocating computing resources. Since the device embodiments of the present disclosure correspond to the above-mentioned method embodiments, for details not disclosed in the device embodiments, reference can be made to the above-mentioned method embodiments, which will not be described in detail in the present disclosure.
[0056] Figure 2A structural schematic diagram of an allocation apparatus of a computing resource provided by an embodiment of the present disclosure is shown in FIG. 1, which comprises: Figure 2 A division unit 21 is configured to construct a shared computing resource pool and dynamically divide resource groups according to tenant identification; An adjustment unit 22 is configured to dynamically adjust resource quotas in different business cycle states based on the tenant identification and resource policy evaluation results, and implement resource isolation control based on the adjusted resource quotas; A restriction unit 23 is configured to limit the computing resources allocated to the tenants by a resource isolation mechanism; An allocation unit 24 is configured to execute a task allocation and load balancing strategy based on distributed scheduling to allocate computing tasks to corresponding computing nodes.
[0057] The allocation apparatus of the computing resource provided by the present disclosure can solve the problems in the prior art, such as resource contention, calculation parameter error and result error when multiple tenants simultaneously initiate computing tasks due to the lack of effective resource isolation and dynamic allocation in the completely centralized mode, and idle waste and difficulty in meeting the needs of multi-tenant simultaneous operation and resource collaborative allocation due to the inability of resource sharing in the completely decentralized or combined mode, and achieve the technical effects of fine management of computing resources, guarantee of hardware-level isolation of computing environments between tenants to avoid resource contention and data interference, improvement of overall resource utilization, and ensuring of stable operation of multiple tenants in different business cycles.
[0058] Further, in a possible implementation manner of the present embodiment, the division unit 21 is further configured to: aggregate multiple computing nodes into a unified shared computing resource pool, wherein each computing node contributes its computing core and memory resources; dynamically divide a logically isolated resource group from the shared computing resource pool based on the tenant identification; allocate a dedicated computing resource quota to each resource group, wherein the computing resource quota includes the number of computing cores and the memory capacity.
[0059] Further, in a possible implementation manner of the present embodiment, the adjustment unit 22 is further configured to: identify high-load periods and low-load periods based on the load of the shared computing resource pool; In the high-load period, a hard isolation mode is configured for each resource group, the computing resource quota is locked, and resource boundary control is performed; In the low-load period, over-allocation of computing resources is performed, so as to over-allocate the computing resource quota beyond the original upper limit of the computing resource quota in response to the computing demand of the resource group.
[0060] Further, in a possible implementation manner of the embodiment, the limiting unit 23 is further configured to: limit the computing resource usage of each process based on the process-level computing resource usage upper limit set by the control group; configure a tenant-level memory quota, and bind the memory quota with the number of computing cores; establish a resource isolation boundary between tenants, and monitor the resource usage of tenant processes in real time.
[0061] Further, in a possible implementation manner of the embodiment, the allocating unit 24 is further configured to: allocate the computing task to the computing node with the most available computing resources according to the priority of the computing task; split a single computing task into multiple sub-tasks, and bind an independent process to each sub-task.
[0062] Further, in a possible implementation manner of the embodiment, as Figure 2 shown, the method further includes: a monitoring unit 25 configured to continuously monitor the resource usage state of each resource group, and release the over-allocated resources and return the resources to the shared computing resource pool when a preset resource recycling condition is met.
[0063] It should be noted that the foregoing explanation and description of the method embodiment are also applicable to the apparatus of the embodiment, and the principle is the same, which is not limited in the embodiment.
[0064] According to embodiments of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium, and a computer program product.
[0065] Figure 3 A schematic block diagram of an example electronic device 300 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptops, desktops, tablets, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown here, their connections and relationships, and their functions, are meant to be examples only, and are not intended to limit the implementations of the present disclosure described and / or claimed in this document.
[0066] As shown in Figure 3 Fig. 3, the electronic device 300 includes a computing unit 301 that can perform various appropriate actions and processes in accordance with a computer program stored in a ROM (Read-Only Memory) 302 or a computer program loaded from a storage unit 308 into a RAM (Random Access Memory) 303. Various programs and data required for the operation of the electronic device 300 can also be stored in the RAM 303. The computing unit 301, the ROM 302, and the RAM 303 are connected to each other through a bus 304. An I / O (Input / Output) interface 305 is also connected to the bus 304.
[0067] A plurality of components in the electronic device 300 are connected to the I / O interface 305, including an input unit 306 such as a keyboard, a mouse, and the like, an output unit 307 such as various types of displays, a speaker, and the like, a storage unit 308 such as a magnetic disk, an optical disk, and the like, and a communication unit 309 such as a network card, a modem, a wireless communication transceiver, and the like. The communication unit 309 allows the electronic device 300 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0068] The computing unit 301 can be various general and / or special purpose processing components with processing and computing capabilities. Some examples of the computing unit 301 include, but are not limited to, a CPU (Central Processing Unit), a GPU (Graphic Processing Units), various special-purpose AI (Artificial Intelligence) computing chips, various computing units running machine learning model algorithms, a DSP (Digital Signal Processor), and any appropriate processor, controller, microcontroller, etc. The computing unit 301 performs various methods and processes described above, such as the allocation method of computing resources. For example, in some embodiments, the allocation method of computing resources can be implemented as a computer software program, which is tangibly embodied in a machine-readable medium, such as the storage unit 308. In some embodiments, part or all of the computer program can be loaded and / or installed onto the electronic device 300 via the ROM 302 and / or the communication unit 309. When the computer program is loaded onto the RAM 303 and executed by the computing unit 301, one or more steps of the methods described above can be performed. Alternatively, in other embodiments, the computing unit 301 can be configured to perform the aforementioned allocation method of computing resources by any other appropriate means, such as by means of firmware.
[0069] Various implementations of the systems and techniques described above herein can be realized in digital electronic circuitry, integrated circuitry, a Field Programmable Gate Array (FPGA), an Application-Specific Integrated Circuit (ASIC), an Application Specific Standard Product (ASSP), a System on Chip (SOC), a Complex Programmable Logic Device (CPLD), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include implementation in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which can be special or general purpose, coupled to receive data and instructions from, and to transmit data and instructions to, a storage system, at least one input device, and at least one output device.
[0070] Program code for carrying out methods of the present disclosure can be written in any combination of one or more programming languages. The program code can be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the program code, when executed by the processor or controller, produces the functions / operations specified in the flowcharts and / or block diagrams. The program code can be executed entirely on a machine, partially on a machine, partially on a machine as a stand-alone software package, partially on a machine and partially on a remote machine or entirely on a remote machine or server.
[0071] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. Machine-readable storage medium can include but are not limited to an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of the machine-readable storage medium would include one or more lines of electrical conductors, portable computer disks, hard disks, RAM, ROM, EPROM (Electrically Programmable Read-Only-Memory) or flash memory, optical fiber, CD-ROM (Compact Disc Read-Only Memory), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0072] To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having a display device (e.g., a CRT (Cathode-Ray Tube) or LCD (Liquid Crystal Display) monitor) for displaying information to the user and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the computer. Other kinds of devices can be used to provide for interaction with a user as well; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form, including acoustic, speech, or tactile input.
[0073] The systems and techniques described herein can be implemented in a computing system that includes a back end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front end component (e.g., a user computer having a graphical user interface or a Web browser through which a user can interact with an implementation of the systems and techniques described herein), or any combination of such back end, middleware, or front end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a LAN (Local Area Network), a WAN (Wide Area Network), the Internet, and a blockchain network.
[0074] The computer system can include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server is generally established using computer programs running on the respective computers and having a client-server relationship to each other. A server can be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system, to solve the defects of large management difficulty and weak business scalability in traditional physical host and VPS service ("Virtual Private Server", or simply "VPS"). The server can also be a server of a distributed system, or a server combined with a blockchain.
[0075] It should be noted that artificial intelligence is a discipline that studies enabling computers to simulate some thinking processes and intelligent behaviors (such as learning, reasoning, thinking, planning, etc.) of people, both hardware and software technologies. Artificial intelligence hardware technology generally includes technologies such as sensors, special artificial intelligence chips, cloud computing, distributed storage, big data processing, etc.; artificial intelligence software technology mainly includes computer vision technology, speech recognition technology, natural language processing technology, and machine learning / deep learning, big data processing technology, knowledge graph technology, etc. several major directions.
[0076] The first, second, and various other numerical designations involved in the present disclosure are only for the convenience of differentiation in the description, and do not limit the scope of the embodiments of the present disclosure, nor represent the order of precedence.
[0077] At least one of the present disclosure can also be described as one or more, multiple can be two, three, four or more, the present disclosure does not make restrictions. In the embodiments of the present disclosure, for a technical feature, the technical features in the technical feature are distinguished by "first", "second", "third", "A", "B", "C" and "D" and the like. The technical features described by "first", "second", "third", "A", "B", "C" and "D" have no order or size order.
[0078] It should be understood that the steps shown above can be reordered, added or deleted. For example, the steps described in the present disclosure can be executed in parallel, sequentially or in different order, as long as the desired results of the technical solutions disclosed in the present disclosure can be achieved, which is not limited herein.
[0079] The above specific embodiments do not constitute a limitation on the protection scope of the present disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modifications, equivalent replacements and improvements made within the spirit and principles of the present disclosure shall be included in the protection scope of the present disclosure.
Claims
1. A method of allocating computing resources, characterized by, The method comprises the following steps: constructing a shared computing resource pool and dynamically dividing resource groups according to tenant identification; based on the tenant identification and resource policy evaluation results, dynamically adjusting resource quotas in different business cycle states, and implementing resource isolation control based on the adjusted resource quotas; limiting the computing resources allocated to the tenants through the resource isolation mechanism; executing a task allocation and load balancing strategy based on distributed scheduling to allocate computing tasks to corresponding computing nodes.
2. The method of claim 1, wherein, The method of constructing a shared computing resource pool and dynamically dividing resource groups according to tenant identification comprises the following steps: aggregating multiple computing nodes into a unified shared computing resource pool, wherein each computing node contributes its computing core and memory resources; based on the tenant identification, dynamically dividing logically isolated resource groups from the shared computing resource pool; allocating exclusive computing resource quotas to each resource group, which includes the number of computing cores and memory capacity.
3. The method of claim 1, wherein, The method of dynamically adjusting resource quotas in different business cycle states based on the tenant identification and resource policy evaluation results comprises the following steps: based on the load of the shared computing resource pool, identifying high-load periods and low-load periods; in the high-load period, configuring a hard isolation mode for each resource group, locking its computing resource quota and executing resource boundary control; in the low-load period, performing over-allocated distribution of computing resources to respond to the computing needs of the resource groups, and over-allocating the computing resource quota beyond the original upper limit of the computing resource quota.
4. The method of claim 1, wherein, The method of limiting the computing resources allocated to the tenants through the resource isolation mechanism comprises the following steps: based on the control group, setting the upper limit of process-level computing resource usage to limit the computing resource usage rate of a single process; configuring a tenant-level memory quota and binding the memory quota with the number of computing cores; establishing resource isolation boundaries between tenants and monitoring the resource usage of tenant processes in real time.
5. The method of claim 1, wherein, The method of executing a task allocation and load balancing strategy based on distributed scheduling to allocate computing tasks to corresponding computing nodes comprises the following steps: according to the task priority, allocating the computing task to the computing node with the most available computing resources; splitting a single computing task into multiple sub-tasks and binding an independent process to each sub-task for execution.
6. The method of claim 3, wherein, The method further comprises the following steps: continuously monitoring the resource usage status of each resource group, and when the preset resource recycling conditions are met, releasing the over-allocated resources and returning them to the shared computing resource pool.
7. An apparatus for allocating computing resources, characterized by The method comprises the following steps: a division unit for constructing a shared computing resource pool and dynamically dividing resource groups according to tenant identification; an adjustment unit for dynamically adjusting resource quotas in different business cycle states based on the tenant identification and resource policy evaluation results, and implementing resource isolation control based on the adjusted resource quotas; a limiting unit for limiting the computing resources allocated to the tenants through the resource isolation mechanism; an allocation unit for executing a task allocation and load balancing strategy based on distributed scheduling to allocate computing tasks to corresponding computing nodes.
8. An electronic device, comprising: The method comprises the following steps: at least one processor; and a memory connected in communication with the at least one processor; wherein, The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-6.
9. A non-transitory computer-readable storage medium having stored thereon computer instructions, wherein, The computer instructions are for causing the computer to perform the method of any one of claims 1-6.
10. A computer program product, characterised in that, A computer program comprising instructions which, when executed by a processor, implement the method of any one of claims 1-6.