Cloud server resource allocation method and system

By using a pre-trained resource allocation model in the Xinchuang Cloud Management Platform, the problem of resource allocation dependence on manual operations in the existing technology is solved, the efficiency and accuracy of resource allocation are improved, and the cost and error correction difficulty are reduced.

CN119759582AActive Publication Date: 2025-04-04HUAWEI MARINE NETWORKS CO LTD

Patent Information

Application Number
CN202510244669.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-04
Publication Date
2025-04-04
Estimated Expiration
2045-03-04

AI Technical Summary

Technical Problem

In the existing Xinchuang Cloud Management Platform, resource allocation relies on manual operations, which leads to low efficiency and high cost of resource activation. Inexperienced managers find it difficult to optimally allocate resources, resulting in high cost of resource waste and error correction.

Method used

A pre-trained resource allocation model is adopted, combining the available resources of the cloud server and the resource requirements of the application to be deployed, resource allocation parameters are automatically generated to realize the automatic allocation and deployment of resources, and adjust the resource allocation results according to the corrected allocation information when needed.

Benefits of technology

It improves the efficiency and accuracy of cloud server resource allocation, reduces the cost of resource allocation and error correction difficulty, and reduces the dependence on managers' experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119759582A_ABST
    Figure CN119759582A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of computers, in particular to a cloud server resource allocation method and system. The method comprises the following steps: acquiring a first resource allocation request, and acquiring a first resource allocation parameter corresponding to the first resource allocation request by using a pre-trained resource allocation model based on an available resource quantity of a cloud server and a resource demand of a to-be-deployed target application; based on the first resource allocation parameter, allocating a first target resource to the target application from available resources of the cloud server, and deploying the target application in the first target resource; and under the condition that the second resource allocation request is obtained, allocating a second target resource to the target application, and migrating the target application deployed in the first target resource to the second target resource. According to the cloud server resource allocation method and system provided by the invention, automatic allocation of cloud server resources can be realized, the deployed target application can be migrated, and the accuracy and flexibility of resource allocation are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a method and system for allocating cloud service resources. Background Art

[0002] Xinchuang Cloud is a cloud computing service platform built on Xinchuang products and technologies, which can provide computing, storage, network and other cloud computing resources. The management platform of Xinchuang Cloud can allocate resources according to the business type and data volume of the commissioned business, so that each commissioned business can run stably within the allocated resources.

[0003] In the current trusted cloud management platform, resources are usually allocated manually by managers. For example, an independent resource pool or tenant account is created on the platform for the commissioned business, and a certain number of servers are allocated to it, and the required applications are deployed on the server. However, the above manual allocation method is not only labor-intensive and affects the efficiency of resource activation, but also requires a high level of experience from managers. Managers without rich experience often cannot allocate resources optimally, resulting in waste of resources and increased resource costs. In addition, in the case of unreasonable resource allocation, the environment deployment needs to be reallocated, and the cost of error correction is high. Summary of the invention

[0004] In order to solve the above problems, the present application provides a method and system for allocating cloud server resources, which can allocate target resources from the cloud server to the target application to be deployed, and can improve the efficiency and accuracy of cloud server resource allocation.

[0005] In order to achieve the above-mentioned objectives, in a first aspect, the present application provides a method for allocating cloud server resources, including: obtaining a first resource allocation request, the first resource allocation request including the resource requirements of a target application to be deployed; based on the available resources of the cloud server and the resource requirements of the target application to be deployed, using a pre-trained resource allocation model, obtaining a first resource allocation parameter corresponding to the first resource allocation request; based on the first resource allocation parameter, allocating a first target resource to the target application from the available resources of the cloud server, and deploying the target application in the first target resource; when a second resource allocation request including a second resource allocation parameter is obtained, allocating a second target resource to the target application from the available resources of the cloud server, and migrating the target application deployed in the first target resource to the second target resource.

[0006] The cloud server resource allocation method provided in the present application can utilize the resource allocation model, combine the available resource amount of the cloud service and the resource demand of the target application to be deployed, generate the first resource allocation parameter, and then realize the resource allocation for the target application to be deployed, and automatically deploy the target application to be deployed in the first target resource. At the same time, when the second resource allocation request is obtained, the resource allocation result is adjusted, the second target resource is allocated to the target application according to the second resource allocation parameter, and the target application deployed in the first target resource is migrated to the second target resource, and then the resource allocation result is adjusted, which reduces the cost of resource allocation and improves the efficiency and accuracy of resource allocation.

