Virtual machine creation processing method, related apparatus, and medium

WO2026051644A1PCT designated stage Publication Date: 2026-03-12TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2025-07-28
Publication Date
2026-03-12

AI Technical Summary

Technical Problem

In a cloud computing environment, when virtual machines and network cards work together, the network speed and access bandwidth are not high, resulting in low efficiency in forwarding network requests.

Method used

By determining the processing resource architecture associated with the target network card in the target server, the target associated resource information of the target virtual machine is obtained, and a reasonable resource body is selected and allocated in the processing resource architecture to ensure that the virtual machine and the network card are deployed on the same resource architecture, thus shortening the transmission path.

Benefits of technology

It improves the efficiency of network request forwarding in virtual machines, avoiding problems with low network speed and access bandwidth.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025110889_12032026_PF_FP_ABST
    Figure CN2025110889_12032026_PF_FP_ABST
Patent Text Reader

Abstract

The present disclosure provides a virtual machine creation processing method, a related apparatus, and a medium. The method comprises: in response to a creation request for a target virtual machine, determining a target server on which the target virtual machine will be located, the target server comprising a target network card; if the type of the target virtual machine is a first type, acquiring, from the target server, a processing resource body architecture associated with the target network card, the first type being used to indicate that the target virtual machine needs to work in coordination with the target network card; acquiring target associated resource information of the target virtual machine; on the basis of the target associated resource information, determining a target processing resource body in the processing resource body architecture; and allocating the target processing resource body to the target virtual machine, so as to create the target virtual machine on the basis of the target processing resource body and the target network card. The present disclosure can improve the network request forwarding efficiency of virtual machines. The present disclosure is applicable to various scenarios such as computers, artificial intelligence, and cloud technology.
Need to check novelty before this filing date? Find Prior Art

Description

Virtual machine creation processing method, related apparatus and medium

[0001] The present application claims priority to the Chinese patent application No. 202411253898.3, filed on September 9, 2024, and entitled "Virtual machine creation processing method, related apparatus and medium", the whole content of which is incorporated herein by reference. TECHNICAL FIELD

[0002] The present disclosure relates to the field of computer technology, and more particularly to virtual machine creation processing. BACKGROUND

[0003] At present, in a cloud computing environment, network function virtualization (NFV) is often implemented through a virtual machine, so as to complete the function of network request forwarding by using a virtual machine capable of implementing network function virtualization.

[0004] In the related art, a virtual machine and a network card (gateway) exist in a server at the same time. The network request forwarding process of the virtual machine in the server often needs to rely on the network card. When creating a virtual machine, a piece of internal CPU resource needs to be allocated to the virtual machine in the server to create the virtual machine. However, after creating the virtual machine based on the network card and the internal CPU resource of the server, the problem of low network speed and low access bandwidth often occurs, thereby causing low network request forwarding efficiency. SUMMARY

[0005] The embodiments of the present disclosure provide a virtual machine creation processing method, related apparatus and medium, which can improve the network request forwarding efficiency of the virtual machine.

[0006] According to an aspect of the present disclosure, a virtual machine creation processing method is provided, which comprises:

[0007] In response to a creation request of a target virtual machine, a target server for creating the target virtual machine is determined, the target server comprising a target network card;

[0008] If the type of the target virtual machine is a first type, a processing resource body framework associated with the target network card is obtained in the target server, the first type being used to indicate that the target virtual machine needs to work cooperatively with the target network card;

[0009] Target associated resource information of the target virtual machine is obtained;

[0010] Based on the target associated resource information, a target processing resource body in the processing resource body framework is determined;

[0011] allocate the target processing resource body to the target virtual machine to create the target virtual machine based on the target processing resource body and the target network card.

[0012] According to an aspect of the present disclosure, a virtual machine creation processing apparatus is provided, the apparatus comprising:

[0013] a first determining unit configured to determine a target server for creating a target virtual machine in response to a creation request of the target virtual machine, the target server comprising a target network card;

[0014] a first obtaining unit configured to obtain a processing resource body framework associated with the target network card in the target server if a type of the target virtual machine is a first type, the first type being used to indicate that the target virtual machine needs to work cooperatively with the target network card;

[0015] a second obtaining unit configured to obtain target associated resource information of the target virtual machine;

[0016] a second determining unit configured to determine a target processing resource body in the processing resource body framework based on the target associated resource information;

[0017] an allocating unit configured to allocate the target processing resource body to the target virtual machine to create the target virtual machine based on the target processing resource body and the target network card.

[0018] According to an aspect of the present disclosure, an electronic device is provided, comprising a memory and a processor, the memory storing a computer program, and the processor implementing the virtual machine creation processing method as described above when executing the computer program.

[0019] According to an aspect of the present disclosure, a computer readable storage medium is provided, the storage medium storing a computer program, and the computer program being executed by a processor to implement the virtual machine creation processing method as described above.

[0020] According to an aspect of the present disclosure, a computer program product is provided, the computer program product comprising a computer program, the computer program being read and executed by a processor of an electronic device, so that the electronic device executes the virtual machine creation processing method as described above.

[0021] In the prior art, after a virtual machine is created, the virtual machine needs to be associated with a network card through a long transmission path, which results in low efficiency of network request forwarding. In the present embodiment, when a creation request for a target virtual machine is received, the creation request for the target virtual machine is responded to first, and a target server for creating the target virtual machine is determined, so as to provide sufficient CPU resources for creating the target virtual machine through the target server. The target server includes a target network card. Further, if the type of the target virtual machine is a first type (the first type is used to indicate that the target virtual machine needs to work in cooperation with the target network card), a processing resource architecture associated with the target network card in the target server is obtained, so that the processing resource architecture in which the target network card is located is preferentially selected, and processing resources are provided for the target virtual machine based on the processing resource architecture, which is beneficial to shorten the transmission path of the target virtual machine and the target network card, and avoid the problem of low network speed and access bandwidth caused by deploying the target virtual machine and the target network card in different resource architectures. Further, after the processing resource architecture is determined, the present embodiment considers the case that multiple processing resources exist in the processing resource architecture, and further obtains target associated resource information of the target virtual machine, and determines a target processing resource in the multiple processing resources included in the processing resource architecture based on the target associated resource information, so as to reasonably allocate resources according to the target associated resource information. Finally, the target processing resource is allocated to the target virtual machine, so as to create the target virtual machine based on the target processing resource and the target network card. In this way, a target processing resource is selected in the processing resource architecture associated with the target network card to provide CPU resources required for creating the target virtual machine, which can realize deploying the target virtual machine and the target network card in the same processing resource architecture, and when the target virtual machine needs to forward a network request, the target virtual machine does not need to establish contact with the target network card through a transmission protocol and a long transmission path, and the problem of low network speed and access bandwidth is avoided, so as to improve the network request forwarding efficiency of the virtual machine. BRIEF DESCRIPTION OF DRAWINGS

[0022] FIG. 1 is a system architecture diagram of a virtual machine creation processing method according to an embodiment of the present disclosure;

[0023] FIGS. 2A-2F show a schematic diagram of a virtual machine creation processing method applied in a virtual machine creation scenario according to an embodiment of the present disclosure;

[0024] FIG. 3 is a flowchart of a virtual machine creation processing method according to an embodiment of the present disclosure;

[0025] FIG. 4 is a flowchart of determining a target server in multiple candidate servers according to an embodiment of the present disclosure;

[0026] FIG. 5 is a flowchart of determining a target server in multiple intermediate servers according to an embodiment of the present disclosure;

[0027] FIG. 6 is a flow chart of determining an intermediate server according to one embodiment of the present disclosure;

[0028] FIG. 7 is a schematic diagram of implementation process of determining an intermediate server according to one embodiment of the present disclosure;

[0029] FIG. 8 is a flow chart of determining a priority score of an intermediate server according to one embodiment of the present disclosure;

[0030] FIG. 9 is a schematic diagram of implementation process of determining a priority score of an intermediate server according to one embodiment of the present disclosure;

[0031] FIG. 10 is a flow chart of determining a processing resource framework according to one embodiment of the present disclosure;

[0032] FIG. 11 is a schematic diagram of implementation process of determining a processing resource framework according to one embodiment of the present disclosure;

[0033] FIG. 12 is a flow chart of determining a target processing resource according to one embodiment of the present disclosure;

[0034] FIG. 13 is a flow chart of determining a target resource hierarchy according to one embodiment of the present disclosure;

[0035] FIG. 14A-FIG. 14B are schematic diagrams of implementation process of determining a target resource hierarchy according to one embodiment of the present disclosure;

[0036] FIG. 15 is a flow chart of determining a target processing resource according to one embodiment of the present disclosure;

[0037] FIG. 16 is a schematic diagram of implementation process of determining a target processing resource according to one embodiment of the present disclosure;

[0038] FIG. 17 is a flow chart of creating a second type of target virtual machine according to one embodiment of the present disclosure;

[0039] FIG. 18 is a flow chart of creating a third type of target virtual machine according to one embodiment of the present disclosure;

[0040] FIG. 19 is a flow chart of adapting each candidate server according to one embodiment of the present disclosure;

[0041] FIG. 20 is a schematic diagram of implementation details of adapting each candidate server according to one embodiment of the present disclosure;

[0042] FIG. 21 is a schematic diagram of implementation details of a virtual machine creation processing method according to one embodiment of the present disclosure;

[0043] FIG. 22 is a block diagram of a virtual machine creation processing apparatus according to one embodiment of the present disclosure;

[0044] FIG. 23 is a terminal structure diagram of a virtual machine creation processing method according to an embodiment of the present disclosure;

[0045] FIG. 24 is a server structure diagram of a virtual machine creation processing method according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0046] In order to make the purposes, technical solutions and advantages of the present disclosure clearer, the present disclosure will be further described in detail below in combination with the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present disclosure and do not limit the present disclosure.

[0047] The system architecture and scenarios to which the embodiments of the present disclosure are applied will be described below.

[0048] FIG. 1 is a system architecture diagram to which a virtual machine creation processing method according to an embodiment of the present disclosure is applied. It includes an object terminal 140, an Internet 130, a gateway 120, a virtual machine creation server 110, a candidate server 150, and the like.

[0049] The object terminal 140 includes desktop computers, laptop computers, PDAs (personal digital assistants), mobile phones, vehicle-mounted terminals, home theater terminals, special-purpose terminals, and the like in various forms. In addition, it can be a single device or a collection of multiple devices. The object terminal 140 can communicate with the Internet 130 in a wired or wireless manner to exchange data. The object terminal 140 includes a virtual machine creation processing platform, which is used to provide a target object (i.e., an object using the virtual machine creation processing platform) with some parameters required to set up a virtual machine. The object involved in the present application can be a real user using the virtual machine creation processing platform, or an object controlled by an artificial intelligence (AI) device, which is not limited herein.

[0050] The virtual machine creation server 110 and the plurality of candidate servers 150 for providing processing resources refer to computer systems capable of providing certain services to the object terminal 140. In comparison with the ordinary object terminal 140, the virtual machine creation server 110 and the candidate servers 150 have higher requirements in stability, security, performance, and the like. The virtual machine creation server 110 and the candidate servers 150 are combinations of one high-performance computer, a cluster of multiple high-performance computers, a portion (for example, a virtual machine) of one high-performance computer, a portion (for example, a virtual machine) of multiple high-performance computers, and the like in a network platform. The virtual machine creation server 110 and the candidate servers 150 include multiple types of services, and the implementation of each service of the virtual machine creation server 110 and the candidate servers 150 is often associated with some intermediate databases or storage media, and the like. The virtual machine creation server 110 is configured to receive a virtual machine creation request of a target object, and select a candidate server most suitable for creating a virtual machine from a plurality of candidate servers (for example, a candidate server 1, a candidate server 2, and a candidate server 3) for providing processing resources according to the virtual machine creation request, and determine a specific module for providing processing resources for creating a virtual machine in the server. The candidate server 150 is configured to provide internal CPU resources to create various types of virtual machines.

