Resource scheduling method, device, equipment and storage medium

By using Markov linked lists to predict the sequence of service instances in the cloud server cluster, the problem of low service instance prediction accuracy in the existing technology is solved and resource utilization is improved.

CN117648167BActive Publication Date: 2024-09-06BEIJING VOLCANO ENGINE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311695890.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-11
Publication Date
2024-09-06
Estimated Expiration
2043-12-11

AI Technical Summary

Technical Problem

In the existing technology, the accuracy of predicting the service instances that need to be created in the cloud server cluster is low, resulting in low usage of service instances in the host, thereby reducing the resource utilization of the cloud server cluster.

Method used

By obtaining the historical instance information within the preset historical period of the cloud server cluster, determine the first conditional probability of each demand type service instance and the second conditional probability of any two demand type service instances, and use Markov linked lists to predict future service instances. sequence, and then schedule the hosts in the cloud server cluster.

Benefits of technology

It improves the prediction accuracy of service instances and improves the accuracy of resource scheduling, thereby improving the resource utilization of the cloud server cluster.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117648167B
    Figure CN117648167B
Patent Text Reader

Abstract

The disclosed embodiment provides a resource scheduling method, apparatus, device and storage medium, the method comprising: obtaining historical instance information within a preset historical duration of a cloud server cluster; determining a first conditional probability corresponding to a service instance of each demand type according to the historical instance information; and determining a second conditional probability corresponding to any two service instances of demand types according to the historical instance information; determining multiple service instances of different demand types to be created by the cloud server cluster within a preset future duration according to the first conditional probability corresponding to the service instance of each demand type and the second conditional probability corresponding to the service instances of any two demand types, and scheduling multiple hosts in the cloud server cluster according to the multiple service instances of different demand types to be created. The present application can improve the resource utilization of the cloud server cluster.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present disclosure relate to the field of cloud computing technology, and in particular to a resource scheduling method, apparatus, device, and storage medium. Background Art

[0002] There are multiple hosts on the cloud computing data center server (i.e., cloud server cluster). Multiple hosts provide resources to tenants in the form of pooled resources. Tenants can send resource requests to the cloud server cluster, and the cloud server cluster creates a service instance corresponding to the resource request.

[0003] In the related art, in order to improve the processing efficiency of resource requests, the service instances that need to be created in the cloud server cluster can be predicted first, and the predicted service instances of various specifications and types can be created in the cloud server cluster. When a tenant sends a resource request to the cloud server cluster, a service instance that matches the resource request can be selected from the created service instances of various types, and the service instance can be configured for the tenant.

[0004] However, the inventors have found that the prior art has at least the following technical problems: the accuracy of predicting the service instances that need to be created in the cloud server cluster is low, so that the utilization rate of the service instances created in the host is low, resulting in low resource utilization of the cloud server cluster. Summary of the invention

[0005] The embodiments of the present disclosure provide a resource scheduling method, apparatus, device and storage medium, which can improve the accuracy of predicted service instances that need to be created, so as to improve the resource utilization of a cloud server cluster.

[0006] In a first aspect, an embodiment of the present disclosure provides a resource scheduling method, including:

[0007] Obtain historical instance information within a preset historical duration of the cloud server cluster, wherein the historical instance information includes one or more of the following: demand types of multiple created service instances, creation sequences of the multiple service instances, and quantities of service instances of multiple demand types respectively corresponding to each other;

[0008] Determine, based on the historical instance information, a first conditional probability corresponding to the service instance of each demand type, wherein the first conditional probability is used to represent the probability that the service instance of the demand type is the first service instance created within a preset time period in the future; and determine, based on the historical instance information, a second conditional probability corresponding to any two service instances of the demand type, wherein the second conditional probability is used to represent the probability of continuing to create a service instance of another demand type after creating a service instance of one demand type within a preset time period in the future;

[0009] Based on the first conditional probability corresponding to the service instance of each demand type and the second conditional probability corresponding to any two service instances of the demand types, determine the multiple service instances of different demand types to be created by the cloud server cluster within a future preset time period, and schedule the multiple hosts in the cloud server cluster based on the multiple service instances of different demand types to be created.

[0010] In a second aspect, an embodiment of the present disclosure provides a resource scheduling device, including:

[0011] The acquisition module is used to obtain historical instance information within a preset period of time of the cloud server cluster, wherein the historical instance information includes one or more of the following: the demand types of multiple service instances that have been created, the creation sequence of the multiple service instances, and the number of service instances of multiple demand types that respectively correspond to each other

[0012] A determination module, configured to determine, based on the historical instance information, a first conditional probability corresponding to a service instance of each demand type, wherein the first conditional probability is used to represent the probability that the service instance of the demand type is the first service instance created within a preset time period in the future; and, based on the historical instance information, determine a second conditional probability corresponding to any two service instances of the demand type, wherein the second conditional probability is used to represent the probability that after creating a service instance of a demand type within a preset time period in the future, another service instance of the demand type is created;

[0013] The scheduling module is used to determine multiple service instances of different demand types to be created by the cloud server cluster within a preset time period in the future based on a first conditional probability corresponding to a service instance of each demand type and a second conditional probability corresponding to any two service instances of different demand types, and schedule multiple hosts in the cloud server cluster based on the multiple service instances of different demand types to be created.

[0014] In a third aspect, an embodiment of the present disclosure provides an electronic device, including:

[0015] A processor, and a memory communicatively connected to the processor;

[0016] The memory stores computer-executable instructions;

[0017] The processor executes the computer-executable instructions stored in the memory to implement the resource scheduling method as described in the first aspect above.

[0018] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions. When a processor executes the computer-executable instructions, the resource scheduling method described in the first aspect above is implemented.

[0019] In a fifth aspect, an embodiment of the present disclosure provides a computer program product, including a computer program, which, when executed by a processor, implements the resource scheduling method described in the first aspect above.

[0020] The resource scheduling method, apparatus, device and storage medium provided in the present embodiment include: obtaining historical instance information within a preset historical duration of a cloud server cluster, wherein the historical instance information includes one or more of the following: demand types of multiple service instances that have been created, creation sequences of multiple service instances and the number of service instances of multiple demand types that respectively correspond to each other; determining a first conditional probability corresponding to a service instance of each demand type according to the historical instance information, wherein the first conditional probability is used to indicate the probability that a service instance of the demand type will be the first service instance created within a preset future duration; and determining a second conditional probability corresponding to any two service instances of the demand type according to the historical instance information, wherein the second conditional probability is used to indicate the probability that after creating a service instance of one demand type within a preset future duration, another service instance of the demand type will continue to be created; determining multiple service instances of different demand types to be created by the cloud server cluster within the preset future duration according to the first conditional probability corresponding to the service instance of each demand type and the second conditional probability corresponding to any two service instances of the demand type, and scheduling multiple hosts in the cloud server cluster according to the multiple service instances of different demand types to be created. In the embodiment of the present application, the first conditional probability and the second conditional probability in the Markov chain table are determined according to the historical instance information, and then the service instance sequence within the preset time period in the future is predicted through the first conditional probability and the second conditional probability in the Markov chain table. That is, through the Markov chain table, the accuracy of predicting multiple different types of service instances is improved, and then the accuracy of resource scheduling is improved, thereby improving the resource utilization of the cloud server cluster. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0022] Figure 1 A schematic diagram of an application scenario of a resource scheduling method provided by an embodiment of the present disclosure;