[0007] In an optional embodiment, based on the available resources of the cloud server and the resource requirements of the target application to be deployed, a pre-trained resource allocation model is used to obtain a first resource allocation parameter corresponding to the first resource allocation request, including: inputting the available resources of the cloud server and the resource requirements of the target application to be deployed into the resource allocation model; obtaining an allocation strategy output by the resource allocation model, the allocation strategy being used to characterize the allocation of a first number of resources to be allocated to a second number of target servers; and generating a first resource allocation parameter according to the allocation strategy.

[0008] In this way, the pre-trained resource allocation model can be used to automatically generate a resource allocation plan, reduce the cost of resource allocation and the subjectivity of allocation results, and improve the efficiency of resource allocation.

[0009] In an optional embodiment, the target application to be deployed includes at least one task to be deployed, the first resource allocation parameter includes at least one allocation information, the allocation information includes the task name "task to be deployed", the first deployment address and the first allocated resource amount, the first deployment address is used to characterize the deployment location of the task to be deployed, and the first allocated resource amount is used to characterize the resource amount of the resource pool corresponding to the first deployment address.

[0010] In this way, the target application can be deployed in multiple resource pools according to the actual situation of the target application to be deployed, and resource amounts can be allocated to the multiple resource pools according to the first resource allocation parameter.

[0011] In an optional implementation, based on a first resource allocation parameter, a first target resource is allocated to a target application from available resources of a cloud server, and the target application is deployed in the first target resource, including: obtaining the first target resource from available resources of the cloud server according to a first deployment address and a first allocated resource amount, the location of the first target resource being the first deployment address, and the resource amount of the first target resource being the first allocated resource amount; obtaining a software program corresponding to the task to be deployed; and deploying the software program corresponding to the task to be deployed in the first target resource.

[0012] In this way, the first target resource can be obtained from the available resources of the cloud server according to the first allocated resource amount, and the first target resource can be set according to the first deployment address, and the target application can be deployed in the first target resource according to the task to be deployed, thereby allocating resources to the target application according to the first resource allocation parameter and completing the deployment of the target application.

[0013] In an optional embodiment, the second resource allocation parameter includes at least one piece of revised allocation information, the revised allocation information includes the name of the task to be deployed, the second deployment address and the second allocated resource amount, the second deployment address is used to characterize the deployment location of the task to be deployed, and the second allocated resource amount is used to characterize the resource amount of the resource pool corresponding to the second deployment address.

[0014] In this way, when resource allocation is unreasonable, the second deployment address and the second allocated resource amount corresponding to the name of the task to be deployed can be modified according to the revised allocation information.

[0015] In an optional implementation, a second target resource is allocated to the target application from the available resources of the cloud server, and the target application deployed in the first target resource is migrated to the second target resource, including: obtaining the second target resource from the available resources of the cloud server according to the second deployment address and the second allocated resource amount, the location of the second target resource being the second deployment address, and the resource amount of the second target resource being the second allocated resource amount; obtaining the software program corresponding to the task to be deployed; deploying the software program corresponding to the task to be deployed in the second target resource, and deleting the software program corresponding to the task to be deployed in the first target resource.

[0016] In this way, the deployed target application can be migrated according to the second resource allocation parameter. In the case of unreasonable resource allocation, resources can be reallocated and the software program corresponding to the task to be deployed in the first target resource can be migrated to the second target resource with one click, thereby reducing the error correction cost of modifying resource allocation.

[0017] In an optional implementation, before obtaining the first resource allocation request, it also includes training a resource allocation model, and the training resource allocation model includes: obtaining training data and inputting the training data into the resource allocation model, the training data including the server resource margin and the resource requirements to be deployed; The strategy generates at least one allocation strategy corresponding to the resource demand to be deployed; calculates the reward score corresponding to the allocation strategy, and generates a first list based on the reward score, and the reward score is used to evaluate the allocation strategy; queries the reward score with the largest value from the first list, and controls the resource allocation model to output the allocation strategy corresponding to the reward score with the largest value.

[0018] In this way, the reinforcement learning method can be used to train the resource allocation model to generate the best allocation strategy based on the server resource margin and the demand for resources to be deployed, thereby improving the accuracy of resource allocation.

[0019] In an optional implementation, calculating the reward score corresponding to the allocation strategy includes: calculating a first score, where the first score is the difference between the first quantity and the second quantity; and calculating a second score according to an occupancy score formula, where the occupancy score formula is used to calculate the resource occupancy of the target server after the resources to be allocated are deployed, and the occupancy score formula is: , Wherein, D represents the second score, n represents the preset occupancy score, and f represents the resource occupancy percentage; based on the first score and the second score, the reward score is calculated, and the reward score is the sum of the first score and the second score.

[0020] In this way, the allocation strategies can be scored according to the resource occupancy of the target servers and the number of target servers, so that the resource allocation model outputs the allocation strategy with the highest score.