[0051] The gateway 120 is also referred to as an inter-network connector or a protocol converter. The gateway implements network interconnection at the transport layer, and is a computer system or device acting as a conversion function. The gateway is a translator between two systems using different communication protocols, data formats or languages, or even having completely different architectures. Meanwhile, the gateway can also provide filtering and security functions. Messages sent by the object terminal 140 to the virtual machine creation server 110 and the candidate servers 150 are sent to the corresponding virtual machine creation server 110 and the candidate servers 150 through the gateway 120. Messages sent by the virtual machine creation server 110 and the candidate servers 150 to the object terminal 140 are also sent to the corresponding object terminal 140 through the gateway 120.

[0052] The embodiments of the present disclosure can be applied in various scenarios, for example, the virtual machine creation scenarios shown in FIGS. 2A-2F.

[0053] As shown in FIG. 2A, when the target object wants to create a virtual machine, the target object logs in to the virtual machine creation processing platform through the object terminal and enters the virtual machine creation flow. At this time, a prompt field "please enter the name, type, required CPU core number and memory size of the virtual machine to be created" is displayed on the page, and an editing area for inputting the virtual machine name, an editing area for inputting the virtual machine type, an editing area for inputting the required CPU core number for creating the virtual machine, and an editing area for inputting the required memory size for creating the virtual machine are provided. Based on this, the target object inputs "K" in the editing area for inputting the virtual machine name, inputs "NFV virtual machine for non-integer machine deployment" in the editing area for inputting the virtual machine type, inputs "8 cores" in the editing area for inputting the required CPU core number for creating the virtual machine, and inputs "8g" in the editing area for inputting the required memory size for creating the virtual machine, and clicks the "Confirm" button to determine to create an NFV virtual machine K for non-integer machine deployment, and the virtual machine K requires the server to provide 8-core CPU resources and 8G memory size.

[0054] As shown in FIG. 2B, after the target object clicks the "Confirm" button, a prompt field "the following is the specific situation of the screened servers meeting the resource requirements" is displayed on the page, and a list indicating the CPU core number, memory size and priority score of each candidate server is displayed. Since the CPU core number of the server 5 is 64 and the memory size is 256G, the processing resources in the server 5 are the most sufficient, so the server 5 is determined as the target server for providing CPU resources when creating the virtual machine K.

[0055] As shown in FIG. 2C, after the target server is determined, the virtual machine creation server finds the CPU topology structure in which the target network card in the server 5 is located, and displays a prompt field "the target network card of the server 5 is located in the CPU topology structure Socket1, wherein the specific hierarchical structure of the CPU topology structure Socket1 is as follows" on the page, and the specific hierarchical structure diagram of the CPU topology structure Socket1 is also displayed on the page, so that the target object can view the nesting level in the specific hierarchical structure diagram and the specific number of CPU resources in each level. The CPU topology structure Socket1 is composed of 4 CCD structures, and each CCD structure is composed of two CCX structures. Based on the initial processing resource information and the specific hierarchical structure configured by the target object, a prompt field "since the CCD level of the above CPU topology structure Socket1 is the smallest level that can provide 8-core CPU resources, the CCD level is taken as the target level" is also displayed on the page to prompt the target object to select a CCD structure as the carrier for providing CPU resources on the CCD level.

[0056] As shown in FIG. 2D, after determining that the target level is the CCD level, the virtual machine creation server performs resource scoring on each CCD structure of the CCD level of the server 5, at this time, a prompt field "The following is the resource score of each structure of the target level in the server 5." is displayed on the page, and the resource score details of each CCD structure are displayed. Among them, the resource score of the structure CCD0 containing 8-core CPU resources is 85; the resource score of the structure CCD1 containing 4-core CPU resources is 45; the resource score of the structure CCD2 containing 6-core CPU resources is 55; and the resource score of the structure CCD3 containing 6-core CPU resources is 55. Based on this, the virtual machine creation server selects the structure CCD0 with the highest resource score as the carrier for providing CPU resources.

[0057] As shown in FIG. 2E, after determining the carrier for providing CPU resources, a prompt window is displayed on the page, and the prompt window has a prompt field "The CPU resources in the structure CCD0 are used to create a virtual machine K, and the creation of the virtual machine K is in progress. Please wait patiently...". To prompt the specific location of the virtual machine K to be created in the server 5.

[0058] As shown in FIG. 2F, after the virtual machine K is created, a prompt window is displayed on the page, and the prompt window has a prompt field "The virtual machine K has been created, and the network request forwarding operation can be performed through the virtual machine K and the target network card." To prompt that the target object has successfully created the virtual machine K.

[0059] It should be noted that Socket refers to the physical CPU topology structure inside the server, CCD refers to the computing chip (full name is Core Chiplet Die) inside the server, and CCX refers to the computing core (full name is CPU Complex) inside the server. In the server, the CCX is often arranged on the CCD chip, and the CCD chip is deployed on the physical CPU topology structure Socket, and the inside of a server often contains at least two Socket structures.

[0060] The following is a general description of the embodiments of the present disclosure.

[0061] According to one embodiment of the present disclosure, a virtual machine creation processing method is provided.

[0062] The virtual machine creation processing method is generally applied in a business scenario of allocating server processing resources for different types of virtual machines for virtual machine creation, such as the virtual machine creation scenarios shown in FIGS. 2A-2F. The embodiment of the present disclosure provides a scheme of allocating processing resources for a virtual machine based on the performance indicators of a server and the location of a network card in the creation of a virtual machine that implements a network request forwarding function, which can improve the network request forwarding efficiency of the virtual machine.

[0063] As shown in FIG. 3, the virtual machine creation processing method according to one embodiment of the present disclosure can include:

[0064] Step 310, in response to a creation request of a target virtual machine, determining a target server for creating the target virtual machine;

[0065] Step 320, if the type of the target virtual machine is a first type, obtaining a processing resource body framework associated with the target network card in the target server;

[0066] Step 330, obtaining target associated resource information of the target virtual machine;

[0067] Step 340, determining a target processing resource body in the processing resource body framework based on the target associated resource information;

[0068] Step 350, allocating the target processing resource body to the target virtual machine to create the target virtual machine based on the target processing resource body and the target network card.

[0069] The steps 310-350 are described in detail below.

[0070] In step 310, in response to a creation request of a target virtual machine, a target server where the target virtual machine is located is determined.

[0071] The target virtual machine refers to a virtual machine to be created, wherein the creation of the target virtual machine requires occupying CPU resources (such as CPU core number, etc.) and memory and other processing resources of a server.

[0072] The creation request is a request sent by a user through an object terminal to a virtual machine creation server when the user wants to create a virtual machine. In the creation request, resource information such as CPU core number and memory size configured by the user for creating the target virtual machine is often recorded.

[0073] The target server refers to a candidate server selected by the virtual machine creation server from multiple candidate servers for providing processing resources (such as sufficient CPU resources) for creating a target virtual machine, and the target virtual machine will be deployed in the target server after being created, wherein the target server includes a target network card, and the target network card is used to help the target virtual machine to implement the forwarding of network requests.

[0074] In the embodiment, when an object needs to create a target virtual machine in a server, the object sends a creation request for the target virtual machine to the virtual machine creation server through the object terminal. Based on this, the virtual machine creation server first responds to the creation request of the target virtual machine to obtain the server performance and processing resource requirements that the server creating the target virtual machine needs to meet. Then, according to the server performance and processing resource requirements required by the target server, the target server is determined from a plurality of alternative servers to determine the target server to which the target virtual machine is to be deployed.

[0075] For brevity, the specific implementation process of determining the target server in which the target virtual machine is located will be described in detail below. Here, no further description is given.

[0076] In step 320, if the type of the target virtual machine is the first type, the processing resource body framework associated with the target network card in the target server is obtained.

[0077] The first type is used to indicate that the target virtual machine needs to work in cooperation with the target network card.

[0078] The processing resource body framework refers to the resource body framework in which the target network card is located in the target server.

[0079] In the embodiment, if the type of the target virtual machine is the first type, it indicates that the target virtual machine is a virtual machine capable of implementing network request forwarding (NFV virtual machine not deployed as a whole machine), and the target virtual machine needs to work in cooperation with the target network card when performing network request forwarding. Based on this, on the target server, the processing resource body framework associated with the target network card is determined, wherein the processing resource body framework associated with the target network card in the target server refers to the processing resource body framework in which the target network card is located.

[0080] In step 330, the target associated resource information of the target virtual machine is obtained.

[0081] The target associated resource information is used to indicate specific resource information such as specific CPU core number and specific memory size required for creating the target virtual machine.

[0082] In the embodiment, when the object sends the creation request for the target virtual machine, the object configures resources for the target virtual machine on the front-end interface of the object terminal and sets the processing resource conditions (such as memory size and computing resource amount) required for the target virtual machine when creating. As a possible implementation manner, the target associated resource information of the target virtual machine is obtained by performing request analysis on the creation request under the condition of authorized permission. Alternatively, the pre-set associated resource information is selected as the target associated resource information.

[0083] In step 340, based on the target associated resource information, a target processing resource body is determined in the processing resource body framework.

[0084] The target processing resource body refers to a certain module determined by the processing resource body framework inside the target server to provide resources for creating the target virtual machine, and the target processing resource body can indicate the specific location of the target virtual machine inside the target server.

[0085] For brevity, the specific implementation process of determining the target processing resource body in the processing resource body framework based on the target associated resource information in the embodiment of the present disclosure will be described in detail below. Here, no further description is made.

[0086] In step 350, the target processing resource body is allocated to the target virtual machine, so as to create the target virtual machine based on the target processing resource body and the target network card.

[0087] In the implementation of this embodiment, first, the processing resources carried by the target processing resource body are allocated to the target virtual machine. Then, the target virtual machine is created inside the target server by using the processing resources carried by the target processing resource body, and the target virtual machine and the target network card are associated, so as to complete the creation of the target virtual machine.

[0088] Through the steps 310-350, in the related art, after a virtual machine is created, the virtual machine needs to be associated to the network card through a long transmission path, which causes low efficiency of network request forwarding. In the embodiment of the present disclosure, when the creation request for the target virtual machine is received, the creation request for the target virtual machine is responded to, the target server for creating the target virtual machine is determined, and the target server is provided with sufficient CPU resources for creating the target virtual machine. The target server includes the target network card. Further, if the type of the target virtual machine is the first type (the first type is used to indicate that the target virtual machine needs to work with the target network card), the processing resource architecture associated with the target network card in the target server is obtained. This can preferentially select the processing resource architecture in which the target network card is located, provide the target virtual machine with processing resources based on the processing resource architecture, shorten the transmission path of the target virtual machine and the target network card, and avoid the problem of low network speed and access bandwidth caused by deploying the target virtual machine and the target network card in different resource architectures. Further, after the processing resource architecture is determined, the present embodiment considers that there are multiple processing resources in the processing resource architecture, obtains the target associated resource information of the target virtual machine, and determines the target processing resource in the multiple processing resources included in the processing resource architecture based on the target associated resource information, so as to reasonably allocate resources according to the target associated resource information. Finally, the target processing resource is allocated to the target virtual machine, and the target virtual machine is created based on the target processing resource and the target network card. Therefore, by selecting a target processing resource in the processing resource architecture associated with the target network card to provide the CPU resources required for creating the target virtual machine, the target virtual machine and the target network card can be deployed in the same processing resource architecture. When the target virtual machine needs to forward a network request, it does not need to establish a connection with the target network card through a transmission protocol and a long transmission path, thereby avoiding the problem of low network speed and access bandwidth, and improving the network request forwarding efficiency of the virtual machine.

[0089] The above is a general description of steps 310-350. Since steps 330 and 350 have been described in detail in the above general description, the specific implementation of steps 310, 320 and 340 will be described in detail below.

[0090] Step 310 will be described in detail below.

[0091] In step 310, in response to the creation request of the target virtual machine, the target server in which the target virtual machine is located is determined, and the target server includes the target network card.

[0092] Please refer to FIG. 4. In one embodiment, the process of determining the target server in which the target virtual machine is located includes but is not limited to the following steps 410-430:

[0093] Step 410, obtaining a plurality of candidate servers;

[0094] Step 420, in response to a creation request of a target virtual machine, obtaining virtual machine configuration information of the target virtual machine and target associated resource information;