[0023] Figure 2 A flowchart of a resource scheduling method provided by an embodiment of the present disclosure;

[0024] Figure 3 A schematic diagram of a resource scheduling method provided by an embodiment of the present disclosure;

[0025] Figure 4 A flowchart of another resource scheduling method provided by an embodiment of the present disclosure;

[0026] Figure 5 A flowchart of another resource scheduling method provided by an embodiment of the present disclosure;

[0027] Figure 6 A structural block diagram of a resource scheduling device provided in an embodiment of the present disclosure;

[0028] Figure 7 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0029] In order to make the purpose, technical solution and advantages of the embodiments of the present disclosure clearer, the technical solution in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present disclosure.

[0030] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0031] There are multiple hosts on the cloud computing data center server (i.e., cloud server cluster). Multiple hosts provide resources to tenants in the form of pooled resources. Tenants can send resource requests to the cloud server cluster, and the cloud server cluster creates a service instance corresponding to the resource request.

[0032] In the prior art, in order to improve the processing efficiency of resource requests, the service instances that need to be created in the cloud server cluster can be predicted first, and the predicted service instances of various specifications and types can be created in the cloud server cluster. When a tenant sends a resource request to the cloud server cluster, a service instance that matches the resource request can be selected from the various types of service instances that have been created, and the service instance can be configured to the tenant. At present, when predicting the service instances that need to be created in the cloud server cluster, statistical prediction methods or time series prediction models based on machine learning are generally used. Among them, the statistical prediction methods mainly include: AR (Auto Regressive) model, MA (Moving Average) model, ARMA (Auto Regressive Moving Average) model, etc. Among them, the time series prediction models based on machine learning mainly include: MLP (Multi-layer Perceptron Networks) model and RBF (Radial Basis Function) model, etc.

[0033] However, the inventors have found that the prior art has at least the following technical problems: the above prediction algorithm can achieve good results in processing small data set time series linear prediction, but the effect is often poor when processing large data sets of complex nonlinear time series. That is, the accuracy of predicting the service instances that need to be created in the cloud server cluster by the current existing prediction algorithm is low, so the utilization rate of the service instances created in the host is low, resulting in low resource utilization of the cloud server cluster.

[0034] In order to solve the above problems, this embodiment provides the following technical concept: based on the historical instance information within the preset time period of the cloud server cluster (which may include the creation order of instances of different specifications in the business application creation template) as prior knowledge, the Markov chain and the transfer matrix are used to define the prior knowledge to predict the load creation sequence of instances of different specifications in the future specified time window. Among them, the Markov chain includes conditional probabilities corresponding to multiple random variables. In this application, the Markov chain table includes conditional probabilities corresponding to multiple service instances. For example, the service instances of multiple demand types are: t1, t2, and t3. The first row of the Markov chain table includes: the first conditional probability corresponding to t1 (the probability that the first service instance is t1), the second conditional probability corresponding to t1t1 (the probability that the first service instance is t1 and the second service instance is t1), the second conditional probability corresponding to t1t2 (the probability that the first service instance is t1 and the second service instance is t2) and the second conditional probability corresponding to t1t3 (the probability that the first service instance is t1 and the second service instance is t3).

[0035] The specific steps of prediction may include: first, obtaining historical instance information within a historical preset time period of the cloud server cluster, wherein the historical instance information includes one or more of the following: the demand types of multiple service instances that have been created, the creation sequence of multiple service instances, and the number of service instances of multiple demand types that respectively correspond to each other; second, determining a first conditional probability corresponding to a service instance of each demand type based on the historical instance information, wherein the first conditional probability is used to represent the probability that a service instance of the demand type will be the first service instance created within a future preset time period; and, determining a second conditional probability corresponding to any two service instances of the demand type based on the historical instance information, wherein the second conditional probability is used to represent the probability of continuing to create another service instance of the demand type after creating a service instance of one demand type within a future preset time period; finally, determining multiple service instances of different demand types to be created by the cloud server cluster within a future preset time period based on the first conditional probability corresponding to the service instance of each demand type and the second conditional probability corresponding to any two service instances of the demand type, and scheduling multiple hosts in the cloud server cluster based on the multiple service instances of different demand types to be created.

[0036] Since the first conditional probability and the second conditional probability in the Markov chain table are determined according to the historical instance information, the service instance sequence within the preset time period in the future is predicted through the first conditional probability and the second conditional probability in the Markov chain table. That is, through the Markov chain table, the accuracy of predicting multiple service instances of different demand types can be improved, thereby improving the accuracy of resource scheduling, thereby improving the resource utilization of the cloud server cluster.

[0037] The application scenarios of the embodiments of the present disclosure are explained below:

[0038] The resource scheduling method provided by the embodiment of the present disclosure can be applied to an application scenario in which a cloud server cluster processes resource requests of tenants. Figure 1 A schematic diagram of an application scenario of a resource scheduling method provided by an embodiment of the present disclosure. Figure 1 As shown, the cloud server cluster 102 can deploy multiple service instances of different types in the host through the resource scheduling method provided by the embodiment of the present disclosure. The terminal 101 sends a resource request corresponding to the service A to the cloud server cluster 102, and the resource request includes resource requirement information (for example, CPU requirement information, memory requirement information, hard disk requirement information). The cloud server cluster 102 receives the resource request sent by the terminal 101, and configures the target service instance that meets its resource request information to the terminal 101 through the resource requirement information corresponding to the resource request, and processes the service request related to the service A on the terminal 101 through the target service instance. The resource scheduling method provided by the embodiment of the present disclosure is described in detail below using a detailed embodiment.

[0039] Figure 2 The flowchart of a resource scheduling method provided by the embodiment of the present disclosure. The execution subject of the resource scheduling method may be a server; wherein the server may be a cloud server cluster. Figure 2 As shown, the method includes:

[0040] S201. Obtain historical instance information within a preset historical duration of a cloud server cluster, wherein the historical instance information includes one or more of the following: demand types of multiple service instances that have been created, a creation sequence of multiple service instances, and the number of service instances of multiple demand types that respectively correspond to each other.

[0041] In the disclosed embodiment, the demand type of a service instance is used to represent the resource demand information of the service instance. The resource demand information corresponding to service instances of different demand types is different. Exemplarily, the resource demand information corresponding to service instance A is 10 for the CPU demand and 5 for the GPU demand. The resource demand information corresponding to service instance B is 20 for the CPU demand and 5 for the GPU demand. Service instance A and service instance B have different resource demand information and are service instances of different demand types.

