A decision model training method for virtual machine network deployment scheme

Through the reinforcement learning decision model training method, the virtual machine network deployment plan is monitored and adjusted, which solves the problem of low utilization efficiency of virtual machine network resources in cloud computing and achieves efficient hardware resource utilization.

CN114816659BActive Publication Date: 2024-08-23ALIBABA CLOUD COMPUTING CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210302138.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-24
Publication Date
2024-08-23
Estimated Expiration
2042-03-24

AI Technical Summary

Technical Problem

In cloud computing scenarios, different virtual machines in the virtual machine network have different demands for hardware resources, and the available hardware resources of servers in the device network are also different, making it difficult to determine a virtual machine network deployment solution to efficiently utilize the hardware resources of each server. , to achieve optimal benefits.

Method used

Use the decision-making model training method based on reinforcement learning to monitor the current decision-making status, select alternative deployment plans, deploy the virtual machine network, and adjust the decision-making model based on the success of the deployment and the consumption of hardware resources to optimize the deployment plan of the virtual machine network , ensuring successful deployment and efficient use of hardware resources.

Benefits of technology

It achieves efficient deployment of virtual machine networks in cloud computing scenarios, ensuring successful deployment and maximizing the use of hardware resources of the device network, improving resource utilization efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114816659B
    Figure CN114816659B
Patent Text Reader

Abstract

The multiple embodiments disclosed in this specification provide a decision model training method for a virtual machine network deployment solution. Based on the idea of ​​reinforcement learning, a decision model for outputting a virtual machine network deployment solution is trained. The deployment solution output by the decision model can utilize the available hardware resources of each server in the device network as efficiently as possible while ensuring the success of the deployment as much as possible.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Multiple embodiments of the present specification relate to the field of information technology, and in particular to a decision model training method for a virtual machine network deployment solution. Background Art

[0002] Currently, in the cloud computing technology scenario, users can apply to deploy a user-defined virtual machine network in the cloud computing service provider's device network, so as to use the virtual machine network to implement the user's specified business. It is easy to understand that this is equivalent to the user migrating his own business system from the local to the cloud, using the hardware resources of the cloud computing service provider to run the user's own business-related software functions, and the software functions are implemented based on the virtual machine network.

[0003] However, different virtual machines in a virtual machine network have different requirements for the hardware resources of the server used to deploy themselves, and the objectively available hardware resources of different servers in a device network are also different. Therefore, what kind of virtual machine network deployment plan (that is, which virtual machine is deployed on which server) can be adopted to utilize the available hardware resources of each server as efficiently as possible and achieve the best benefits is a technical issue that technical personnel in this field need to consider. Summary of the invention

[0004] Multiple embodiments of the present specification provide a decision model training method for a virtual machine network deployment solution so as to utilize the available hardware resources of each server in a device network as efficiently as possible.

[0005] The technical solutions provided by the multiple embodiments of this specification are as follows:

[0006] According to a first aspect of multiple embodiments of this specification, a decision model training method for a virtual machine network deployment solution is proposed, including:

[0007] Monitor the current decision state to obtain first state information; wherein the current decision state is defined as: the size of the currently available hardware resources of each server in the device network, and the size of the hardware resources required by each virtual machine in the virtual machine network to be currently deployed;

[0008] Inputting the first state information into the decision model to be trained, and selecting an alternative deployment scheme from a set of alternative deployment schemes;

[0009] Adopting the selected alternative deployment scheme to deploy the virtual machine network to be deployed in the device network; wherein, if the size of the available hardware resources of the server for deploying each virtual machine specified by the alternative deployment scheme is greater than or equal to the size of the hardware resources required by the virtual machine, the deployment is successful, otherwise the deployment fails, and if the deployment is successful, the size of the currently available hardware resources of at least part of the servers in the device network is consumed;

[0010] Re-determine the size of the currently available hardware resources of each server in the device network, and reset the current virtual machine network to be deployed as the next virtual machine network to be deployed; then, monitor the current decision state again to obtain second state information;

[0011] Determine a reward value that is positively correlated to a change in the size of available hardware resources of the device network, and, based on a scoring model to be trained, score the first state information and the second state information respectively;

[0012] The decision model is trained based on the first state information, the second state information, and the reward value.

[0013] According to a second aspect of multiple embodiments of this specification, a decision method for a virtual machine network deployment solution is proposed, including:

[0014] Monitor the current decision state and obtain current state information; wherein the current decision state is defined as: the size of the currently available hardware resources of each server in the device network, and the size of the hardware resources required by each virtual machine in the virtual machine network to be currently deployed;