[0095] Step 430, based on the virtual machine configuration information and the target associated resource information, determining a target server from the plurality of candidate servers.

[0096] The steps 410-430 are described in detail as follows.

[0097] In step 410, a plurality of candidate servers are obtained.

[0098] The candidate server refers to a server capable of providing processing resources for the creation of the target virtual machine.

[0099] In the embodiment, since the candidate servers capable of providing processing resources for the creation of various virtual machines are stored in a server resource pool, the plurality of candidate servers can be obtained from the server resource pool under the authorization permission, so as to screen the target server from the plurality of candidate servers.

[0100] In step 420, in response to a creation request of a target virtual machine, virtual machine configuration information of the target virtual machine and target associated resource information are obtained.

[0101] The virtual machine configuration information is information required for creating the target virtual machine, such as information for indicating the specific type, size, and the like of the target virtual machine.

[0102] In the embodiment, since the model specification configuration information of different types of virtual machines is often fixed, the model specification configuration information of each type of virtual machine can be stored in a virtual machine database. Based on this, when the virtual machine creation server receives a creation request for a target virtual machine, the specific type of the target virtual machine is first determined according to the creation request. Then, under the authorization permission, the model specification configuration information corresponding to the specific type is extracted from the virtual machine database according to the specific type of the target virtual machine, and the extracted model specification configuration information is determined as the virtual machine configuration information of the target virtual machine.

[0103] The specific process of obtaining the target associated resource information of the target virtual machine in the embodiment is similar to the above step 330. For the sake of brevity, it will not be described again.

[0104] In step 430, based on the virtual machine configuration information and the target associated resource information, a target server is determined from the plurality of candidate servers.

[0105] In the embodiment, the server resource usage and performance of each candidate server are compared with the virtual machine configuration information and the target associated resource information, and a candidate server that can meet the processing resource requirement of creating the target virtual machine and has better performance is selected as the target server.

[0106] The embodiment has the advantage that when determining the target server, the candidate servers of the server resource pool are screened according to the virtual machine configuration information and the target associated resource information of the target virtual machine, so that a candidate server that can meet the processing resource requirement of creating the target virtual machine and has better performance is selected as the target server, thereby improving the accuracy of screening the target server.

[0107] Referring to FIG. 5, in one embodiment, step 430 specifically includes but is not limited to steps 510-540:

[0108] In step 510, the server basic information of each candidate server is obtained.

[0109] In step 520, intermediate servers are screened from the plurality of candidate servers based on the virtual machine configuration information, the target associated resource information and the server basic information.

[0110] In step 530, for each intermediate server, a priority score of the intermediate server is determined based on the server basic information.

[0111] In step 540, the target server is determined from the plurality of intermediate servers based on the priority score.

[0112] The steps 510-540 are described in detail as follows.

[0113] In step 510, the server basic information of each candidate server is obtained.

[0114] The server basic information is information for describing the candidate server, such as resource usage and various performance indicators for indicating the number of CPU cores, memory size, storage type, network bandwidth, CPU usage of the candidate server.

[0115] In the embodiment, the server basic information and other data of each candidate server in the server resource pool are recorded in the preset database in the server adaptation stage before the virtual machine creation stage. Therefore, the server basic information of each candidate server can be obtained from the preset database under the condition of authorized permission.

[0116] In step 520, intermediate servers are screened from the plurality of candidate servers based on the virtual machine configuration information, the target associated resource information and the server basic information.

[0117] The intermediate server refers to a candidate server satisfying basic requirements of performance indicators and resource usage for creating the target virtual machine.

[0118] In the embodiment, for each candidate server, the server basic information is compared with the virtual machine configuration information, and the server basic information is compared with the target associated resource information. Then, the candidate server whose server basic information can satisfy the virtual machine creation requirements of the virtual machine configuration information and the target associated resource information is determined as the intermediate server.

[0119] For example, the number of CPU cores and the size of memory of the intermediate server need to be no less than the required number of CPU cores and the required size of memory in the target associated resource information.

[0120] In step 530, for each intermediate server, a priority score of the intermediate server is determined based on the server basic information.

[0121] The priority score is used to indicate the priority of using the intermediate server as the target server for creating the target virtual machine. The greater the priority score is, the more the intermediate server is considered as the target server.

[0122] In the embodiment, the server basic information of each intermediate server includes a plurality of indicators. For each candidate server, each indicator in the server basic information can be scored to obtain a priority sub-score corresponding to each indicator. Then, the priority sub-scores of all indicators are integrated into the priority score of the intermediate server.

[0123] In step 540, based on the priority score, the target server is determined from the plurality of intermediate servers.

[0124] In the embodiment, first, according to the priority score, each intermediate server is sorted in the order of the priority score from large to small to obtain a server sequence. Then, the intermediate server ranked first in the server sequence is used as the target server.

[0125] Further, since the server state of each intermediate server is dynamically changing, in order to improve the availability of the selected intermediate server, one of the first predetermined number of intermediate servers in the server sequence can also be randomly selected as the target server.

[0126] The embodiment has the advantage that, when determining the target server, the conditional filtering and the priority scoring are combined. For each candidate server, the candidate server whose server basic information meets the basic requirements (the virtual machine configuration information and the virtual machine creation requirements of the target associated resource information) is selected as an intermediate server. Then, the priority score of each intermediate server is determined according to the scoring strategy, and the priority score is used to quantify the selection priority of each intermediate server when creating the virtual machine, so that the candidate server meeting the basic requirements and having better performance indicators can be selected as the target server, and the accuracy and rationality of the server screening are improved.

[0127] Referring to FIG. 6, in one embodiment, step 520 specifically includes but is not limited to steps 610-620:

[0128] Step 610, determining the server screening condition based on the virtual machine configuration information and the target associated resource information.

[0129] Step 620, in the plurality of candidate servers, determining the candidate server whose target indicators in the server basic information meet the server screening condition as an intermediate server.

[0130] The steps 610-620 are described in detail as follows.

[0131] In step 610, the server screening condition is determined based on the virtual machine configuration information and the target associated resource information.

[0132] The server screening condition is used to indicate the minimum performance indicators that the target server needs to meet.

[0133] In the implementation of the embodiment, first, each indicator related to the server in the virtual machine configuration information and the target associated resource information is obtained, and each obtained indicator is taken as a target indicator, and the indicator value of each target indicator in the virtual machine configuration information and the target associated resource information is taken as the indicator threshold of the target indicator. Then, each target indicator and the indicator threshold are integrated into the server screening condition.

[0134] For example, in the virtual machine configuration information and the target associated resource information, the indicator related to the server is that the CPU core number required for creating the target virtual machine is 4 cores, and the memory size is 8G. Based on this, the server screening condition is determined as that the CPU core number of the target server is not less than 4 cores, and the memory size is not less than 8G.

[0135] In step 620, for each candidate server, firstly, the specific indicator value of the target indicator is obtained in the server basic information. Then, the specific indicator value of the target indicator is compared with the minimum indicator value of the target indicator in the server screening condition. Further, according to the comparison, the candidate server whose specific indicator value of all target indicators is not less than the minimum indicator value of the target indicator in the server screening condition is taken as an intermediate server.

[0136] As shown in FIG. 7, the server screening condition determined based on the virtual machine configuration information of the target virtual machine and the target associated resource information is that the number of CPU cores is not less than 8 cores and the memory is not less than 4G. According to the server basic information of each candidate server in the server resource pool, the number of CPU cores and the memory size of each candidate server are determined respectively. Among them, the number of CPU cores of server 1 is 32 cores, and the memory size is 32G; the number of CPU cores of server 2 is 8 cores, and the memory size is 16G; the number of CPU cores of server 3 is 8 cores, and the memory size is 256G; the number of CPU cores of server 4 is 16 cores, and the memory size is 64G; the number of CPU cores of server 5 is 64 cores, and the memory size is 256G; the number of CPU cores of server 6 is 2 cores, and the memory size is 2G; the number of CPU cores of server 7 is 2 cores, and the memory size is 4G. Based on this, the number of CPU cores and the memory size of each candidate server are compared with the server screening condition, and the candidate servers whose number of CPU cores and memory size meet the server screening condition are screened out. Since the number of CPU cores and the memory size of server 6 and server 7 cannot meet the server screening condition, server 1, server 2, server 3, server 4 and server 5 are determined as intermediate servers.

[0137] The advantage of this embodiment is that the condition filtering method can eliminate the candidate servers that cannot meet the processing resources and performance indicators required by the virtual machine configuration information and the target associated resource information, and retain the candidate servers whose server basic information meets the basic requirements as intermediate servers, which can reduce the adverse effects of the candidate servers that do not meet the requirements on the determination of the target server, and is beneficial to improve the determination efficiency and accuracy of the target server.

[0138] Please refer to FIG. 8, in one embodiment, step 530 specifically includes but is not limited to the following steps 810-820:

[0139] Step 810, for each intermediate server, the server thread number, the server core number, the storage type and the memory size of the candidate server are obtained in the server basic information;

[0140] Step 820, the priority score of the intermediate server is determined based on the server thread number, the server core number, the storage type and the memory size.

[0141] Steps 810-820 are described in detail as follows.

[0142] In step 810, for each intermediate server, the server thread number, the server core number, the storage type and the memory size of the candidate server are obtained in the server basic information.

[0143] The server thread number is used to indicate the total number of threads that can independently execute tasks in the server.

[0144] The server core number is used to indicate the total number of CPU cores in the server.

[0145] The storage type is used to indicate the type of hardware device for storing data in the server.

[0146] The memory size is used to indicate the size of the resource storage space that can be provided inside the server.

[0147] In the implementation of this embodiment, for each intermediate server, the server basic information is extracted to obtain the server thread number, the server core number, the storage type and the memory size of the candidate server.

[0148] In step 820, the priority score of the intermediate server is determined based on the server thread number, the server core number, the storage type and the memory size.

[0149] The advantage of this embodiment is that the priority score of the intermediate server is determined based on multiple performance indicators of the intermediate server in the server basic information, such as the server thread number, the server core number, the storage type and the memory size. Therefore, the multi-dimensional scoring of the intermediate server through multiple indicators can achieve better comprehensiveness of the scoring dimension, thereby improving the accuracy and rationality of the priority score.

[0150] In the implementation of this embodiment, step 820 specifically includes but is not limited to the following steps:

[0151] Based on the server thread number, a first score of the intermediate server is determined;

[0152] Based on the server core number, a second score of the intermediate server is determined;

[0153] Based on the storage type, a third score of the intermediate server is determined;

[0154] Based on the memory size, a fourth score of the intermediate server is determined;

[0155] Based on the weighted sum of the first score, the second score, the third score and the fourth score, the priority score is obtained.

[0156] The first score is used to indicate the priority of the number of server threads of the candidate server in the screening. The second score is used to indicate the priority of the number of server cores of the candidate server in the screening. The third score is used to indicate the priority of the storage type of the candidate server in the screening. The fourth score is used to indicate the priority of the memory size of the candidate server in the screening.

[0157] Specifically, since the number of server threads, the number of server cores and the memory size are all numerical data. Based on this, first, a first function taking the number of server threads as the independent variable (input) and taking the first score as the dependent variable (output) can be constructed in advance; a second function taking the number of server cores as the independent variable (input) and taking the second score as the dependent variable (output) can be constructed; and a third function taking the memory size as the independent variable (input) and taking the fourth score as the dependent variable (output) can be constructed. The first function, the second function and the third function are all increasing functions. Then, the number of server threads of the intermediate server is input into the first function, and the first score of the intermediate server can be obtained; the number of server cores of the intermediate server is input into the second function, and the second score of the intermediate server can be obtained; and the memory size of the intermediate server is input into the third function, and the fourth score of the intermediate server can be obtained.

[0158] Further, since the storage type is non-numerical data, based on this, a lookup table method can be used to obtain the third score. Specifically, first, a preset relationship mapping table is called, wherein the relationship mapping table is used to indicate the candidate score corresponding to each candidate storage type, and the candidate storage type refers to the storage type that the server can exist. Then, the storage type of the intermediate server is compared with each candidate storage type of the relationship mapping table, and the candidate score corresponding to the candidate storage type consistent with the storage type is taken as the third score of the intermediate server.