[0042] In the embodiments of the present disclosure, the numerical value of the historical preset duration is not specifically limited. Exemplarily, the historical preset duration can be one day, one week, or one month. Among them, the creation sequence of multiple service instances is used to indicate the creation order of multiple service instances. Exemplarily, multiple service instances include t1, t2, t3, t4, t5, and the creation sequence of multiple service instances is {t1, t4, t5, t3, t2}, which means that service instance t4 is created after service instance t1, service instance t5 is created after service instance t4, service instance t3 is created after service instance t5, and service instance t2 is created after service instance t3.

[0043] The multiple service instances may include service instances of multiple demand types, and each service instance of a demand type may include one or more service instances.

[0044] S202. Determine a first conditional probability corresponding to a service instance of each demand type based on historical instance information, wherein the first conditional probability is used to represent the probability that the service instance of the demand type will be the first service instance created within a preset time period in the future; and determine a second conditional probability corresponding to any two service instances of the demand type based on historical instance information, wherein the second conditional probability is used to represent the probability of creating a service instance of another demand type after creating a service instance of one demand type within a preset time period in the future.

[0045] In the disclosed embodiment, the first conditional probability can be determined according to the number of service instances of each demand type. Accordingly, the first conditional probability corresponding to the service instance of each demand type is determined according to the historical instance information, including: determining the total number of multiple service instances according to the number of service instances of multiple demand types respectively corresponding to each other; for each service instance of the demand type, determining the ratio of the number of service instances corresponding to the demand type to the total number, and using the ratio as the first conditional probability corresponding to the service instance of the demand type.

[0046] Exemplarily, the demand types of the service instances include: demand type A and demand type B. The total number of the multiple service instances is 100; among them, the service instances of demand type A include 20, and the service instances of demand type B include 80. In this case, the first conditional probability corresponding to the service instance of demand type A is 0.2, and the first conditional probability corresponding to the service instance of demand type B is 0.8.

[0047] In some embodiments, the service instances of two demand types include a service instance of a first demand type and a service instance of a second demand type, wherein the service instance of the first demand type is the first service instance created, and the service instance of the second demand type is the second service instance created; accordingly, based on the historical instance information, the second conditional probability corresponding to any two service instances of the demand types is determined, including: for any two service instances of the demand types, selecting at least one first service instance group from a creation sequence of multiple service instances, wherein the first service instance group includes two consecutively created service instances, and the first created service instance is the same as the service instance of the first demand type; selecting at least one second service instance group from at least one first service instance group, wherein the second created service instance in the second service instance group is the same as the service instance of the second demand type; determining the second conditional probability corresponding to any two service instances of the demand types based on at least one first service instance group and at least one second service instance group.

[0048] It should be noted that if the order of creating any two service instances of the required type is different, the corresponding second conditional probability is different. For example, if the service instances of the two required types are (t1, t2), then the second conditional probability represents the probability of creating service instance t2 after creating service instance t1. For example, if the service instances of the two required types are (t2, t1), then the second conditional probability represents the probability of creating service instance t1 after creating service instance t2.

[0049] Exemplarily, the service instances of two demand types are (t1, t2). At least one first service instance group with t1 as the first position is selected from the creation sequence of multiple service instances; for example, at least one first service instance group includes: service instance group A (t1, t2), service instance group B (t1, t3), service instance group C (t1, t4), service instance group D (t1, t2). At least one second service instance group includes: service instance group A (t1, t2), service instance group D (t1, t2).

[0050] Optionally, the second conditional probability is determined based on the number of at least one first service instance group and the number of at least one second service instance group. Accordingly, the second conditional probability corresponding to any two service instances of the demand type is determined based on the at least one first service instance group and the at least one second service instance group, including: determining a first number corresponding to the at least one first service instance group, and determining a second number corresponding to the at least one second service instance group; and determining the ratio of the second number to the first number as the second conditional probability corresponding to any two service instances of the demand type.

[0051] Exemplarily, at least one first service instance group includes: service instance group A (t1, t2), service instance group B (t1, t3), service instance group C (t1, t4), service instance group D (t1, t2), that is, the first number is 4. At least one second service instance group includes: service instance group A (t1, t2), service instance group D (t1, t2), that is, the second number is 2. Then the second conditional probability corresponding to the service instances of the two demand types (t1, t2) is 0.5. The second conditional probability represents the probability of continuing to create service instance t2 after creating service instance t1.

[0052] In some embodiments, the plurality of demand type service instances include (t1, t2, t3, t4, t5, t6, t7), wherein the second conditional probabilities corresponding to any two demand type service instances are shown in Table 1 below:

[0053] Table 1 The second conditional probability corresponding to any two service instances of demand types

[0054] t1 t2 t3 t4 t5 t6 t7 t1 0.386 0.147 0.202 0.062 0.140 0.047 0.016 t2 0.107 0.267 0.227 0.120 0.207 0.052 0.020 t3 0.035 0.101 0.188 0.191 0.357 0.067 0.061 t4 0.021 0.039 0.112 0.212 0.431 0.124 0.061 t5 0.009 0.024 0.075 0.123 0.473 0.171 0.125 t6 0.000 0.103 0.041 0.088 0.391 0.312 0.155 t7 0.000 0.008 0.036 0.083 0.364 0.235 0.274

[0055] Among them, the first row in Table 1 represents the probability of creating service instances t1, t2, t3, t4, t5, t6, and t7 respectively after creating service instance t1.

[0056] S203. Determine multiple service instances of different demand types to be created in the cloud server cluster within a preset time period in the future based on the first conditional probability corresponding to each service instance of the demand type and the second conditional probability corresponding to any two service instances of the demand types, and schedule multiple hosts in the cloud server cluster based on the multiple service instances of different demand types to be created.

[0057] In the embodiment of the present disclosure, there is no specific limitation on the value of the future preset time. For example, the future preset time may be 12 hours, one day or one week.

[0058] Optionally, the multiple service instances of different demand types are the maximum possible service instance sequence within a future preset time period. Exemplarily, the multiple service instances of different demand types are {(2, 10), (6, 10), ..., (c, g)}.

[0059] In some embodiments, a service instance may be created on a host under the condition that a pre-position strategy is satisfied, wherein the pre-position strategy may include one or more of minimum fragmentation, online and offline affinity colocation, and cross-service scheduling affinity colocation.

[0060] Optionally, the pre-position strategy includes minimum fragmentation. Accordingly, according to the multiple service instances of different demand types to be created, multiple hosts in the cloud server cluster are scheduled, including: for each service instance of the demand type, multiple candidate hosts whose remaining resource information is greater than the resource demand information corresponding to the service instance of the demand type are selected from multiple hosts; the candidate host with the smallest remaining resource information among the multiple candidate hosts is determined as the target host corresponding to the service instance of the demand type, and the service instance of the demand type is created on the target host.

[0061] The target host meets two conditions: one is that it can fully meet the resource requirements of the instance; the other is that it can minimize memory fragmentation on the host.