[0015] Inputting the current state information into the decision model trained by the training method of the first aspect, and selecting an alternative deployment plan from the set of alternative deployment plans;

[0016] The selected alternative deployment solution is adopted to deploy the virtual machine network currently to be deployed in the device network.

[0017] According to the third aspect of multiple embodiments of this specification, an electronic device is proposed, including a memory and a processor; the memory is used to store computer instructions that can be executed on the processor, and the processor is used to implement the method of the first aspect or the second aspect when executing the computer instructions.

[0018] According to a fourth aspect of multiple embodiments of the present specification, a computer-readable storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, the method of the first aspect or the second aspect is implemented.

[0019] In the above technical solution, based on the idea of ​​reinforcement learning, a decision model is trained to output a virtual machine network deployment plan. The deployment plan output by the decision model can utilize the available hardware resources of each server in the device network as efficiently as possible while ensuring the success of the deployment as much as possible.

[0020] The specific method for training the decision model is to use the size of the currently available hardware resources of each server in the device network and the size of the hardware resources required by each virtual machine in the virtual machine network to be deployed as the "state" defined in reinforcement learning, which is referred to as the current decision state in this article; the current decision state is input into the decision model so that the decision model gives an alternative deployment plan for the current decision state. This alternative deployment plan is used as the "action" defined in reinforcement learning. After the "action" is applied to the "state", the "state" will change. Regardless of whether the deployment is successful, at least the current virtual machine network to be deployed will become the next virtual machine network, and the size of the hardware resources required by each virtual machine in the virtual machine network will often change. In addition, if the deployment is successful, at least some of the currently available hardware resources of the servers in the device network will also be consumed. Monitor the current decision state again, and what is actually monitored is the changed decision state.

[0021] The value that is positively correlated to the change in the size of the available hardware resources of the device network (easy to understand, it is an overall change value) is defined as the reward value in reinforcement learning. It is easy to understand that if the deployment fails, the size of the available hardware resources of the device network will not change, and the reward value in this case is the smallest (for example, it can be 0). The greater the change in the size of the available hardware resources of the device network (that is, the more hardware resources consumed), the higher the degree of utilization of the hardware resources of the device network by the virtual machine network successfully deployed based on the alternative deployment solution, which means that the utilization of the hardware resources of the device network is more efficient.

[0022] In this way, the decision model can be optimized and adjusted according to the new and old state information and reward values ​​based on the training method of reinforcement learning to train the decision model.

[0023] After completing the decision model training, when faced with the need to deploy a virtual machine network in the device network, the current decision state can be input into the decision model to obtain the alternative deployment plan output by the decision model. Deployment is performed based on the alternative deployment plan. This can ensure that the deployment is successful as much as possible while making the most efficient use of the available hardware resources of each server in the device network. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] Figure 1 This is a flowchart of a decision model training method for a virtual machine network deployment solution provided in this specification.

[0025] Figure 2 This is a schematic diagram of the structure of a device network suitable for a VPC networking mode provided by the present invention.

[0026] Figure 3 It is a schematic diagram of a decision-making system based on a reinforcement learning framework provided by the present disclosure.

[0027] Figure 4 It is a flowchart of a decision-making method for a virtual machine network deployment solution provided by the present disclosure. DETAILED DESCRIPTION

[0028] In order to enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the drawings in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this specification.

[0029] It should be noted that: in other embodiments, the steps of the corresponding method are not necessarily performed in the order shown and described in this specification. In some other embodiments, the steps included in the method may be more or less than those described in this specification. In addition, a single step described in this specification may be decomposed into multiple steps for description in other embodiments; and multiple steps described in this specification may be combined into a single step for description in other embodiments.

[0030] The application scenarios of the technical solutions provided by the present disclosure are introduced here. In the cloud computing technology scenario, users can choose to define a virtual machine network and deploy the virtual machine network to the device network of the cloud computing service provider. The device network here refers to a network composed of multiple physical servers (or physical machines). The hardware resource demands of different virtual machines in the user-defined virtual machine network can be the same or different. The so-called hardware resource demand of a virtual machine refers to the demand of the virtual machine for the hardware resources of the device (generally a server) on which it is expected to be deployed.

[0031] The hardware resources here can be any hardware resources that can be used by the virtual machine. Those skilled in the art can set the types of hardware resources according to actual business needs. For example, the hardware resources can be computing resources of the device, data forwarding resources of the device, bandwidth resources, storage space, power, etc. of the device.