[0021] In an optional embodiment, the method for allocating cloud server resources also includes: when a second resource allocation request is obtained, inputting the second resource allocation parameter into the resource allocation model to update the first list; when the second resource allocation request is not obtained, inputting the first resource allocation parameter into the resource allocation model to update the first list.

[0022] In this way, training data can be continuously provided to the resource allocation model, thereby continuously optimizing the resource allocation model and improving the accuracy of resource allocation.

[0023] In a second aspect, the present application provides a cloud server resource allocation system, comprising: a request acquisition module, configured to: acquire a first resource allocation request, the first resource allocation request including the resource requirements of a target application to be deployed; a resource allocation module, configured to: based on the available resource amount of the cloud server and the resource requirements of the target application to be deployed, using a pre-trained resource allocation model, acquire a first resource allocation parameter corresponding to the first resource allocation request; a resource deployment module, configured to: based on the first resource allocation parameter, allocate a first target resource to the target application from the available resources of the cloud server, and deploy the target application in the first target resource; a resource adjustment module, configured to: when a second resource allocation request including a second resource allocation parameter is acquired, allocate a second target resource to the target application from the available resources of the cloud server, and migrate the target application deployed in the first target resource to the second target resource.

[0024] It can be understood that the cloud server resource allocation system provided in the second aspect is applied to the cloud server resource allocation method provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the cloud server resource allocation method provided above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] In order to more clearly illustrate the technical solution of the present application, the drawings required for use in the embodiments are briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0026] Figure 1 A schematic diagram of a cloud server resource allocation method provided in this embodiment; Figure 2 A schematic diagram of a resource allocation model training process provided in this embodiment; Figure 3 A schematic diagram of a process of deploying a target application provided in this embodiment; Figure 4 A schematic diagram of a flow chart of a manual confirmation allocation strategy provided in this embodiment; Figure 5 A schematic diagram of the structure of a cloud server resource allocation system provided in this embodiment. DETAILED DESCRIPTION

[0027] The technical solutions in the embodiments of the present application will be described clearly below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments of the present application, other embodiments obtained by ordinary technicians in this field without making creative work all belong to the protection scope of the present application.

[0028] In the following, the terms "first", "second", etc. are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first", "second", etc. may explicitly or implicitly include one or more of the features. In the description of this application, unless otherwise specified, "plurality" means two or more.

[0029] In addition, in the present application, directional terms such as "upper", "lower", "inner" and "outer" are defined relative to the orientation of the components schematically placed in the drawings. It should be understood that these directional terms are relative concepts. They are used for relative description and clarification, and they can change accordingly according to the changes in the orientation of the components placed in the drawings.

[0030] To facilitate understanding of the solution, the following explains the relevant terms: Cloud server: is a virtual server based on cloud computing technology. It can run multiple virtual servers on a physical server at the same time and flexibly allocate resources according to the actual needs of users, thereby improving the efficiency of resource utilization. Cloud servers divide resources into different resource pools, including computing resource pools, storage resource pools, and network resource pools. Among them, the computing resource pool includes the central processing unit (CPU) and memory, the storage resource pool includes hard disk resources, and the network resource pool includes bandwidth and Internet Protocol Address (IP address). The cloud server allocates resources in the resource pool according to the resource allocation request.

[0031] Reinforcement learning algorithm: is an algorithm in machine learning that emphasizes how the model takes a series of actions in the environment to maximize the cumulative reward. The model interacts with the environment and The strategy selects actions and learns the optimal behavior strategy based on the reward signal fed back by the environment.

[0032] Strategy: It is a method used by the neural network model to balance exploration and exploitation during the reinforcement learning training process. Among them, "exploration" means that the neural network model tries some actions that have not been fully tried before during the training process in order to discover better strategies or action values. "Exploitation" means that when the exploration rate is large, it means that the model is more inclined to explore. When the exploration rate is small, the model tends to be stable and more inclined to exploit. "Action" is the behavior that the neural network model can take in the environment. The neural network model interacts with the environment by selecting actions. "Environment" is the external world where the neural network model interacts.

[0033] Q-value table: used to store the knowledge accumulated by the neural network model during the learning process. The Q-value table records the value information of different actions of the neural network model in different environments. After the Q-value table training is completed, this knowledge can be applied in similar scenarios. When the model encounters a state that has been learned again, it can make decisions quickly based on the information in the Q-value table. In addition, when facing some partially similar new environments, the knowledge in the Q-value table can be used as an initial reference to adapt to the new environment through further fine-tuning.

[0034] In the field of trusted cloud technology, the management platform of trusted cloud can be used to allocate resources for commissioned business. First, the management personnel need to obtain the business type and data size of the commissioned business, and then create an independent resource pool for the commissioned business based on the management platform, allocate a certain number of servers to it, and deploy the required applications on the servers, so that the commissioned business can run stably in the allocated resources.