[0062] The disclosed embodiment provides a resource scheduling method: obtaining historical instance information within a preset historical duration of a cloud server cluster, wherein the historical instance information includes one or more of the following: demand types of multiple service instances that have been created, a creation sequence of multiple service instances, and the number of service instances of multiple demand types that respectively correspond to each other; determining a first conditional probability corresponding to a service instance of each demand type based on the historical instance information, wherein the first conditional probability is used to indicate the probability that a service instance of the demand type will be the first service instance created within a preset future duration; and determining a second conditional probability corresponding to any two service instances of the demand type based on the historical instance information, wherein the second conditional probability is used to indicate the probability of continuing to create another service instance of the demand type after creating a service instance of the demand type within the preset future duration; determining multiple service instances of different demand types to be created by the cloud server cluster within the preset future duration based on the first conditional probability corresponding to the service instance of each demand type and the second conditional probability corresponding to any two service instances of the demand type, and scheduling multiple hosts in the cloud server cluster based on the multiple service instances of different demand types to be created. In the embodiment of the present application, the first conditional probability and the second conditional probability in the Markov chain table are determined according to the historical instance information, and then the service instance sequence within the preset time period in the future is predicted through the first conditional probability and the second conditional probability in the Markov chain table. That is, through the Markov chain table, the accuracy of predicting multiple service instances of different demand types is improved, and then the accuracy of resource scheduling is improved, thereby improving the resource utilization of the cloud server cluster.

[0063] It should be noted that, in the embodiments of the present disclosure, it is also possible to determine, for each business, multiple service instances of different demand types to be created by the cloud server cluster for the business within a preset time in the future. Optionally, a business may correspond to an application. Optionally, a business may also correspond to a functional scenario. For example, businesses may include: cloud rendering business, cloud gaming business, or VR (Virtual Reality) business. Accordingly, when determining multiple service instances of different demand types to be created by a business within a preset time in the future, the historical instance information is the demand type of the multiple service instances that have been created corresponding to the business, the creation sequence of the multiple service instances, and the number of service instances of the multiple demand types that respectively correspond to each other.

[0064] Exemplarily, the historical instance information corresponding to the cloud rendering service includes service instance sequences of multiple demand types: (2, 10), (2, 10), (2, 10), (6, 10), (6, 10), (8, 15), and (15, 15). The demand types of multiple service instances include: (2, 10), (6, 10), (8, 15), and (15, 15). The number corresponding to the demand type (2, 10) is 3, the number corresponding to the demand type (6, 10) is 2, the number corresponding to the demand type (8, 15) is 1, and the number corresponding to the demand type (15, 15) is 1.

[0065] In some embodiments, an association relationship may be established between each service instance of a demand type and a first conditional probability corresponding to the service instance of the demand type, and an association relationship may be established between any two service instances of the demand type and a second conditional probability corresponding to any two service instances of the demand type. Figure 2 Based on the above, the method for determining multiple service instances of different demand types to be created by the cloud server cluster within a preset time period in the future according to the first conditional probability corresponding to each service instance of the demand type and the second conditional probability corresponding to any two service instances of the demand type in step S203 is described in detail. Figure 3 As shown, the method includes:

[0066] S301. Determine, from the association relationship between each service instance of the demand type and the first conditional probability corresponding to the service instance of the demand type, a service instance of the first target demand type corresponding to the maximum first conditional probability.

[0067] For example, Figure 4 As shown, the service instances of multiple demand types include: t1, t2, t3, t4, t5, t6; the first conditional probability distribution corresponding to the service instances of multiple demand types is shown in the figure. Among them, the service instance of the first target demand type corresponding to the largest first conditional probability is t4.

[0068] S302: Determine a service instance of a second target demand type to be created after the service instance of the first target demand type according to an association relationship between any two service instances of the demand type and second conditional probabilities corresponding to the service instances of the any two demand types.

[0069] Optionally, this step includes: selecting at least one first target service instance group from any two service instances of demand types, wherein the first service instance created in the first target service instance group is the same as the service instance of the first target demand type; for each first target service instance group, determining the second conditional probability corresponding to the service instances of the two demand types included in the first target service instance group based on the association relationship between the service instances of any two demand types and the second conditional probabilities corresponding to the service instances of any two demand types; determining the second target service instance group corresponding to the largest second conditional probability from at least one first target service instance group, and using the second created service instance in the second target service instance group as the service instance of the second target demand type.

[0070] For example, Figure 5 As shown, the service instance of the first target requirement type is t d The first target service instance group includes (t d ,t e )、(t d ,t b )(t d ,t f ); wherein the second conditional probabilities corresponding to the service instances of the two demand types included in the first target service instance group are: (t d ,t e ) is 0.42, (t d ,t b ) is 0.32, (t d ,t f ) is 0.26. Then the second target service instance group corresponding to the maximum second conditional probability is (t d ,t e ), t d ,t e ) in the second service instance created e As a service instance of the second target requirement type. That is, in the service instance t d The most likely service instance to be created later is service instance t e .

[0071] S303. Continue to determine the service instances of the third target demand type to be created after the service instances of the second target demand type based on the association relationship between any two service instances of the demand type and the second conditional probabilities corresponding to any two service instances of the demand type, until the number of determined service instances reaches a preset number, thereby obtaining multiple service instances of different demand types to be created by the cloud server cluster within a preset time period in the future.

[0072] In the embodiment of the present application, the value of the preset number is not specifically limited. For example, the preset number may be 10, 20, etc.

[0073] For example, Figure 5 As shown, the service instance of the second target requirement type is t e . Service Instance e The corresponding first target service instance group includes (t e ,t b )、(t e ,t c ); where (t e ,t b ) corresponds to a second conditional probability of 0.28, (t e ,t c ) corresponds to a second conditional probability of 0.72. Then the second target service instance group corresponding to the maximum second conditional probability is (t e ,t c ), will (t e ,t c ) in the second service instance created c As a service instance of the third target requirement type. That is, in the service instance t e The most likely service instance to be created later is service instance t c .

[0074] It should be noted that, in some embodiments, the probability graph model can be determined through the remaining resource information of multiple hosts, the resource demand information of multiple service instances with different demand types, and the fragmentation change rate (remaining resource change rate), and then the fragmentation change rate can be predicted through the probability graph model. Accordingly, after creating a service instance on the target host, it also includes:

[0075] S501: Determine the remaining resource change rate corresponding to the cloud server cluster.

[0076] Optionally, this step may include: determining the remaining resource change rate of the target host, and determining the remaining resource change rate corresponding to the cloud server cluster according to the remaining resource change rates of the target hosts respectively corresponding to multiple service instances of different demand types.

[0077] S502. Train a probability graph model based on resource demand information corresponding to each of multiple service instances of different demand types, remaining resource information corresponding to each of multiple hosts, and a remaining resource change rate corresponding to a cloud server cluster; wherein the probability graph model is used to predict the remaining resource change rate corresponding to a cloud server cluster.

[0078] Optionally, this step may include: using resource demand information corresponding to each of multiple service instances of different demand types, remaining resource information corresponding to each of multiple hosts, and remaining resource change rate corresponding to the cloud server cluster as training samples, training the initial probability graph model, and obtaining a trained probability graph model; wherein the probability graph model is used to predict the remaining resource change rate corresponding to the cloud server cluster through the resource demand information corresponding to each of multiple service instances of different demand types to be configured and the remaining resource information corresponding to each of multiple hosts.