[0159] Finally, the score weights of the first score, the second score, the third score and the fourth score are obtained respectively; then, according to the score weights, the first score, the second score, the third score and the fourth score are weighted and operated to obtain the priority score.

[0160] As shown in FIG. 9, it is a ranking table of multiple intermediate servers meeting the server screening condition. Specifically, the score weights of the first score, the second score, the third score and the fourth score are all 0.25. Based on this, the priority score of server 1 with the first score of 72, the second score of 84, the third score of 55 and the fourth score of 75 is 71.5. The priority score of server 2 with the first score of 66, the second score of 72, the third score of 80 and the fourth score of 70 is 72. The priority score of server 3 with the first score of 54, the second score of 72, the third score of 76 and the fourth score of 86 is 72. The priority score of server 4 with the first score of 83, the second score of 80, the third score of 63 and the fourth score of 78 is 76. The priority score of server 5 with the first score of 78, the second score of 90, the third score of 82 and the fourth score of 84 is 83.5. Based on this, the five intermediate servers are ranked as [server 5, server 4, server 3, server 2, server 1] according to the priority scores. As can be seen, server 5 is the intermediate server with the highest priority, and the performance indicators of server 5 are optimal, so server 5 is preferentially selected as the target server.

[0161] The advantage of this embodiment is that the multiple performance indicators of the intermediate server in the server basic information are scored respectively, and the look-up table method and the function calculation method are combined in the scoring, which can realize multi-dimensional scoring of the intermediate server, so that the scoring dimension has better comprehensiveness, and the accuracy and rationality of the priority score are improved.

[0162] The step 320 is described in detail below.

[0163] In the step 320, if the type of the target virtual machine is the first type, a processing resource architecture associated with the target network card in the target server is obtained, and the first type is used to indicate that the target virtual machine needs to work cooperatively with the target network card.

[0164] In the embodiments of the present disclosure, the target server includes multiple candidate resource architectures with candidate architecture indexes.

[0165] The candidate resource architecture refers to a piece of internal CPU resource structure on the target server, and the candidate resource architecture can also be referred to as a physical CPU structure inside the target server. Different candidate resource architectures can communicate and interact through the IFOP (Infinity Fabric On-Package) protocol.

[0166] The candidate architecture index is used to uniquely identify each candidate resource architecture in the target server, and the candidate architecture indexes of different candidate resource architectures are different.

[0167] Referring to FIG. 10, in one embodiment, the process of determining the target server in which the target virtual machine is located includes, but is not limited to, the following steps 1010-1030:

[0168] Step 1010, if the type of the target virtual machine is the first type, obtaining the server index of the target server;

[0169] Step 1020, based on the server index, searching for the target framework index corresponding to the server index in the preset mapping table;

[0170] Step 1030, in the plurality of candidate resource body frameworks, determining the candidate resource body framework in which the candidate framework index is consistent with the target framework index as the processing resource body framework.

[0171] The steps 1010-1030 are described in detail below.

[0172] In step 1010, if the type of the target virtual machine is the first type, the server index of the target server is obtained.

[0173] The server index is used to uniquely identify the target server. Each candidate server has a server index, and the server indexes of different candidate servers are different.

[0174] In the implementation of this embodiment, if the type of the target virtual machine is the first type, the server index of the target server is extracted from the server basic information of the target server under the condition of authorized permission.

[0175] In step 1020, based on the server index, the target framework index corresponding to the server index in the preset mapping table is searched.

[0176] The preset mapping table is used to indicate the candidate framework index corresponding to the candidate resource body framework in which the target network card inside each candidate server is located.

[0177] The target framework index is used to identify which candidate resource body framework the target network card inside the target server is located in.

[0178] In the implementation of this embodiment, first, the server index of the target server is compared with the server indexes of the plurality of candidate servers in the preset mapping table. Then, the candidate framework index corresponding to the candidate server whose server index in the preset mapping table is consistent with the server index of the target server is determined as the target framework index.

[0179] In step 1030, for the target server, the candidate framework index of each candidate resource framework is compared with the target framework index in the plurality of candidate resource frameworks. Then, if the candidate framework index of a certain candidate resource framework is consistent with the target framework index, indicating that the target network card of the target server is located in the candidate resource framework, the candidate resource framework with the consistent candidate framework index and target framework index is determined as the processing resource framework.

[0180] As shown in FIG. 11, the preset mapping table records the server index of 7 candidate servers and the target index of the processing resource framework where the target network card is located. Among them, the target index corresponding to the candidate server of server 1 is SocketAA1; the target index corresponding to the candidate server of server 2 is SocketNK1; the target index corresponding to the candidate server of server 3 is SocketLQ3; the target index corresponding to the candidate server of server 4 is SocketYY3; the target index corresponding to the candidate server of server 5 is SocketQ11; the target index corresponding to the candidate server of server 6 is SocketXQ3; and the target index corresponding to the candidate server of server 7 is SocketT01. Based on this, when the server index of the target server is server 3, the target index of the processing resource framework where the target network card of the target server is located can be queried in the preset mapping table, which is SocketLQ3.

[0181] The advantage of this embodiment is that the preset mapping table is constructed to record the location of the target network card of each candidate server inside the candidate server, and the mapping relationship between the server index of each candidate server and the candidate framework index of the candidate resource framework where the target network card is located is stored in the preset mapping table, so that when the target virtual machine is created, the mapping relationship can be relied on to preferentially select the candidate resource framework where the target network card is located as the processing resource framework for providing processing resources, and preferentially consider deploying the target virtual machine on the processing resource framework. This way can effectively shorten the transmission path of the target virtual machine and the target network card, avoid the problem of low network speed and access bandwidth caused by deploying the target virtual machine and the target network card on different resource frameworks, and thus improve the efficiency of virtual machine network card request forwarding.

[0182] Step 340 is described in detail below.

[0183] In step 340, based on the target associated resource information, the target processing resource body is determined in the processing resource framework.

[0184] In the embodiments of the present disclosure, the processing resource framework includes a plurality of candidate resource body levels.

[0185] The candidate resource body hierarchy is used to indicate how the specific hierarchical structure of the processing resource body framework is, and there is a certain subordination or nesting relationship between multiple candidate resource body hierarchies.

[0186] Referring to FIG. 12, in one embodiment, step 340 specifically includes steps 1210-1220:

[0187] Step 1210, based on the target associated resource information, determining the target resource body hierarchy from multiple candidate resource body hierarchies;

[0188] Step 1220, determining the target processing resource body in the target resource body hierarchy.

[0189] The steps 1210-1220 will be described in detail below.

[0190] In step 1210, based on the target associated resource information, the target resource body hierarchy is determined from multiple candidate resource body hierarchies.

[0191] The target resource body hierarchy is used to indicate the hierarchical position of the target virtual machine in the target server after being created.

[0192] In order to save space, the specific process of determining the target resource body hierarchy from multiple candidate resource body hierarchies in the embodiment of the present disclosure will be described in detail below, and will not be described here.

[0193] In step 1220, the target processing resource body is determined in the target resource body hierarchy.

[0194] In the implementation of this embodiment, since there is more than one candidate processing resource body in the target resource body hierarchy that can provide processing resources, and the number of processing resources provided by different candidate processing resource bodies often has certain differences. Based on this, in the case of considering reducing the resource fragmentation degree of the target resource body hierarchy, a candidate processing resource body that can provide the processing resources for creating the target virtual machine can be selected in the target resource body hierarchy, and after the target virtual machine is created on the candidate processing resource body, the processing resources of the target resource body hierarchy are still in a relatively complete state, and this candidate processing resource body is selected as the target processing resource body.

[0195] The embodiment has the advantage that, based on the target associated resource information, the target resource body level is determined in the multiple candidate resource body levels, and the target virtual machine can be created in the exactly suitable resource body level according to actual processing resource demand, so as to avoid the problems of insufficient bandwidth or too low access efficiency caused by cross resource body levels. Further, when the target processing resource body is determined, the problem of resource fragmentation is considered, and a candidate processing resource body which can provide the processing resource for creating the target virtual machine and make the processing resource of the target server remain regular is selected as the target processing resource body as much as possible, so as to improve the rationality of resource allocation when the virtual machine is created.

[0196] Referring to FIG. 13, in one embodiment, step 1210 specifically includes steps 1310-1330.

[0197] Step 1310, determining the processing resource reference number of each candidate resource body level;

[0198] Step 1320, obtaining the processing resource number required for creating the target virtual machine in the target associated resource information;

[0199] Step 1330, based on the processing resource number and the processing resource reference number of each candidate resource body level, determining the target resource body level in the multiple candidate resource body levels.

[0200] The steps 1310-1330 are described in detail as follows.

[0201] In step 1310, the processing resource reference number of each candidate resource body level is determined.

[0202] The processing resource reference number is used to indicate the maximum number of processing resources that the candidate resource body level can provide for creating the target virtual machine.

[0203] In this embodiment, each candidate resource body level includes multiple candidate processing resource bodies.

[0204] The candidate processing resource body refers to a module distributed in the candidate resource body level and capable of providing resources for creating the target virtual machine.

[0205] In the implementation of this embodiment, step 1310 specifically includes but is not limited to the following steps:

[0206] For each candidate resource body level, the candidate processing resource number of each candidate processing resource body in the candidate resource body level is obtained;

[0207] The maximum candidate processing resource number is determined as the processing resource reference number of the candidate resource body level.

[0208] The candidate processing resource number is used to indicate the maximum number of processing resources that each candidate processing resource body in the candidate resource body hierarchy can provide for creating the target virtual machine.

[0209] Specifically, first, for each candidate resource body hierarchy, processing resource statistics is performed on each candidate processing resource body in the candidate resource body hierarchy to obtain the maximum number of processing resources that each candidate processing resource body can provide for creating the target virtual machine. Then, the maximum number of processing resources that can be provided for creating the target virtual machine is taken as the candidate processing resource number of the candidate processing resource body.

[0210] The advantage of this embodiment is that by obtaining the candidate processing resource number corresponding to each candidate processing resource body in the candidate resource body hierarchy, the maximum candidate processing resource number is determined as the processing resource reference number of the candidate resource body hierarchy to reflect the capability of the candidate resource body hierarchy, so that the target virtual machine can be created in the exactly appropriate resource body hierarchy based on the processing resource reference number, avoiding the problems of insufficient bandwidth or too low access efficiency caused by crossing the resource body hierarchy, and improving the rationality of resource allocation for virtual machine creation.

[0211] In step 1320, the number of processing resources required for creating the target virtual machine is obtained in the target associated resource information.

[0212] The number of processing resources is used to indicate how many processing resources are required for creating the target virtual machine.

[0213] In the implementation of this embodiment, since the target associated resource information records the specific conditions of various resources required for creating the target virtual machine, the target associated resource information can be information extracted to obtain the number of processing resources required for creating the target virtual machine.

[0214] The number of processing resources can be the number of CPU cores required for creating the target virtual machine, etc.

[0215] In step 1330, based on the number of processing resources and the processing resource reference number of each candidate resource body hierarchy, the target resource body hierarchy is determined in the multiple candidate resource body hierarchies.

[0216] In the implementation of this embodiment, step 1330 specifically includes but is not limited to the following steps:

[0217] The number of processing resources is compared with each processing resource reference number;

[0218] In the multiple candidate resource body hierarchies, the candidate resource body hierarchy with the processing resource reference number greater than the number of processing resources and the smaller hierarchy level is determined as the target resource body hierarchy.

[0219] Specifically, first, the processing resource reference number of each candidate resource body level is compared. Then, in the multiple candidate resource body levels, the candidate resource body level whose processing resource reference number is greater than the processing resource number and whose level level is smaller is determined as the target resource body level.