[0032] The virtual machine's demand for hardware resources refers to the size of the hardware resources that the virtual machine needs to use after it actually runs. For example, the virtual machine can demand the size of the computing resources of the device to be used, the size of the data forwarding resources to be used, the size of the bandwidth resources, storage space, power, etc. to be used.

[0033] It can be understood that the size of the available hardware resources of the device on which the virtual machine is deployed should meet (be greater than or equal to) the size of the hardware resources required by the virtual machine.

[0034] The available hardware resources of different servers in the device network vary in size. For example, different servers have different specifications and models, and their objective hardware capabilities vary. For another example, multiple virtual machine networks can be deployed in the device network. Before the current virtual machine network is deployed, other virtual machine networks have been deployed, occupying some hardware resources, resulting in different sizes of available hardware resources on different servers. It should be noted that one or more virtual machines can be deployed on a single server.

[0035] However, manually deploying a virtual machine network to a device network involves traversing and comparing the available hardware resources of the devices in the device network with the hardware resource requirements of each virtual machine in the virtual network, which is too inefficient. Therefore, a solution is needed to automatically deploy a virtual machine network to a device network, and this automatic deployment solution (i.e., which virtual machine is deployed on which server) should preferably be able to utilize the available hardware resources of each server as efficiently as possible, so as to achieve the best benefits for the cloud computing service provider.

[0036] To this end, in one or more embodiments provided in the present disclosure, a decision model for outputting a virtual machine network deployment plan is trained based on the idea of ​​reinforcement learning. The deployment plan output by the decision model can utilize the available hardware resources of each server in the device network as efficiently as possible while ensuring the success of the deployment as much as possible.

[0037] The specific method for training the decision model is to use the size of the currently available hardware resources of each server in the device network and the size of the hardware resources required by each virtual machine in the virtual machine network to be deployed as the "state" defined in reinforcement learning, which is referred to as the current decision state in this article; the current decision state is input into the decision model so that the decision model gives an alternative deployment plan for the current decision state. This alternative deployment plan is used as the "action" defined in reinforcement learning. After the "action" is applied to the "state", the "state" will change. Regardless of whether the deployment is successful, at least the current virtual machine network to be deployed will become the next virtual machine network, and the size of the hardware resources required by each virtual machine in the virtual machine network will often change. In addition, if the deployment is successful, at least some of the currently available hardware resources of the servers in the device network will also be consumed. Monitor the current decision state again, and what is actually monitored is the changed decision state.

[0038] The value that is positively correlated to the change in the size of the available hardware resources of the device network (easy to understand, it is an overall change value) is defined as the reward value in reinforcement learning. It is easy to understand that if the deployment fails, the size of the available hardware resources of the device network will not change, and the reward value in this case is the smallest (for example, it can be 0). The greater the change in the size of the available hardware resources of the device network (that is, the more hardware resources consumed), the higher the degree of utilization of the hardware resources of the device network by the virtual machine network successfully deployed based on the alternative deployment solution, which means that the utilization of the hardware resources of the device network is more efficient.

[0039] In this way, the decision model can be optimized and adjusted according to the new and old state information and reward values ​​based on the training method of reinforcement learning to train the decision model.

[0040] After completing the decision model training, when faced with the need to deploy a virtual machine network in the device network, the current decision state can be input into the decision model to obtain the alternative deployment plan output by the decision model. Deployment is performed based on the alternative deployment plan. This can ensure that the deployment is successful as much as possible while making the most efficient use of the available hardware resources of each server in the device network.

[0041] The above technical solution is described in detail below in conjunction with the accompanying drawings.

[0042] Figure 1 This is a flowchart of a decision model training method for a virtual machine network deployment solution provided in this specification, including the following steps:

[0043] S100: Monitor the current decision state and obtain first state information.

[0044] S102: Input the first state information into the decision model to be trained, and select an alternative deployment solution from a set of alternative deployment solutions.

[0045] S104: Adopt the selected alternative deployment solution to deploy the virtual machine network to be deployed in the device network.

[0046] S106: Re-determine the size of the currently available hardware resources of each server in the device network, and reset the current virtual machine network to be deployed as the next virtual machine network to be deployed.

[0047] S108: After step S106, the current decision state is monitored again to obtain second state information.

[0048] S110: Determine a reward value that is positively correlated to a change in the size of available hardware resources of the device network.

[0049] S112: Training the decision model based on the first state information, the second state information, and the reward value.