[0079] It should be noted that the remaining resource information includes one or more of the following: CPU remaining amount, memory remaining amount, GPU remaining amount and hard disk storage remaining amount; wherein the resource demand information includes one or more of the following: CPU demand amount, memory demand amount, GPU demand amount and hard disk storage demand amount. In this case, due to the different types of information included in the remaining resource information and / or the different types of information included in the resource demand information, the corresponding remaining resource change rates are also different. Therefore, the probability graph model can explain the reasons for the change in the fragmentation rate and give the most probable explanation (MPE, Most Probable Explanation) for the change in the fragmentation rate.

[0080] Figure 6 This is a structural block diagram of a resource scheduling device provided by an embodiment of the present disclosure. Figure 6 The device includes: an acquisition module 601, a determination module 602 and a scheduling module 603.

[0081] The acquisition module 601 is used to acquire historical instance information within a preset historical duration of the cloud server cluster, wherein the historical instance information includes the demand types of multiple service instances that have been created, the creation sequence of the multiple service instances, and the number of service instances of multiple demand types that respectively correspond to each other;

[0082] Determining module 602 is used to determine a first conditional probability corresponding to a service instance of each demand type according to the historical instance information, wherein the first conditional probability is used to represent the probability that the service instance of the demand type is the first service instance created within a preset time period in the future; and determining a second conditional probability corresponding to any two service instances of the demand type according to the historical instance information, wherein the second conditional probability is used to represent the probability that after a service instance of a demand type is created within a preset time period in the future, a service instance of another demand type is created;

[0083] The scheduling module 603 is used to determine a plurality of service instances of different demand types to be created by the cloud server cluster within a preset time period in the future based on a first conditional probability corresponding to a service instance of each demand type and a second conditional probability corresponding to any two service instances of the demand types, and to schedule a plurality of hosts in the cloud server cluster based on the plurality of service instances of different demand types to be created.

[0084] According to one or more embodiments of the present disclosure, the determination module 602 determines the first conditional probability corresponding to the service instance of each demand type based on the historical instance information, specifically including: determining the total number of the multiple service instances based on the respective numbers corresponding to the service instances of the multiple demand types; for each service instance of the demand type, determining the ratio of the number corresponding to the service instance of the demand type to the total number, and using the ratio as the first conditional probability corresponding to the service instance of the demand type.

[0085] According to one or more embodiments of the present disclosure, the two demand types of service instances include a service instance of a first demand type and a service instance of a second demand type, wherein the service instance of the first demand type is the first service instance created, and the service instance of the second demand type is the second service instance created; accordingly, the determination module 602 determines the second conditional probability corresponding to any two demand types of service instances based on the historical instance information, specifically including: for any two demand types of service instances, selecting at least one first service instance group from the creation sequence of the multiple service instances, wherein the first service instance group includes two consecutively created service instances, and the first created service instance is the same as the service instance of the first demand type; selecting at least one second service instance group from the at least one first service instance group, wherein the second created service instance in the second service instance group is the same as the service instance of the second demand type; and determining the second conditional probability corresponding to the service instances of any two demand types based on the at least one first service instance group and the at least one second service instance group.

[0086] According to one or more embodiments of the present disclosure, the determination module 602 determines the second conditional probability corresponding to the service instances of any two demand types based on the at least one first service instance group and the at least one second service instance group, specifically including: determining a first quantity corresponding to the at least one first service instance group, and determining a second quantity corresponding to the at least one second service instance group; and determining the ratio of the second quantity to the first quantity as the second conditional probability corresponding to the service instances of any two demand types.

[0087] According to one or more embodiments of the present disclosure, the device also includes: an association module; the association module is used to establish an association relationship between a service instance of each demand type and a first conditional probability corresponding to the service instance of the demand type, and to establish an association relationship between any two service instances of the demand type and a second conditional probability corresponding to the any two service instances of the demand type.

[0088] According to one or more embodiments of the present disclosure, the scheduling module 603 determines multiple service instances of different demand types to be created by the cloud server cluster within a preset time period in the future based on the first conditional probability corresponding to each service instance of the demand type and the second conditional probability corresponding to any two service instances of the demand type, specifically including: determining the service instance of the first target demand type corresponding to the largest first conditional probability from the association relationship between the service instance of each demand type and the first conditional probability corresponding to the service instance of the demand type; determining the service instance of the second target demand type to be created after the service instance of the first target demand type based on the association relationship between the service instances of any two demand types and the second conditional probabilities corresponding to the service instances of any two demand types; and continuing to determine the service instance of the third target demand type to be created after the service instance of the second target demand type based on the association relationship between the service instances of any two demand types and the second conditional probabilities corresponding to the service instances of any two demand types, until the number of determined service instances reaches the preset number, thereby obtaining multiple service instances of different demand types to be created by the cloud server cluster within the preset time period in the future.

[0089] According to one or more embodiments of the present disclosure, the scheduling module 603 determines the service instance of the second target demand type to be created after the service instance of the first target demand type according to the association relationship between the service instances of any two demand types and the second conditional probabilities corresponding to the service instances of any two demand types, specifically including: selecting at least one first target service instance group from the service instances of any two demand types, wherein the first service instance created in the first target service instance group is the same as the service instance of the first target demand type; for each first target service instance group, determining the second conditional probabilities corresponding to the service instances of the two demand types included in the first target service instance group according to the association relationship between the service instances of any two demand types and the second conditional probabilities corresponding to the service instances of any two demand types; from the at least one first target service instance group, determining the second target service instance group corresponding to the largest second conditional probability, and using the second created service instance in the second target service instance group as the service instance of the second target demand type.

[0090] According to one or more embodiments of the present disclosure, the scheduling module 603 schedules multiple hosts in the cloud server cluster according to multiple service instances of different demand types to be created, specifically including: for each service instance of a demand type, selecting multiple candidate hosts from the multiple hosts whose remaining resource information is greater than the resource demand information corresponding to the service instance of the demand type; determining the candidate host with the smallest remaining resource information among the multiple candidate hosts as the target host corresponding to the service instance of the demand type, and creating the service instance of the demand type on the target host.

[0091] According to one or more embodiments of the present disclosure, the device also includes: a training module; the training module is used to determine the remaining resource change rate corresponding to the cloud server cluster; training a probability graph model according to the resource demand information corresponding to each of the multiple service instances of different demand types, the remaining resource information corresponding to each of the multiple hosts, and the remaining resource change rate corresponding to the cloud server cluster; wherein the probability graph model is used to predict the remaining resource change rate corresponding to the cloud server cluster.

[0092] The acquisition module 601, determination module 602 and scheduling module 603 are connected in sequence. The resource scheduling device provided in this embodiment can implement the technical solution of the above method embodiment, and its implementation principle and technical effect are similar, which will not be described in detail in this embodiment.

