Virtual machine startup control method, electronic equipment and storage medium

By predicting the demand time point of virtual machines and starting virtual machines in advance, the problem of low startup efficiency of traditional virtual machines is solved, the response speed and resource utilization are improved, and the stability of the cloud desktop service platform is enhanced.

CN118535282APending Publication Date: 2024-08-23SHENZHEN RENDERBUS TECH
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410604102.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-15
Publication Date
2024-08-23

AI Technical Summary

Technical Problem

The startup process of traditional virtual machines requires users to manually click, resulting in uncertain startup waiting time, low efficiency, and difficulty in predicting the user's virtual machine demand time, resulting in insufficient or wasted resource allocation.

Method used

By obtaining the historical virtual machine usage data of the cloud desktop service platform, use the trained demand time prediction model to predict the user's virtual machine demand time point, and start the virtual machine before the predicted time point to ensure timely response and optimization when user requests arrive. Resource allocation.

Benefits of technology

It reduces the waiting time for virtual machines to start up, improves the response speed and usage efficiency of virtual machines, avoids resource waste and insufficient configuration, and improves the stability and reliability of the cloud desktop service platform.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118535282A
    Figure CN118535282A
Patent Text Reader

Abstract

The invention provides a virtual machine startup control method, electronic equipment and a computer readable storage medium. The virtual machine startup control method comprises the following steps: acquiring virtual machine historical use data of a target user in a cloud desktop service platform; inputting the historical use data of the virtual machine into the trained demand time prediction model, and performing prediction according to the historical use data of the virtual machine through the trained demand time prediction model to obtain a virtual machine demand time point of the target user; obtaining virtual machine demand data of the target user at the virtual machine demand time point; based on the virtual machine demand data, determining a target virtual machine serving the target user at the virtual machine demand time point from each virtual machine of the target user; and before entering the virtual machine demand time point, starting the target virtual machine. The virtual machine demand time point of the user can be predicted, the pre-boot operation of the virtual machine can be carried out, the response speed of the virtual machine to the user request is improved, and the use efficiency of the virtual machine is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of robotics technology, and in particular to a virtual machine startup control method, an electronic device, and a computer-readable storage medium. Background Art

[0002] With the continuous development of computer technology, virtual machines are being used more and more widely. A virtual machine is a complete computer system with complete hardware system functions that runs in a completely isolated environment and is simulated by software. By running multiple virtual machines on a physical computer at the same time, computing resources can be more fully utilized and the utilization rate of hardware resources can be improved.

[0003] When using a traditional virtual machine, the user needs to click on the power on button before using it. However, it takes several minutes from clicking on the power on button to connecting to the virtual machine, which makes the use of the virtual machine inefficient. Summary of the invention

[0004] The present application provides a virtual machine startup control method, an electronic device and a computer-readable storage medium, which can predict the user's virtual machine demand time point and perform a pre-startup operation of the virtual machine, thereby reducing the waiting time for the virtual machine to start up, improving the virtual machine's response speed to user requests, and improving the efficiency of virtual machine use.

[0005] In a first aspect, the present application provides a virtual machine startup control method, the method comprising:

[0006] Obtaining the target user's virtual machine historical usage data in the cloud desktop service platform, wherein the virtual machine historical usage data includes the platform opening time point, the platform closing time point, the virtual machine startup time point, the virtual machine shutdown time point, the connection time, the startup connection waiting time, and the login connection waiting time;

[0007] Inputting the virtual machine historical usage data into a trained demand time prediction model, and using the trained demand time prediction model to make a prediction based on the virtual machine historical usage data to obtain the virtual machine demand time point of the target user;

[0008] Acquire virtual machine demand data of the target user at the virtual machine demand time point;

[0009] Based on the virtual machine demand data, determining a target virtual machine serving the target user at the virtual machine demand time point from the virtual machines of the target user;

[0010] Before entering the virtual machine demand time point, the target virtual machine is started.

[0011] In a second aspect, the present application further provides an electronic device, comprising a processor and a memory, wherein the memory stores a computer program, and when the processor calls the computer program in the memory, it executes any one of the virtual machine startup control methods provided in the present application.

[0012] In a third aspect, the present application further provides a computer-readable storage medium on which a computer program is stored, and the computer program is loaded by a processor to execute the virtual machine startup control method.

[0013] In the present application, on the one hand, by obtaining the historical usage data of the virtual machines of the target users in the cloud desktop service platform for prediction, the target user's virtual machine demand time point is obtained; by starting the target virtual machine before entering the virtual machine demand time point, the time point when the user needs the virtual machine can be predicted in advance, and the virtual machine required by the user can be pre-started, so as to start the virtual machine in advance when the user request arrives, and ensure that it can be responded to in time when the user request arrives; on the second hand, by using the target user's virtual machine historical usage data to predict the target user's virtual machine demand time point, the prediction accuracy of the demand time point can be improved, and the problem of wasting host machine resources caused by starting the virtual machine too long in advance can be avoided; on the third hand, by predicting the target user's virtual machine demand time point, In order to predict the future resource requirements of the cloud desktop service platform, resource allocation can be better configured, avoiding the problem of insufficient resources for virtual machine startup and use during special periods such as peak periods, effectively responding to sudden increases in requests, and improving the stability and reliability of the cloud desktop service platform; fourthly, by determining the target virtual machine to serve the target user at the virtual machine demand time point based on the virtual machine demand data of the target user at the virtual machine demand time point, the degree of match between the virtual machine started in advance and the virtual machine required by the user can be improved; thus, the present application can predict the user's virtual machine demand time point and perform pre-startup operations on the virtual machine, thereby reducing the waiting time for the virtual machine startup, improving the response speed of the virtual machine to user requests, and improving the efficiency of virtual machine use. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0015] Figure 1 is a schematic block diagram of the structure of an electronic device provided in an embodiment of the present application;

[0016] Figure 2 This is a flow chart of a virtual machine startup control method provided by an embodiment of the present application;

[0017] Figure 3 This is a schematic diagram illustrating a principle framework of a demand time prediction model in an embodiment of the present application;