[0220] For example, in one specific example, the rule followed by the above-mentioned determination of the target resource body level is defined as the minimum level rule. Specifically, the processing resource number (CPU core number) required by the target virtual machine creation is denoted as N, where N is an integer greater than 0. For the processing resource body framework, including the Socket level, the CCD level and the CCX level, the Socket level is higher than the CCD level, and the CCD level is higher than the CCX level. The processing resource reference number of the Socket level is denoted as Socket CPUs; the processing resource reference number of the CCD level is denoted as CCD CPUs; and the processing resource reference number of the CCX level is denoted as CCX CPUs, where Socket CPUs, CCD CPUs and CCX CPUs are all integers greater than 0, and Socket CPUs is not less than CCD CPUs, and CCD CPUs is not less than CCX CPUs. Based on this, when N is less than or equal to CCX CPUs, the target resource body level is determined as the CCX level. When N is less than or equal to CCD CPUs, and N is greater than CCX CPUs, the target resource body level is determined as the CCD level. When N is less than or equal to Socket CPUs, and N is greater than CCD CPUs, the target resource body level is determined as the Socket level. In particular, when N is greater than Socket CPUs, it indicates that a single processing resource body framework cannot meet the processing resources required for creating the target virtual machine, so the target resource body level is determined as the target server whole machine, and the processing resource body framework in the target server and other candidate processing resource body frameworks are all used to provide the processing resources required for creating the target virtual machine.

[0221] As shown in FIG. 14A, the processing resource body framework in which the target network card inside the target server is located is Socket 1 with 38-core CPU resources. Among them, Socket 1 is the target framework index of the processing resource body framework. Among them, the processing resource body framework has three levels, and the largest candidate resource body level in the processing resource body framework is the Socket level. Among them, the processing resource body framework Socket 1 includes 4 CCD structures, which are CCD0 structure with 8-core CPU resources, CCD1 structure with 4-core CPU resources, CCD2 structure with 6-core CPU resources, and CCD3 structure with 20-core CPU resources. Further, the CCD0 structure has two sub-structures, which are CCX0 structure with 4-core CPU resources and CCX1 structure with 4-core CPU resources. The CCD1 structure has two sub-structures, which are CCX0 structure with 2-core CPU resources and CCX1 structure with 2-core CPU resources. The CCD2 structure has two sub-structures, which are CCX0 structure with 2-core CPU resources and CCX1 structure with 4-core CPU resources. The CCD3 structure has two sub-structures, which are CCX0 structure with 4-core CPU resources and CCX1 structure with 16-core CPU resources. Based on this, the entire processing resource body framework Socket 1 is hierarchical, and the processing resource body framework Socket 1 can be divided into a first level, a second level and a third level in turn, that is, the candidate resource body level includes the first level, the second level and the third level. The largest candidate resource body level (the first level) has one candidate processing resource body, which is Socket 1 with 38-core CPU resources. The second level has four candidate processing resource bodies, which are candidate processing resource body CCD0 with 8-core CPU resources, candidate processing resource body CCD1 with 4-core CPU resources, candidate processing resource body CCD2 with 6-core CPU resources, and candidate processing resource body CCD3 with 20-core CPU resources. The third level has eight candidate processing resource bodies, which are candidate processing resource body CCD0-CCX0 (the CCX0 structure in the CCD0 structure), candidate processing resource body CCD0-CCX1 with 4-core CPU resources, candidate processing resource body CCD1-CCX0 with 2-core CPU resources, candidate processing resource body CCD1-CCX1 with 2-core CPU resources, candidate processing resource body CCD2-CCX0 with 2-core CPU resources, candidate processing resource body CCD2-CCX1 with 4-core CPU resources, candidate processing resource body CCD3-CCX0 with 4-core CPU resources, and candidate processing resource body CCD3-CCX1 with 16-core CPU resources.According to the CPU resources provided by each candidate processing resource body at each level, the processing resource reference number of the first level is determined as 38, the processing resource reference number of the second level is determined as 20, and the processing resource reference number of the third level is determined as 16.

[0222] As shown in FIG. 14B, after the processing resource reference numbers of the first level, the second level and the third level are determined, when the processing resource number of the target virtual machine is 8 cores, since 8 is less than 16, the target virtual machine can be created by using the processing resources provided by the candidate processing resource bodies at the third level, therefore, the third level (CCX level) is selected as the target level, and the target processing resource body can be selected from the 8 candidate processing resource bodies at the CCX level.

[0223] The advantage of this embodiment is that when the target resource body level is determined from the multiple candidate resource body levels, the maximum number of processing resources (processing resource reference number) provided by each candidate resource body level is determined first, and the processing resource number required for creating the target virtual machine is compared with the processing resource reference number, and the candidate resource body level with a smaller level and meeting the required processing resource is selected as the target resource body level, so that the smallest unit of resource level can be selected, and the target virtual machine can be deployed to the appropriate topology level (target resource body level) as much as possible, thereby avoiding the access performance problem caused by crossing the resource body level or the resource body (for example, crossing the CCD or the CCX), and improving the rationality of resource allocation when the virtual machine is created.

[0224] The advantage of the embodiment shown in FIG. 13 is that not only the target associated resource information is used to determine the target resource body level from the multiple candidate resource body levels, but also the processing resource reference number of each candidate resource body level and the processing resource number obtained based on the target associated resource information are used to determine the target resource body level from the multiple candidate resource body levels. Therefore, the target virtual machine can be created at the appropriate resource body level as much as possible according to the actual processing resource requirement, and the problem of insufficient bandwidth or low access efficiency caused by crossing the resource body level can be avoided.

[0225] In the embodiments of the present disclosure, the target resource body level includes multiple candidate processing resource bodies.

[0226] Referring to FIG. 15, in one embodiment, step 1220 specifically includes steps 1510-1530.

[0227] Step 1510, obtaining the candidate processing resource number of each candidate processing resource body in the target resource body level;

[0228] Step 1520, performing resource scoring based on the processing resource reference number and the candidate processing resource number of each candidate resource body in the target resource body hierarchy, to obtain a resource scoring result;

[0229] Step 1530, determining the target processing resource body from the multiple candidate processing resource bodies in the target resource body hierarchy based on the resource scoring result.

[0230] The steps 1510-1530 are described in detail as follows.

[0231] In step 1510, the candidate processing resource number of each candidate processing resource body in the target resource body hierarchy is obtained.

[0232] The candidate processing resource number is used to indicate the maximum number of processing resources that can be provided by each candidate processing resource body in the target resource body hierarchy for creating the target virtual machine.

[0233] In the implementation of this embodiment, the specific process of step 1510 is similar to the specific process of obtaining the candidate processing resource number of each candidate processing resource body in the candidate resource body hierarchy in step 1310. For the sake of brevity, no longer be described.

[0234] In step 1520, the resource scoring is performed based on the processing resource reference number and the candidate processing resource number of each candidate processing resource body in the target resource body hierarchy, to obtain a resource scoring result.

[0235] The resource scoring result is used to indicate the degree of appropriateness of the candidate processing resource body as a carrier for providing processing resources for creating the target virtual machine.

[0236] In the implementation of this embodiment, step 1520 specifically includes but is not limited to the following steps:

[0237] Based on the processing resource reference number and the candidate processing resource number, the processing resource surplus of the candidate processing resource body and the idle processing resource state of the target server are determined.

[0238] The resource scoring is performed based on the processing resource surplus and the idle processing resource state, to obtain the resource scoring result.

[0239] The processing resource surplus is used to indicate the number of processing resources remaining in a candidate processing resource body after using the processing resources of the candidate processing resource body to create the target virtual machine; and the idle processing resource state is used to indicate the fragmentation degree of the idle processing resources inside the target server after using the processing resources of a candidate processing resource body to create the target virtual machine.

[0240] Specifically, for each candidate processing resource body, first, the difference between the processing resource reference number and the candidate processing resource number is calculated to obtain the processing resource surplus of the candidate processing resource body. Then, assuming that the candidate processing resource body is used to create the target virtual machine, the fragmentation degree of the idle processing resources on each candidate processing resource body in the target server after the target virtual machine is created using the processing resources of the candidate processing resource body is calculated. Further, the processing resource surplus is substituted into the first scoring function, and the output of the first scoring function is taken as the first resource score, wherein the first scoring function is a decreasing function with the processing resource surplus as the independent variable and the first resource score as the dependent variable, and the greater the processing resource surplus, the smaller the first resource score, so as to use the processing resources of the candidate processing resource body as much as possible to create the target virtual machine. Similarly, for the fragmentation degree of the idle processing resources on each candidate processing resource body, the idle processing resource state is input into the second scoring function, and the second resource score is output by the second scoring function, wherein the second scoring function is a decreasing function with the idle processing resource state as the independent variable and the second resource score as the dependent variable, and the greater the fragmentation degree indicated by the idle processing resource state, the smaller the second resource score, so as to make the resource fragmentation degree of the target server as small as possible after the target virtual machine is created using the processing resources of the candidate processing resource body. Since there are multiple idle processing resource states, there are multiple second resource scores, and the multiple second resource scores are averaged to obtain the second resource score average. Finally, the first resource score and the second resource score average are averaged to obtain the resource score result. In this way, in the resource scoring, both the consideration of using the processing resources of the candidate processing resource body to create the target virtual machine and the consideration of minimizing the resource fragmentation degree after the target virtual machine is created can be taken into account, which is beneficial to improving the rationality of the processing resource body screening.

[0241] In step 1530, based on the resource score result, the target processing resource body is determined from the multiple candidate processing resource bodies distributed in the target resource body hierarchy.

[0242] In the implementation of this embodiment, first, the resource score results of the multiple candidate processing resource bodies distributed in the target resource body hierarchy are compared. Then, according to the comparison, the candidate processing resource body with the largest resource score result is selected as the target processing resource body.

[0243] As shown in FIG. 16, when the object wants to create a target virtual machine, the object first configures the number of CPU cores as 8 cores and the memory size as 8g on the object terminal application. Then, the virtual machine creation server filters, sets the influence factor and sorts the multiple candidate servers in the server resource pool according to the processing resource parameters configured by the object, and obtains a server sequence capable of providing the processing resources required for creating the target virtual machine, wherein the server sequence has server 3, server 2 and server n arranged in sequence. Based on this, server 3 arranged in the first position in the server sequence is determined as the target server to which the target virtual machine is to be deployed, wherein the specific process of filtering, setting the influence factor and sorting the multiple candidate servers in the server resource pool is similar to steps 510-540 described above. Further, the processing resource body architecture of the target network card in server 3 is Socket1 with 38-core CPU resources. Among them, the processing resource body architecture Socket1 is composed of 4 CCD structures, and each CCD structure is composed of two CCX structures. Specifically, the 4 CCD structures are CCD0 with 8-core CPU resources, CCD1 with 4-core CPU resources, CCD2 with 6-core CPU resources, and CCD3 with 20-core CPU resources. The CCD0 structure includes CCX0 with 4-core CPU resources (denoted as candidate processing resource body CCD0-CCX0) and CCX1 with 4-core CPU resources (denoted as candidate processing resource body CCD0-CCX1). The CCD1 structure includes CCX0 with 2-core CPU resources (denoted as candidate processing resource body CCD1-CCX0) and CCX1 with 2-core CPU resources (denoted as candidate processing resource body CCD1-CCX1). The CCD2 structure includes CCX0 with 2-core CPU resources (denoted as candidate processing resource body CCD2-CCX0) and CCX1 with 4-core CPU resources (denoted as candidate processing resource body CCD2-CCX1). The CCD3 structure includes CCX0 with 4-core CPU resources (denoted as candidate processing resource body CCD3-CCX0) and CCX1 with 16-core CPU resources (denoted as candidate processing resource body CCD3-CCX1). Since the candidate processing resource body CCD3-CCX1 is used to create the target virtual machine, the complete 16-core CPU resources will be split into two 8-core CPU resources, which makes the target server unable to meet the needs of tasks requiring 16-core CPU resources, causing the server resource fragmentation to deepen.When the CCX0 or CCX1 of the different CCD structures are combined to provide the processing resources required by the target virtual machine, the problem of cross-CCD structure occurs, and some defects of slow access speed or insufficient bandwidth occur. When the two CCX structures of the CCD2 structure or the two CCX structures in the CCD1 are used as candidate processing resource bodies to provide processing resources, the situation of insufficient processing resources occurs. Therefore, the candidate processing resource body CCD0-CCX0 and the candidate processing resource body CCD0-CCX1 in the CCD0 structure should be preferentially selected to jointly provide the processing resources required for creating the target virtual machine. In this way, the processing resources of other candidate processing resource bodies of the target server can be maximized to be complete or regular under the condition that the processing resources in the CCD0 structure are completely used.