[0093] Figure 7 A schematic diagram of the hardware structure of an electronic device provided by an embodiment of the present disclosure. Figure 7 The electronic device 700 may be a terminal device or a server. The terminal device may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, personal digital assistants (PDAs), tablet computers (Portable Android Devices, PADs), portable multimedia players (Portable Media Players, PMPs), vehicle terminals (such as vehicle navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 7 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0094] like Figure 7As shown, the electronic device 700 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage device 708 to a random access memory (RAM) 703. Various programs and data required for the operation of the electronic device 700 are also stored in the RAM 703. The processing device 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.

[0095] Typically, the following devices may be connected to the I / O interface 705: input devices 706 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 707 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 708 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 709. The communication device 709 may allow the electronic device 700 to communicate with other devices wirelessly or by wire to exchange data. Figure 7 The electronic device 700 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.

[0096] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 709, or installed from a storage device 708, or installed from a ROM 702. When the computer program is executed by the processing device 701, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.

[0097] It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. Computer readable signal media may also be any computer readable medium other than computer readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0098] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0099] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device executes the method shown in the above embodiment.

[0100] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0101] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0102] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware. The name of a unit does not limit the unit itself in some cases. For example, the first acquisition unit may also be described as a "unit for acquiring at least two Internet Protocol addresses".

[0103] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary required types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0104] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0105] In a first aspect, according to one or more embodiments of the present disclosure, a resource scheduling method is provided, the method comprising:

[0106] Obtain historical instance information within a preset historical duration of the cloud server cluster, wherein the historical instance information includes one or more of the following: demand types of multiple created service instances, creation sequences of the multiple service instances, and quantities of service instances of multiple demand types respectively corresponding to each other;

[0107] Determine, based on the historical instance information, a first conditional probability corresponding to the service instance of each demand type, wherein the first conditional probability is used to represent the probability that the service instance of the demand type is the first service instance created within a preset time period in the future; and determine, based on the historical instance information, a second conditional probability corresponding to any two service instances of the demand type, wherein the second conditional probability is used to represent the probability of continuing to create a service instance of another demand type after creating a service instance of one demand type within a preset time period in the future;

[0108] Based on the first conditional probability corresponding to the service instance of each demand type and the second conditional probability corresponding to any two service instances of the demand types, determine the multiple service instances of different demand types to be created by the cloud server cluster within a future preset time period, and schedule the multiple hosts in the cloud server cluster based on the multiple service instances of different demand types to be created.

[0109] According to one or more embodiments of the present disclosure, determining the first conditional probability corresponding to the service instance of each demand type based on the historical instance information includes: determining the total number of the multiple service instances based on the respective corresponding numbers of the service instances of the multiple demand types; for each service instance of the demand type, determining the ratio of the number corresponding to the service instance of the demand type to the total number, and using the ratio as the first conditional probability corresponding to the service instance of the demand type.

[0110] According to one or more embodiments of the present disclosure, the two demand types of service instances include a service instance of a first demand type and a service instance of a second demand type, wherein the service instance of the first demand type is the first service instance created, and the service instance of the second demand type is the second service instance created; accordingly, determining the second conditional probability corresponding to any two demand types of service instances based on the historical instance information includes: for any two demand types of service instances, selecting at least one first service instance group from the creation sequence of the multiple service instances, wherein the first service instance group includes two consecutively created service instances, and the first created service instance is the same as the service instance of the first demand type; selecting at least one second service instance group from the at least one first service instance group, wherein the second created service instance in the second service instance group is the same as the service instance of the second demand type; and determining the second conditional probability corresponding to the service instances of any two demand types based on the at least one first service instance group and the at least one second service instance group.

[0111] According to one or more embodiments of the present disclosure, determining the second conditional probability corresponding to the service instances of any two demand types based on the at least one first service instance group and the at least one second service instance group includes: determining a first quantity corresponding to the at least one first service instance group, and determining a second quantity corresponding to the at least one second service instance group; and determining the ratio of the second quantity to the first quantity as the second conditional probability corresponding to the service instances of any two demand types.

[0112] According to one or more embodiments of the present disclosure, before determining multiple service instances of different demand types to be created by the cloud server cluster within a preset time period in the future based on the first conditional probability corresponding to the service instance of each demand type and the second conditional probability corresponding to any two service instances of the demand types, the method also includes: establishing an association relationship between the service instance of each demand type and the first conditional probability corresponding to the service instance of the demand type, and establishing an association relationship between any two service instances of the demand type and the second conditional probability corresponding to the any two service instances of the demand types.

[0113] According to one or more embodiments of the present disclosure, the method of determining multiple service instances of different demand types to be created by the cloud server cluster within a preset time period in the future based on the first conditional probability corresponding to the service instance of each demand type and the second conditional probability corresponding to any two service instances of the demand type includes: determining the service instance of the first target demand type corresponding to the largest first conditional probability from the association relationship between the service instance of each demand type and the first conditional probability corresponding to the service instance of the demand type; determining the service instance of the second target demand type to be created after the service instance of the first target demand type based on the association relationship between the service instances of any two demand types and the second conditional probabilities corresponding to the service instances of any two demand types; and continuing to determine the service instance of the third target demand type to be created after the service instance of the second target demand type based on the association relationship between the service instances of any two demand types and the second conditional probabilities corresponding to the service instances of any two demand types, until the number of determined service instances reaches the preset number, thereby obtaining multiple service instances of different demand types to be created by the cloud server cluster within the preset time period in the future.

[0114] According to one or more embodiments of the present disclosure, the method of determining a service instance of a second target demand type to be created after the service instance of the first target demand type based on the association relationship between the service instances of any two demand types and the second conditional probabilities corresponding to the service instances of any two demand types includes: selecting at least one first target service instance group from the service instances of any two demand types, wherein the first service instance created in the first target service instance group is the same as the service instance of the first target demand type; for each first target service instance group, determining the second conditional probabilities corresponding to the service instances of two demand types included in the first target service instance group based on the association relationship between the service instances of any two demand types and the second conditional probabilities corresponding to the service instances of any two demand types; and determining the second target service instance group corresponding to the largest second conditional probability from the at least one first target service instance group, and using the second created service instance in the second target service instance group as the service instance of the second target demand type.

[0115] According to one or more embodiments of the present disclosure, the scheduling of multiple hosts within the cloud server cluster according to multiple service instances of different demand types to be created includes: for each service instance of a demand type, selecting from the multiple hosts multiple candidate hosts whose remaining resource information is greater than the resource demand information corresponding to the service instance of the demand type; determining the candidate host with the smallest remaining resource information among the multiple candidate hosts as the target host corresponding to the service instance of the demand type, and creating the service instance of the demand type on the target host.

[0116] According to one or more embodiments of the present disclosure, after creating the service instance of the demand type on the target host, it also includes: determining the remaining resource change rate corresponding to the cloud server cluster; training a probability graph model based on the resource demand information corresponding to each of the multiple service instances of different demand types, the remaining resource information corresponding to each of the multiple hosts, and the remaining resource change rate corresponding to the cloud server cluster; wherein the probability graph model is used to predict the remaining resource change rate corresponding to the cloud server cluster.