[0018] Figure 4 This is a schematic diagram illustrating a principle framework for determining a virtual machine task category using a task category prediction model in an embodiment of the present application;

[0019] Figure 5 It is a schematic diagram illustrating a principle framework for determining virtual machine demand using a demand prediction model in an embodiment of the present application. DETAILED DESCRIPTION

[0020] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.

[0021] The flowcharts shown in the accompanying drawings are only examples and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may also be decomposed, combined or partially merged, so the actual execution order may change according to actual conditions.

[0022] In the description of the embodiments of the present application, it should be understood that the terms "first" and "second" are used for descriptive purposes only and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of the present application, the meaning of "multiple" is two or more, unless otherwise clearly and specifically defined.

[0023] In order to enable any person skilled in the art to implement and use the present application, the following description is provided. In the following description, details are listed for the purpose of explanation. It should be understood that those of ordinary skill in the art can recognize that the present application can also be implemented without using these specific details. In other examples, the known process will not be elaborated in detail to avoid unnecessary details that make the description of the present application embodiment obscure. Therefore, the present application is not intended to be limited to the embodiments shown, but is consistent with the widest range of principles and features disclosed in accordance with the embodiments of the present application.

[0024] The embodiment of the present application provides a virtual machine startup control method, an electronic device and a computer-readable storage medium. The electronic device may be a mobile robot, a mobile phone, a computer, etc.

[0025] Some embodiments of the present application are described in detail below in conjunction with the accompanying drawings. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.

[0026] Figure 1 It is a schematic block diagram of the structure of an electronic device provided in an embodiment of the present application.

[0027] like Figure 1 As shown, the electronic device 100 includes a processor 101 and a memory 102, and the processor 101 and the memory 102 are connected via a bus 103, such as an I2C (Inter-integrated Circuit) bus.

[0028] Specifically, the processor 101 is used to provide computing and control capabilities to support the operation of the entire electronic device 100. The processor 101 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0029] Specifically, the memory 102 may be a Flash chip, a read-only memory (ROM) disk, an optical disk, a USB flash drive, or a mobile hard disk.

[0030] Those skilled in the art will understand that Figure 1 The structure shown in the figure is merely a block diagram of a partial structure related to the embodiment scheme of the present application, and does not constitute a limitation on the electronic device to which the embodiment scheme of the present application is applied. The specific electronic device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.

[0031] The processor 101 is used to run the computer program stored in the memory 102, and implement any one of the virtual machine startup control methods provided in the embodiments of the present application when executing the computer program. For example, the processor 101 is used to run the computer program stored in the memory 102, and can implement the following steps when executing the computer program:

[0032] Obtain the target user's virtual machine historical usage data in the cloud desktop service platform, wherein the virtual machine historical usage data includes the platform opening time point, the platform closing time point, the virtual machine startup time point, the virtual machine shutdown time point, the connection duration, the startup connection waiting time, and the login connection waiting time; input the virtual machine historical usage data into a trained demand time prediction model, and use the trained demand time prediction model to predict according to the virtual machine historical usage data to obtain the target user's virtual machine demand time point; obtain the target user's virtual machine demand data at the virtual machine demand time point; based on the virtual machine demand data, determine the target virtual machine that serves the target user at the virtual machine demand time point from the target user's various virtual machines; and start the target virtual machine before entering the virtual machine demand time point.

[0033] In some embodiments, the virtual machine demand data includes a virtual machine task category, and the processor 101 is used to run a computer program stored in the memory 102, and when executing the computer program, the following steps may be implemented:

[0034] Determine, from the virtual machines of the target user, a virtual machine matching the virtual machine task category as a preliminary virtual machine;

[0035] Obtaining the startup priority of the initially determined virtual machine;

[0036] Based on the startup priority, a virtual machine serving the target user at the virtual machine demand time point is determined from the initially determined virtual machines as the target virtual machine.

[0037] In some embodiments, the processor 101 is used to run a computer program stored in the memory 102, and when executing the computer program, the following steps may be implemented:

[0038] Obtaining a downtime probability of the initially determined virtual machine;

[0039] Obtaining the host machine load of the initially determined virtual machine at the virtual machine demand time point;

[0040] Based on the downtime probability and the host machine load, a startup priority of the initially determined virtual machine is determined.

[0041] In some embodiments, the processor 101 is used to run a computer program stored in the memory 102, and when executing the computer program, the following steps may be implemented:

[0042] Determine a shared virtual machine of a target host machine of the initially determined virtual machine;

[0043] Acquiring historical connection data of the shared virtual machine;

[0044] Perform prediction based on historical connection data of the shared virtual machine to obtain a predicted usage time period of the shared virtual machine;

[0045] Based on the predicted usage time period of the shared virtual machine, the load of the target host machine at the virtual machine demand time point is determined as the host machine load.

[0046] In some embodiments, the virtual machine demand data further includes a virtual machine demand amount, and the processor 101 is used to run a computer program stored in the memory 102, and when executing the computer program, the following steps may be implemented:

[0047] Based on the startup priority and the virtual machine demand, a virtual machine serving the target user at the virtual machine demand time point is determined from the initially determined virtual machines as the target virtual machine.

[0048] In some embodiments, the processor 101 is used to run a computer program stored in the memory 102, and when executing the computer program, the following steps may be implemented:

[0049] Based on the historical usage data of the virtual machine, obtaining the time characteristics, address characteristics and device characteristics of the demand of the target user;

[0050] The demand time feature, the demand address feature and the demand device feature are integrated to obtain the demand usage feature of the target user;

[0051] Perform splicing processing based on the demand usage characteristics and the virtual machine demand time point to obtain a second usage characteristic of the target user;

[0052] The trained demand prediction model is used to predict the virtual machine demand of the target user at the virtual machine demand time point based on the second usage feature.

[0053] In some embodiments, the processor 101 is used to run a computer program stored in the memory 102, and when executing the computer program, the following steps may be implemented:

[0054] Based on the virtual machine historical usage data, obtaining the task category time characteristics, task category address characteristics and task category device characteristics of the target user;