[0035] However, the above resource allocation method relies on the manual allocation of resources by managers, which not only consumes manpower and affects the efficiency of resource provisioning, but also requires high work experience of managers. Inexperienced managers often cannot optimally allocate resources, resulting in resource waste and increased resource costs. For example, when allocating resources, managers allocate too many resources to users on a certain server, while resources on other servers are not fully utilized, resulting in reduced resource utilization of the entire cloud environment and increased operating costs. In addition, the resource structure of manually allocated resources is relatively fixed. When user business changes and resources need to be re-planned and adjusted, the operation is difficult, resulting in poor flexibility in resource allocation and high error correction costs.

[0036] In order to improve the allocation efficiency and accuracy of cloud server resource allocation, the present application embodiment provides a cloud server resource allocation method, see Figure 1 , the cloud server resource allocation method provided in this application includes: Step S100: Obtain a first resource allocation request.

[0037] In the embodiment of the present application, the cloud server resource allocation method is applied to the cloud server management platform. The cloud server management platform is a software system for centralized management, monitoring, configuration and scheduling of cloud server resources. The administrator can obtain the available resources of the cloud server by logging into the management account, and then allocate resources to the target application to be deployed from the available resources. The available resources of the cloud server include computing resources, storage resources and network resources.

[0038] Furthermore, the administrator inputs the resource requirements of the target application to be deployed into the cloud server management platform, and the cloud server management platform generates a first resource allocation request according to the resource requirements of the target application to be deployed, and obtains the first resource allocation request. The first resource allocation request includes the resource requirements of the target application to be deployed, and is used to apply for resources from the cloud server so that the target application can be deployed in the resources allocated by the cloud server, thereby enabling the target application to run normally.

[0039] Exemplarily, in the first resource allocation request, the resource requirements of the target application to be deployed are: a server with 32 GB of memory, an 8-core CPU, a storage capacity of 1 TB, and a network bandwidth of 50 Mbps.

[0040] Step S200: Based on the available resources of the cloud server and the resource requirements of the target application to be deployed, a first resource allocation parameter corresponding to the first resource allocation request is obtained using a pre-trained resource allocation model.

[0041] In the embodiment of the present application, the resource allocation model can be used to allocate resources to the target application to be deployed according to the available resources of the cloud server, thereby realizing automatic allocation of cloud server resources and improving allocation efficiency.

[0042] First, the cloud server management platform inputs the available resources of the cloud server and the resource requirements of the target application to be deployed into the resource allocation model; then obtains the allocation strategy output by the resource allocation model, and the allocation strategy is used to characterize the allocation of a first number of resources to be allocated to a second number of target servers; finally, generates a first resource allocation parameter according to the allocation strategy, and the first resource allocation parameter includes allocation information for allocating target resources to the target application to be deployed.

[0043] In this way, the resource allocation model can calculate the resources required by the target application to be deployed according to the input resource requirements of the target application to be deployed, such as the number of CPU cores, memory size, storage resource capacity and network resource bandwidth in the computing resources. At the same time, combined with the available resources of the current cloud server, such as the performance of the server, the idle capacity of the storage device and the available bandwidth of the network, an allocation strategy is generated, and the first resource allocation parameter is generated according to the allocation strategy.

[0044] In order to improve the accuracy and rationality of the first resource allocation parameter, the cloud server management platform needs to use the training data to perform enhanced learning training on the resource allocation model before obtaining the first resource allocation request. In the process of training the resource allocation model, the training data is first obtained, the training data includes the server resource margin and the resource requirements to be deployed, and the training data is input into the resource allocation model.

[0045] Furthermore, the cloud server management platform The strategy generates at least one allocation strategy corresponding to the resource demand to be deployed, calculates the reward score corresponding to the allocation strategy, and generates a first list based on the reward score. The reward score is used to evaluate the allocation strategy. Finally, the reward score with the largest value is queried from the first list, and the resource allocation model is controlled to output the allocation strategy corresponding to the reward score with the largest value.

[0046] In the above training process, the cloud server management platform uses the SARSA algorithm to train the resource allocation model. SARSA is a policy-based temporal difference learning algorithm in reinforcement learning. Its name comes from the sequence used in its update formula: state, action, reward, state, action. The SARSA algorithm is used to train the resource allocation model to output the allocation strategy with the highest score.

[0047] In the process of using the SARSA algorithm to train the resource allocation model on the cloud server management platform, a Q function (usually a table, namely the Q value table) is first initialized to store the expected long-term reward of each action taken by the model in each environment. The Q value table includes the Q value, and the initialization of the Q value can be random or set according to some prior knowledge.