[0050] In the present disclosure, the current decision state is defined as: the size of the currently available hardware resources of each server in the device network, and the size of the hardware resources requested by each virtual machine in the virtual machine network currently to be deployed.

[0051] For step S104, if the size of the available hardware resources of the server used to deploy each virtual machine specified by the alternative deployment plan is greater than or equal to the size of the hardware resources requested by the virtual machine, the deployment is successful, otherwise the deployment fails, and if the deployment is successful, the size of the currently available hardware resources of at least part of the servers in the device network is consumed.

[0052] In addition, the present disclosure also introduces how to train the decision model based on the first state information, the second state information, and the reward value. Generally speaking, the reinforcement learning framework includes not only a decision model to be trained, but also a scoring model to be trained. The first state information and the second state information can be scored respectively based on the scoring model to be trained; the training error is calculated based on the score of the first state information, the score of the second state information and the reward value; wherein the training error is positively correlated with the reward value and negatively correlated with the difference between the score of the second state information and the score of the first state information; the decision model and the scoring model are adjusted with the reduction of the training error as the training goal.

[0053] In some embodiments, the size of the currently available hardware resources of each server in the device network can specifically be the size of the currently available computing resources, the size of the available data forwarding resources, and the size of the available bandwidth resources of each server in the device network; the available bandwidth resources include: the sum of the bandwidths of the communication links between the server and each other server in the device network.

[0054] The size of the available computing resources may be, for example, the available memory size, the available cache size, or the number of processor cores.

[0055] The size of available data forwarding resources can be understood as the size of data forwarding resources that can be called upon per unit time, which is a reflection of data forwarding capability.

[0056] In this way, the size of the hardware resources requested by each virtual machine in the virtual machine network currently to be deployed can specifically be: the size of the computing resources requested by each virtual machine in the virtual machine network currently to be deployed, and the guaranteed forwarding data volume requested; wherein the guaranteed forwarding data volume is the minimum data volume that is guaranteed to be forwarded between the virtual machine and other virtual machines.

[0057] Among them, the size of the available hardware resources of the server used to deploy each virtual machine is greater than or equal to the size of the hardware resources requested by the virtual machine, which may specifically include: the size of the available computing resources of the server used to deploy each virtual machine is greater than or equal to the size of the computing resources requested by the virtual machine; and the size of the available data forwarding resources of the server used to deploy each virtual machine is greater than or equal to the amount of forwarding data requested by the virtual machine; and the size of the available bandwidth resources of the server used to deploy each virtual machine is greater than or equal to the amount of forwarding data requested by the virtual machine.

[0058] The guaranteed forwarding data volume claimed by the virtual machine may be understood as a lower limit of the I / O (receive / send) data volume claimed by the virtual machine per unit time.

[0059] In some embodiments, the computing resources requested by each virtual machine in the virtual machine network to be deployed may include: the number of virtual cores that the server can provide to the virtual machine; the virtual cores that the server can provide to the virtual machine are mapped based on the processor core of the server, and a single processor core is mapped to a number of virtual cores;

[0060] The computing resources requested by each virtual machine in the virtual machine network include: the number of virtual cores applied for by the virtual machine, wherein different virtual machines occupy different virtual cores.

[0061] In some embodiments, the cloud computing service provider typically deploys a virtual machine network in the device network based on a cloud virtual private network (Virtual Private Cloud, VPC) networking method. Figure 2 This is a schematic diagram of a device network structure suitable for VPC networking provided by the present disclosure. Figure 2 As shown in the figure, in the VPC networking mode, the device network usually includes several core switches, several edge switches, and several servers. Different edge switches are connected to different server groups, and each edge switch is used to realize communication forwarding between the servers it is connected to; each core switch is connected to all edge switches to realize communication forwarding between different edge interactive machines.

[0062] In some embodiments, at least some of the alternative deployment solutions in the set of alternative deployment solutions are randomly generated. In other embodiments, at least some of the alternative deployment solutions in the set of alternative deployment solutions are generated based on different solution generation algorithms, and the solution generation algorithm is an algorithm that generates alternative deployment solutions that can be successfully deployed based on the hardware resource size required by each virtual machine in the virtual machine network currently to be deployed and the current available hardware resource size of each server in the device network. Of course, the alternative deployment solutions in the set of alternative deployment solutions can be generated based on the above two embodiments.

[0063] Here, a solution generation algorithm (referred to as solution generation algorithm 1) is exemplified, including:

[0064] Sorting each server in the device network; and, sorting each virtual machine in the virtual machine network twice to obtain a first virtual machine sequence and a second virtual machine sequence;