[0117] In a second aspect, according to one or more embodiments of the present disclosure, a resource scheduling device is provided, the device comprising:

[0118] An acquisition module is used to acquire historical instance information within a preset historical duration of a cloud server cluster, wherein the historical instance information includes one or more of the following: demand types of multiple service instances that have been created, creation sequences of the multiple service instances, and the number of service instances of multiple demand types that respectively correspond to each other;

[0119] A determination module, configured to determine, based on the historical instance information, a first conditional probability corresponding to a service instance of each demand type, wherein the first conditional probability is used to represent the probability that the service instance of the demand type is the first service instance created within a preset time period in the future; and, based on the historical instance information, determine a second conditional probability corresponding to any two service instances of the demand type, wherein the second conditional probability is used to represent the probability that after creating a service instance of a demand type within a preset time period in the future, another service instance of the demand type is created;

[0120] The scheduling module is used to determine multiple service instances of different demand types to be created by the cloud server cluster within a preset time period in the future based on a first conditional probability corresponding to a service instance of each demand type and a second conditional probability corresponding to any two service instances of different demand types, and schedule multiple hosts in the cloud server cluster based on the multiple service instances of different demand types to be created.

[0121] According to one or more embodiments of the present disclosure, the determination module determines the first conditional probability corresponding to the service instance of each demand type based on the historical instance information, specifically including: determining the total number of the multiple service instances based on the respective corresponding numbers of the service instances of the multiple demand types; for each service instance of the demand type, determining the ratio of the number corresponding to the service instance of the demand type to the total number, and using the ratio as the first conditional probability corresponding to the service instance of the demand type.

[0122] According to one or more embodiments of the present disclosure, the two demand types of service instances include a service instance of a first demand type and a service instance of a second demand type, wherein the service instance of the first demand type is the first service instance created, and the service instance of the second demand type is the second service instance created; accordingly, the determination module determines the second conditional probability corresponding to any two demand types of service instances based on the historical instance information, specifically including: for any two demand types of service instances, selecting at least one first service instance group from the creation sequence of the multiple service instances, wherein the first service instance group includes two consecutively created service instances, and the first created service instance is the same as the service instance of the first demand type; selecting at least one second service instance group from the at least one first service instance group, wherein the second created service instance in the second service instance group is the same as the service instance of the second demand type; and determining the second conditional probability corresponding to the service instances of any two demand types based on the at least one first service instance group and the at least one second service instance group.

[0123] According to one or more embodiments of the present disclosure, the determination module determines the second conditional probability corresponding to the service instances of any two demand types based on the at least one first service instance group and the at least one second service instance group, specifically including: determining a first quantity corresponding to the at least one first service instance group, and determining a second quantity corresponding to the at least one second service instance group; and determining the ratio of the second quantity to the first quantity as the second conditional probability corresponding to the service instances of any two demand types.

[0124] According to one or more embodiments of the present disclosure, the device also includes: an association module; the association module is used to establish an association relationship between a service instance of each demand type and a first conditional probability corresponding to the service instance of the demand type, and to establish an association relationship between any two service instances of the demand type and a second conditional probability corresponding to the any two service instances of the demand type.

[0125] According to one or more embodiments of the present disclosure, the scheduling module determines multiple service instances of different demand types to be created by the cloud server cluster within a preset time period in the future based on the first conditional probability corresponding to each service instance of the demand type and the second conditional probability corresponding to any two service instances of the demand type, specifically including: determining the service instance of the first target demand type corresponding to the largest first conditional probability from the association relationship between the service instance of each demand type and the first conditional probability corresponding to the service instance of the demand type; determining the service instance of the second target demand type to be created after the service instance of the first target demand type based on the association relationship between the service instances of any two demand types and the second conditional probabilities corresponding to the service instances of any two demand types; and continuing to determine the service instance of the third target demand type to be created after the service instance of the second target demand type based on the association relationship between the service instances of any two demand types and the second conditional probabilities corresponding to the service instances of any two demand types, until the number of determined service instances reaches the preset number, thereby obtaining multiple service instances of different demand types to be created by the cloud server cluster within the preset time period in the future.

[0126] According to one or more embodiments of the present disclosure, the scheduling module determines the service instance of the second target demand type to be created after the service instance of the first target demand type based on the association relationship between the service instances of any two demand types and the second conditional probabilities corresponding to the service instances of any two demand types, specifically including: selecting at least one first target service instance group from the service instances of any two demand types, wherein the first service instance created in the first target service instance group is the same as the service instance of the first target demand type; for each first target service instance group, determining the second conditional probabilities corresponding to the service instances of two demand types included in the first target service instance group based on the association relationship between the service instances of any two demand types and the second conditional probabilities corresponding to the service instances of any two demand types; from the at least one first target service instance group, determining the second target service instance group corresponding to the largest second conditional probability, and using the second created service instance in the second target service instance group as the service instance of the second target demand type.

[0127] According to one or more embodiments of the present disclosure, the scheduling module schedules multiple hosts within the cloud server cluster according to multiple service instances of different demand types to be created, specifically including: for each service instance of a demand type, selecting from the multiple hosts multiple candidate hosts whose remaining resource information is greater than the resource demand information corresponding to the service instance of the demand type; determining the candidate host with the smallest remaining resource information among the multiple candidate hosts as the target host corresponding to the service instance of the demand type, and creating the service instance of the demand type on the target host.

[0128] According to one or more embodiments of the present disclosure, the device also includes: a training module; the training module is used to determine the remaining resource change rate corresponding to the cloud server cluster; training a probability graph model according to the resource demand information corresponding to each of the multiple service instances of different demand types, the remaining resource information corresponding to each of the multiple hosts, and the remaining resource change rate corresponding to the cloud server cluster; wherein the probability graph model is used to predict the remaining resource change rate corresponding to the cloud server cluster.

[0129] In a third aspect, according to one or more embodiments of the present disclosure, there is provided an electronic device, comprising: a processor, and a memory communicatively connected to the processor;

[0130] The memory stores computer-executable instructions;

[0131] The processor executes the computer-executable instructions stored in the memory to implement the resource scheduling method as described in the first aspect and various possible designs of the first aspect.

[0132] In a fourth aspect, according to one or more embodiments of the present disclosure, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer execution instructions. When a processor executes the computer execution instructions, the resource scheduling method described in the first aspect and various possible designs of the first aspect is implemented.

[0133] In a fifth aspect, an embodiment of the present disclosure provides a computer program product, including a computer program, which, when executed by a processor, implements the resource scheduling method described in the first aspect and various possible designs of the first aspect.

[0134] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.

[0135] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.

[0136] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.

Claims