[0048] Next, according to The strategy selects an action, that is, the model selects an action based on the exploration rate Randomly choose an action, according to the probability 1- The action with the highest Q value is selected. After the model performs the selected action, the environment will feedback a reward score, which allows the model to move to a new state. The reward score is used to evaluate the quality of the action, and the new state is the basis for the model's next decision.

[0049] Finally, the Q value table is updated using the SARSA update formula. The update formula is as follows: , in, Indicates the current status. Indicates the current action. Indicates execution of an action After the reward, Indicates the next state, Indicates the next action. Represents the learning rate, which is used to control the update step size. Represents a discount factor that measures the importance of future rewards relative to current rewards.

[0050] The Q value is updated using the above update formula. As the number of updates increases, the Q value table will gradually converge. Among them, the learning rate uses an exponential decay method. As the number of actions executed increases, the learning rate is adjusted using the learning rate decay formula. The learning rate decay formula is as follows: , in, represents the attenuation coefficient, and t represents the number of times the action is performed. For example, the attenuation coefficient can be 1.

[0051] In the embodiment of the present application, the process of the cloud server management platform using SARSA to train the resource allocation model is as follows Figure 2 As shown, first obtain the initialization Q value table and initialize the Q value to 0, then set the initial state according to the current cloud server resource situation , and according to The strategy chooses an action , and execute , Strategies include exploration rate When executing the action for the first time, set The initial value of is 1. As the number of actions executed increases, the exploration rate decays according to the decay formula until it decays to the preset exploration threshold, and then stops exploring. For example, the preset exploration threshold is 0.05. The decay formula is as follows: , in, represents the exploration rate, and t represents the number of times the action is executed.

[0052] It should be understood that the action It can be an allocation strategy, which is used to represent the allocation of a first number of resources to be allocated to a second number of target servers, and when executing the action Then, calculate the action The corresponding reward score, and then the action Conduct an assessment.

[0053] In the process of calculating the reward score on the cloud server management platform, the first score is calculated first, which is the difference between the first quantity and the second quantity; then the second score is calculated according to the occupancy rate score formula, which is used to calculate the resource occupancy of the target server after the resources to be allocated are deployed. The occupancy rate score formula is: , Among them, D represents the second score, n represents the preset occupancy score, and f represents the resource occupancy percentage; finally, the reward score is calculated based on the first score and the second score, and the reward score is the sum of the first score and the second score.

[0054] For example, the allocation strategy is to allocate 6 resources to be allocated to 2 target servers (target server A and target server B). After the resources to be allocated are deployed, the occupancy rate of target server A is 70%, the occupancy rate of target server B is 80%, and the preset occupancy score is 9. Then, the above method can be used to calculate the first score to be 4 points, the second score of target server A to be 7 points, the second score of target server B to be 8 points, and the bonus score to be 19 points.

[0055] Furthermore, the cloud server management platform follows the action After resources are allocated, the cloud server is updated to the new state , use again Strategy based on new state Select next action , and use the update formula to update the Q value, and generate a first list based on the Q value, namely the Q value table.

[0056] It should be noted that as the number of actions executed increases, the Q value table will gradually converge. By observing the changes in the Q value after multiple updates, it can be determined whether the resource allocation model has completed training.

[0057] In the embodiment of the present application, if the Q value changes less than a preset change threshold after multiple updates, or remains stable after a certain number of iterations, the Q value table is marked as a converged state, and the training of the resource allocation model is stopped, so that the resource allocation model selects the best resource allocation strategy according to the Q value table in the converged state.

[0058] If the Q value table has not reached convergence, the cloud server is obtained to perform actions The corresponding state , and then execute the selected action , and calculate the action Corresponding reward scores and cloud server execution actions The corresponding state , and according to Strategy selection action , use the update formula to update the Q value table until the Q value table is in a converged state.

[0059] In this way, the trained resource allocation model can automatically generate an allocation strategy corresponding to the maximum reward score based on the available resources of the cloud server and the resource requirements of the target application to be deployed, thereby making the allocation of cloud server resources more efficient and accurate.

[0060] Step S300: Allocate a first target resource to a target application from available resources of a cloud server based on a first resource allocation parameter, and deploy the target application in the first target resource.

[0061] In an embodiment of the present application, the target application to be deployed includes at least one task to be deployed, and the first resource allocation parameter includes at least one allocation information. The allocation information includes the task name to be deployed, the first deployment address, and the first allocated resource amount, the first deployment address is used to characterize the deployment location of the task to be deployed, and the first allocated resource amount is used to characterize the resource amount of the resource pool corresponding to the first deployment address.

[0062] The allocation information is associated with the task to be deployed, and the allocation information is used to characterize the deployment location and the amount of allocated resources of the task to be deployed. Exemplarily, the target application to be deployed includes task A, task B and task C, and Table 1 is used to represent the first resource allocation parameter.

