Method, apparatus and computer device for running resource allocation
By constructing a resource demand prediction model and optimizing it through artificial intelligence algorithms, the problem of unreasonable resource allocation in a multi-tenant environment has been solved, thereby improving resource utilization and business stability, and reducing operating costs.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- 曙光信息产业(河南)有限公司
- Filing Date
- 2024-12-11
- Publication Date
- 2026-06-19
Smart Images

Figure CN122240284A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a method, apparatus and computer equipment for allocating operating resources. Background Technology
[0002] With the development of digital technologies, enterprises and organizations require substantial operational resources to support applications such as data analytics, cloud computing, and artificial intelligence, making multi-tenant environments a common business model. In a multi-tenant environment, different tenants have different business needs and usage patterns, resulting in varying requirements for operational resources. Therefore, allocating appropriate operational resources to each tenant becomes crucial.
[0003] In related technologies, the main approach is to allocate fixed operating resources to multiple different tenants based on static configuration.
[0004] However, the unreasonable allocation of runtime resources to multiple different tenants in related technologies can lead to low utilization of runtime resources. Summary of the Invention
[0005] Therefore, it is necessary to provide a method, apparatus, and computer equipment for allocating operating resources to address the aforementioned technical problems, which can improve the rationality of multi-tenant allocation of operating resources and thus improve the utilization rate of operating resources.
[0006] In a first aspect, embodiments of this application provide a method for allocating runtime resources, the method comprising:
[0007] The resource demand forecasting model predicts the operational resource demand of each tenant to obtain the operational resource demand of each tenant; the resource demand forecasting model is a multi-tenant operational resource demand forecasting model built on artificial intelligence algorithms.
[0008] Based on the operational resource requirements of each tenant, corresponding operational resources are allocated to each tenant from the idle operational resources in the shared resource pool to determine the preliminary resource allocation results for each tenant.
[0009] The initial resource allocation results for each tenant are optimized to determine the optimized resource allocation results for each tenant.
[0010] The technical solution in this application embodiment predicts the operational resource requirements of each tenant based on a resource demand prediction model, obtaining the operational resource requirements of each tenant. The resource demand prediction model is a multi-tenant operational resource demand prediction model built on an artificial intelligence algorithm. Based on the operational resource requirements of each tenant, corresponding operational resources are allocated to each tenant from the idle operational resources in the shared resource pool to determine the preliminary resource allocation result for each tenant. The preliminary resource allocation result for each tenant is then optimized to determine the optimized resource allocation result for each tenant. The above method can predict the operational resource requirements of multiple tenants and, based on the prediction results, can effectively and reasonably allocate the operational resources of each tenant, improving the rationality of the operational resources allocated to multiple tenants, thereby improving the service quality of tenants, ensuring the stable operation of each tenant's business, and avoiding the problems of operational resource waste and insufficient operational resources obtained by each tenant, reducing the operating costs of tenants, and improving the utilization rate of operational resources. At the same time, the above method can predict the operational resource requirements of multiple tenants through a multi-tenant operational resource demand prediction model built on an artificial intelligence algorithm, thereby improving the accuracy of the prediction results and, on this basis, greatly improving the rationality of the operational resources allocated to multiple tenants.
[0011] In one embodiment, the operational resource requirements of each tenant are predicted based on a resource demand forecasting model to obtain the operational resource requirements of each tenant, including:
[0012] Obtain historical operational data for each tenant within a historical time period;
[0013] Based on historical operational data, determine the impact characteristics of each tenant on operational resource requirements;
[0014] All historical operational data and influencing characteristics are input into the resource demand forecasting model to predict the operational resource demand of each tenant, thus obtaining the operational resource demand of each tenant.
[0015] The technical solution in this application embodiment obtains the historical operation data of each tenant within a historical time period. Based on the historical operation data, it determines the impact characteristics of each tenant's operational resource demand. Both the historical operation data and the impact characteristics are then input into a resource demand prediction model to predict the operational resource demand of each tenant, thus obtaining the operational resource demand of each tenant. This method does not require complex algorithms to obtain the historical operation data and corresponding impact characteristics of each tenant within a historical time period, thereby reducing the complexity of obtaining the historical operation data and impact characteristics. Furthermore, based on this, the resource demand prediction model can predict the operational resource demand of each tenant based on both the historical operation data and the corresponding impact characteristics of their operational resource demand within a historical time period, which can greatly improve the accuracy of the predicted tenant operational resource demand.
[0016] In one embodiment, based on historical operational data, the impact characteristics of each tenant's operational resource requirements are determined, including:
[0017] Preprocess the historical operating data of each tenant within the historical time period to obtain the processed resource usage of each tenant;
[0018] Based on the processed resource usage of each tenant, feature extraction is performed to obtain the impact features of each tenant on the operational resource demand.
[0019] The technical solution in this application embodiment preprocesses the historical operating data of each tenant within a historical time period to obtain the processed resource usage of each tenant, and extracts features based on the processed resource usage of each tenant to obtain the impact features of each tenant on the operating resource demand. The above-mentioned acquisition of the impact features of each tenant on the operating resource demand provides important dependent information for further accurate prediction of the operating resource demand of each tenant. Moreover, this process first preprocesses the historical operating data of each tenant within a historical time period, and then extracts features based on the high-quality preprocessed results to obtain the impact features of each tenant on the operating resource demand, so that the accuracy of the final obtained impact features is high.
[0020] In one embodiment, based on the operational resource requirements of each tenant, corresponding operational resources are allocated to each tenant from the idle operational resources in the shared resource pool to determine the preliminary resource allocation results for each tenant, including:
[0021] Based on the operating resource requirements of each tenant and the current available resources corresponding to the idle operating resources, obtain the imbalance status of idle operating resources;
[0022] Based on the imbalance of idle running resources, the preset resource scheduling strategy, and the running resource requirements of each tenant, determine the resource allocation strategy for each tenant.
[0023] According to each tenant's resource allocation strategy, corresponding operating resources are allocated to each tenant from the idle operating resources to obtain the preliminary resource allocation results for each tenant.
[0024] The technical solution in this application embodiment obtains the imbalance state of idle running resources based on the operating resource requirements of each tenant and the current available resources corresponding to idle running resources. Based on the imbalance state of idle running resources, the preset resource scheduling strategy, and the operating resource requirements of each tenant, the resource allocation strategy of each tenant is determined. According to the resource allocation strategy of each tenant, the corresponding running resources are allocated to each tenant from the idle running resources to obtain the preliminary resource allocation result of each tenant. The above method can determine the resource allocation strategy of each tenant based on the imbalance state of idle running resources, and then allocate running resources to multiple tenants based on the resource allocation strategy of each tenant. This can avoid the problem of service interruption of each tenant due to the insufficient amount of idle running resources to meet the operating resource requirements of each tenant, and can speed up the processing efficiency of tenant services.
[0025] In one embodiment, the imbalance state of idle running resources is obtained based on the running resource requirements of each tenant and the current resource availability corresponding to idle running resources, including:
[0026] Determine the total demand for operating resources based on the operating resource requirements of each tenant;
[0027] If the total demand exceeds the current available resources, the imbalance of idle running resources is determined to be a resource shortage state.
[0028] If the total demand is less than the current available resources, then the imbalance of idle running resources is determined to be a resource surplus state.
[0029] The technical solution in this application embodiment determines the total demand for operating resources based on the operating resource requirements of each tenant. If the total demand is greater than the current available resources, the imbalance state of idle operating resources is determined to be a resource shortage state; if the total demand is less than the current available resources, the imbalance state of idle operating resources is determined to be a resource surplus state. The above method can determine the imbalance state of idle operating resources based on the relationship between the total demand for operating resources and the current available resources of idle operating resources. This process does not require complex algorithms, thereby reducing the complexity of determining the imbalance state of idle operating resources and improving the efficiency of determining the imbalance state of idle operating resources.
[0030] In one embodiment, the resource allocation strategy for each tenant is determined based on the imbalance of idle operating resources, a preset resource scheduling strategy, and the operating resource requirements of each tenant, including:
[0031] When the imbalance state is a resource shortage state, the additional available resources for running resources are determined according to the resource scheduling strategy;
[0032] Configure resource allocation strategies for each tenant based on current resource availability, additional resource availability, and each tenant's operational resource requirements.
[0033] The technical solution in this application embodiment, when the imbalance state is a resource gap state, determines the additional available resources for running resources according to the resource scheduling strategy, and configures the resource allocation strategy for each tenant based on the current available resources, the additional available resources, and the running resource requirements of each tenant. When the imbalance state of idle running resources is a resource gap state, the above method can obtain additional available resources from resource scheduling nodes outside each cluster, and configure resource allocation strategies for multiple tenants based on the idle running resources within each cluster and the idle running resources of resource scheduling nodes outside each cluster. Furthermore, the resource allocation strategy configured based on the additional available resources can not only accelerate the resource allocation speed for multiple tenants, but also ensure that the running resources allocated to each tenant can meet the actual needs. At the same time, the above method can flexibly configure the resource allocation strategy for multiple tenants by obtaining the additional available resources, thereby improving the wide applicability of the resource allocation method.
[0034] In one embodiment, the preliminary resource allocation results for each tenant are optimized to determine the optimized resource allocation results for each tenant, including:
[0035] Based on the preliminary resource allocation results of each tenant and the current resource usage of each tenant in relation to the preliminary resource allocation results, the resource utilization efficiency of each tenant's preliminary resource allocation results is evaluated to obtain the first energy efficiency quantification value of each tenant.
[0036] If the first energy efficiency quantification value of each tenant does not meet the standard, the preliminary resource allocation results of each tenant will be adjusted according to the first energy efficiency quantification value of each tenant to obtain the candidate resource allocation results of each tenant.
[0037] If each tenant meets the second energy efficiency quantification value under the corresponding candidate resource allocation result, the candidate resource allocation result will be determined as the optimized resource allocation result for each tenant.
[0038] The technical solution in this application embodiment evaluates the resource utilization efficiency of each tenant's initial resource allocation result based on the initial resource allocation result and the current resource usage of each tenant in relation to the initial resource allocation result, obtaining a first energy efficiency quantification value for each tenant. If the first energy efficiency quantification value of each tenant does not meet the standard, the initial resource allocation result of each tenant is adjusted according to the first energy efficiency quantification value of each tenant to obtain a candidate resource allocation result for each tenant. If the second energy efficiency quantification value of each tenant under the corresponding candidate resource allocation result meets the standard, the candidate resource allocation result is determined as the optimized resource allocation result for each tenant. In the process of allocating operating resources to multiple tenants, if the operating resources allocated to each tenant cause the resource utilization efficiency of multiple tenants to not meet the standard, the above method will continuously and dynamically adjust the resource allocation result to reduce unnecessary resource waste and ensure that the final obtained resource allocation result can make the resource utilization efficiency of multiple tenants reach the optimal standard, that is, to ensure the maximum utilization of resources of each tenant, reduce the energy consumption of each tenant, and achieve the goal of energy conservation and emission reduction. In addition, the method can also enable the operating resources allocated to each tenant to adapt to the current dynamic changes in demand, thereby improving the utilization rate of the allocated operating resources.
[0039] In one embodiment, the method further includes:
[0040] If the second energy efficiency quantification value of each tenant does not meet the standard, the resource optimization strategy library will be adjusted according to the second energy efficiency quantification value of each tenant and the current resource usage to obtain the latest resource optimization strategy library;
[0041] Based on the second energy efficiency quantification value of each tenant and the resource optimization strategy library, the candidate resource allocation results of each tenant are adjusted until the energy efficiency quantification value of each tenant under the latest resource allocation results meets the standard. The latest resource allocation results are then determined as the optimized resource allocation results for each tenant.
[0042] In the technical solution of this application embodiment, if the second energy efficiency quantification value of each tenant does not meet the standard, the resource optimization strategy library is adjusted according to the second energy efficiency quantification value of each tenant and the current resource usage to obtain the latest resource optimization strategy library. Then, the candidate resource allocation results of each tenant are adjusted according to the second energy efficiency quantification value of each tenant and the resource optimization strategy library until the energy efficiency quantification value of each tenant meets the standard under the latest resource allocation result. The latest resource allocation result is determined as the optimized resource allocation result corresponding to each tenant. The above method can iteratively optimize the resource allocation result of each tenant to ensure that the final operating resources allocated to each tenant can greatly improve the resource utilization efficiency of each tenant when processing business.
[0043] Secondly, embodiments of this application provide a runtime resource allocation device, the device comprising:
[0044] The prediction module is used to predict the operating resource requirements of each tenant based on the resource demand prediction model, and obtain the operating resource requirements of each tenant; the resource demand prediction model is a multi-tenant operating resource demand prediction model built on artificial intelligence algorithms.
[0045] The allocation module is used to allocate corresponding running resources to each tenant from the idle running resources in the shared resource pool according to the running resource requirements of each tenant, and determine the preliminary resource allocation results for each tenant.
[0046] The optimization processing module is used to optimize the initial resource allocation results for each tenant and determine the optimized resource allocation results for each tenant.
[0047] Thirdly, embodiments of this application also provide a computer device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the steps of the method in any of the embodiments of the first aspect described above.
[0048] Fourthly, embodiments of this application also provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the method in any of the embodiments of the first aspect described above.
[0049] Fifthly, embodiments of this application also provide a computer program product, which includes a computer program that, when executed by a processor, implements the steps of the method in any of the embodiments of the first aspect described above.
[0050] The above description is only an overview of the technical solution of this application. In order to better understand the technical means of this application and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of this application more obvious and understandable, the following are specific embodiments of this application. Attached Figure Description
[0051] Figure 1 This is a diagram of the application environment in which the resource allocation method is running in one embodiment;
[0052] Figure 2 This is a flowchart illustrating the execution of a resource allocation method in one embodiment;
[0053] Figure 3 This is a flowchart illustrating the execution of the resource allocation method in another embodiment;
[0054] Figure 4 This is a flowchart illustrating the execution of the resource allocation method in another embodiment;
[0055] Figure 5This is a flowchart illustrating the execution of the resource allocation method in another embodiment;
[0056] Figure 6 This is a flowchart illustrating the execution of the resource allocation method in another embodiment;
[0057] Figure 7 This is a flowchart illustrating the execution of the resource allocation method in another embodiment;
[0058] Figure 8 This is a flowchart illustrating the execution of the resource allocation method in another embodiment;
[0059] Figure 9 This is a flowchart illustrating the execution of the resource allocation method in another embodiment;
[0060] Figure 10 This is a structural block diagram of the operating resource allocation device in one embodiment;
[0061] Figure 11 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0062] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0063] In the business processing domain, enterprises and organizations require substantial operational resources to support applications such as data analytics, cloud computing, and artificial intelligence, making multi-tenant environments a common business model. In a multi-tenant environment, different tenants have different business needs and usage patterns, resulting in varying demands for operational resources. Therefore, allocating appropriate operational resources to multiple tenants becomes crucial. Related technologies primarily rely on static configuration to allocate different fixed operational resources to multiple tenants. However, the unreasonable allocation of operational resources among multiple tenants in these technologies leads to low resource utilization. Therefore, this application provides a method for allocating operational resources that improves the rationality of resource allocation among multiple tenants, thereby increasing resource utilization.
[0064] The runtime resource allocation method provided in this application embodiment is applicable to... Figure 1The application environment diagram shown illustrates this. This application environment includes a runtime resource allocation system, which may include at least one cluster, a management node, and computer equipment. Each cluster can communicate with the management node, and the management node can communicate with the computer equipment. This communication method can be Wi-Fi, mobile network, or Bluetooth, etc. Optionally, each cluster can be, but is not limited to, a high-performance computing cluster, a high-availability cluster, or a load-balancing cluster. Each cluster includes multiple computing nodes, each with certain runtime resources. The computer equipment can be personal computers, laptops, desktop computers, smartphones, smart bracelets, smartwatches, or other electronic devices with data processing capabilities. This embodiment does not limit the specific form of each cluster and computer equipment. Figure 1 This example illustrates the operation of a resource allocation system using n clusters as an example. The following embodiment uses computer devices as the executing entity of the resource allocation method to describe the specific process of running the resource allocation method.
[0065] like Figure 2 The diagram shown is a flowchart illustrating the runtime resource allocation method provided in this application embodiment. This method can be implemented through the following steps:
[0066] S100. Based on the resource demand prediction model, predict the operating resource requirements of each tenant to obtain the operating resource requirements of each tenant. The resource demand prediction model is a multi-tenant operating resource demand prediction model built based on artificial intelligence algorithms.
[0067] In practical applications, each tenant can apply for corresponding runtime resources when processing relevant business. These runtime resources can include storage resources. In this embodiment, the runtime resources are described as computing resources, which may include CPU resources, GPU resources, DCU resources, memory resources, hard disk resources, network resources, etc. It should be noted that each tenant can be an enterprise or an organization.
[0068] Optionally, the aforementioned artificial intelligence algorithm can be at least one of big data analysis algorithms, machine learning algorithms, deep learning algorithms, etc.; the aforementioned resource demand prediction model can be implemented by at least one of convolutional neural network models, fully connected neural network models, long short-term memory neural network models, time series analysis neural network models, recurrent recurrent neural network models, residual neural network models, etc. In this embodiment of the application, the resource demand prediction model is used to predict the resource demand for multi-tenant operation in a multi-tenant scenario.
[0069] Specifically, the computer equipment can obtain the resource usage of each tenant for running resources and / or the amount of business to be processed by each tenant in a historical time period, and input the resource usage and corresponding business volume of each tenant into the resource demand prediction model in sequence. The resource demand prediction model predicts the running resource demand of each tenant based on the resource usage and corresponding business volume of each tenant and outputs the running resource demand of each tenant.
[0070] It should be noted that the computer equipment is equipped with a resource request service interface. Each tenant can input their own runtime resource request through this resource request service interface. Correspondingly, the computer equipment can respond to each tenant's runtime resource request and begin executing the steps in S100 above.
[0071] S200. Based on the operating resource requirements of each tenant, allocate corresponding operating resources to each tenant from the idle operating resources in the shared resource pool to determine the preliminary resource allocation results for each tenant.
[0072] In practical applications, computer devices can send the operating resource requirements of each tenant to the management node, instructing the management node to allocate the corresponding operating resources to each tenant from the idle operating resources in the shared resource pool, thus obtaining the preliminary resource allocation results for each tenant.
[0073] In addition, the computer device can obtain the current available amount of idle running resources in the shared resource pool, and then analyze and / or perform arithmetic operations on the current available resources and the running resource requirements of each tenant to allocate corresponding running resources to each tenant from the idle running resources in the shared resource pool, thereby obtaining the preliminary resource allocation results for each tenant. Optionally, the above arithmetic operations can be addition and / or subtraction operations.
[0074] The idle operating resources within the shared resource pool can include the set of idle operating resources on each compute node in each cluster. Furthermore, the initial resource allocation result for any tenant can include the amount of operating resources allocated to that tenant on the corresponding compute node in at least one cluster, along with the identifier of that compute node.
[0075] S300. Optimize the preliminary resource allocation results for each tenant and determine the optimized resource allocation results for each tenant.
[0076] Specifically, the computer equipment can optimize the initial resource allocation results of each tenant according to a preset optimization allocation strategy to obtain the optimized resource allocation results of each tenant.
[0077] In addition, the computer equipment can pre-train an algorithm model, and then input the preliminary resource allocation results of each tenant into the algorithm model in sequence. The algorithm model optimizes the preliminary resource allocation results of each tenant and outputs the optimized resource allocation results of each tenant.
[0078] The technical solution in this application embodiment predicts the operational resource requirements of each tenant based on a resource demand prediction model, obtaining the operational resource requirements of each tenant. The resource demand prediction model is a multi-tenant operational resource demand prediction model built on an artificial intelligence algorithm. Based on the operational resource requirements of each tenant, corresponding operational resources are allocated to each tenant from the idle operational resources in the shared resource pool to determine the preliminary resource allocation result for each tenant. The preliminary resource allocation result for each tenant is then optimized to determine the optimized resource allocation result for each tenant. The above method can predict the operational resource requirements of multiple tenants and, based on the prediction results, can effectively and reasonably allocate the operational resources of each tenant, improving the rationality of the operational resources allocated to multiple tenants, thereby improving the service quality of tenants, ensuring the stable operation of each tenant's business, and avoiding the problems of operational resource waste and insufficient operational resources obtained by each tenant, reducing the operating costs of tenants, and improving the utilization rate of operational resources. At the same time, the above method can predict the operational resource requirements of multiple tenants through a multi-tenant operational resource demand prediction model built on an artificial intelligence algorithm, thereby improving the accuracy of the prediction results and, on this basis, greatly improving the rationality of the operational resources allocated to multiple tenants.
[0079] The following describes the process of predicting the operational resource requirements of each tenant based on the resource demand forecasting model to obtain the operational resource requirements of each tenant. In one embodiment, as... Figure 3 As shown, the steps in S100 above can be implemented in the following ways:
[0080] S110. Obtain historical operational data for each tenant within a historical time period.
[0081] Specifically, computer devices can obtain historical operational data of each tenant within a historical time period from locations such as the cloud, local storage, hard drives, and disks. Optionally, the tenant's historical operational data may include multi-dimensional data such as the tenant's resource usage data, processed business data, business resource usage, and tenant data within the historical time period; historical resource usage data may include data such as the quantity, model, type, and resource utilization rate of operating resources; business data may include data such as business type and volume; and tenant data may include data such as the tenant's name, size, and region.
[0082] In practical applications, computer devices can retrieve historical operational data for each tenant within a historical time period from a high-performance database. In this embodiment, the historical operational data of each tenant can be stored in a high-performance database for quick querying and retrieval during application use.
[0083] S120. Based on historical operational data, determine the impact characteristics of each tenant's operational resource requirements.
[0084] Specifically, computer equipment can perform feature analysis on the historical operational data of each tenant within a historical time period to obtain the impact characteristics of each tenant's demand for operational resources. Optionally, the impact characteristics may include features such as time patterns, business runtime, and the tenant's application or release status for operational resources; the time patterns may include off-peak or peak periods.
[0085] S130. Input all historical operational data and all influencing characteristics into the resource demand forecasting model to predict the operational resource demand of each tenant, and obtain the operational resource demand of each tenant.
[0086] In this embodiment of the application, for any tenant, the computer device can input the tenant's historical operating data and the tenant's impact characteristics into the resource demand prediction model to predict the tenant's operating resource demand, and then output the tenant's operating resource demand.
[0087] The technical solution in this application embodiment obtains the historical operation data of each tenant within a historical time period. Based on the historical operation data, it determines the impact characteristics of each tenant's operational resource demand. Both the historical operation data and the impact characteristics are then input into a resource demand prediction model to predict the operational resource demand of each tenant, thus obtaining the operational resource demand of each tenant. This method does not require complex algorithms to obtain the historical operation data and corresponding impact characteristics of each tenant within a historical time period, thereby reducing the complexity of obtaining the historical operation data and impact characteristics. Furthermore, based on this, the resource demand prediction model can predict the operational resource demand of each tenant based on both the historical operation data and the corresponding impact characteristics of their operational resource demand within a historical time period, which can greatly improve the accuracy of the predicted tenant operational resource demand.
[0088] The process of determining the impact characteristics of each tenant's operational resource requirements based on historical operational data is described below. In one embodiment, such as... Figure 4 As shown, the steps in S120 above can be implemented in the following ways:
[0089] S121. Preprocess the historical operating data of each tenant within the historical time period to obtain the processed resource usage of each tenant.
[0090] In practical applications, computer equipment can pre-train a preprocessing model, and then input the historical operating data of each tenant within the historical time period into the preprocessing model in sequence. The preprocessing model preprocesses the historical operating data of each tenant within the historical time period and outputs the processed resource usage of each tenant.
[0091] The computer equipment can employ filtering algorithms to preprocess the historical operational data of each tenant within a historical time period to obtain the processed resource usage of each tenant. In this embodiment, the preprocessing may include at least one of data augmentation, data balancing, data cleaning, data integration, and standardization.
[0092] S122. Based on the processed resource usage of each tenant, feature extraction is performed to obtain the impact features of each tenant on the operational resource demand.
[0093] Specifically, the computer equipment can employ feature extraction algorithms to extract features from the processed resource usage of each tenant, thereby obtaining the impact features of each tenant on the operational resource demand. Optionally, the aforementioned feature extraction algorithm can be at least one of histogram feature extraction, principal component analysis, wavelet transform feature extraction, etc.
[0094] Additionally, the computer equipment can pre-train a feature extraction model, and then sequentially input the processed resource usage of each tenant into the feature extraction model. This model extracts features based on the processed resource usage of each tenant to obtain the impact features of each tenant's influence on runtime resource requirements. The aforementioned feature extraction model can be implemented using at least one of the following: convolutional neural network model, fully connected neural network model, long short-term memory neural network model, recurrent recurrent neural network model, etc.
[0095] The technical solution in this application embodiment preprocesses the historical operating data of each tenant within a historical time period to obtain the processed resource usage of each tenant, and extracts features based on the processed resource usage of each tenant to obtain the impact features of each tenant on the operating resource demand. The above-mentioned acquisition of the impact features of each tenant on the operating resource demand provides important dependent information for further accurate prediction of the operating resource demand of each tenant. Moreover, this process first preprocesses the historical operating data of each tenant within a historical time period, and then extracts features based on the high-quality preprocessed results to obtain the impact features of each tenant on the operating resource demand, so that the accuracy of the final obtained impact features is high.
[0096] In one embodiment, such as Figure 5As shown, the step in S200 above, which allocates corresponding operating resources to each tenant from the idle operating resources in the shared resource pool based on each tenant's operating resource requirements, and determines the preliminary resource allocation result for each tenant, can be implemented in the following way:
[0097] S210. Based on the operating resource requirements of each tenant and the current available resources corresponding to the idle operating resources, obtain the unbalanced state of the idle operating resources.
[0098] Specifically, computer equipment can perform arithmetic operations, analysis, and comparison on the operating resource requirements of each tenant and the current available resources corresponding to idle operating resources to obtain the unbalanced state of idle operating resources.
[0099] In addition, computer equipment can call analysis tools to analyze the resource requirements of each tenant and the current resource availability corresponding to idle resources, thereby obtaining the imbalance status of idle resources.
[0100] S220. Based on the imbalance of idle operating resources, the preset resource scheduling strategy, and the operating resource requirements of each tenant, determine the resource allocation strategy for each tenant.
[0101] In practical applications, computer devices can send the imbalance status of idle operating resources, preset resource scheduling policies, and the operating resource requirements of each tenant to a third-party device, instructing the third-party device to formulate a resource allocation policy for each tenant based on the imbalance status of idle operating resources, the preset resource scheduling policies, and the operating resource requirements of each tenant. Correspondingly, the computer device can obtain the resource allocation policies for each tenant sent by the third-party device.
[0102] Simultaneously, the computer equipment can also employ resource allocation algorithms to configure resource allocation strategies for each tenant based on the imbalance of idle operating resources, preset resource scheduling strategies, and the operating resource requirements of each tenant. Optionally, the aforementioned resource allocation algorithm can be at least one of the following: first-come, first-served algorithm, minimum service priority algorithm, contribution algorithm, resource scheduling strategy, etc.
[0103] S230. According to the resource allocation strategy of each tenant, allocate the corresponding running resources to each tenant from the idle running resources to obtain the preliminary resource allocation results of each tenant.
[0104] The resource allocation strategy mentioned above may include information such as the resource allocation method and resource allocation parameters for each tenant. Specifically, the computer equipment can allocate corresponding operating resources to each tenant from idle operating resources according to the resource allocation strategy for each tenant, thereby obtaining the preliminary resource allocation results for each tenant.
[0105] In this embodiment of the application, the computer device can send the resource allocation strategy of each tenant to the management node, instructing the management node to allocate corresponding running resources to each tenant from the idle running resources according to the resource allocation strategy of each tenant, so as to obtain the preliminary resource allocation result of each tenant.
[0106] The technical solution in this application embodiment obtains the imbalance state of idle running resources based on the operating resource requirements of each tenant and the current available resources corresponding to idle running resources. Based on the imbalance state of idle running resources, the preset resource scheduling strategy, and the operating resource requirements of each tenant, the resource allocation strategy of each tenant is determined. According to the resource allocation strategy of each tenant, the corresponding running resources are allocated to each tenant from the idle running resources to obtain the preliminary resource allocation result of each tenant. The above method can determine the resource allocation strategy of each tenant based on the imbalance state of idle running resources, and then allocate running resources to multiple tenants based on the resource allocation strategy of each tenant. This can avoid the problem of service interruption of each tenant due to the insufficient amount of idle running resources to meet the operating resource requirements of each tenant, and can speed up the processing efficiency of tenant services.
[0107] The process of obtaining the imbalance state of idle running resources based on the running resource requirements of each tenant and the current resource availability corresponding to the idle running resources is described below. In one embodiment, as... Figure 6 As shown, the steps in S210 above can be implemented in the following ways:
[0108] S211. Determine the total demand for operating resources based on the operating resource requirements of each tenant.
[0109] Specifically, computer equipment can sum the operating resource requirements of each tenant to obtain the total operating resource requirements.
[0110] S212. If the total demand is greater than the current available resources, then the unbalanced state of idle running resources is determined to be a resource shortage state.
[0111] In practical applications, computer equipment can determine whether the total demand is greater than the current available resources. If so, the imbalance of idle running resources is determined to be a resource gap state, indicating that the current available resources cannot meet the total demand.
[0112] S213. If the total demand is less than the current available resources, then the unbalanced state of idle running resources is determined to be a resource surplus state.
[0113] Meanwhile, if the total demand is determined to be less than the current available resources, the imbalance of idle running resources can be identified as a resource surplus state, indicating that the current available resources can meet the total demand.
[0114] The technical solution in this application embodiment determines the total demand for operating resources based on the operating resource requirements of each tenant. If the total demand is greater than the current available resources, the imbalance state of idle operating resources is determined to be a resource shortage state; if the total demand is less than the current available resources, the imbalance state of idle operating resources is determined to be a resource surplus state. The above method can determine the imbalance state of idle operating resources based on the relationship between the total demand for operating resources and the current available resources of idle operating resources. This process does not require complex algorithms, thereby reducing the complexity of determining the imbalance state of idle operating resources and improving the efficiency of determining the imbalance state of idle operating resources.
[0115] The process of determining the resource allocation strategy for each tenant based on the imbalance of idle operating resources, the preset resource scheduling strategy, and the operating resource requirements of each tenant is described below. In one embodiment, as... Figure 7 As shown, the steps in S220 above can be implemented in the following ways:
[0116] S221. When the imbalance state is a resource shortage state, determine the additional available resources for running resources according to the resource scheduling strategy.
[0117] In practical applications, if the imbalance of idle running resources constitutes a resource shortage, a resource scheduling node can be determined according to the resource scheduling strategy. Then, a resource availability request is sent to the resource scheduling node to obtain additional available resources for the running resources. Optionally, there can be one or more resource scheduling nodes; these nodes can be newly added nodes in each cluster, i.e., expansion nodes; or they can be nodes from the cloud service provider in each cluster.
[0118] In one embodiment, the resource scheduling strategy can determine the resource scheduling node by extracting the node identifier from the resource scheduling strategy and then determining the node corresponding to the node identifier as the resource scheduling node.
[0119] In another embodiment, the resource scheduling strategy can determine the resource scheduling node by identifying and processing the information in the resource scheduling strategy.
[0120] In addition, the computer equipment can also look up the scheduling node identifier corresponding to the scheduling node in the association between different node identifiers and different resource availability, and then determine the resource availability corresponding to the node identifier that is adjacent to the scheduling node identifier in the association as the additional resource availability.
[0121] S222. Configure the resource allocation strategy for each tenant based on the current resource availability, additional resource availability, and the operating resource requirements of each tenant.
[0122] Specifically, the computer device can pre-train a resource allocation strategy formulation model, and then input the current available resources, additional available resources, and the operating resource requirements of each tenant into the formulation model. The formulation model configures the resource allocation strategy for each tenant based on the current available resources, additional available resources, and the operating resource requirements of each tenant, and then outputs the resource allocation strategy for each tenant.
[0123] In addition, computer equipment can also use resource allocation algorithms to configure resource allocation strategies for each tenant based on the current available resources, additional available resources, and the operating resource requirements of each tenant.
[0124] The technical solution in this application embodiment, when the imbalance state is a resource gap state, determines the additional available resources for running resources according to the resource scheduling strategy, and configures the resource allocation strategy for each tenant based on the current available resources, the additional available resources, and the running resource requirements of each tenant. When the imbalance state of idle running resources is a resource gap state, the above method can obtain additional available resources from resource scheduling nodes outside each cluster, and configure resource allocation strategies for multiple tenants based on the idle running resources within each cluster and the idle running resources of resource scheduling nodes outside each cluster. Furthermore, the resource allocation strategy configured based on the additional available resources can not only accelerate the resource allocation speed for multiple tenants, but also ensure that the running resources allocated to each tenant can meet the actual needs. At the same time, the above method can flexibly configure the resource allocation strategy for multiple tenants by obtaining the additional available resources, thereby improving the wide applicability of the resource allocation method.
[0125] The following describes the process of optimizing the preliminary resource allocation results for each tenant to determine the optimized resource allocation results. In one embodiment, as... Figure 8 As shown, the steps in S300 above can be implemented in the following ways:
[0126] S310. Based on the preliminary resource allocation results of each tenant and the current resource usage of each tenant in relation to the preliminary resource allocation results, evaluate the resource utilization efficiency of each tenant's preliminary resource allocation results to obtain the first energy efficiency quantification value of each tenant.
[0127] It should be noted that for any tenant, the required operating resources will dynamically change over time. Naturally, during the use of the allocated operating resources based on the initial resource allocation results, the tenant's current resource usage can be dynamically monitored in real time to continuously adjust the initial resource allocation results and improve the rationality of the final resource allocation results for each tenant. The tenant's current resource usage based on the initial resource allocation results can be greater than, less than, or equal to the tenant's operating resource requirements. Therefore, in this embodiment, the resource utilization efficiency of the tenant's initial resource allocation results can be evaluated to determine the tenant's usage of the allocated operating resources. Furthermore, to ensure high resource utilization, the allocation can be continuously optimized based on the energy efficiency assessment results.
[0128] In this embodiment of the application, the computer device is provided with a resource monitoring service interface. Each tenant can input their own resource usage monitoring request through the resource monitoring service interface to instruct the computer device to dynamically monitor the current resource usage of the tenant in real time.
[0129] In practical applications, computer equipment can employ evaluation algorithms to assess the resource utilization efficiency of each tenant based on the initial resource allocation results and the current resource usage of each tenant relative to the initial allocation results, thereby obtaining a first energy efficiency quantification value for each tenant. Optionally, the aforementioned evaluation algorithm can be a supply-demand balance analysis method, a core component analysis method, etc.
[0130] In addition, the computer equipment can pre-train an evaluation model, and then input the preliminary resource allocation results of each tenant and the current resource usage of each tenant in relation to the preliminary resource allocation results into the evaluation model. The evaluation model evaluates the resource usage efficiency of each tenant's preliminary resource allocation results based on the preliminary resource allocation results of each tenant and the current resource usage of each tenant in relation to the preliminary resource allocation results, and then obtains the first energy efficiency quantification value of each tenant.
[0131] S320. If the first energy efficiency quantification value of each tenant does not meet the standard, the preliminary resource allocation result of each tenant shall be adjusted according to the first energy efficiency quantification value of each tenant to obtain the candidate resource allocation result of each tenant.
[0132] In cases where the first energy efficiency quantification value of each tenant is determined to be unsatisfactory, the preliminary resource allocation results of each tenant can be adjusted based on the first energy efficiency quantification value of each tenant to obtain the candidate resource allocation results of each tenant.
[0133] In addition, if each tenant meets the first energy efficiency quantification value, the preliminary resource allocation results can be determined as the optimized resource allocation results for each tenant.
[0134] S330. If each tenant meets the second energy efficiency quantification value under the corresponding candidate resource allocation result, the candidate resource allocation result shall be determined as the optimized resource allocation result corresponding to each tenant.
[0135] In practical applications, during the process of each tenant processing the corresponding task under the corresponding candidate resource allocation results, the candidate resource usage of each tenant under the initial resource allocation results can be obtained. Then, based on the candidate resource allocation results of each tenant and the current resource usage of each tenant under the candidate resource allocation results, the resource utilization efficiency of each tenant's candidate resource allocation results is evaluated to obtain the second energy efficiency quantification value of each tenant. If the second energy efficiency quantification value of each tenant under the corresponding candidate resource allocation results meets the standard, the candidate resource allocation results can be determined as the optimized resource allocation results for each tenant.
[0136] The technical solution in this application embodiment evaluates the resource utilization efficiency of each tenant's initial resource allocation result based on the initial resource allocation result and the current resource usage of each tenant in relation to the initial resource allocation result, obtaining a first energy efficiency quantification value for each tenant. If the first energy efficiency quantification value of each tenant does not meet the standard, the initial resource allocation result of each tenant is adjusted according to the first energy efficiency quantification value of each tenant to obtain a candidate resource allocation result for each tenant. If the second energy efficiency quantification value of each tenant under the corresponding candidate resource allocation result meets the standard, the candidate resource allocation result is determined as the optimized resource allocation result for each tenant. In the process of allocating operating resources to multiple tenants, if the operating resources allocated to each tenant cause the resource utilization efficiency of multiple tenants to not meet the standard, the above method will continuously and dynamically adjust the resource allocation result to reduce unnecessary resource waste and ensure that the final obtained resource allocation result can make the resource utilization efficiency of multiple tenants reach the optimal standard, that is, to ensure the maximum utilization of resources of each tenant, reduce the energy consumption of each tenant, and achieve the goal of energy conservation and emission reduction. In addition, the method can also enable the operating resources allocated to each tenant to adapt to the current dynamic changes in demand, thereby improving the utilization rate of the allocated operating resources.
[0137] In one embodiment, after performing the steps in S320 above, as follows: Figure 9 As shown, the above method may further include the following steps:
[0138] S340. If the second energy efficiency quantification value of each tenant does not meet the standard, the resource optimization strategy library shall be adjusted according to the second energy efficiency quantification value of each tenant and the current resource usage to obtain the latest resource optimization strategy library.
[0139] The resource optimization strategy library may include load balancing strategies, resource hibernation strategies, task migration strategies, etc., which are not limited in this embodiment.
[0140] Specifically, the computer device can pre-train a strategy library adjustment model. Then, for any tenant, if the tenant's second energy efficiency quantification value does not meet the standard, the tenant's second energy efficiency quantification value and current resource usage are both input into the strategy library adjustment model. The strategy library adjustment model adjusts the resource optimization strategy library according to the tenant's second energy efficiency quantification value and current resource usage, and then outputs the latest resource optimization strategy library.
[0141] In addition, if the second energy efficiency quantification value of the tenant does not meet the standard, the computer equipment can calculate the resource allocation parameters based on the tenant's second energy efficiency quantification value and the current resource usage, and then update the original resource allocation parameters in the resource optimization strategy library based on the resource allocation parameters to complete the adjustment of the resource optimization strategy library and obtain the latest resource optimization strategy library.
[0142] S350. Based on the second energy efficiency quantification value of each tenant and the resource optimization strategy library, adjust the candidate resource allocation results of each tenant until the energy efficiency quantification value of each tenant under the latest resource allocation results meets the standard, and determine the latest resource allocation results as the optimized resource allocation results corresponding to each tenant.
[0143] Furthermore, for any given tenant, the computer device can select a target resource optimization strategy from the resource optimization strategy library based on the tenant's second energy efficiency quantification value. Then, it adjusts the candidate resource allocation results for each tenant according to the target resource optimization strategy until the tenant's energy efficiency quantification value under the latest resource allocation result meets the standard. Each latest resource allocation result is then determined as the optimized resource allocation result for each tenant. It should be noted that the resource allocation result for each tenant can be adjusted cyclically until the obtained energy efficiency quantification value for that tenant under the latest resource allocation result meets the standard.
[0144] In practical applications, computer devices are equipped with query interfaces. Through these interfaces, users can input resource allocation result query requests. In response, the computer devices can output and display the optimized resource allocation results for each tenant.
[0145] In the technical solution of this application embodiment, if the second energy efficiency quantification value of each tenant does not meet the standard, the resource optimization strategy library is adjusted according to the second energy efficiency quantification value of each tenant and the current resource usage to obtain the latest resource optimization strategy library. Then, the candidate resource allocation results of each tenant are adjusted according to the second energy efficiency quantification value of each tenant and the resource optimization strategy library until the energy efficiency quantification value of each tenant meets the standard under the latest resource allocation result. The latest resource allocation result is determined as the optimized resource allocation result corresponding to each tenant. The above method can iteratively optimize the resource allocation result of each tenant to ensure that the final operating resources allocated to each tenant can greatly improve the resource utilization efficiency of each tenant when processing business.
[0146] In one embodiment, this application also provides a method for allocating runtime resources, applied to a computer device, the method comprising the following steps:
[0147] (1) Obtain historical operational data for each tenant within a historical time period;
[0148] (2) Preprocess the historical operating data of each tenant within the historical time period to obtain the processed resource usage of each tenant;
[0149] (3) Based on the processed resource usage of each tenant, feature extraction is performed to obtain the impact features of each tenant on the operational resource demand;
[0150] (4) Input all historical operating data and all influencing characteristics into the resource demand prediction model to predict the operating resource demand of each tenant and obtain the operating resource demand of each tenant; the resource demand prediction model is a prediction model of multi-tenant operating resource demand based on artificial intelligence algorithm.
[0151] (5) Determine the total demand for operating resources based on the operating resource requirements of each tenant;
[0152] (6) If the total demand is greater than the current available resources, the imbalance of idle operating resources is determined to be a resource shortage state; if the total demand is less than the current available resources, the imbalance of idle operating resources is determined to be a resource surplus state.
[0153] (7) When the imbalance state is a resource shortage state, determine the additional available resources for operation based on the resource scheduling strategy;
[0154] (8) Configure the resource allocation strategy for each tenant based on the current resource availability, additional resource availability, and the operating resource requirements of each tenant;
[0155] (9) According to the resource allocation strategy of each tenant, allocate the corresponding running resources to each tenant from the idle running resources to obtain the preliminary resource allocation results of each tenant;
[0156] (10) Based on the preliminary resource allocation results of each tenant and the current resource usage of each tenant in relation to the preliminary resource allocation results, evaluate the resource utilization efficiency of each tenant’s preliminary resource allocation results and obtain the first energy efficiency quantification value of each tenant.
[0157] (11) If the first energy efficiency quantification value of each tenant does not meet the standard, the preliminary resource allocation result of each tenant is adjusted according to the first energy efficiency quantification value of each tenant to obtain the candidate resource allocation result of each tenant. If the second energy efficiency quantification value of each tenant meets the standard under the corresponding candidate resource allocation result, the candidate resource allocation result is determined as the optimized resource allocation result of each tenant.
[0158] (12) If the second energy efficiency quantification value of each tenant does not meet the standard, the resource optimization strategy library is adjusted according to the second energy efficiency quantification value of each tenant and the current resource usage to obtain the latest resource optimization strategy library. The candidate resource allocation results of each tenant are adjusted according to the second energy efficiency quantification value of each tenant and the resource optimization strategy library until the energy efficiency quantification value of each tenant meets the standard under the latest resource allocation results. The latest resource allocation results are determined as the optimized resource allocation results corresponding to each tenant.
[0159] The specific execution process of (1) to (12) above can be found in the description of the above embodiments. The implementation principle and technical effect are similar, and will not be repeated here.
[0160] It should be understood that although the steps in the flowcharts of the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0161] Based on the same inventive concept, this application also provides a runtime resource allocation apparatus for implementing the runtime resource allocation method described above. The solution provided by this apparatus is similar to the implementation scheme described in the above method; therefore, the specific limitations in one or more runtime resource allocation apparatus embodiments provided below can be found in the limitations of the runtime resource allocation method described above, and will not be repeated here.
[0162] In one embodiment, Figure 10 This is a schematic diagram of the structure of a runtime resource allocation device in one embodiment of this application. The runtime resource allocation device provided in this embodiment can be applied to computer equipment. Figure 10 As shown, the runtime resource allocation device in this embodiment may include: a prediction module 11, an allocation module 12, and an optimization processing module 13, wherein:
[0163] The prediction module 11 is used to predict the operating resource requirements of each tenant based on the resource demand prediction model, and obtain the operating resource requirements of each tenant; the resource demand prediction model is a prediction model of multi-tenant operating resource requirements built on artificial intelligence algorithms.
[0164] The allocation module 12 is used to allocate corresponding operating resources to each tenant from the idle operating resources in the shared resource pool according to the operating resource requirements of each tenant, and to determine the preliminary resource allocation result of each tenant.
[0165] The optimization processing module 13 is used to optimize the preliminary resource allocation results of each tenant and determine the optimized resource allocation results of each tenant.
[0166] The runtime resource allocation device provided in this application embodiment can be used to execute the technical solutions in the above-described runtime resource allocation method embodiments of this application. Its implementation principle and technical effects are similar, and will not be repeated here.
[0167] In one embodiment, the prediction module 11 includes: a first acquisition unit, a first determination unit, and a prediction unit, wherein:
[0168] The first acquisition unit is used to acquire historical operational data of each tenant within a historical time period;
[0169] The first determining unit is used to determine the impact characteristics of each tenant's impact on operational resource requirements based on historical operational data.
[0170] The prediction unit is used to input all historical operational data and various influencing characteristics into the resource demand prediction model to predict the operational resource demand of each tenant and obtain the operational resource demand of each tenant.
[0171] The runtime resource allocation device provided in this application embodiment can be used to execute the technical solutions in the above-described runtime resource allocation method embodiments of this application. Its implementation principle and technical effects are similar, and will not be repeated here.
[0172] In one embodiment, the determining unit is specifically used for:
[0173] Preprocess the historical operating data of each tenant within the historical time period to obtain the processed resource usage of each tenant;
[0174] Based on the processed resource usage of each tenant, feature extraction is performed to obtain the impact features of each tenant on the operational resource demand.
[0175] The runtime resource allocation device provided in this application embodiment can be used to execute the technical solutions in the above-described runtime resource allocation method embodiments of this application. Its implementation principle and technical effects are similar, and will not be repeated here.
[0176] In one embodiment, the allocation module 12 includes: a second acquisition unit, a second determination unit, and a resource allocation unit, wherein:
[0177] The second acquisition unit is used to acquire the imbalance status of idle running resources based on the running resource demand of each tenant and the current resource availability corresponding to the idle running resources.
[0178] The second determining unit is used to determine the resource allocation strategy for each tenant based on the imbalance of idle running resources, the preset resource scheduling strategy, and the running resource requirements of each tenant.
[0179] The resource allocation unit is used to allocate corresponding operating resources to each tenant from idle operating resources according to each tenant's resource allocation strategy, so as to obtain the preliminary resource allocation results for each tenant.
[0180] The runtime resource allocation device provided in this application embodiment can be used to execute the technical solutions in the above-described runtime resource allocation method embodiments of this application. Its implementation principle and technical effects are similar, and will not be repeated here.
[0181] In one embodiment, the second acquisition unit is specifically used for:
[0182] Determine the total demand for operating resources based on the operating resource requirements of each tenant;
[0183] If the total demand exceeds the current available resources, the imbalance of idle running resources is determined to be a resource shortage state.
[0184] If the total demand is less than the current available resources, then the imbalance of idle running resources is determined to be a resource surplus state.
[0185] The runtime resource allocation device provided in this application embodiment can be used to execute the technical solutions in the above-described runtime resource allocation method embodiments of this application. Its implementation principle and technical effects are similar, and will not be repeated here.
[0186] In one embodiment, the second determining unit is specifically used for:
[0187] When the imbalance state is a resource shortage state, the additional available resources for running resources are determined according to the resource scheduling strategy;
[0188] Configure resource allocation strategies for each tenant based on current resource availability, additional resource availability, and each tenant's operational resource requirements.
[0189] The runtime resource allocation device provided in this application embodiment can be used to execute the technical solutions in the above-described runtime resource allocation method embodiments of this application. Its implementation principle and technical effects are similar, and will not be repeated here.
[0190] In one embodiment, the optimization processing module 13 includes: an evaluation unit, a first adjustment unit, and a third determination unit, wherein:
[0191] The evaluation unit is used to evaluate the resource utilization efficiency of each tenant's initial resource allocation based on the initial resource allocation results and the current resource usage of each tenant in relation to the initial resource allocation results, and to obtain the first energy efficiency quantification value of each tenant.
[0192] The first adjustment unit is used to adjust the preliminary resource allocation results of each tenant based on the first energy efficiency quantification value of each tenant to obtain the candidate resource allocation results of each tenant when the first energy efficiency quantification value of each tenant does not meet the standard.
[0193] The third determining unit is used to determine each candidate resource allocation result as the optimized resource allocation result for each tenant, provided that the second energy efficiency quantification value of each tenant meets the standard under the corresponding candidate resource allocation result.
[0194] The runtime resource allocation device provided in this application embodiment can be used to execute the technical solutions in the above-described runtime resource allocation method embodiments of this application. Its implementation principle and technical effects are similar, and will not be repeated here.
[0195] In one embodiment, the optimization processing module 13 further includes: a strategy library adjustment unit and a second adjustment unit, wherein:
[0196] The strategy library adjustment unit is used to adjust the resource optimization strategy library based on the second energy efficiency quantification value of each tenant and the current resource usage when the second energy efficiency quantification value of each tenant does not meet the standard, so as to obtain the latest resource optimization strategy library.
[0197] The second adjustment unit is used to adjust the candidate resource allocation results of each tenant based on the second energy efficiency quantification value and the resource optimization strategy library, until the energy efficiency quantification value of each tenant under the latest resource allocation result meets the standard, and the latest resource allocation result is determined as the optimized resource allocation result corresponding to each tenant.
[0198] The runtime resource allocation device provided in this application embodiment can be used to execute the technical solutions in the above-described runtime resource allocation method embodiments of this application. Its implementation principle and technical effects are similar, and will not be repeated here.
[0199] The runtime resource allocation device provided in this application embodiment can be used to execute the technical solutions in the above-described runtime resource allocation method embodiments of this application. Its implementation principle and technical effects are similar, and will not be repeated here.
[0200] Specific limitations regarding the runtime resource allocation device can be found in the limitations on runtime resource allocation methods described above, and will not be repeated here. Each module in the aforementioned runtime resource allocation device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in the computer device in hardware form, or stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0201] In one embodiment, a computer device is also provided, which may be a server, and its internal structure diagram may be as follows: Figure 11 As shown, the computer device includes a processor, memory, and a network interface connected via a system bus. The processor provides processing power. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores the current resource availability corresponding to idle running resources and the optimized resource allocation results for each tenant. The network interface communicates with external endpoints via a network connection. When the computer program is executed by the processor, it implements a running resource allocation method.
[0202] Those skilled in the art will understand that Figure 11 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0203] In one embodiment, a computer device is also provided, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the technical solution in the above-described embodiment of the resource allocation method of this application. The implementation principle and technical effect are similar, and will not be repeated here.
[0204] In one embodiment, a computer-readable storage medium is also provided, on which a computer program is stored. When the computer program is executed by a processor, it implements the technical solution of the above-described resource allocation method of this application. Its implementation principle and technical effect are similar, and will not be repeated here.
[0205] In one embodiment, a computer program product is also provided, including a computer program that, when executed by a processor, implements the technical solution of the above-described resource allocation method of this application. Its implementation principle and technical effects are similar and will not be repeated here.
[0206] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the methods described above. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, or optical storage, etc. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc.
[0207] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0208] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.
Claims
1. A method for allocating runtime resources, characterized in that, The method includes: The resource demand prediction model is used to predict the operating resource demand of each tenant to obtain the operating resource demand of each tenant; the resource demand prediction model is a multi-tenant operating resource demand prediction model built on artificial intelligence algorithms. Based on the operating resource requirements of each tenant, corresponding operating resources are allocated to each tenant from the idle operating resources in the shared resource pool to determine the preliminary resource allocation results for each tenant. The preliminary resource allocation results for each tenant are optimized to determine the optimized resource allocation results for each tenant.
2. The method according to claim 1, characterized in that, The step of predicting the operational resource requirements of each tenant based on the resource demand prediction model to obtain the operational resource requirements of each tenant includes: Obtain the historical operational data of each tenant within the historical time period; Based on the historical operational data, determine the impact characteristics of each tenant on operational resource requirements; The historical operational data and the influencing features are all input into the resource demand prediction model to predict the operational resource demand of each tenant, thereby obtaining the operational resource demand of each tenant.
3. The method according to claim 2, characterized in that, The step of determining the impact characteristics of each tenant's operational resource requirements based on the historical operational data includes: The historical operating data of each tenant within the historical time period is preprocessed to obtain the processed resource usage of each tenant; Based on the processed resource usage of each tenant, feature extraction is performed to obtain the impact features of each tenant on the runtime resource requirements.
4. The method according to claim 1 or 2, characterized in that, The step of allocating corresponding operating resources to each tenant from the idle operating resources in the shared resource pool based on the operating resource requirements of each tenant, and determining the preliminary resource allocation result for each tenant, includes: Based on the operating resource requirements of each tenant and the current available resources corresponding to the idle operating resources, the imbalance state of the idle operating resources is obtained; Based on the imbalance of idle running resources, the preset resource scheduling strategy, and the running resource requirements of each tenant, the resource allocation strategy for each tenant is determined. According to the resource allocation strategy of each tenant, corresponding running resources are allocated to each tenant from the idle running resources to obtain the preliminary resource allocation results of each tenant.
5. The method according to claim 4, characterized in that, The step of obtaining the imbalance state of the idle running resources based on the running resource requirements of each tenant and the current resource availability corresponding to the idle running resources includes: Based on the operating resource requirements of each tenant, determine the total operating resource requirements; If the total demand is greater than the current available resources, then the imbalance of the idle running resources is determined to be a resource shortage state. If the total demand is less than the current available resources, then the imbalance of the idle running resources is determined to be a resource surplus state.
6. The method according to claim 4, characterized in that, The step of determining the resource allocation strategy for each tenant based on the imbalance state of the idle operating resources, the preset resource scheduling strategy, and the operating resource requirements of each tenant includes: When the imbalance state is a resource shortage state, the additional available resources of the operating resources are determined according to the resource scheduling strategy; Based on the current available resources, the additional available resources, and the operating resource requirements of each tenant, the resource allocation strategy for each tenant is configured.
7. The method according to claim 1 or 2, characterized in that, The optimization process for the preliminary resource allocation results of each tenant, to determine the optimized resource allocation results for each tenant, includes: Based on the preliminary resource allocation results of each tenant and the current resource usage of each tenant in relation to the preliminary resource allocation results, the resource utilization efficiency of the preliminary resource allocation results of each tenant is evaluated to obtain the first energy efficiency quantification value of each tenant. If the first energy efficiency quantification value of each tenant does not meet the standard, the preliminary resource allocation result of each tenant is adjusted according to the first energy efficiency quantification value of each tenant to obtain the candidate resource allocation result of each tenant; If each tenant meets the second energy efficiency quantification value under the corresponding candidate resource allocation result, the candidate resource allocation result is determined as the optimized resource allocation result corresponding to each tenant.
8. The method according to claim 7, characterized in that, The method further includes: If the second energy efficiency quantification value of each tenant does not meet the standard, the resource optimization strategy library is adjusted according to the second energy efficiency quantification value of each tenant and the current resource usage to obtain the latest resource optimization strategy library; Based on the second energy efficiency quantification value of each tenant and the resource optimization strategy library, the candidate resource allocation results of each tenant are adjusted until the energy efficiency quantification value of each tenant under the latest resource allocation result meets the standard, and the latest resource allocation result is determined as the optimized resource allocation result corresponding to each tenant.
9. A resource allocation device, characterized in that, The device includes: The prediction module is used to predict the operating resource requirements of each tenant based on the resource demand prediction model, and obtain the operating resource requirements of each tenant; the resource demand prediction model is a multi-tenant operating resource demand prediction model built based on artificial intelligence algorithms. The allocation module is used to allocate corresponding operating resources to each tenant from the idle operating resources in the shared resource pool according to the operating resource requirements of each tenant, and to determine the preliminary resource allocation result of each tenant. The optimization processing module is used to optimize the preliminary resource allocation results of each tenant and determine the optimized resource allocation results of each tenant.
10. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1-8.