[0065] The first server is used as the current server, the first virtual machine in the first virtual machine sequence is used as the current virtual machine, and the following first process is performed:

[0066] Determine whether the current virtual machine can be successfully deployed to the current server;

[0067] If successful, a deployment relationship is established between the current virtual machine and the current server, the deployment relationship is recorded, and the next server is used as the current server again, and the next virtual machine in the first virtual machine sequence is used as the current virtual machine again, and the first process is re-executed;

[0068] If it fails, determine the reason for the failure;

[0069] If the failure reason is that the available computing resource size of the current server is less than the computing resource size requested by the current virtual machine, or the available data forwarding resource size of the current server is less than the guaranteed forwarding data volume requested by the current virtual machine, the next server is used as the current server again and the first process is re-executed;

[0070] If the failure reason is that the available bandwidth resource size of the current server is less than the guaranteed forwarding data volume required by the current virtual machine, the current virtual machine and the next virtual machine in the second virtual machine sequence are included in the test set, and the following second process is executed:

[0071] Determine whether the test set can be successfully deployed to the current server;

[0072] If successful, the virtual machines in the test set are added to the valid set; if unsuccessful, the cause of failure is determined;

[0073] If the reason for the failure is that the available computing resource size of the current server is smaller than the computing resource size required by the test set, or the available data forwarding resource size of the current server is smaller than the guaranteed forwarding data volume required by the test set, then, if the valid set is not empty, a deployment relationship between the virtual machines in the valid set and the current server is established, the deployment relationship is recorded, and the next virtual machine in the first virtual machine sequence other than the virtual machines in the valid set is used as the current virtual machine again, the next server is used as the current server again, and the first process is re-executed; if the valid set is empty, the next virtual machine of the current virtual machine in the first virtual machine sequence is used as the current virtual machine again, the next server is used as the current server again, and the first process is re-executed;

[0074] If the failure reason is that the available bandwidth resource size of the current server is less than the guaranteed forwarding data volume required by the test set, the next virtual machine in the second virtual machine sequence except the virtual machines in the valid set is added to the test set, and the second process is re-executed.

[0075] Based on the solution generation algorithm 1, further improvements can be made:

[0076] A capacity value of each server in the computing device network is a normalized weighted sum of the current available computing resource size, available data forwarding resource size, and available bandwidth resource size of the server;

[0077] Sort the servers in the device network, including:

[0078] The servers in the device network are sorted according to their capacity values. Furthermore, the servers can be sorted from large to small, or from small to large.

[0079] In this way, after making the above improvements on the basis of solution generation algorithm 1, we obtain solution generation algorithm 2 (sorting the servers from large to small according to their capability values) and solution generation algorithm 3 (sorting the servers from small to large according to their capability values).

[0080] In addition, based on solution generation algorithm 2 and solution generation algorithm 3, the following further improvements can be made:

[0081] In the VPC networking mode, the servers in the device network are sorted according to their capabilities, which may include:

[0082] According to the sum of the capacity values ​​of the server groups connected to the edge switches in the device network, the server groups are sorted; the servers in each server group are queued in order. Furthermore, the servers can be sorted from large to small, or from small to large.

[0083] In this way, solution generation algorithm 4 (improved by solution generation algorithm 2) and solution generation algorithm 5 (improved by solution generation algorithm 3) applicable to the VPC networking mode can be obtained.

[0084] Based on the solution generation algorithm 1, the following improvements can be made:

[0085] The demand value of each virtual machine in the virtual machine network is calculated, where the demand value is a normalized weighted sum of the computing resource size demanded by the virtual machine and the guaranteed forwarding data volume demanded.

[0086] Each virtual machine in the virtual machine network is sorted twice, including:

[0087] According to the size of the demand value of each virtual machine in the virtual machine network, each virtual machine is sorted to obtain a first virtual machine sequence; according to the size of the guaranteed forwarding data volume demanded by each virtual machine in the virtual machine network, each virtual machine is sorted from small to large to obtain a second virtual machine sequence. The virtual machines in the first virtual machine sequence can be arranged from large to small or from small to large, while the virtual machines in the second virtual machine sequence are usually sorted from small to large.

[0088] In this way, solution generation algorithm 6 (the virtual machines in the first virtual machine sequence are arranged from large to small according to the demand value) and solution generation algorithm 7 (the virtual machines in the first virtual machine sequence are arranged from small to large according to the demand value) can be obtained.

[0089] The above solution generation algorithms 1-7 can all be used to generate alternative deployment solutions, and the generated alternative deployment solutions are added to the set of alternative deployment solutions for selection by the decision model.