[0063] Table 1 .

[0064] In the embodiments of the present application, Figure 3 As shown, the cloud server management platform obtains the first target resource from the available resources of the cloud server according to the first deployment address and the first allocated resource amount, obtains the software program corresponding to the task to be deployed, and deploys the software program corresponding to the task to be deployed in the first target resource. The location of the first target resource is the first deployment address, and the resource amount of the first target resource is the first allocated resource amount. In this way, after the resources are allocated, the target application to be deployed can be automatically deployed in the corresponding allocated target resource, reducing the difficulty of manually deploying the target application and improving the deployment efficiency.

[0065] Step S400: Determine whether a second resource allocation request is received.

[0066] In the embodiment of the present application, in some cases, the allocation strategy generated by the resource allocation model can meet the user's needs, and the current resource allocation and deployment task is terminated.

[0067] However, in other cases, due to incomplete coverage of the training data of the resource allocation model or the limitations of the resource allocation model itself, the output allocation strategy cannot meet user needs. At this time, the user can modify the first resource allocation parameters to generate a second resource allocation request containing the second resource allocation parameters.

[0068] Therefore, the cloud server management platform needs to determine whether the second resource allocation request is received, and then determine whether the cloud server resources need to be reallocated and deployed.

[0069] Step S4011: when a second resource allocation request including a second resource allocation parameter is obtained, a second target resource is allocated to the target application from available resources of the cloud server, and the target application deployed in the first target resource is migrated to the second target resource.

[0070] In an embodiment of the present application, when the cloud server management platform obtains the second resource allocation request, it indicates that the user needs to modify the automatic allocation result of the cloud server resources according to the second resource allocation parameter. The second resource allocation parameter includes at least one piece of modified allocation information, and the modified allocation information includes the name of the task to be deployed, the second deployment address, and the second allocated resource amount. The second deployment address is used to represent the deployment location of the task to be deployed, and the second allocated resource amount is used to represent the resource amount of the resource pool corresponding to the second deployment address.

[0071] The revised allocation information is associated with the task to be deployed, and the revised allocation information is used to characterize the revised deployment location and allocated resource amount of the task to be deployed. For example, if the user modifies the allocated resource amount of the task to be deployed B in Table 1 to "8-core CPU, storage capacity 256GB, bandwidth 25Mbps", and modifies the deployment address of the task to be deployed C in Table 1 to "Server 1", then Table 2 is used to represent the second resource allocation parameter.

[0072] Table 2 .

[0073] In the embodiment of the present application, the cloud server management platform obtains the second target resource from the available resources of the cloud server according to the second deployment address and the second allocated resource amount, obtains the software program corresponding to the task to be deployed, deploys the software program corresponding to the task to be deployed in the second target resource, and deletes the software program corresponding to the task to be deployed in the first target resource. The location of the second target resource is the second deployment address, and the resource amount of the second target resource is the second allocated resource amount.

[0074] In this way, when the cloud server resource allocation plan generated by the resource allocation model is unreasonable, the cloud server management platform can quickly correct the allocation plan according to the second resource allocation parameter, and automatically migrate the software program corresponding to the task to be deployed from the first target resource to the second target resource to achieve one-click migration between servers.

[0075] It should be noted that in addition to automatically allocating target resources and deploying target applications based on the first resource allocation parameter, the present application solution also provides a manual confirmation method, see Figure 4 After the first resource allocation parameter is generated, the cloud server management platform first obtains the evaluation identifier input by the user, which can be "satisfied" or "unsatisfied". Among them, "satisfied" is used to indicate that the user determines to use the allocation strategy corresponding to the first resource allocation parameter to allocate cloud server resources. "Unsatisfied" is used to indicate that the user needs to modify the first resource allocation parameter.

[0076] Exemplarily, after the user inputs an evaluation mark including "satisfactory" based on the first resource allocation parameter, the resources of the cloud server are allocated according to the first resource allocation parameter, and the target application is deployed.

[0077] Exemplarily, after the user inputs an evaluation identifier including "unsatisfied" based on the first resource allocation parameters, the parameters modified by the user are obtained to generate a second resource allocation request including the second resource allocation parameters, and one-click migration of the server is implemented according to the second resource allocation parameters, the resource allocation strategy of the cloud server is quickly adjusted, and the deployment of the target application is completed according to the second resource allocation parameters.

[0078] Step S4012: input the second resource allocation parameter into the resource allocation model to update the first list.