1. A resource scheduling method, characterized in that: include: Obtain historical instance information within a preset historical duration of the cloud server cluster, wherein the historical instance information includes one or more of the following: demand types of multiple created service instances, creation sequences of the multiple service instances, and quantities of service instances of multiple demand types respectively corresponding to each other; Determine, based on the number of service instances of each demand type in the historical instance information, a first conditional probability corresponding to the service instance of each demand type, wherein the first conditional probability is used to represent the probability that the service instance of the demand type is the first service instance created within a preset time period in the future; and, based on the creation sequence of multiple service instances in the historical instance information, determine a second conditional probability corresponding to any two service instances of the demand type, wherein the second conditional probability is used to represent the probability of continuing to create a service instance of another demand type after creating a service instance of one demand type within a preset time period in the future; Based on the first conditional probability corresponding to the service instance of each demand type and the second conditional probability corresponding to any two service instances of the demand types, determine the multiple service instances of different demand types to be created by the cloud server cluster within a preset time period in the future, and schedule the multiple hosts in the cloud server cluster according to the resource demand information corresponding to the multiple service instances of different demand types to be created.

2. The method according to claim 1, characterized in that The determining, according to the historical instance information, a first conditional probability corresponding to the service instance of each demand type includes: Determining the total number of the multiple service instances according to the respective numbers of the service instances of the multiple demand types; For each service instance of a demand type, a ratio of the number of service instances of the demand type to the total number is determined, and the ratio is used as a first conditional probability corresponding to the service instance of the demand type.

3. The method according to claim 1, characterized in that The two service instances of the demand types include a service instance of a first demand type and a service instance of a second demand type, wherein the service instance of the first demand type is the first service instance created, and the service instance of the second demand type is the second service instance created; Accordingly, determining the second conditional probability corresponding to any two service instances of the demand type according to the historical instance information includes: For any two service instances of the required type, selecting at least one first service instance group from the creation sequence of the multiple service instances, wherein the first service instance group includes two consecutively created service instances, and the first created service instance is the same as the service instance of the first required type; Selecting at least one second service instance group from the at least one first service instance group, wherein the second created service instance in the second service instance group is the same as the service instance of the second demand type; A second conditional probability corresponding to the service instances of any two demand types is determined according to the at least one first service instance group and the at least one second service instance group.

4. The method according to claim 3, characterized in that The determining, according to the at least one first service instance group and the at least one second service instance group, a second conditional probability corresponding to the service instances of any two demand types includes: Determine a first quantity corresponding to the at least one first service instance group, and determine a second quantity corresponding to the at least one second service instance group; The ratio of the second number to the first number is determined as a second conditional probability corresponding to the service instances of any two demand types.

5. The method according to claim 1, characterized in that Before determining, based on the first conditional probability corresponding to each service instance of the demand type and the second conditional probability corresponding to any two service instances of the demand types, a plurality of service instances of different demand types to be created by the cloud server cluster within a preset time period in the future, the method further includes: An association relationship is established between a service instance of each demand type and a first conditional probability corresponding to the service instance of the demand type, and an association relationship is established between any two service instances of the demand type and a second conditional probability corresponding to the service instances of the any two demand types.

6. The method according to claim 5, characterized in that The determining, according to the first conditional probability corresponding to each service instance of the demand type and the second conditional probability corresponding to any two service instances of the demand types, a plurality of service instances of different demand types to be created by the cloud server cluster within a preset time period in the future, includes: Determine, from the association relationship between the service instance of each demand type and the first conditional probability corresponding to the service instance of the demand type, the service instance of the first target demand type corresponding to the largest first conditional probability; Determine, according to the association relationship between the service instances of any two demand types and the second conditional probabilities corresponding to the service instances of any two demand types, a service instance of a second target demand type to be created after the service instance of the first target demand type; Continue to determine the service instances of the third target demand type to be created after the service instances of the second target demand type based on the association relationship between the service instances of any two demand types and the second conditional probabilities corresponding to the service instances of any two demand types, until the number of determined service instances reaches a preset number, and obtain multiple service instances of different demand types to be created by the cloud server cluster within a future preset time period.

7. The method according to claim 6, characterized in that The determining, according to the association relationship between the service instances of any two demand types and the second conditional probabilities corresponding to the service instances of any two demand types, a service instance of a second target demand type to be created after the service instance of the first target demand type includes: Selecting at least one first target service instance group from any two service instances of the demand type, wherein the first created service instance in the first target service instance group is the same as the service instance of the first target demand type; For each first target service instance group, determining the second conditional probabilities corresponding to the two service instances of the demand types included in the first target service instance group according to the association relationship between the service instances of any two demand types and the second conditional probabilities corresponding to the service instances of any two demand types; A second target service instance group corresponding to the largest second conditional probability is determined from the at least one first target service instance group, and a second created service instance in the second target service instance group is used as a service instance of the second target demand type.

8. The method according to claim 1, characterized in that The step of scheduling multiple hosts in the cloud server cluster according to multiple service instances of different demand types to be created includes: For each service instance of the demand type, selecting from the multiple hosts multiple candidate hosts whose remaining resource information is greater than the resource demand information corresponding to the service instance of the demand type; A candidate host with the smallest remaining resource information among the multiple candidate hosts is determined as a target host corresponding to the service instance of the demand type, and a service instance of the demand type is created on the target host.

9. The method according to claim 8, characterized in that After creating the service instance of the required type on the target host, the method further includes: Determine the remaining resource change rate corresponding to the cloud server cluster; A probability graph model is trained based on the resource demand information corresponding to each of the multiple service instances of different demand types, the remaining resource information corresponding to each of the multiple hosts, and the remaining resource change rate corresponding to the cloud server cluster; wherein the probability graph model is used to predict the remaining resource change rate corresponding to the cloud server cluster.

10. A resource scheduling device, characterized in that: include: The acquisition module is used to obtain historical instance information within a preset period of time of the cloud server cluster, wherein the historical instance information includes one or more of the following: the demand types of multiple service instances that have been created, the creation sequence of the multiple service instances, and the number of service instances of multiple demand types that respectively correspond to each other A determination module, configured to determine a first conditional probability corresponding to a service instance of each demand type according to the number of service instances of each demand type in the historical instance information, wherein the first conditional probability is used to represent the probability that the service instance of the demand type is the first service instance created within a preset time period in the future; and, based on a creation sequence of multiple service instances in the historical instance information, determine a second conditional probability corresponding to any two service instances of the demand type, wherein the second conditional probability is used to represent the probability of continuing to create a service instance of another demand type after creating a service instance of one demand type within a preset time period in the future; The scheduling module is used to determine multiple service instances of different demand types to be created by the cloud server cluster within a preset time period in the future based on a first conditional probability corresponding to a service instance of each demand type and a second conditional probability corresponding to any two service instances of different demand types, and schedule multiple hosts in the cloud server cluster based on resource demand information corresponding to each of the multiple service instances of different demand types to be created.

11. An electronic device, characterized in that: include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the resource scheduling method according to any one of claims 1 to 9.

12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and when the processor executes the computer-executable instructions, the resource scheduling method according to any one of claims 1 to 9 is implemented.

13. A computer program product, characterized in that It comprises a computer program, which, when executed by a processor, implements the resource scheduling method as claimed in any one of claims 1 to 9.