[0055] The task category time feature, the task category address feature and the task category device feature are integrated to obtain the task category usage feature of the target user;

[0056] Perform splicing processing based on the task category usage characteristics and the virtual machine demand time point to obtain the first usage characteristics of the target user;

[0057] The trained task category prediction model is used to predict based on the first usage feature to obtain the virtual machine task category of the target user at the virtual machine demand time point.

[0058] In some embodiments, the virtual machine demand data includes a virtual machine task category, and the processor 101 is used to run a computer program stored in the memory 102, and when executing the computer program, the following steps may be implemented:

[0059] According to the virtual machine task category, the host machine of the target virtual machine is controlled to adjust the configuration resources of the target virtual machine, wherein the configuration resources include at least one of processor resources, memory resources and storage space resources.

[0060] It should be noted that those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the electronic device described above can refer to the corresponding process in the following virtual machine startup control method embodiment, and will not be repeated here.

[0061] In the following, Figure 1 The electronic device shown in is used as the execution subject of the virtual machine startup control method as an example to introduce the virtual machine startup control method provided by the embodiment of the present application in detail. For the sake of simplicity and convenience of description, the execution subject will be omitted in the subsequent method embodiments. Figure 1 The scenario is only used to explain the virtual machine startup control method provided in the embodiment of the present application, but does not constitute a limitation on the application scenario of the virtual machine startup control method provided in the embodiment of the present application.

[0062] See also Figure 2 , Figure 2 201 to 205, wherein:

[0063] 201. Obtain historical virtual machine usage data of a target user in a cloud desktop service platform.

[0064] The virtual machine historical usage data includes the platform opening time point, the platform closing time point, the virtual machine startup time point, the virtual machine shutdown time point, the connection duration, the startup connection waiting time, and the login connection waiting time.

[0065] Exemplarily, in the historical usage data of virtual machines, users connect and use virtual machines through the following steps: ① The user opens the cloud desktop service platform; ② In the cloud desktop service platform, the user chooses to open the virtual machine that needs to be used; ③ After the user opens the virtual machine, he clicks to connect to the virtual machine; ④ The connection to the virtual machine is successful, and the cloud desktop service provided by the virtual machine is used normally.

[0066] In order to better understand the embodiments of the present application, some names involved in the embodiments are introduced below:

[0067] 1. Cloud desktop service: It is a virtual desktop solution based on cloud computing technology. It hosts the traditional desktop environment (including operating system, applications and user data) on cloud servers. Users can remotely access and use these desktop environments through Internet connections. Usually, cloud desktop services provide each user with an independent virtual desktop instance. Users can access and use this virtual desktop through the network at any location and on any device, just like using a local desktop.

[0068] 2. Virtual machine: A complete computer system with complete hardware system functions that is simulated by software and runs in a completely isolated environment. It creates multiple independent virtual environments (i.e. virtual desktops, also known as cloud desktops) based on physical computers through virtualization technology. Each virtual environment can run different operating systems and applications, just like an independent physical computer.

[0069] 3. Cloud desktop service platform: It is a platform that provides cloud desktop services. The cloud desktop service platform implements multiple cloud desktops by providing multiple virtual machines, and each virtual machine acts as a cloud desktop.

[0070] 4. Platform opening time (denoted as t O1 ): refers to the time when the user opens the cloud desktop service platform. For example, if the user opens the cloud desktop service platform at 8:50, opens the virtual machine at 9:00, opens the connection to the virtual machine at 9:05, opens the connection to the virtual machine at 10:55, closes the virtual machine at 11:00, and closes the cloud desktop service platform at 11:10, then the platform opening time is 8:50.

[0071] 5. Platform closing time (denoted as t C1 ): refers to the time when the user shuts down the cloud desktop service platform. For example, if the user opens the cloud desktop service platform at 8:50, opens the virtual machine at 9:00, connects to the virtual machine at 9:05, connects to the virtual machine at 10:55, shuts down the virtual machine at 11:00, and shuts down the cloud desktop service platform at 11:10, then the platform shutdown time is 11:10.

[0072] 6. The time when the virtual machine is turned on (denoted as t O2): refers to the time when the user chooses to start the virtual machine after opening the cloud desktop service platform. For example, if the user opens the cloud desktop service platform at 8:50, opens the virtual machine at 9:00, opens the connection to the virtual machine at 9:05, opens the connection to the virtual machine at 10:55, closes the virtual machine at 11:00, and closes the cloud desktop service platform at 11:10, then the virtual machine startup time is 9:00.

[0073] 7. The virtual machine shutdown time (denoted as t C2 ): refers to the time point when the user chooses to shut down the virtual machine after turning it on. For example, if the user turns on the cloud desktop service platform at 8:50, turns on the virtual machine at 9:00, turns on the connection to the virtual machine at 9:05, turns on the connection to the virtual machine at 10:55, shuts down the virtual machine at 11:00, and shuts down the cloud desktop service platform at 11:10, then the shutdown time point of the virtual machine is 11:00.

[0074] 8. Open the connection time (recorded as t O3 ): refers to the time point when the user opens the virtual machine and connects to the virtual machine. For example, if the user opens the cloud desktop service platform at 8:50, opens the virtual machine at 9:00, connects to the virtual machine at 9:05, connects to the virtual machine at 10:55, closes the virtual machine at 11:00, and closes the cloud desktop service platform at 11:10, then the time point of opening the connection is 9:05.

[0075] 9. Close the connection time (recorded as t C3 ): refers to the time when the user closes the connection to the virtual machine after connecting to it. For example, if the user opens the cloud desktop service platform at 8:50, opens the virtual machine at 9:00, opens the connection to the virtual machine at 9:05, opens the connection to the virtual machine at 10:55, closes the virtual machine at 11:00, and closes the cloud desktop service platform at 11:10, then the closing time is 10:55.

[0076] 10. Connection duration (referred to as T0): refers to the total duration of each user's connection to the virtual machine, that is, connection duration T0 = closing time t C3 -Open connection time t O3 For example, if a user opens the cloud desktop service platform, opens the virtual machine at 9:00 and closes the virtual machine at 11:00, the connection duration of the virtual machine this time is 2 hours.