[0079] In the embodiment of the present application, in order to improve the accuracy of cloud server resource allocation, the cloud server management platform needs to update the training data, thereby increasing the generalization ability of the resource allocation model, so that the resource allocation model can generate a more accurate allocation strategy. By inputting the second resource allocation parameter into the resource allocation model, the resource allocation model sets the action corresponding to the second resource allocation parameter in the first list to the highest reward score, thereby updating the first list and improving the accuracy of cloud server resource allocation.

[0080] Step S4021: When the second resource allocation request is not obtained, input the first resource allocation parameter into the resource allocation model to update the first list.

[0081] In the case where the second resource allocation request is not obtained, the first resource allocation parameter is characterized as the best solution for the current cloud server resource allocation. The cloud server management platform inputs the first resource allocation parameter into the resource allocation model. The resource allocation model sets the action corresponding to the first resource allocation parameter in the first list to the highest reward score, thereby updating the first list and improving the accuracy of cloud server resource allocation.

[0082] It can be seen from the above technical solution that the present application provides a method for allocating cloud server resources, which can utilize a resource allocation model, combine the available resource amount of the cloud service and the resource requirements of the target application to be deployed, generate a first resource allocation parameter, and then allocate resources to the target application to be deployed, and automatically deploy the target application to be deployed in the first target resource. At the same time, when a second resource allocation request is obtained, the resource allocation result is adjusted, the second target resource is allocated to the target application according to the second resource allocation parameter, and the target application deployed in the first target resource is migrated to the second target resource, and then the resource allocation result is adjusted, which reduces the cost of resource allocation and improves the accuracy of resource allocation.

[0083] Based on the cloud server resource allocation method provided in the above embodiment, some embodiments of the present application also provide a cloud server resource allocation system, see Figure 5 The cloud server resource allocation system is used to execute the cloud server resource allocation method described in the first embodiment, and the cloud server resource allocation system includes: a cloud server, a communication device and a computer. The computer uses the communication device to send a resource allocation request to the cloud server to allocate the available resources of the cloud server. The computer is installed with cloud server management platform software, and the cloud server management platform includes a request acquisition module 501, a resource allocation module 502, a resource deployment module 503 and a resource adjustment module 504.

[0084] The acquisition request module 501 is configured to: acquire a first resource allocation request, the first resource allocation request including the resource requirements of the target application to be deployed. The resource allocation module 502 is configured to: based on the available resources of the cloud server and the resource requirements of the target application to be deployed, using a pre-trained resource allocation model, acquire a first resource allocation parameter corresponding to the first resource allocation request. The resource deployment module 503 is configured to: based on the first resource allocation parameter, allocate a first target resource to the target application from the available resources of the cloud server, and deploy the target application in the first target resource. The resource adjustment module 504 is configured to: in the case of acquiring a second resource allocation request including a second resource allocation parameter, allocate a second target resource to the target application from the available resources of the cloud server, and migrate the target application deployed in the first target resource to the second target resource.

[0085] The effects of the above system in the process of executing the method can be found in the description of the above method, which will not be repeated here.

[0086] It should be noted that those skilled in the art will easily think of other embodiments of the present application after considering the specification and practicing the application disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary technical means in the art that are not disclosed in the present application. The specification and examples are only regarded as exemplary, and the true scope of the present application is indicated by the claims.

[0087] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.

Claims

1. A method for allocating cloud server resources, characterized in that: include: Obtaining a first resource allocation request, where the first resource allocation request includes resource requirements of a target application to be deployed; Based on the available resources of the cloud server and the resource requirements of the target application to be deployed, using a pre-trained resource allocation model, obtaining a first resource allocation parameter corresponding to the first resource allocation request; Allocating a first target resource to the target application from available resources of the cloud server based on the first resource allocation parameter, and deploying the target application in the first target resource; When a second resource allocation request including a second resource allocation parameter is obtained, a second target resource is allocated to the target application from available resources of the cloud server, and the target application deployed in the first target resource is migrated to the second target resource.

2. The method for allocating cloud server resources according to claim 1, characterized in that: The obtaining, based on the available resources of the cloud server and the resource requirements of the target application to be deployed, a first resource allocation parameter corresponding to the first resource allocation request using a pre-trained resource allocation model includes: Inputting the available resources of the cloud server and the resource requirements of the target application to be deployed into the resource allocation model; Acquire an allocation strategy output by the resource allocation model, where the allocation strategy is used to characterize allocation of a first number of resources to be allocated to a second number of target servers; The first resource allocation parameter is generated according to the allocation strategy.

3. The method for allocating cloud server resources according to claim 2, characterized in that: The target application to be deployed includes at least one task to be deployed, and the first resource allocation parameter includes at least one allocation information, and the allocation information includes a task name (task to be deployed), a first deployment address, and a first allocated resource amount, the first deployment address is used to characterize the deployment location of the task to be deployed, and the first allocated resource amount is used to characterize the resource amount of the resource pool corresponding to the first deployment address.