[0244] The advantage of this embodiment is that the problem of resource fragmentation is considered when determining the target processing resource body. The fragmentation of the processing resources in the target server is calculated by using the resource score when the processing resources in the candidate processing resource body are used to create the target virtual machine. Therefore, one candidate processing resource body that can provide the processing resources for creating the target virtual machine and keep the processing resources of the target server regular is selected as the target processing resource body as much as possible, and the rationality of resource allocation during virtual machine creation is improved.

[0245] The process of creating a virtual machine of another type except the first type according to an embodiment of the present disclosure is described in detail below.

[0246] In actual application, the created virtual machine can be of another type except the first type, for example, a virtual machine that needs to use the server to provide processing resources and needs to work with the target network card; a common virtual machine that is not used to implement network card request forwarding and does not need to work with the target network card, and the like. Based on this, the present embodiment further provides a scheme for creating a virtual machine of another type except the first type, which can improve the universality of virtual machine creation and meet the virtual machine creation requirements in various scenarios.

[0247] Please refer to FIG. 17. In an embodiment, after determining the target server for creating the target virtual machine, the virtual machine creation method further includes the following steps 1710-1740:

[0248] Step 1710, if the type of the target virtual machine is the second type, obtaining a processing resource body architecture in the target server that is not associated with the target network card;

[0249] Step 1720, obtaining target associated resource information of the target virtual machine;

[0250] Step 1730, determining a target processing resource body in the processing resource body architecture based on the target associated resource information;

[0251] Step 1740, allocating the target processing resource body to the target virtual machine to create the target virtual machine based on the target processing resource body.

[0252] The steps 1710-1740 are described in detail as follows.

[0253] In step 1710, if the type of the target virtual machine is the second type, the processing resource body framework in the target server not associated with the target network card is obtained.

[0254] The second type is used to indicate that the target virtual machine does not need to work with the target network card.

[0255] In the implementation of this embodiment, the specific process of step 1710 is similar to step 320 described above. To save space, no longer described.

[0256] In steps 1720-1740, the specific process of steps 1720-1740 is similar to steps 330-350 described above. To save space, no longer described.

[0257] The advantage of this embodiment is that for the ordinary virtual machine (the target virtual machine of the second type) which is not used to implement the network card request forwarding and does not need to work with the target network card, the candidate processing resource body framework not associated with the target network card in the target server is preferentially selected as the processing resource body framework for providing the processing resource required for creating the target virtual machine, so that the processing resource on the candidate processing resource body framework where the target network card is located is used to create the virtual machine of the first type, which can effectively improve the rationality of server internal CPU resource distribution and resource utilization efficiency. At the same time, when creating the target virtual machine of the second type, the screening of multiple candidate resource body levels and the screening of the candidate processing resource body of the target resource body level are also adopted, which can realize the regularity of resource allocation, so that the processing resource on the processing resource body framework not associated with the target network card has better integrity after the target virtual machine is created, and the resource fragmentation degree is reduced. This way meets the creation of ordinary virtual machines and can improve the universality of virtual machine creation, meeting the virtual machine creation demand in various scenarios.

[0258] Please refer to FIG. 18, in another embodiment, after determining the target server for creating the target virtual machine, the virtual machine creation method further includes the following steps 1810-1820:

[0259] Step 1810, if the type of the target virtual machine is the third type, obtaining the idle resource body framework in the target server;

[0260] Step 1820, allocate the processing resource body in the idle resource body framework to the target virtual machine, to create the target virtual machine based on the processing resource body in the idle resource body framework and the target network card;

[0261] The steps 1810-1820 are described in detail as follows.

[0262] In step 1810, if the type of the target virtual machine is the third type, an idle resource body framework in the target server is obtained.

[0263] The third type is used to indicate that the creation of the target virtual machine needs the overall resources of the target server, and the target virtual machine needs to work with the target network card.

[0264] The idle resource body framework refers to a candidate processing resource body framework in which there are unused processing resources on the target server.

[0265] In the implementation of this embodiment, the specific process of step 1810 is similar to the above-described step 320. For brevity, no longer be described.

[0266] In step 1820, the processing resource body in the idle resource body framework is allocated to the target virtual machine, to create the target virtual machine based on the processing resource body in the idle resource body framework and the target network card.

[0267] In the implementation of this embodiment, the specific process of step 1820 is similar to the above-described steps 330-350. For brevity, no longer be described.

[0268] The advantage of this embodiment is that, for the general virtual machine (the target virtual machine of the third type) which needs to use the server as a whole to implement the network card request forwarding and needs to work with the target network card, all unused processing resources of the target server are directly provided to the target virtual machine for creation, and at the time of creation, the screening of multiple candidate resource body levels and the screening of the candidate processing resource body of the target resource body level are also adopted, so that after the target virtual machine is created, the processing resources on each candidate processing resource body framework in the target server have better integrity, and the resource fragmentation degree of the target server is reduced. This way meets the creation of the virtual machine which needs to use the server as a whole to implement the network card request forwarding and needs to work with the target network card, can improve the universality of virtual machine creation, and meets the virtual machine creation demand in multiple scenarios.

[0269] The process of adapting and setting each candidate server in the embodiment of the present disclosure is described in detail as follows.

[0270] Since the server basic information and other related data of each candidate server are needed in the process of creating the target virtual machine, the embodiments of the present disclosure provide a scheme of collecting and storing the related data of each candidate server before performing the virtual machine creation process, so as to improve the data acquisition and data query efficiency in the virtual machine creation stage.

[0271] Please refer to FIG. 19. In one embodiment, before determining the target server where the target virtual machine is located, the virtual machine creation method further includes the following steps 1910-1940:

[0272] In step 1910, in response to a data collection request for each candidate server, if it is determined that the target script of each candidate server is downloaded, the server basic information, the processing resource body structure data and the processing resource body structure where the target network card is located of the candidate server are acquired based on the target script.

[0273] In step 1920, a preset mapping table is constructed based on the target index of the processing resource body structure of each candidate server.

[0274] In step 1930, other resource body structures except the processing resource body structure are marked for each candidate server.

[0275] In step 1940, the server basic information, the processing resource body structure data and the preset mapping table are stored in a preset database.

[0276] The steps 1910-1940 are described in detail as follows.

[0277] In step 1910, in response to a data collection request for each candidate server, if it is determined that the target script of each candidate server is downloaded, the server basic information, the processing resource body structure data and the processing resource body structure where the target network card is located of the candidate server are acquired based on the target script.

[0278] The data collection request refers to a request triggered when collecting the server data of each candidate server before creating the target virtual machine.

[0279] The target script refers to a series of script codes related to the creation of the target virtual machine, wherein the target script includes but is not limited to a data collection script for collecting the server data of each candidate server.

[0280] The processing resource body structure data is used to indicate the specific hierarchical structure of each candidate resource body structure included in the candidate server, and how the processing resource contained in each candidate processing resource body level in the specific hierarchical structure has the candidate processing resource body.

[0281] In the embodiment, when the data collection is to be performed on each candidate server, a data collection event is triggered, based on which each candidate server responds to the data collection request, and first detects the relevant script for performing the data collection. When it is determined that the candidate server has downloaded the target script, the server basic information, the processing resource architecture data and the processing resource architecture where the target network card is located of the candidate server can be collected by executing the target script.

[0282] In step 1920, a preset mapping table is constructed based on the target index of the processing resource architecture of each candidate server.

[0283] In the embodiment, step 1920 specifically includes but is not limited to the following steps:

[0284] For each candidate server, the server index of the candidate server is obtained;

[0285] The server index is determined as a key, the target index is determined as a value, and a key-value pair is generated based on the key and the value;

[0286] Based on the key-value pairs of the plurality of candidate servers, the preset mapping table is generated.

[0287] Specifically, first, for each candidate server, the server index of the candidate server is obtained from the server basic information. Then, the server index is determined as a key (key), and the target index of the processing resource architecture where the target network card is located is determined as a value (value), to construct the key-value pair of the candidate server. Further, the key-value pairs of the plurality of candidate servers are stored into a key-value pair table, and the key-value pair table is taken as the preset mapping table.

[0288] In step 1930, for each candidate server, other resource architectures except the processing resource architecture are marked.

[0289] In the embodiment, for each candidate server, other resource architectures except the processing resource architecture in the candidate server are marked with a preset identifier, to distinguish the processing resource architecture where the target network card is located from other resource architectures, which is beneficial to the efficiency of obtaining the processing resource architecture where the target network card is located from the target server in the stage of creating the target virtual machine.

[0290] In step 1940, the server basic information, the processing resource architecture data and the preset mapping table are stored into a preset database.

[0291] The preset database refers to a data space capable of providing data storage. The storage space size of the preset database is fixed.

[0292] In the implementation of the embodiment, for each candidate server, the server basic information and the processing resource architecture data of the candidate server are integrated into a data block, and the data block of the candidate server is stored in the preset database, so that the related data of each candidate server can be stored in blocks. In addition, the preset mapping table is directly stored in the preset database, so as to use the preset mapping table to indicate the correspondence between each candidate server and the processing resource architecture in which the internal target network card is located.

[0293] The advantage of the embodiment is that before the virtual machine creation process is executed, the related data of each candidate server is collected and stored, and the mapping relationship between the server index of each candidate server and the target index of the processing resource architecture in which the internal target network card is located is stored in the form of a key-value pair table, which can improve the efficiency and accuracy of determining the processing resource architecture in which the target network card is located in the virtual machine creation stage. Storing the server basic information and the processing resource architecture data can provide more reliable and comprehensive data reference for determining the target server, and can improve the accuracy of determining the target server in the virtual machine creation stage.

[0294] The implementation details of the virtual machine creation processing method of one embodiment of the present disclosure are described below.

[0295] The specific implementation process of the virtual machine creation processing method of the embodiment of the present disclosure is described in detail below with reference to FIGS. 20 and 21.

[0296] As shown in FIG. 20, it is a specific implementation process of adapting each candidate server before creating a target virtual machine. Specifically, first, in response to the triggering of the server adaptation process, the adaptation script and the proxy application program adapted to the candidate server are determined. Then, the adaptation script is downloaded and installed to the candidate server, and the proxy application program is started. Further, the data collection instruction is sent to the candidate server, and the candidate server will call the data collection script on the candidate server to collect various server data of the candidate server in response to the data collection instruction, wherein the server data includes the CPU topology structure of the candidate server, the processing resource architecture (Socket) in which the target network card is located, and other information. Finally, the related data of the candidate server is stored in the preset database DB to complete the adaptation operation of the candidate server, and the specific process is similar to the above steps 1910-1940. To save space, no longer described.

[0297] As shown in FIG. 21, when the object wants to create a target virtual machine, the object first configures the processing resource parameters such as the number of CPU cores and the size of memory required for creating the target virtual machine on the object terminal application. Then, the virtual machine creation server filters, sets the influence factor and sorts the plurality of candidate servers in the server resource pool according to the processing resource parameters configured by the object, to obtain a server sequence capable of providing the processing resources required for creating the target virtual machine, and the server sequence has the server 3, the server 2 and the server n arranged in sequence. Based on this, the server 3 arranged in the first position in the server sequence is determined as the target server to which the target virtual machine is to be deployed, and the specific process of filtering, setting the influence factor and sorting the plurality of candidate servers in the server resource pool is similar to the above steps 510-540. Further, the server 3 has two candidate resource body architectures (the Socket 1 where the target network card is located and the Socket 0 where the target network card is not located), wherein the processing resources of the Socket 1 where the target network card is located are used for creating the non-integer machine NFV virtual machine, and the processing resources of the Socket 0 where the target network card is not located are used for creating the integer machine NFV virtual machine or the non-NFV virtual machine. Therefore, the Socket 1 where the target network card is located is taken as the processing resource body architecture. Then, since the processing resource body architecture Socket 1 is composed of 4 CCD structures, and each CCD structure is composed of two CCX structures, it can be determined that the processing resource body architecture Socket 1 has three candidate resource body levels (the Socket level, the CCD level and the CCX level), and based on this, the CCX level is first determined as the target resource body level in the plurality of candidate resource body levels in the processing resource body architecture Socket 1, and the specific implementation process is similar to the above steps 1310-1330. Then, each candidate processing resource body of the CCX level is scored, and the candidate processing resource bodies CCX0 and CCX1 in the CCD0 structure are selected as the target processing resource bodies according to the scoring situation, and the specific implementation process is similar to the above steps 1510-1530. Finally, the target virtual machine (NFV virtual machine) is created based on the processing resources in the target processing resource bodies, and the specific implementation process is similar to the above step 350. In order to save space, no longer tedious.