[0077] 11. Boot connection waiting time (referred to as T1): refers to the interval between each time a user opens a virtual machine and connects to the virtual machine, that is, boot connection waiting time T1 = opening connection time t O3 -The virtual machine boot time t O2For example, if the user opens the cloud desktop service platform at 8:50, opens the virtual machine at 9:00, opens the connection to the virtual machine at 9:05, opens the connection to the virtual machine at 10:55, closes the virtual machine at 11:00, and closes the cloud desktop service platform at 11:10, then the waiting time for the startup connection is 5 minutes (9:00 to 9:05).

[0078] 12. Login connection waiting time (referred to as T2): refers to the interval between the user opening the cloud desktop service platform and the user connecting to the virtual machine, that is, the boot connection waiting time T1 = the opening connection time t O3 - Platform opening time t O1 For example, if the user opens the cloud desktop service platform at 8:50, opens the virtual machine at 9:00, opens the connection to the virtual machine at 9:05, opens the connection to the virtual machine at 10:55, closes the virtual machine at 11:00, and closes the cloud desktop service platform at 11:10, then the waiting time for the login connection is 15 minutes (8:50 to 9:05).

[0079] The owned virtual machine refers to a virtual machine in the cloud desktop service platform that serves the target user.

[0080] Exemplarily, the log files of the cloud desktop service platform may be collected; the log files of the cloud desktop service platform may be analyzed to obtain the historical usage data of the virtual machine of the target user.

[0081] 202. Input the virtual machine historical usage data into a trained demand time prediction model, and use the trained demand time prediction model to make a prediction based on the virtual machine historical usage data to obtain the virtual machine demand time point of the target user.

[0082] The historical usage data of the virtual machine includes multiple sets of connection usage data, each set of connection usage data is used as input data of a time step, and each set of connection usage data is [t O1 ,t C1 ,t O2 ,t C2 , T0, T1, T2], which is used to indicate the platform opening time point, platform closing time point, virtual machine startup time point, virtual machine shutdown time point, connection duration, startup connection waiting time, and login connection waiting time each time the target user connects to the virtual machine.

[0083] Among them, the virtual machine demand time point (denoted as t n ) is predicted based on the historical usage data of the virtual machine, and is the time point when the target user needs to use the virtual machine next time.

[0084] Please refer to Figure 3,The demand time prediction model is first introduced below. The demand time prediction model includes an input layer, a feature representation layer, a fully connected layer and an activation layer.

[0085] (I) Input layer, used to take the 1st, 2nd, ..., tth group of usage data in the historical usage data of the virtual machine as the input data of the 1st, 2nd, ..., tth time step, respectively, and input them into the 1st, 2nd, ..., tth GRU model of the input representation layer, respectively. Among them, the input data of the 1st time step is the group of connection usage data ranked first at the time point when the virtual machine is turned on, and so on.

[0086] (ii) a feature representation layer, comprising a plurality of hidden nodes, the feature representation layer is used for. For example, Figure 3 As shown in the figure, the hidden nodes adopt the GRU (Gate Recurrent Unit) model structure. The tth GRU node combines the input data of the tth time step (i.e., xt) and the hidden state of the t-1th GRU node (i.e., ht-1) to obtain the output yt of the tth GRU node and the hidden state (i.e., ht) passed to the next node, and so on.

[0087] (III) The fully connected layer is used to perform full connection processing based on the outputs y1, y2, ..., yt of the 1st, 2nd, ..., tth GRU nodes, and is activated through the activation layer to obtain the time point Y when the target user needs to use the virtual machine next time, that is, to obtain the virtual machine demand time point t of the target user n Exemplarily, the activation layer may use a tanh function and / or a sigmoid function as an activation function.

[0088] Exemplarily, in step 202, after the virtual machine historical usage data is input into the trained demand time prediction model, first, the 1st, 2nd, ..., tth groups of connection usage data x1, x2, ..., xt in the virtual machine historical usage data can be input into the 1st, 2nd, ..., tth hidden nodes respectively through the input layer of the demand time prediction model. Then, through the feature representation layer of the demand time prediction model, the first hidden node (GRU node) is used to combine the input data of the first time step (i.e., x1) and the initialized hidden state (i.e., h0) to obtain the output y1 of the first hidden node (GRU node) and the hidden state (i.e., h1) passed to the next node; the tth hidden node (GRU node) is used to combine the input data of the tth time step (i.e., xt) and the hidden state (i.e., ht-1) of the t-1th hidden node (GRU node) to obtain the output yt of the tth hidden node (GRU node) and the hidden state (i.e., ht) passed to the next node, and so on, to obtain the outputs y1, y2, …, yt of the 1st, 2nd, …, tth hidden nodes (GRU nodes), respectively. Next, the outputs y1, y2, ..., yt of the 1st, 2nd, ..., tth hidden nodes (GRU nodes) are fully connected through the fully connected layer of the demand time prediction model; and activated through the activation layer of the demand time prediction model, and finally the virtual machine demand time point of the target user is obtained.

[0089] 203. Obtain virtual machine demand data of the target user at the virtual machine demand time point.

[0090] The virtual machine demand data is indicative data reflecting the target user's demand for virtual machine usage at a virtual demand time point. Exemplarily, the virtual machine demand data includes at least one of a virtual machine demand amount, a virtual machine task category, and the like.

[0091] The virtual machine demand refers to the number of virtual machines that the target user needs to use at the virtual machine demand time point. For example, assuming that the target user needs to use 3 virtual machines at the virtual machine demand time point, the virtual machine demand is 3.

[0092] The virtual machine task category refers to the task category that the target user needs to use the virtual machine to process tasks at the virtual machine demand time point.

[0093] There are many ways to obtain virtual demand data in step 203, illustratively including:

[0094] (1) Use virtual machine historical usage data for prediction.

[0095] ① Taking the virtual machine demand data as a virtual machine task category as an example, the virtual machine task category of the target user at the virtual machine demand time point in step 203 may be specifically obtained as follows: steps 2031A to 2034A:

[0096] 2031A. Based on the historical usage data of the virtual machine, obtain the task category time characteristics, task category address characteristics, and task category device characteristics of the target user.

[0097] Exemplarily, the historical virtual machine usage data includes the target user's past N virtual machine usage data. Based on the target user's past N virtual machine usage data, task category time features, task category address features, and task category device features can be constructed, including: 1> According to the data format [task category of the i-th use of the virtual machine, connection time point of the i-th use of the virtual machine], the task category time feature is constructed; for example, the task category time feature [C1, C2, ..., C10, t1, t2, ..., t10] is constructed based on the past N = 10 virtual machine usage data, wherein C1, C2, ..., C10 respectively represent the task categories of the target user's past 1st, 2nd, ..., 10th use of the virtual machine, and t1, t2, ..., t10 respectively represent the connection time points of the target user's past 1st, 2nd, ..., 10th use of the virtual machine; 2> According to the data format [task category of the i-th use of the virtual machine, connection time point of the i-th use of the virtual machine], the task category time feature is constructed; for example, the task category time feature [C1, C2, ..., C10, t1, t2, ..., t10] is constructed based on the past N = 10 virtual machine usage data, 3> According to the data format [task category of the i-th use of the virtual machine, connection device number of the i-th use of the virtual machine], construct the task category address feature; for example, the task category address feature [C1, C2, …, C10, IP1, IP2, …, IP10] is constructed with the past N = 10 virtual machine use data, wherein IP1, IP2, …, IP10 respectively represent the connection IP addresses of the target user's 1st, 2nd, …, and 10th use of the virtual machine in the past; 3> According to the data format [task category of the i-th use of the virtual machine, connection device number of the i-th use of the virtual machine], construct the task category device feature; for example, the task category device feature [C1, C2, …, C10, ID1, ID2, …, ID10] is constructed with the past N = 10 virtual machine use data, wherein ID1, ID2, …, ID10 respectively represent the connection device numbers of the target user's 1st, 2nd, …, and 10th use of the virtual machine in the past. Among them, when the number of times the virtual machine is used is less than N, the corresponding position representation data of the task category time feature, task category address feature, and task category device feature can be represented by the default values. For example, when the number of times the virtual machine is used is 5, the task category representation data C6, …, C10 and the device representation data ID6, …, ID10 at the 6th to 10th positions in the task category device features [C1, C2, …, C10, ID1, ID2, …, ID10] are represented by the default values.

[0098] 2032A. Fuse the task category time feature, the task category address feature, and the task category device feature to obtain the task category usage feature of the target user.

[0099] 2033A. Perform splicing processing based on the task category usage characteristics and the virtual machine demand time point to obtain the first usage characteristics of the target user.

[0100] The task category usage feature is obtained by integrating the task category time feature, the task category address feature and the task category device feature, and is the usage feature of the task category processed by the target user using the virtual machine.

[0101] The first usage feature is a usage feature of the target user on the virtual machine obtained by splicing the task category usage feature and the virtual machine demand time point.

[0102] For example, Figure 4 As shown, first, the time information in the task category time feature, the address information in the task category address feature, and the device information in the task category device feature can be sequentially spliced ​​together according to a preset data format, and the spliced ​​feature sequence is used as the task category usage feature of the target user; then, the task category usage feature is spliced ​​with the virtual machine demand time point to obtain the first usage feature of the target user. For example, the task category usage feature of the target user can be spliced ​​according to the data format [task category, time information, address information, device information], such as the task category usage feature obtained by splicing is [C1, C2, …, C10, IP1, IP2, …, IP10, ID1, ID2, …, ID10, ID1, ID2, …, ID10], then the task category usage feature [C1, C2, …, C10, IP1, IP2, …, IP10, ID1, ID2, …, ID10, ID1, ID2, …, ID10] is spliced ​​with the virtual machine demand time point t n By splicing them together, we can get the first usage features of the target user, such as [C1, C2, …, C10, IP1, IP2, …, IP10, ID1, ID2, …, ID10, ID1, ID2, …, ID10, t n ].

[0103] 2034A. Predict the virtual machine task category of the target user at the virtual machine demand time point by using the trained task category prediction model and based on the first usage feature.

[0104] The virtual machine task category is a task category that is predicted based on the first usage feature and that the target user will use the virtual machine to process at the virtual machine demand time point.

[0105] ② Taking the virtual machine demand data as the virtual machine demand quantity as an example, the acquisition of the virtual machine demand quantity of the target user at the virtual machine demand time point in step 203 may specifically be performed as follows: steps 2031B to 2034B:

[0106] 2031B. Based on the historical usage data of the virtual machine, obtain the time characteristics, address characteristics and device characteristics of the demand of the target user.

[0107] Exemplarily, the historical virtual machine usage data includes the target user's past N virtual machine usage data. Based on the target user's past N virtual machine usage data, a demand time feature, a demand address feature, and a demand device feature can be constructed, including: 1> According to the data format [demand for the i-th use of the virtual machine, the connection time point of the i-th use of the virtual machine], the demand time feature is constructed; for example, the demand time feature [Q1, Q2, ..., Q10, t1, t2, ..., t10] is constructed based on the past N = 10 virtual machine usage data, wherein Q1, Q2, ..., Q10 respectively represent the demand for the target user's 1st, 2nd, ..., 10th use of the virtual machine in the past, and t1, t2, ..., t10 respectively represent the connection time points of the target user's 1st, 2nd, ..., 10th use of the virtual machine in the past; 2> According to the data format [demand for the i-th use of the virtual machine, the connection time point of the i-th use of the virtual machine], the demand time feature is constructed; for example, the demand time feature [Q1, Q2, ..., Q10, t1, t2, ..., t10] is constructed based on the past N = 10 virtual machine usage data, , IP address of the target user’s first, second, …, tenth times of using the virtual machine in the past], to construct the demand quantity address feature; for example, the demand quantity address feature [Q1, Q2, …, Q10, IP1, IP2, …, IP10] is constructed with the past N = 10 virtual machine usage data, wherein IP1, IP2, …, IP10 represent the connection IP addresses of the target user’s first, second, …, tenth times of using the virtual machine in the past, respectively; 3> According to the data format [demand quantity of the i-th use of the virtual machine, connection device number of the i-th use of the virtual machine], construct the demand quantity device feature; for example, the demand quantity device feature [Q1, Q2, …, Q10, ID1, ID2, …, ID10] is constructed with the past N = 10 virtual machine usage data, wherein ID1, ID2, …, ID10 represent the connection device numbers of the target user’s first, second, …, tenth times of using the virtual machine in the past, respectively. Among them, when the number of times the virtual machine is used is less than N, the corresponding position representation data of the demand time characteristic, demand address characteristic, and demand device characteristic can be represented by the default values. For example, when the number of times the virtual machine is used is 5, the demand representation data Q6, …, Q10 and the device representation data ID6, …, ID10 at the 6th to 10th positions in the demand device characteristics [Q1, Q2, …, Q10, ID1, ID2, …, ID10] are represented by the default values.