4. The method for allocating cloud server resources according to claim 3, characterized in that: The allocating a first target resource to the target application from available resources of the cloud server based on the first resource allocation parameter, and deploying the target application in the first target resource includes: According to the first deployment address and the first allocated resource amount, acquiring the first target resource from available resources of the cloud server, where the location of the first target resource is the first deployment address, and the resource amount of the first target resource is the first allocated resource amount; Obtaining the software program corresponding to the task to be deployed; Deploy the software program corresponding to the task to be deployed in the first target resource.

5. The method for allocating cloud server resources according to claim 4, characterized in that: The second resource allocation parameter includes at least one piece of revised allocation information, and the revised allocation information includes the name of the task to be deployed, the second deployment address, and the second allocated resource amount. The second deployment address is used to characterize the deployment location of the task to be deployed, and the second allocated resource amount is used to characterize the resource amount of the resource pool corresponding to the second deployment address.

6. The method for allocating cloud server resources according to claim 5, characterized in that: The allocating a second target resource to the target application from available resources of the cloud server, and migrating the target application deployed in the first target resource to the second target resource, comprises: According to the second deployment address and the second allocated resource amount, acquiring the second target resource from available resources of the cloud server, where the location of the second target resource is the second deployment address, and the resource amount of the second target resource is the second allocated resource amount; Obtaining the software program corresponding to the task to be deployed; The software program corresponding to the task to be deployed is deployed in the second target resource, and the software program corresponding to the task to be deployed in the first target resource is deleted.

7. The method for allocating cloud server resources according to claim 2, characterized in that: Before obtaining the first resource allocation request, the method further includes training the resource allocation model, wherein the training the resource allocation model includes: Acquire training data, and input the training data into the resource allocation model, wherein the training data includes server resource margin and resource requirements to be deployed; according to Strategy generates at least one allocation strategy corresponding to the resource demand to be deployed; Calculating a reward score corresponding to the allocation strategy, and generating a first list according to the reward score, wherein the reward score is used to evaluate the allocation strategy; The reward score with the largest value is searched from the first list, and the resource allocation model is controlled to output the allocation strategy corresponding to the reward score with the largest value.

8. The method for allocating cloud server resources according to claim 7, characterized in that: The calculating the reward score corresponding to the allocation strategy includes: Calculating a first score, the first score being a difference between the first number and the second number; The second score is calculated according to an occupancy rate score formula, wherein the occupancy rate score formula is used to calculate the resource occupancy of the target server after the to-be-allocated resources are deployed, and the occupancy rate score formula is: , Wherein, D represents the second score, n represents the preset occupancy score, and f represents the resource occupancy percentage; The reward score is calculated according to the first score and the second score, and the reward score is the sum of the first score and the second score.

9. The method for allocating cloud server resources according to claim 7, characterized in that: Also includes: In case of acquiring the second resource allocation request, inputting the second resource allocation parameter into the resource allocation model to update the first list; In a case where the second resource allocation request is not obtained, the first resource allocation parameter is input into the resource allocation model to update the first list.

10. A cloud server resource allocation system, characterized in that: The cloud server resource allocation method applied to any one of claims 1 to 9, wherein the allocation system comprises: The request acquisition module is configured to: acquire a first resource allocation request, wherein the first resource allocation request includes a resource requirement of a target application to be deployed; The resource allocation module is configured to: obtain a first resource allocation parameter corresponding to the first resource allocation request by using a pre-trained resource allocation model based on the available resources of the cloud server and the resource requirements of the target application to be deployed; a resource deployment module, configured to: allocate a first target resource to the target application from available resources of the cloud server based on the first resource allocation parameter, and deploy the target application in the first target resource; The resource adjustment module is configured to: upon obtaining a second resource allocation request containing a second resource allocation parameter, allocate a second target resource to the target application from the available resources of the cloud server, and migrate the target application deployed in the first target resource to the second target resource.

Citation Information

Patent Citations

  • Data center job scheduling method and system, storage medium and computing equipment

    CN113094159A

  • Calculation unloading and resource allocation joint optimization system and method in multi-constraint edge environment

    CN115567978A

  • Internet of Vehicles system scheduling method and Internet of Vehicles resource scheduling method

    CN117640693A

  • Computing resource dynamic allocation method and device, electronic equipment and storage medium

    CN119396555A

  • Deep reinforcement learning-based cloud data center adaptive efficient resource allocation method

    US20250013500A1

Cited By

  • Allocating resources among autonomous artificial intelligence agents within a distributed computational network

    US12621253B2

  • Allocating resources among autonomous artificial intelligence agents within a distributed computational network

    US20260012431A1