[0090] It should be noted that the guaranteed forwarding data volume claimed by the virtual machine is not only restricted by the available bandwidth resources of the server, but also by the available data forwarding resources of the server. The available data forwarding of the server not only involves communication between servers, which requires the use of the available bandwidth resources of the server, but also involves internal communication of the server (for example, interaction between different virtual machines deployed on the same server). The internal communication of the server does not need to use the available bandwidth resources of the server. This means that if multiple virtual machines in the same virtual machine network are deployed on the same server, the actual bandwidth resources consumed may be less than that of only a single virtual machine in the virtual machine network deployed on the server (because different virtual machines deployed on the same server may communicate internally on the server, and do not need to consume the available bandwidth resources of the server). Therefore, the available bandwidth resources of the server belong to "non-incremental consumption". Therefore, it is necessary to set a second process in the above-mentioned solution generation algorithm to analyze whether multiple virtual machines including the single virtual machine can be successfully deployed on the same server when a single virtual machine cannot be successfully deployed on a certain server. For this reason, the order of each virtual machine in the second virtual machine sequence can be preferably sorted from small to large, so that multiple virtual machines with few bandwidth resources originally claimed can be deployed on the same server as much as possible, saving the available bandwidth resources of the server.

[0091] Figure 3 is a schematic diagram of a decision-making system based on a reinforcement learning framework provided by the present disclosure. Figure 3 As shown, the decision system includes a decision model, an evaluation model, and an alternative deployment solution generation module. The alternative deployment solution generation module can have multiple algorithms for generating alternative deployment solutions built in. In the model training phase, the alternative deployment solution generation module is used to provide a set of alternative deployment solutions. The decision model selects an alternative deployment solution for simulated deployment. Then, the evaluation model evaluates the change in the decision state and determines the reward value that is positively correlated to the change in the size of the available hardware resources of the device network. In this way, the parameters of the decision model and the evaluation model can be adjusted based on the change in the decision state and the reward value, and the decision model and the evaluation model can be iteratively trained.

[0092] Figure 4 The present invention provides a flow chart of a decision method for a virtual machine network deployment solution, including:

[0093] S400: Monitor the current decision status.

[0094] S402: Input the current state information into the trained decision model, and select an alternative deployment solution from the set of alternative deployment solutions.

[0095] S404: Adopt the selected alternative deployment solution to deploy the virtual machine network to be deployed in the device network.

[0096] After completing the decision model training, when faced with the need to deploy a virtual machine network in the device network, the current decision state can be input into the decision model to obtain the alternative deployment plan output by the decision model. Deployment is performed based on the alternative deployment plan. This can ensure that the deployment is successful as much as possible while making the most efficient use of the available hardware resources of each server in the device network.

[0097] In engineering practice, the reinforcement learning framework can be built into the network deployment program. The network deployment program can run on any server in the device network or on other servers outside the device network.

[0098] That is, the network deployment program can be based on the built-in reinforcement learning framework to achieve Figure 1 The method flow shown is used to train a decision model. In addition, the network deployment program can output a corresponding deployment plan for the virtual machine network to be deployed and the current device network based on the trained decision model. When the network deployment program executes step S404, it can send a virtual machine deployment instruction to one or more servers in the device network based on the deployment plan to deploy the virtual machine network in the device network. In addition, step S404 can also be performed manually instead of by the network deployment program, and the manual operation of virtual machine deployment is performed on one or more servers in the device network according to the deployment plan output by the network deployment program.

[0099] This specification also provides an electronic device, including a memory and a processor; the memory is used to store computer instructions that can be run on the processor, and the processor is used to implement when executing the computer instructions Figure 1 Or the method flow shown in 4.

[0100] This specification also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements Figure 1 Or the method flow shown in 4.

[0101] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0102] For the convenience of description, the above device is described in various units according to their functions. Of course, when implementing this specification, the functions of each unit can be implemented in the same or multiple software and / or hardware.

[0103] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0104] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0105] This specification may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. This specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.

[0106] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0107] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 In a typical configuration, a computer includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0108] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0109] Computer-readable media include permanent and non-permanent, removable and non-removable media that can be used to store information by any method or technology. Information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, disk storage, quantum memory, graphene-based storage media or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include temporary computer-readable media (transitory media), such as modulated data signals and carrier waves.

[0110] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0111] The above describes a number of embodiments of the present specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0112] The terms used in the multiple embodiments of this specification are only for the purpose of describing specific embodiments, and are not intended to limit the multiple embodiments of this specification. The singular forms of "a", "said" and "the" used in the multiple embodiments of this specification and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.