[0108] 2032B. Fusion the demand time feature, the demand address feature, and the demand device feature to obtain the demand usage feature of the target user.

[0109] 2033B. Perform concatenation processing based on the demand usage characteristic and the virtual machine demand time point to obtain a second usage characteristic of the target user.

[0110] The demand usage characteristics are obtained by integrating the demand time characteristics, the demand address characteristics and the demand device characteristics, and are the target user's demand usage characteristics for the virtual machine.

[0111] The second usage feature is a usage feature of the target user on the virtual machine obtained by splicing the demand usage feature and the virtual machine demand time point.

[0112] For example, Figure 5 As shown, first, the time information in the demand time feature, the address information in the demand address feature, and the device information in the demand device feature can be spliced ​​together in sequence according to a preset data format, and the spliced ​​feature sequence is used as the target user's demand usage feature; then, the demand usage feature is spliced ​​with the virtual machine demand time point to obtain the target user's second usage feature. For example, the target user's demand usage feature can be spliced ​​according to the data format [demand, time information, address information, device information], such as the spliced ​​demand usage feature is [Q1, Q2, …, Q10, IP1, IP2, …, IP10, ID1, ID2, …, ID10, ID1, ID2, …, ID10], then the demand usage feature [Q1, Q2, …, Q10, IP1, IP2, …, IP10, ID1, ID2, …, ID10, ID1, ID2, …, ID10] is spliced ​​with the virtual machine demand time point t n By splicing them together, we can get the second usage characteristics of the target user, such as [Q1, Q2, …, Q10, IP1, IP2, …, IP10, ID1, ID2, …, ID10, ID1, ID2, …, ID10, t n ].

[0113] 2034B. Using the trained demand prediction model, a prediction is performed based on the second usage feature to obtain the virtual machine demand of the target user at the virtual machine demand time point.

[0114] The virtual machine demand is the number of virtual machines that will be used by the target user at the virtual machine demand time point, which is predicted based on the second usage feature.

[0115] (2) Target user customization: For example, the target user can customize virtual machine demand data such as virtual machine task category and virtual machine demand quantity.

[0116] 204. Determine, based on the virtual machine demand data, from the virtual machines of the target user, a target virtual machine that serves the target user at the virtual machine demand time point.

[0117] There are many ways to determine the target virtual machine in step 204, illustratively including:

[0118] (1) The virtual machine demand data includes virtual machine task categories, and one or more virtual machines are randomly selected from the virtual machines of the target user using the virtual machine task categories as target virtual machines. At this time, step 204 may specifically include the following steps 2041A to 2042A:

[0119] 2041A. Determine, from among the virtual machines of the target user, a virtual machine that matches the virtual machine task category as a preliminary virtual machine.

[0120] 2042A. Randomly select a virtual machine that serves the target user at the virtual machine demand time point from the initially determined virtual machines as the target virtual machine.

[0121] (2) The virtual machine demand data includes a virtual machine task category. Using the virtual machine task category, one or more virtual machines are selected from the virtual machines of the target user according to the startup priority of the virtual machine as the target virtual machine. By determining the target virtual machine in combination with the startup priority of the virtual machine, the degree of consistency between the target virtual machine and the virtual machine required by the target user can be improved. At this time, step 204 can specifically include the following steps 2041B to 2043B:

[0122] 2041B. Determine, from among the virtual machines of the target user, a virtual machine that matches the virtual machine task category as a preliminary virtual machine.

[0123] 2042B. Obtain the startup priority of the initially determined virtual machine.

[0124] In some embodiments, the startup priority of the initial virtual machine can be customized by the user.

[0125] In some embodiments, in order to improve the working stability of the target virtual machine, the downtime probability of the virtual machine within a period of time can be used to determine the startup priority of the virtual machine. At this time, step 2042B includes: obtaining the downtime probability of the initially determined virtual machine; determining the startup priority of the initially determined virtual machine based on the downtime probability of the initially determined virtual machine.

[0126] In some embodiments, in order to improve the working stability of the target virtual machine, the startup priority of the virtual machine can also be determined in combination with the virtual downtime probability and the host load of the virtual machine. At this time, step 2042B includes: obtaining the downtime probability of the initially determined virtual machine; obtaining the host load of the initially determined virtual machine at the time point when the virtual machine is required; and determining the startup priority of the initially determined virtual machine based on the downtime probability and the host load.

[0127] The higher the probability of downtime of the initially determined virtual machine is, the lower the startup priority of the initially determined virtual machine is; conversely, the lower the probability of downtime of the initially determined virtual machine is, the higher the startup priority of the initially determined virtual machine is.

[0128] The higher the host load, the lower the startup priority of the initially determined virtual machine; conversely, the lower the host load, the higher the startup priority of the initially determined virtual machine.

[0129] The host load refers to the virtual machines used on the target host of the initial virtual machine at the time point of virtual machine demand. Exemplarily, the host load can be predicted in the following way: determine the common virtual machine of the target host of the initial virtual machine; obtain the historical connection data of the common virtual machine; predict based on the historical connection data of the common virtual machine to obtain the predicted usage time period of the common virtual machine; determine the load of the target host at the time point of virtual machine demand as the host load based on the predicted usage time period of the common virtual machine.