[0298] The apparatus and device of the embodiment of the present disclosure are described below.

[0299] It can be understood that, although each step in each of the above flowcharts is displayed in sequence according to the representation of the arrow, these steps are not necessarily executed in the order represented by the arrow. Unless otherwise specified in the embodiments, the execution of these steps is not strictly limited in sequence, and these steps can be executed in other orders. Moreover, at least part of the steps in the above flowcharts can include multiple steps or multiple stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily sequential, but can be alternately executed with at least part of other steps or steps or stages in other steps.

[0300] It should be noted that, in each specific embodiment of the present application, when it is necessary to perform relevant processing according to the target object attribute information or attribute information set and other data related to the characteristics of the target object, the permission or consent of the target object is obtained first, and the collection, use and processing of these data comply with relevant laws, regulations and standards. In addition, when the embodiments of the present application need to obtain target object attribute information, the separate permission or separate consent of the target object is obtained through a pop-up window or by jumping to a confirmation page, and after obtaining the separate permission or separate consent of the target object, the necessary target object related data for enabling the embodiments of the present application to normally run is obtained.

[0301] FIG. 22 is a structural schematic diagram of a virtual machine creation processing apparatus 2200 provided by an embodiment of the present disclosure. The virtual machine creation processing apparatus 2200 comprises:

[0302] A first determination unit 2210 is configured to determine a target server for creating a target virtual machine in response to a creation request of the target virtual machine, and the target server comprises a target network card;

[0303] A first acquisition unit 2220 is configured to acquire a processing resource body framework associated with the target network card in the target server if a type of the target virtual machine is a first type, and the first type is used to indicate that the target virtual machine needs to work cooperatively with the target network card;

[0304] A second acquisition unit 2230 is configured to acquire target associated resource information of the target virtual machine;

[0305] A second determination unit 2240 is configured to determine a target processing resource body in the processing resource body framework based on the target associated resource information;

[0306] An allocation unit 2250 is configured to allocate the target processing resource body to the target virtual machine, so as to create the target virtual machine based on the target processing resource body and the target network card.

[0307] Optionally, the processing resource architecture comprises a plurality of candidate resource body levels;

[0308] The second determining unit 2240 comprises:

[0309] A first determining module (not shown) is configured to determine a target resource body level from the plurality of candidate resource body levels based on the target associated resource information.

[0310] A second determining module (not shown) is configured to determine a target processing resource body in the target resource body level.

[0311] Optionally, the first determining module (not shown) is configured to:

[0312] A first determining sub-module (not shown) is configured to determine a processing resource reference number of each candidate resource body level.

[0313] A first obtaining sub-module (not shown) is configured to obtain a processing resource number required for creating the target virtual machine from the target associated resource information.

[0314] A second determining sub-module (not shown) is configured to determine the target resource body level from the plurality of candidate resource body levels based on the processing resource number and the processing resource reference number of each candidate resource body level.

[0315] Optionally, the second determining sub-module (not shown) is configured to:

[0316] Compare the processing resource number with each processing resource reference number.

[0317] From the plurality of candidate resource body levels, determine a candidate resource body level with a processing resource reference number greater than the processing resource number and a level level smaller as the target resource body level.

[0318] Optionally, each candidate resource body level comprises a plurality of candidate processing resource bodies.

[0319] The first determining sub-module (not shown) is configured to:

[0320] For each candidate resource body level, obtain a candidate processing resource number of each candidate processing resource body in the candidate resource body level.

[0321] Determine the largest candidate processing resource number as the processing resource reference number of the candidate resource body level.

[0322] Optionally, the target resource body level comprises a plurality of candidate processing resource bodies.

[0323] The second determining module (not shown) is configured to:

[0324] Obtain a candidate processing resource number of each candidate processing resource body in the target resource body level.

[0325] For each candidate processing resource body in the target resource body hierarchy, resource scoring is performed based on the processing resource reference number and the candidate processing resource number of each candidate resource body hierarchy, to obtain a resource scoring result;

[0326] Based on the resource scoring result, a target processing resource body is determined from among the multiple candidate processing resource bodies distributed in the target resource body hierarchy.

[0327] Optionally, the resource scoring based on the processing resource reference number and the candidate processing resource number to obtain the resource scoring result comprises:

[0328] Based on the processing resource reference number and the candidate processing resource number, the processing resource surplus of the candidate processing resource body and the idle processing resource state of the target server are determined;

[0329] The resource scoring is performed based on the processing resource surplus and the idle processing resource state to obtain the resource scoring result.

[0330] Optionally, the first determining unit 2210 comprises:

[0331] A first obtaining module (not shown) is configured to obtain multiple candidate servers;

[0332] A second obtaining module (not shown) is configured to obtain virtual machine configuration information and target associated resource information of a target virtual machine in response to a creation request of the target virtual machine;

[0333] A third determining module (not shown) is configured to determine a target server from among the multiple candidate servers based on the virtual machine configuration information and the target associated resource information.

[0334] Optionally, the third determining module (not shown) comprises:

[0335] A second obtaining sub-module (not shown) is configured to obtain server basic information of each candidate server;

[0336] A screening sub-module (not shown) is configured to screen intermediate servers from among the multiple candidate servers based on the virtual machine configuration information, the target associated resource information, and the server basic information;

[0337] A third determining sub-module (not shown) is configured to determine a priority score of each intermediate server based on the server basic information for each intermediate server;

[0338] A fourth determining sub-module (not shown) is configured to determine the target server from among the multiple intermediate servers based on the priority score.

[0339] Optionally, the screening sub-module (not shown) is configured to:

[0340] determine the server screening condition based on the virtual machine configuration information and the target associated resource information;

[0341] In the plurality of candidate servers, a candidate server satisfying the target index in the server basic information and the server screening condition is determined as an intermediate server.

[0342] Optionally, a third determination submodule (not shown) is configured to:

[0343] For each intermediate server, the server thread number, the server core number, the storage type and the memory size of the candidate server are obtained from the server basic information.

[0344] Based on the server thread number, the server core number, the storage type and the memory size, a priority score of the intermediate server is determined.

[0345] Optionally, based on the server thread number, the server core number, the storage type and the memory size, the priority score of the intermediate server is determined, including:

[0346] Based on the server thread number, a first score of the intermediate server is determined.

[0347] Based on the server core number, a second score of the intermediate server is determined.

[0348] Based on the storage type, a third score of the intermediate server is determined.

[0349] Based on the memory size, a fourth score of the intermediate server is determined.

[0350] Based on a weighted sum of the first score, the second score, the third score and the fourth score, the priority score is obtained.

[0351] Optionally, the target server includes a plurality of candidate resource body frameworks, and each candidate resource body framework has a candidate framework index.

[0352] The first obtaining unit 2220 is configured to:

[0353] If the type of the target virtual machine is the first type, the server index of the target server is obtained.

[0354] Based on the server index, a target framework index corresponding to the server index in a preset mapping table is searched, wherein the preset mapping table is used to indicate the candidate framework index of the candidate resource body framework in which the target network card in each candidate server is located.

[0355] In the plurality of candidate resource body frameworks, a candidate resource body framework with the same candidate framework index and the target framework index is determined as a processing resource body framework.

[0356] Optionally, the virtual machine creation processing apparatus 2200 further comprises a first creation unit (not shown), configured to:

[0357] If the type of the target virtual machine is the second type, obtain the processing resource framework not associated with the target network card in the target server, the second type being used to indicate that the target virtual machine does not need to work cooperatively with the target network card;

[0358] Obtain the target associated resource information of the target virtual machine;

[0359] Based on the target associated resource information, determine the target processing resource framework in the processing resource framework;

[0360] Allocate the target processing resource framework to the target virtual machine, so as to create the target virtual machine based on the target processing resource framework.

[0361] Optionally, the virtual machine creation processing apparatus 2200 further comprises a second creation unit (not shown), configured to:

[0362] If the type of the target virtual machine is the third type, obtain the idle resource framework in the target server, the third type being used to indicate that the creation of the target virtual machine needs the overall resource of the target server, and the target virtual machine needs to work cooperatively with the target network card;

[0363] Allocate the processing resource framework in the idle resource framework to the target virtual machine, so as to create the target virtual machine based on the processing resource framework in the idle resource framework and the target network card.

[0364] Optionally, the virtual machine creation processing apparatus 2200 further comprises a storage unit (not shown), configured to:

[0365] In response to the data collection request for each candidate server, if it is determined that the target script of each candidate server is downloaded completely, obtain the server basic information, the processing resource framework data and the processing resource framework where the target network card is located of the candidate server based on the target script;

[0366] Based on the target index of the processing resource framework of each candidate server, construct a preset mapping table;

[0367] For each candidate server, mark other resource frameworks except the processing resource framework;

[0368] Store the server basic information, the processing resource framework data and the preset mapping table into a preset database.

[0369] Optionally, based on the target index of the processing resource framework of each candidate server, constructing the preset mapping table comprises:

[0370] For each candidate server, obtain a server index of the candidate server;

[0371] Determine the server index as a key, determine the target index as a value, and generate a key-value pair based on the key and the value;

[0372] Generate a preset mapping table based on the key-value pairs of the plurality of candidate servers.

[0373] The virtual machine creation processing method of the embodiment of the disclosure is a computer device, which includes a terminal and a server, which are described below.

[0374] Referring to FIG. 23, FIG. 23 is a structural block diagram of part of a terminal implementing the virtual machine creation processing method of the embodiment of the disclosure, which includes a radio frequency (RF) circuit 2310, a memory 2315, an input unit 2330, a display unit 2340, a sensor 2350, an audio circuit 2360, a wireless fidelity (WiFi) module 2370, a processor 2380, and a power supply 2390, and the like. Those skilled in the art can understand that the structure of the terminal shown in FIG. 23 does not constitute a limitation on the mobile phone or computer, and can include more or fewer components than those shown, or combine some components, or different component arrangements.

[0375] The RF circuit 2310 can be used for receiving and sending signals in the process of receiving or calling, and in particular, receiving the downlink information of the base station and processing it by the processor 2380; in addition, sending the uplink data designed to the base station.

[0376] The memory 2315 can be used to store software programs and modules, and the processor 2380 can execute various function applications and data processing of the object terminal by running the software programs and modules stored in the memory 2315.

[0377] The input unit 2330 can be used to receive input digital or character information, and generate key signal input related to the setting and function control of the object terminal. Specifically, the input unit 2330 can include a touch panel 2331 and other input devices 2332.

[0378] The display unit 2340 can be used to display the input information or the provided information and various menus of the object terminal. The display unit 2340 can include a display panel 2341.

[0379] The audio circuit 2360, the speaker 2361, and the microphone 2362 can provide an audio interface.

[0380] In the present embodiment, the processor 2380 included in the terminal can perform the virtual machine creation processing method of the preceding embodiments.

[0381] The terminal of the embodiments of the present disclosure includes but is not limited to a mobile phone, a computer, a smart voice interaction device, a smart home appliance, a vehicle-mounted terminal, an aircraft, and the like. The embodiments of the present disclosure can be applied to various scenarios, including but not limited to data security, blockchain, computers, cloud computing, information technology, and the like.

[0382] FIG. 24 is a structural block diagram of a part of a server implementing the virtual machine creation processing method of the embodiments of the present disclosure. The server can vary greatly due to different configurations or performances, and can include one or more central processing units (CPUs) 2422 (for example, one or more processors) and a memory 2432, one or more storage media 2430 (for example, one or more mass storage devices) storing application programs 2442 or data 2444. Among them, the memory 2432 and the storage media 2430 can be temporary storage or persistent storage. The programs stored in the storage media 2430 can include one or more modules (not shown in the figure), each of which can include a series of instruction operations in the server. Further, the central processing unit 2422 can be configured to communicate with the storage media 2430 and execute a series of instruction operations in the storage media 2430 on the server.