[0113] It should be understood that although the terms first, second, third, etc. may be used to describe various information in multiple embodiments of this specification, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of multiple embodiments of this specification, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0114] Each embodiment in this specification is described in a progressive manner, and the same and similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the method embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. The method embodiment described above is merely illustrative, wherein the modules described as separate components may or may not be physically separated, and the functions of each module can be implemented in the same one or more software and / or hardware when implementing the embodiment scheme of this specification. It is also possible to select some or all of the modules according to actual needs to achieve the purpose of the embodiment scheme. A person of ordinary skill in the art can understand and implement it without paying creative labor.

[0115] The above description is only a preferred embodiment of the multiple embodiments of this specification and is not intended to limit the multiple embodiments of this specification. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the multiple embodiments of this specification should be included in the scope of protection of the multiple embodiments of this specification.

Claims

1. A decision model training method for a virtual machine network deployment solution, based on a reinforcement learning framework, the method comprising: Monitor the current decision state to obtain first state information; wherein the current decision state is defined as: the size of the currently available hardware resources of each server in the device network, and the size of the hardware resources required by each virtual machine in the virtual machine network to be currently deployed; Inputting the first state information into the decision model to be trained, and selecting an alternative deployment scheme from a set of alternative deployment schemes; Adopting the selected alternative deployment scheme to deploy the virtual machine network to be deployed in the device network; wherein, if the size of the available hardware resources of the server for deploying each virtual machine specified by the alternative deployment scheme is greater than or equal to the size of the hardware resources required by the virtual machine, the deployment is successful, otherwise the deployment fails, and if the deployment is successful, the size of the currently available hardware resources of at least part of the servers in the device network is consumed; Re-determine the size of the currently available hardware resources of each server in the device network, and reset the current virtual machine network to be deployed as the next virtual machine network to be deployed; then, monitor the current decision state again to obtain second state information; Determining a reward value that varies in direct relation to the size of available hardware resources of the device network; The decision model is trained based on the first state information, the second state information, and the reward value.

2. The method of claim 1, wherein: The size of the current available hardware resources for each server in the device network, including: The current available computing resource size, available data forwarding resource size, and available bandwidth resource size of each server in the device network; the available bandwidth resources include: the sum of the bandwidths of the communication links between the server and each other server in the device network; the available data forwarding resource size is the size of the data forwarding resource that can be called per unit time; The size of the hardware resources required by each virtual machine in the virtual machine network to be deployed currently includes: The size of computing resources required by each virtual machine in the virtual machine network to be deployed, and the guaranteed forwarding data volume required; wherein the guaranteed forwarding data volume is the minimum amount of data that can be forwarded between the virtual machine and other virtual machines within a unit time; The size of the available hardware resources of the server used to deploy each virtual machine is greater than or equal to the size of the hardware resources required by the virtual machine, including: The size of the available computing resources of the server used to deploy each virtual machine is greater than or equal to the size of the computing resources required by the virtual machine; and The size of the available data forwarding resources of the server used to deploy each virtual machine is greater than or equal to the guaranteed forwarding data volume requested by the virtual machine; and The size of the available bandwidth resources of the server used to deploy each virtual machine is greater than or equal to the guaranteed forwarding data volume required by the virtual machine.

3. The method of claim 2, wherein: The computing resources required by each virtual machine in the virtual machine network to be deployed currently include: the number of virtual cores that the server can provide to the virtual machine; the virtual cores that the server can provide to the virtual machine are mapped based on the processor core of the server, and a single processor core is mapped to a number of virtual cores; The computing resources requested by each virtual machine in the virtual machine network include: the number of virtual cores applied for by the virtual machine, wherein different virtual machines occupy different virtual cores.

4. The method of claim 1, wherein: The device network usually includes several core switches, several edge switches, and several servers. Different edge switches are connected to different server groups, and each edge switch is used to realize communication forwarding between the servers it is connected to; each core switch is connected to all edge switches to realize communication forwarding between different edge interactive machines.

5. The method of claim 1, wherein: One or more virtual machines can be deployed on a single server.

6. The method of claim 2, wherein: At least some of the alternative deployment solutions in the set of alternative deployment solutions are randomly generated; and / or At least some of the alternative deployment schemes are generated based on different scheme generation algorithms, and the scheme generation algorithm is an algorithm that generates an alternative deployment scheme that can be successfully deployed based on the hardware resource size required by each virtual machine in the virtual machine network to be deployed and the current available hardware resource size of each server in the device network.