[0130] 2043B. Based on the startup priorities of the virtual machines, determine, from the initially determined virtual machines, a virtual machine that serves the target user at the virtual machine demand time point as the target virtual machine.

[0131] In some embodiments, the virtual machine demand data includes a virtual machine task category, and based on the startup priority of the initial virtual machine and the default number of virtual machines, a virtual machine serving the target user at the virtual machine demand time point can be determined from the initial virtual machines as the target virtual machine.

[0132] In some embodiments, in order to reduce the waste of virtual machine resources and improve the utilization of virtual machines, the virtual machine demand data also includes the virtual machine demand quantity. The virtual machine demand data obtained in step 203 also includes the virtual machine demand quantity (the method for determining the virtual machine demand quantity can refer to the relevant instructions of steps 2031B to 2034B). In step 2043B, based on the power-on priority of the initial virtual machine and the virtual machine demand quantity, the virtual machine that serves the target user at the virtual machine demand time point can be determined from the initial virtual machines as the target virtual machine.

[0133] 205. Before entering the virtual machine demand time point, start the target virtual machine.

[0134] Furthermore, in order to improve the utilization of host machine resources, the data processing volume of the target virtual machine at the time point when the virtual machine is required can also be predicted. The host machine dynamically allocates configuration resources to the target virtual machine based on the data processing volume of the target virtual machine at the time point when the virtual machine is required. In this way, on the one hand, when the resource demand of the target virtual machine is relatively large, there are sufficient configuration resources allocated to the target virtual machine to ensure the processing efficiency of the target virtual machine; on the other hand, when the resource demand of the target virtual machine is relatively small, the configuration resources allocated to the target virtual machine can be dynamically reduced to improve the utilization of host machine resources.

[0135] Furthermore, in order to improve the utilization rate of host machine resources, the host machine of the target virtual machine can also be controlled to adjust the configuration resources of the target virtual machine according to the virtual machine task category, wherein the configuration resources include at least one of processor resources, memory resources and storage space resources.

[0136] Furthermore, in order to improve the utilization rate of host machine resources, the data processing volume of the target virtual machine at the time point when the virtual machine is required can also be predicted at the same time; according to the data processing volume of the target virtual machine at the time point when the virtual machine is required, and the virtual machine task category, the host machine of the target virtual machine is controlled to adjust the configuration resources of the target virtual machine.

[0137] Furthermore, in order to cope with the sudden increase in the number of requests and improve the stability and reliability of the cloud desktop service platform, the demand time point of each user in the cloud desktop service platform is predicted with reference to steps 201 to 202, and the virtual machine demand of each user in the cloud desktop service platform at the corresponding demand time point is determined with reference to step 203; the demand time point of each user in the cloud desktop service platform and the virtual machine demand of each user at the corresponding demand time point can be combined to prepare the system resources of the cloud desktop service platform before the target user's virtual machine demand time point to better configure resource allocation and avoid the problem of insufficient resources for virtual machine startup and use during special periods such as peak periods, which can effectively cope with the sudden increase in the number of requests and improve the stability and reliability of the cloud desktop service platform.

[0138] In order to better understand the embodiment of the present application, the virtual machine startup control process is described below with a specific example, as follows:

[0139] 1. Collect historical usage data of each virtual machine: Collect historical usage data of each virtual machine in the cloud desktop service platform through the data collection program.

[0140] 2. Data preprocessing: Perform preprocessing operations such as cleaning and normalization on the collected historical usage data of each virtual machine so as to establish a demand time prediction model.

[0141] 3. Establish a prediction model: Use machine learning algorithms (such as regression analysis, neural networks, etc.) to establish a demand time prediction model based on preprocessed data.

[0142] 4. Predicted startup: Collect the target user's virtual machine historical usage data in the cloud desktop service platform, and use the demand time prediction model to predict the target user's virtual machine demand time point; based on the results of the demand time prediction model, pre-start the target user's virtual machine in advance to ensure timely response when the user request arrives.

[0143] 5. Monitoring and adjustment: Continuously monitor the usage of each virtual machine in the cloud desktop service platform, and adjust and optimize the demand time prediction model according to actual conditions.

[0144] From the above content, it can be seen that, firstly, by obtaining the historical usage data of the virtual machines of the target users in the cloud desktop service platform for prediction, the target user's virtual machine demand time point is obtained; by starting the target virtual machine before entering the virtual machine demand time point, it is possible to predict in advance the time point when the user needs the virtual machine, and pre-start the virtual machine required by the user, so as to start the virtual machine in advance when the user request arrives, and ensure that it can respond in time when the user request arrives; secondly, by using the target user's virtual machine historical usage data to predict the target user's virtual machine demand time point, the prediction accuracy of the demand time point can be improved, and the problem of wasting host resources caused by starting the virtual machine too long in advance can be avoided; thirdly, by predicting the target user's virtual machine demand time point point, it is possible to predict the future resource requirements of the cloud desktop service platform, so that resource allocation can be better performed, and the problem of insufficient resources for virtual machine startup and use during special periods such as peak periods can be avoided. This can effectively respond to sudden increases in requests and improve the stability and reliability of the cloud desktop service platform; fourthly, by determining the target virtual machine that serves the target user at the virtual machine demand time point based on the virtual machine demand data of the target user at the virtual machine demand time point, the degree of match between the virtual machine that is started in advance and the virtual machine required by the user can be improved; thus, the present application can predict the user's virtual machine demand time point and perform pre-startup operations on the virtual machine, thereby reducing the waiting time for the virtual machine startup, improving the response speed of the virtual machine to user requests, and improving the efficiency of virtual machine use.

[0145] A person of ordinary skill in the art can understand that all or part of the steps in the above-mentioned virtual machine startup control method can be completed by instructions, or by controlling related hardware through instructions. The instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.

[0146] To this end, an embodiment of the present application provides a computer-readable storage medium, in which multiple computer programs are stored, and the computer program can be loaded by a processor to execute any virtual machine startup control method provided in the embodiment of the present application. For example, the computer program can be loaded by a processor to execute the following steps:

[0147] Obtain the target user's virtual machine historical usage data in the cloud desktop service platform, wherein the virtual machine historical usage data includes the platform opening time point, the platform closing time point, the virtual machine startup time point, the virtual machine shutdown time point, the connection duration, the startup connection waiting time, and the login connection waiting time; input the virtual machine historical usage data into a trained demand time prediction model, and use the trained demand time prediction model to predict according to the virtual machine historical usage data to obtain the target user's virtual machine demand time point; obtain the target user's virtual machine demand data at the virtual machine demand time point; based on the virtual machine demand data, determine the target virtual machine that serves the target user at the virtual machine demand time point from the target user's various virtual machines; and start the target virtual machine before entering the virtual machine demand time point.

[0148] The computer-readable storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0149] In the above-mentioned virtual machine startup control method, computer-readable storage medium, and electronic device embodiments, the description of each embodiment has its own emphasis. For parts not described in detail in a certain embodiment, reference can be made to the relevant description of other embodiments. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working process and beneficial effects of the computer-readable storage medium, electronic device, and its corresponding units described above can refer to the description of the virtual machine startup control method in the above embodiment, and will not be repeated here.

[0150] The above is a detailed introduction to a virtual machine startup control method, an electronic device and a computer-readable storage medium provided in an embodiment of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for technical personnel in this field, according to the idea of ​​the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A virtual machine startup control method, It is characterized in that The method comprises: Obtaining the target user's virtual machine historical usage data in the cloud desktop service platform, wherein the virtual machine historical usage data includes the platform opening time point, the platform closing time point, the virtual machine startup time point, the virtual machine shutdown time point, the connection time, the startup connection waiting time, and the login connection waiting time; Inputting the virtual machine historical usage data into a trained demand time prediction model, and using the trained demand time prediction model to make a prediction based on the virtual machine historical usage data to obtain the virtual machine demand time point of the target user; Acquire virtual machine demand data of the target user at the virtual machine demand time point; Based on the virtual machine demand data, determining a target virtual machine serving the target user at the virtual machine demand time point from the virtual machines of the target user; Before entering the virtual machine demand time point, the target virtual machine is started.

2. The virtual machine startup control method according to claim 1, It is characterized in that The virtual machine demand data includes a virtual machine task category, and determining, based on the virtual machine demand data, a target virtual machine serving the target user at the virtual machine demand time point from among the virtual machines of the target user, includes: Determine, from the virtual machines of the target user, a virtual machine matching the virtual machine task category as a preliminary virtual machine; Obtaining the startup priority of the initially determined virtual machine; Based on the startup priority, a virtual machine serving the target user at the virtual machine demand time point is determined from the initially determined virtual machines as the target virtual machine.

3. The virtual machine startup control method according to claim 2, It is characterized in that The obtaining of the initial startup priority of the virtual machine includes: Obtaining a downtime probability of the initially determined virtual machine; Obtaining the host machine load of the initially determined virtual machine at the virtual machine demand time point; Based on the downtime probability and the host machine load, a startup priority of the initially determined virtual machine is determined.

4. The virtual machine startup control method according to claim 3, It is characterized in that The obtaining of the host machine load of the initially determined virtual machine at the virtual machine demand time point includes: Determine a shared virtual machine of a target host machine of the initially determined virtual machine; Acquiring historical connection data of the shared virtual machine; Perform prediction based on historical connection data of the shared virtual machine to obtain a predicted usage time period of the shared virtual machine; Based on the predicted usage time period of the shared virtual machine, the load of the target host machine at the virtual machine demand time point is determined as the host machine load.

5. The virtual machine startup control method according to claim 2, It is characterized in that The virtual machine demand data also includes a virtual machine demand amount, and the step of determining, based on the startup priority, from the initially determined virtual machines a virtual machine serving the target user at the virtual machine demand time point as a target virtual machine includes: Based on the startup priority and the virtual machine demand, a virtual machine serving the target user at the virtual machine demand time point is determined from the initially determined virtual machines as the target virtual machine.

6. The virtual machine startup control method according to claim 5, It is characterized in that The acquiring the virtual machine demand data of the target user at the virtual machine demand time point includes: Based on the historical usage data of the virtual machine, obtaining the time characteristics, address characteristics and device characteristics of the demand of the target user; The demand time feature, the demand address feature and the demand device feature are integrated to obtain the demand usage feature of the target user; Perform splicing processing based on the demand usage characteristics and the virtual machine demand time point to obtain a second usage characteristic of the target user; The trained demand prediction model is used to predict the virtual machine demand of the target user at the virtual machine demand time point based on the second usage feature.

7. The virtual machine startup control method according to claim 2, It is characterized in that The acquiring the virtual machine demand data of the target user at the virtual machine demand time point includes: Based on the virtual machine historical usage data, obtaining the task category time characteristics, task category address characteristics and task category device characteristics of the target user; The task category time feature, the task category address feature and the task category device feature are integrated to obtain the task category usage feature of the target user; Perform splicing processing based on the task category usage characteristics and the virtual machine demand time point to obtain the first usage characteristics of the target user; The trained task category prediction model is used to predict based on the first usage feature to obtain the virtual machine task category of the target user at the virtual machine demand time point.

8. The virtual machine startup control method according to claim 1, It is characterized in that The virtual machine demand data includes a virtual machine task category, and the method includes: According to the virtual machine task category, the host machine of the target virtual machine is controlled to adjust the configuration resources of the target virtual machine, wherein the configuration resources include at least one of processor resources, memory resources and storage space resources.

9. An electronic device, It is characterized in that The method comprises a processor and a memory, wherein a computer program is stored in the memory, and when the processor calls the computer program in the memory, the method for controlling the startup of a virtual machine as claimed in any one of claims 1 to 8 is executed.

10. A computer-readable storage medium, It is characterized in that A computer program is stored thereon, and the computer program is loaded by a processor to execute the virtual machine startup control method according to any one of claims 1 to 8.

Citation Information

Cited By

  • Tracking connection number control method and device of virtual machine, equipment and medium

    CN120929194A