[0383] The server can also include one or more power supplies 2426, one or more wired or wireless network interfaces 2450, one or more input and output interfaces 2458, and / or one or more operating systems 2441, such as Windows Server TM , Mac OS X TM , Unix TM , Linux TM , FreeBSD TM , and the like.

[0384] The central processing unit 2422 in the server can be used to execute the virtual machine creation processing method of the embodiments of the present disclosure.

[0385] The embodiments of the present disclosure also provide a computer-readable storage medium for storing a computer program, and the computer program is used to execute the virtual machine creation processing method of the preceding embodiments.

[0386] The embodiments of the present disclosure also provide a computer program product including a computer program. The processor of the electronic device reads the computer program and executes it, so that the electronic device executes the virtual machine creation processing method as described above.

[0387] The terms "first", "second", "third", "fourth" and the like in the description of the disclosure and the above drawings, if any, are used to distinguish similar objects, and are not necessarily used to describe a particular order or sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the disclosure described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "include" and "contain" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device containing a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to these processes, methods, products or devices.

[0388] It should be understood that in the present disclosure, "at least one" refers to one or more, and "multiple" refers to two or more. "And / or" is used to describe the relationship between the associated objects, which means that there can be three relationships, for example, "A and / or B" can represent three cases: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally represents an "or" relationship between the associated objects. "At least one of the following" or similar expressions means any combination of these items, including any combination of single or multiple items. For example, at least one of a, b or c can mean a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.

[0389] It should be understood that in the description of the embodiments of the present disclosure, the meaning of multiple (or multiple items) is two or more, greater than, less than, more than, etc. are not included in the number, above, below, etc. are understood to include the number.

[0390] In several embodiments provided by the present disclosure, it should be understood that the disclosed system, device and method can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of units is only a logical function division, and actual implementation can have another division manner, for example, multiple units or components can be combined or integrated into another system, or some features can be omitted or not executed. In addition, the coupling or direct coupling or communication connection between the displayed or discussed objects can be indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0391] In the embodiments of the present disclosure, the term "module" or "unit" refers to a computer program or a part of a computer program with a predetermined function, and works together with other related parts to achieve a predetermined target, and can be implemented entirely or partially by using software, hardware (such as a processing circuit or a memory), or a combination thereof. Similarly, one processor (or multiple processors or memories) can be used to implement one or more modules or units. In addition, each module or unit can be a part of an integral module or unit that includes the functions of the module or unit.

[0392] The units described as separate components can or can not be physically separate, and the components shown as units can or can not be physical units, that is, they can be located in one place, or they can be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiments of the present application.

[0393] In addition, the functional units in each embodiment of the present disclosure can be integrated in one processing unit, or each unit can exist physically, or two or more units can be integrated in one unit. The integrated unit can be implemented in the form of hardware or in the form of a software functional unit.

[0394] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present disclosure essentially or the part that contributes to the prior art or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, and includes a number of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods of the various embodiments of the present disclosure. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various media that can store program codes.

[0395] It should also be appreciated that the various embodiments provided by the present disclosure can be combined in any way to achieve different technical effects.

[0396] The above is a specific description of the embodiments of the present disclosure, but the present disclosure is not limited to the above embodiments. Those skilled in the art can make various equivalent modifications or replacements without departing from the spirit of the present disclosure, and these equivalent modifications or replacements are all included in the scope defined by the claims of the present disclosure.

Claims

1. A method for virtual machine creation, the method being applied to a computer device, the method comprising: determining a target server for creating a target virtual machine in response to a request for creating the target virtual machine, the target server comprising a target network card; obtaining a processing resource framework associated with the target network card in the target server if a type of the target virtual machine is a first type, the first type being used to indicate that the target virtual machine needs to work with the target network card; obtaining target associated resource information of the target virtual machine; determining a target processing resource in the processing resource framework based on the target associated resource information; and allocating the target processing resource to the target virtual machine to create the target virtual machine based on the target processing resource and the target network card. 2.The method of claim 1, wherein the processing resource framework comprises a plurality of candidate resource hierarchy levels; and the determining the target processing resource in the processing resource framework based on the target associated resource information comprises: determining a target resource hierarchy level in the plurality of candidate resource hierarchy levels based on the target associated resource information; and determining the target processing resource in the target resource hierarchy level. 3.The method of claim 2, wherein the determining the target resource hierarchy level in the plurality of candidate resource hierarchy levels based on the target associated resource information comprises: determining a processing resource reference number of each of the candidate resource hierarchy levels; obtaining a processing resource number required for creating the target virtual machine in the target associated resource information; and determining the target resource hierarchy level in the plurality of candidate resource hierarchy levels based on the processing resource number and the processing resource reference number of each of the candidate resource hierarchy levels. 4.The method of claim 3, wherein the determining the target resource hierarchy level in the plurality of candidate resource hierarchy levels based on the processing resource number and the processing resource reference number of each of the candidate resource hierarchy levels comprises: comparing the processing resource number with each of the processing resource reference number; and determining, in the plurality of candidate resource hierarchy levels, the candidate resource hierarchy level with the processing resource reference number greater than the processing resource number and a smaller hierarchy level as the target resource hierarchy level. 5.The method of claim 3 or 4, wherein each of the candidate resource hierarchy levels comprises a plurality of candidate processing resources; and the determining the processing resource reference number of each of the candidate resource hierarchy levels comprises: obtaining, for each of the candidate resource hierarchy levels, a candidate processing resource number of each of the candidate processing resources in the candidate resource hierarchy level; and determining the maximum candidate processing resource number as the processing resource reference number of the candidate resource hierarchy level. 6.The method of any one of claims 2 to 5, wherein the target resource hierarchy level comprises a plurality of candidate processing resources; and the determining the target processing resource in the target resource hierarchy level comprises: obtaining a candidate processing resource number of each of the candidate processing resources in the target resource hierarchy level. ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ For each of the candidate processing resource bodies in the target resource body hierarchy, a resource score is calculated based on the processing resource reference number of each of the candidate resource body hierarchy and the candidate processing resource number, to obtain a resource score result; Based on the resource score result, the target processing resource body is determined from among the multiple candidate processing resource bodies distributed in the target resource body hierarchy.

7. The method of any one of claims 1 to 6, wherein determining the target server on which the target virtual machine is located in response to a creation request of the target virtual machine comprises: obtaining a plurality of candidate servers; obtaining virtual machine configuration information of the target virtual machine and the target associated resource information in response to the creation request of the target virtual machine; based on the virtual machine configuration information and the target associated resource information, determining the target server from among the plurality of candidate servers.

8. The method of claim 7, wherein determining the target server from among the plurality of candidate servers based on the virtual machine configuration information and the target associated resource information comprises: obtaining server basic information of each of the candidate servers; based on the virtual machine configuration information, the target associated resource information and the server basic information, filtering out intermediate servers from among the plurality of candidate servers; for each of the intermediate servers, determining a priority score of the intermediate server based on the server basic information; based on the priority score, determining the target server from among the plurality of intermediate servers.

9. The method of claim 8, wherein filtering out intermediate servers from among the plurality of candidate servers based on the virtual machine configuration information, the target associated resource information and the server basic information comprises: based on the virtual machine configuration information and the target associated resource information, determining a server filtering condition; from among the plurality of candidate servers, determining the candidate servers whose target indicators in the server basic information satisfy the server filtering condition as the intermediate servers.

10. The method of claim 8, wherein for each of the intermediate servers, determining a priority score of the intermediate server based on the server basic information comprises: for each of the intermediate servers, obtaining a server thread number, a server core number, a storage type and a memory size of the candidate server from the server basic information; based on the server thread number, the server core number, the storage type and the memory size, determining the priority score of the intermediate server.

11. The method of claim 10, wherein based on the server thread number, the server core number, the storage type and the memory size, determining the priority score of the intermediate server comprises: based on the server thread number, determining a first score of the intermediate server; based on the server core number, determining a second score of the intermediate server; based on the storage type, determining a third score of the intermediate server; based on the memory size, determining a fourth score of the intermediate server. The priority score is obtained based on a weighted sum of the first score, the second score, the third score and the fourth score.

12. The method of any one of claims 1 to 11, wherein the target server comprises a plurality of candidate resource body architectures, and the candidate resource body architectures have candidate architecture indexes; The processing resource body architecture associated with the target network card in the target server is obtained if the type of the target virtual machine is the first type. The server index of the target server is obtained if the type of the target virtual machine is the first type. A target architecture index corresponding to the server index is found in a preset mapping table based on the server index, wherein the preset mapping table is used to indicate candidate architecture indexes of candidate resource body architectures in which target network cards are located in each candidate server. The candidate resource body architecture in which the candidate architecture index is consistent with the target architecture index is determined as the processing resource body architecture in the plurality of candidate resource body architectures.

13. The method of any one of claims 1 to 12, after the target server used to create the target virtual machine is determined, the method further comprises: The processing resource body architecture not associated with the target network card in the target server is obtained if the type of the target virtual machine is a second type, wherein the second type is used to indicate that the target virtual machine does not need to work cooperatively with the target network card. Target associated resource information of the target virtual machine is obtained. A target processing resource body is determined in the processing resource body architecture based on the target associated resource information. The target processing resource body is allocated to the target virtual machine, so that the target virtual machine is created based on the target processing resource body.

14. The method of any one of claims 1 to 13, after the target server used to create the target virtual machine is determined, the method further comprises: The idle resource body architecture in the target server is obtained if the type of the target virtual machine is a third type, wherein the third type is used to indicate that the overall resources of the target server are needed to create the target virtual machine, and the target virtual machine needs to work cooperatively with the target network card. Processing resource bodies in the idle resource body architecture are allocated to the target virtual machine, so that the target virtual machine is created based on the processing resource bodies in the idle resource body architecture and the target network card.

15. The method of any one of claims 1 to 14, before the target server used to create the target virtual machine is determined, the method further comprises: In response to a data collection request for each candidate server, if it is determined that a target script of each candidate server is downloaded completely, the server basic information, processing resource body architecture data and the processing resource body architecture in which the target network card is located of the candidate server are obtained based on the target script. A preset mapping table is constructed based on target indexes of the processing resource body architectures of each candidate server. mark other resource architectures except the processing resource architecture for each of the candidate servers; store the server basic information, the processing resource architecture data and the preset mapping table into a preset database. 16.A virtual machine creation processing apparatus, comprising: a first determining unit configured to determine a target server for creating a target virtual machine in response to a creation request of the target virtual machine, the target server comprising a target network card; a first obtaining unit configured to obtain a processing resource architecture associated with the target network card in the target server if a type of the target virtual machine is a first type, the first type being used to indicate that the target virtual machine needs to work with the target network card; a second obtaining unit configured to obtain target associated resource information of the target virtual machine; a second determining unit configured to determine a target processing resource architecture in the processing resource architecture based on the target associated resource information; an allocating unit configured to allocate the target processing resource architecture to the target virtual machine to create the target virtual machine based on the target processing resource architecture and the target network card. 17.An electronic device comprising a memory and a processor, the memory storing a computer program, and the processor implementing the virtual machine creation processing method of any one of claims 1 to 15 when executing the computer program. 18.A computer readable storage medium, the storage medium storing a computer program, and the computer program implementing the virtual machine creation processing method of any one of claims 1 to 15 when executed by a processor. 19.A computer program product comprising a computer program, the computer program being read and executed by a processor of an electronic device, so that the electronic device performs the virtual machine creation processing method of any one of claims 1 to 15.

Citation Information

Patent Citations

  • Virtual machine creation method and apparatus

    CN108614726A

  • Network element equipment construction method and device based on cloud platform

    CN115858088A

  • Resource processing method, device and equipment, readable storage medium and program product

    CN118467093A

  • Virtual machine creation processing method, related device and medium

    CN118779068A

  • Selecting cloud computing resource based on fault tolerance and network efficiency

    US20150178117A1