7. The method of claim 6, wherein a solution generation algorithm comprises: Sorting each server in the device network; and, sorting each virtual machine in the virtual machine network twice to obtain a first virtual machine sequence and a second virtual machine sequence; The first server is used as the current server, the first virtual machine in the first virtual machine sequence is used as the current virtual machine, and the following first process is performed: Determine whether the current virtual machine can be successfully deployed to the current server; If successful, a deployment relationship is established between the current virtual machine and the current server, the deployment relationship is recorded, and the next server is used as the current server again, and the next virtual machine in the first virtual machine sequence is used as the current virtual machine again, and the first process is re-executed; If it fails, determine the reason for the failure; If the failure reason is that the available computing resource size of the current server is less than the computing resource size requested by the current virtual machine, or the available data forwarding resource size of the current server is less than the guaranteed forwarding data volume requested by the current virtual machine, the next server is used as the current server again and the first process is re-executed; If the failure reason is that the available bandwidth resource size of the current server is less than the guaranteed forwarding data volume required by the current virtual machine, the current virtual machine and the next virtual machine in the second virtual machine sequence are included in the test set, and the following second process is executed: Determine whether the test set can be successfully deployed to the current server; If successful, the virtual machines in the test set are added to the valid set; if unsuccessful, the cause of failure is determined; If the failure reason is that the available computing resource size of the current server is smaller than the computing resource size required by the test set, or the available data forwarding resource size of the current server is smaller than the guaranteed forwarding data volume required by the test set, then if the valid set is not empty, a deployment relationship between the virtual machines in the valid set and the current server is established, the deployment relationship is recorded, and the next virtual machine in the first virtual machine sequence except the virtual machines in the valid set is used as the current virtual machine again, the next server is used as the current server again, and the first process is re-executed; When the valid set is empty, the next virtual machine of the current virtual machine in the first virtual machine sequence is used as the current virtual machine again, the next server is used as the current server again, and the first process is executed again; If the failure reason is that the available bandwidth resource size of the current server is less than the guaranteed forwarding data volume required by the test set, the next virtual machine in the second virtual machine sequence except the virtual machines in the valid set is added to the test set, and the second process is re-executed.

8. The method of claim 7, wherein the solution generation algorithm further comprises: A capacity value of each server in the computing device network is a normalized weighted sum of the current available computing resource size, available data forwarding resource size, and available bandwidth resource size of the server; Sort the servers in the device network, including: The servers in the device network are sorted according to their capacity values.

9. The method of claim 8, wherein: The device network usually includes several core switches, several edge switches, and several servers. Different edge switches are connected to different server groups, and each edge switch is used to realize communication forwarding between the servers it is connected to; each core switch is connected to all edge switches to realize communication forwarding between different edge interactive machines; According to the capacity value of each server in the device network, the servers are sorted, including: The server groups are sorted according to the sum of the capability values ​​of the server groups connected to the edge switches in the device network; The servers in each server group are organized into queues in order.

10. The method of claim 7, wherein the solution generation algorithm further comprises: Calculate the demand value of each virtual machine in the virtual machine network, where the demand value is the weighted sum of the computing resource size demanded by the virtual machine and the guaranteed forwarding data volume demanded by the virtual machine after normalization; Each virtual machine in the virtual machine network is sorted twice, including: Sort the virtual machines according to the demand values ​​of the virtual machines in the virtual machine network to obtain a first virtual machine sequence; According to the size of the guaranteed forwarding data volume required by each virtual machine in the virtual machine network, the virtual machines are sorted from small to large to obtain a second virtual machine sequence.

11. A decision method for a virtual machine network deployment solution, comprising: Monitor the current decision state and obtain current state information; wherein the current decision state is defined as: the size of the currently available hardware resources of each server in the device network, and the size of the hardware resources required by each virtual machine in the virtual machine network to be currently deployed; Inputting the current state information into a decision model trained by the training method according to any one of claims 1 to 10, and selecting an alternative deployment scheme from a set of alternative deployment schemes; The selected alternative deployment solution is adopted to deploy the virtual machine network currently to be deployed in the device network.

12. An electronic device comprising a memory and a processor; the memory is used to store computer instructions that can be executed on the processor, and the processor is used to implement the method according to any one of claims 1 to 11 when executing the computer instructions.

13. A computer-readable storage medium having a computer program stored thereon, wherein when the program is executed by a processor, the method according to any one of claims 1 to 11 is implemented.