Cloud resource scheduling method and device, storage medium, and electronic device

The cloud resource scheduling strategy is determined through word vector training and KNN algorithm, which solves the problems of low stability and low efficiency of cloud resource scheduling in the existing technology, and achieves optimal scheduling that takes into account both security and economy in a multi-cloud environment.

CN115309534BActive Publication Date: 2024-09-03CHINA TELECOM CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211086094.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-06
Publication Date
2024-09-03
Estimated Expiration
2042-09-06

AI Technical Summary

Technical Problem

In the existing technology, intelligent scheduling technology has room for improvement in the stability of cloud resource scheduling and multi-cloud resource utilization efficiency. In particular, it is difficult to take into account both security and economy in integration and scheduling management in a multi-cloud environment.

Method used

Through word vector training based on historical cloud resource scheduling requests, word segmentation dictionaries and vector tables are obtained, and combined with the KNN algorithm, the nearest neighbor cloud resource scheduling requests are determined from the sample cloud resource scheduling requests, and then the cloud resource scheduling strategy is determined to reduce the interference of human subjective factors. , improve scheduling stability and efficiency.

Benefits of technology

It achieves the stability of cloud resource scheduling and improves the utilization efficiency of multi-cloud resources, takes into account the security and economy of multi-cloud resources, and optimizes the integration and scheduling management of cloud resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115309534B
    Figure CN115309534B
Patent Text Reader

Abstract

The present disclosure relates to the field of network and information security, and in particular to a cloud resource scheduling method and device, a storage medium, and an electronic device. The cloud resource scheduling method includes: obtaining a word segmentation dictionary and a vector table corresponding to a cloud resource scheduling request; selecting multiple sample cloud resource scheduling requests according to the current cloud resource scheduling request, and determining the first vector corresponding to the current cloud resource scheduling request and the second vector corresponding to each of the sample cloud resource scheduling requests based on the word segmentation dictionary and the vector table; determining the nearest neighbor cloud resource scheduling request from the sample cloud resource scheduling request according to the distance between the first vector and each of the second vectors; and determining the cloud resource scheduling policy corresponding to the current cloud resource scheduling request according to the cloud resource scheduling policy corresponding to the nearest neighbor cloud resource scheduling request. The present disclosure can improve the stability of cloud resource scheduling and the utilization efficiency of multi-cloud resources to a certain extent.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of network and information security technology, and in particular to a cloud resource scheduling method, a cloud resource scheduling device, a non-volatile computer-readable storage medium, and an electronic device. Background Art

[0002] Cloud technology refers to a hosting technology that unifies hardware, software, network and other resources within a wide area network or local area network to achieve data computing, storage, processing and sharing. At present, cloud technology has been widely used in various industries.

[0003] In the existing technology, some enterprises have built a variety of different cloud resources due to historical reasons or regulatory requirements. In this way, they will face the problem of multi-cloud scheduling and management, that is, how to integrate and use these different cloud resources safely and efficiently.

[0004] However, there is still room for improvement in the existing intelligent scheduling technology solutions in terms of scheduling stability and utilization efficiency of multi-cloud resources.

[0005] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention

[0006] The present disclosure provides a cloud resource scheduling method and device, a non-volatile computer-readable storage medium, and an electronic device, thereby improving the stability of cloud resource scheduling and the utilization efficiency of multi-cloud resources at least to a certain extent.

[0007] According to one aspect of the present disclosure, a cloud resource scheduling method is provided, the method comprising:

[0008] Perform word vector training based on multiple historical cloud resource scheduling requests to obtain the word segmentation dictionary and vector table corresponding to the cloud resource scheduling requests;

[0009] Selecting a plurality of sample cloud resource scheduling requests according to the current cloud resource scheduling request, and determining a first vector corresponding to the current cloud resource scheduling request and a second vector corresponding to each of the sample cloud resource scheduling requests based on the word segmentation dictionary and the vector table;

[0010] Determine a nearest neighbor cloud resource scheduling request from the sample cloud resource scheduling requests according to the distance between the first vector and each of the second vectors;

[0011] According to the cloud resource scheduling policy corresponding to the nearest neighbor cloud resource scheduling request, determine the cloud resource scheduling policy corresponding to the current cloud resource scheduling request.

[0012] In an exemplary embodiment of the present disclosure, the word vector training based on multiple historical cloud resource scheduling requests includes:

[0013] Convert each of the historical cloud resource scheduling requests into a corresponding first token sequence;

[0014] Word vector training is performed based on the first token sequence to obtain a vectorized representation of each token in the first token sequence to obtain the word segmentation dictionary and vector table.

[0015] In an exemplary embodiment of the present disclosure, the selecting a plurality of sample cloud resource scheduling requests according to the current cloud resource scheduling request includes:

[0016] Taking a cloud resource scheduling request of the same category as the current cloud resource scheduling request as a candidate cloud resource scheduling request;

[0017] Randomly extracting a seed cloud resource scheduling request from the candidate cloud resource scheduling requests;

[0018] Taking the seed cloud resource scheduling request as the center, multiple consecutive candidate cloud resource scheduling requests are selected as the sample cloud resource scheduling requests according to a window with a preset step size.

[0019] In an exemplary embodiment of the present disclosure, the determining the first vector corresponding to the current cloud resource scheduling request includes:

[0020] Convert the current cloud resource scheduling request into a second token sequence;

[0021] According to the word segmentation dictionary and the vector table, a vectorized representation of each token in the second token sequence is determined to obtain a first vector corresponding to the current cloud resource scheduling request.

[0022] In an exemplary embodiment of the present disclosure, the determining the second vector corresponding to each of the sample cloud resource scheduling requests includes:

[0023] Convert each of the current cloud resource scheduling requests into a corresponding third token sequence;

[0024] According to the word segmentation dictionary and the vector table, a vectorized representation of each token in each of the third token sequences is determined to obtain a second vector corresponding to each of the sample cloud resource scheduling requests.

[0025] In an exemplary embodiment of the present disclosure, the determining the nearest neighbor cloud resource scheduling request from the sample cloud resource scheduling request includes:

[0026] Get the preset quantity;

[0027] The preset number of second vectors that are closest to the first vector are determined, and the sample cloud resource scheduling requests corresponding to the determined second vectors are determined as the nearest neighbor cloud resource scheduling requests.

[0028] In an exemplary embodiment of the present disclosure, determining the cloud resource scheduling policy corresponding to the current cloud resource scheduling request according to the cloud resource scheduling policy corresponding to the nearest neighbor cloud resource scheduling request includes:

[0029] Counting the number of occurrences of each of the cloud resource scheduling strategies corresponding to the nearest neighbor cloud resource scheduling request;

[0030] The cloud resource scheduling strategy that appears the most times is used as the cloud resource scheduling strategy corresponding to the current cloud resource scheduling request.

[0031] According to one aspect of the present disclosure, a cloud resource scheduling device is provided, the device comprising:

[0032] The word vector training module is used to perform word vector training based on multiple historical cloud resource scheduling requests to obtain the word segmentation dictionary and vector table corresponding to the cloud resource scheduling requests;

[0033] A vector calculation module, configured to select a plurality of sample cloud resource scheduling requests according to the current cloud resource scheduling request, and determine a first vector corresponding to the current cloud resource scheduling request and a second vector corresponding to each of the sample cloud resource scheduling requests based on the word segmentation dictionary and the vector table;

[0034] A scheduling strategy determination module is used to determine the nearest neighbor cloud resource scheduling request from the sample cloud resource scheduling requests based on the distance between the first vector and each of the second vectors; and to determine the cloud resource scheduling policy corresponding to the current cloud resource scheduling request based on the cloud resource scheduling policy corresponding to the nearest neighbor cloud resource scheduling request.

[0035] According to one aspect of the present disclosure, an electronic device is provided, comprising: a processor; and a memory for storing one or more programs, which, when executed by the processor, enables the processor to implement the method provided in some aspects of the present disclosure.

[0036] According to one aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the program is executed by a processor, the method provided in some aspects of the present disclosure is implemented.

[0037] The exemplary embodiments of the present disclosure may have some or all of the following beneficial effects:

[0038] In the cloud resource scheduling method provided in the exemplary embodiment of the present disclosure, firstly, a word segmentation dictionary and a vector table corresponding to the cloud resource scheduling request are trained; then, multiple sample cloud resource scheduling requests are selected according to the current cloud resource scheduling request, and the first vector corresponding to the current cloud resource scheduling request and the second vector corresponding to each sample cloud resource scheduling request are determined based on the word segmentation dictionary and the vector table; finally, in combination with the idea of ​​the KNN algorithm, the nearest neighbor cloud resource scheduling request is determined from the sample cloud resource scheduling request according to the distance between the first vector and each second vector, and then the cloud resource scheduling policy corresponding to the nearest neighbor cloud resource scheduling request can be determined. Compared with the prior art, on the one hand, since scheduling is performed through an artificial intelligence algorithm, the interference of human subjective factors is reduced, so the scheduling stability is good; moreover, the scheduling efficiency is also higher, and thus the utilization efficiency of multi-cloud resources can be improved. On the other hand, when the sample cloud resource scheduling request takes into account the security and economic requirements of multi-cloud resources, the cloud resource scheduling policy determined according to the nearest neighbor cloud resource scheduling request can also take into account the security and economy of multi-cloud resource scheduling, thereby achieving better cloud resource scheduling.

[0039] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] The accompanying drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the specification are used to explain the principles of the present disclosure. Obviously, the accompanying drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without creative work.

[0041] Figure 1 A schematic diagram of an application scenario of the cloud resource scheduling method in an embodiment of the present disclosure is shown.

[0042] Figure 2 A flow chart of a cloud resource scheduling method in an embodiment of the present disclosure is shown.

[0043] Figure 3 A schematic diagram of a process of converting a token sequence into a vector in an embodiment of the present disclosure is shown.

[0044] Figure 4 A schematic diagram of a process for selecting a sample cloud resource request in an embodiment of the present disclosure is shown.

[0045] Figure 5 A schematic diagram of the process of converting a sample cloud resource request vector in an embodiment of the present disclosure is shown.

[0046] Figure 6 A schematic diagram of a process for determining a nearest neighbor cloud resource request in an embodiment of the present disclosure is shown.

[0047] Figure 7 A schematic diagram of fields of multiple sample cloud resource requests in an embodiment of the present disclosure is shown.

[0048] Figure 8 A module schematic diagram of a cloud resource scheduling device in an embodiment of the present disclosure is shown.

[0049] Fig. 9 A schematic diagram of the structure of a computer system for implementing an electronic device according to an embodiment of the present disclosure is shown. DETAILED DESCRIPTION

[0050] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that the disclosure will be more comprehensive and complete and to fully convey the concepts of the example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.

[0051] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor devices and / or microcontroller devices.

[0052] It should be noted that in the present disclosure, the terms “including”, “configured with”, and “set on” are used to express an open-ended inclusion meaning, and mean that other elements / components / etc. may exist in addition to the listed elements / components / etc.

[0053] Figure 1 The schematic diagram of an application scenario to which the cloud resource scheduling method of the embodiment of the present disclosure can be applied is shown. In the application scenario, a cloud management platform 101, private cloud resources 102, and industry cloud resources or public cloud resources 103, 104, and 105 can be included.

[0054] To optimize costs, cloud resource scheduling in multi-cloud scenarios can follow the following general principles:

[0055] First, private cloud resources are scheduled for use first. That is, when private cloud resources are insufficient, they are scheduled to industry cloud resources or public cloud resources. Using private cloud resources can save costs; however, enterprise private cloud resources are often limited, so in some cases they need to be scheduled to industry cloud resources or public cloud resources. For example, for some temporary major promotional activities, some application instances can be scheduled to public cloud resources through the cloud management platform at the PaaS (Platform as a Service) layer.

[0056] Second, sort by the billing cost of industry cloud resources or public cloud resources, and prioritize the industry cloud resources or public cloud resources with low charges. Since the cost of each industry cloud resource or public cloud resource may be different, and the charges may change at different times, charge management is an important capability of the cloud management platform, which can better manage and optimize costs.

[0057] Third, the security capabilities of industry cloud resources or public cloud resources are evaluated according to the business or data security level, and calculated as a cloud resource scheduling parameter metric. It is very important and critical to use industry cloud resources or public cloud resources to ensure data security; especially for large enterprises, the value of data is often far greater than the cost saved by using industry cloud resources or public cloud resources. Therefore, data security capability is an important indicator for evaluating industry cloud resources or public cloud resources.

[0058] Fourth, evaluate the reliability and resource effectiveness of industry cloud resources or public cloud resources and calculate them as scheduling parameter metrics. Some public clouds have experienced major failures, resulting in irreparable losses such as customer data loss. Therefore, from the perspective of disaster recovery and high availability, multi-cloud deployment is also needed to avoid risks. Therefore, when choosing a suitable public cloud, it is also necessary to measure the effectiveness (availability, performance, etc.) and reliability (failure frequency, impact of major failures, etc.) of the resources provided by industry cloud resources or public cloud resources.

[0059] In order to implement intelligent scheduling of multi-cloud scenario resources according to cloud resource scheduling requirements and in accordance with the principle of safe and economic scheduling of multi-cloud resources, this exemplary embodiment provides a cloud resource scheduling method; the cloud resource scheduling method can be run on the above-mentioned cloud management platform 101, or on other cloud resource scheduling servers. Figure 2 As shown, the cloud resource scheduling method provided in this example implementation may include the following steps S220 to S240. Among them:

[0060] Step S210: Perform word vector training based on multiple historical cloud resource scheduling requests to obtain a word segmentation dictionary and a vector table corresponding to the cloud resource scheduling requests;

[0061] Step S220: selecting a plurality of sample cloud resource scheduling requests according to the current cloud resource scheduling request, and determining a first vector corresponding to the current cloud resource scheduling request and a second vector corresponding to each of the sample cloud resource scheduling requests based on the word segmentation dictionary and the vector table;

[0062] Step S230: determining a nearest neighbor cloud resource scheduling request from the sample cloud resource scheduling requests according to the distance between the first vector and each of the second vectors;

[0063] Step S240: Determine the cloud resource scheduling policy corresponding to the current cloud resource scheduling request according to the cloud resource scheduling policy corresponding to the nearest neighbor cloud resource scheduling request.

[0064] Based on the cloud resource scheduling method provided in this exemplary embodiment, on the one hand, since scheduling is performed through an artificial intelligence algorithm, the interference of human subjective factors is reduced, so the scheduling stability is good; moreover, the scheduling efficiency is also higher, which can also improve the utilization efficiency of multi-cloud resources. On the other hand, when the sample cloud resource scheduling request takes into account the security and economic requirements of multi-cloud resources, the cloud resource scheduling strategy determined according to the nearest neighbor cloud resource scheduling request can also take into account the security and economy of multi-cloud resource scheduling, thereby achieving better cloud resource scheduling.

[0065] Below, each step of the cloud resource scheduling method in this exemplary embodiment will be described in more detail with reference to the accompanying drawings and embodiments.

[0066] In step S210, word vector training is performed based on multiple historical cloud resource scheduling requests to obtain a word segmentation dictionary and a vector table corresponding to the cloud resource scheduling requests.

[0067] In this exemplary embodiment, multiple historical cloud resource scheduling requests can be obtained through the cloud resource scheduling log. The cloud resource scheduling log may include a cloud resource scheduling request and a cloud resource scheduling policy corresponding to the cloud resource scheduling request. In addition, the cloud resource scheduling request may be an actual scheduling request, or a cloud resource scheduling request obtained through simulation or other means, and this exemplary embodiment does not impose any special restrictions on this.

[0068] After obtaining a large number of historical cloud resource scheduling requests, each of the historical cloud resource scheduling requests can be converted into a corresponding first token sequence. For example, a resource scheduling request can include multiple fields and field contents. In this exemplary embodiment, the field contents in the resource scheduling request can first be generalized by regularization rules and other methods; then, multiple tokens can be obtained through natural language processing such as word segmentation.

[0069] For example, when segmenting the field content "China Telecom Research Institute", we first get three terms "China", "Telecom" and "Research Institute" at a fine-grained level. A token is composed of one or more adjacent terms. For example, "China" and "Telecom" form a token "China Telecom", and "Research Institute" itself is a token; thus, we get two tokens.

[0070] The tokens of all field contents constitute the first token sequence corresponding to the resource scheduling request. After obtaining the first token sequence corresponding to each resource scheduling request, word vector training can be performed based on the first token sequence.

[0071] In this exemplary embodiment, static word vector training can be performed through models such as Word2Vec, GloVe or FastText, or dynamic word vector training can be performed through models such as ELMo or BERT. After completing the model training, the word segmentation dictionary and vector table can be obtained.

[0072] Taking Word2Vec as an example, each token can be represented as a sparse word vector in one-hot form. Then, each one-hot sparse word vector is mapped into a p-dimensional dense vector (p is usually several hundred) through a layer-by-layer neural network (such as CBOW or Skip-gram). During the training process, the model training speed can also be accelerated through methods such as hierarchical Softmax, negative sampling, and Huffman tree.

[0073] refer to Figure 3 As shown, the token sequence includes [T0, T1, ... Ta, ... Tb, ... Tc, ... Tn-1, Tn]; where a, b, c, n are all integers, and n is the number of token sequences. For the token sequence Ta, assuming that it includes q tokens, each token can be represented by a p-dimensional vector, then the token sequence Ta can be represented as a p×q-dimensional vector.

[0074] In addition, in order to reduce the amount of computation and better comply with the security and economic principles that cloud resource scheduling in a multi-cloud scenario needs to follow, this exemplary embodiment can only convert the content of a specific field in the resource scheduling request into the first token sequence; that is, the most important key field features are selected as a reference for cloud resource scheduling. The specific fields to be selected can be determined based on experience or actual test results, and this exemplary embodiment does not impose any special restrictions on this.

[0075] For example, you can choose fields that are closely related to the principles of safety and economy. <C x_free_space>, <C x _safety_level> and <C x _unit price> as the key field, and convert the content of the key field into the first token sequence. The above field names are all generalized field names, C x is the cloud resource identifier, free_space indicates the utilization rate of the cloud resource economic indicators, safety_level indicates the cloud resource safety level, and unit price indicates the unit price of the cloud resource.

[0076] In step S220, multiple sample cloud resource scheduling requests are selected according to the current cloud resource scheduling request, and based on the word segmentation dictionary and the vector table, a first vector corresponding to the current cloud resource scheduling request and a second vector corresponding to each of the sample cloud resource scheduling requests are determined.

[0077] In this exemplary embodiment, the cloud resource scheduling strategies corresponding to the sample cloud resource scheduling requests all take into account the security and economic principles of the above-mentioned multi-cloud resources. Figure 4 As shown, in this exemplary embodiment, multiple sample cloud resource scheduling requests can be selected through the following steps S410 to S430. Among them:

[0078] In step S410, a cloud resource scheduling request of the same category as the current cloud resource scheduling request is used as a candidate cloud resource scheduling request. For example, if the category of the current cloud resource scheduling request is private cloud resource scheduling, then the private cloud resource scheduling request is selected as the candidate cloud resource scheduling request from the existing cloud resource scheduling requests. If the category of the current cloud resource scheduling request is public cloud resource scheduling, then the public cloud resource scheduling request is selected as the candidate cloud resource scheduling request from the existing cloud resource scheduling requests.

[0079] In step S420, a seed cloud resource scheduling request is randomly extracted from the candidate cloud resource scheduling request. For example, at least one seed cloud resource scheduling request can be randomly extracted from the candidate cloud resource scheduling request through a random function. The number of random numbers can be a fixed value or can be dynamically changed according to the total number of candidate cloud resource scheduling requests and the step size of the following window.

[0080] In step S430, taking the seed cloud resource scheduling request as the center, multiple consecutive candidate cloud resource scheduling requests are selected as the sample cloud resource scheduling requests according to a preset step window. In this exemplary embodiment, the preset step can be a fixed value, or it can be dynamically changed according to the total amount of candidate cloud resource scheduling requests and the number of the random numbers, so as to ensure that the sample cloud resource scheduling requests reach a sufficient number or the proportion of the sample cloud resource scheduling requests reaches a certain proportion value.

[0081] It should be noted that in other exemplary embodiments of the present disclosure, sample cloud resource scheduling requests can also be determined by other means; for example, directly randomly selecting multiple sample cloud resource scheduling requests from the candidate cloud resource scheduling requests as sample cloud resource scheduling requests; for example, when the number of the candidate cloud resource scheduling requests is small, directly taking all the candidate cloud resource scheduling requests as sample cloud resource scheduling requests; these also fall within the protection scope of the present disclosure.

[0082] In this exemplary embodiment, the first vector corresponding to the current cloud resource scheduling request may be determined in the following manner:

[0083] First, the current cloud resource scheduling request is converted into a second token sequence. This step is similar to the step of obtaining the first token sequence in step S210, so it will not be repeated here.

[0084] Secondly, according to the word segmentation dictionary and the vector table, determine the vectorized representation of each token in the second token sequence to obtain the first vector corresponding to the current cloud resource scheduling request. For example, for each token in the second token sequence, determine the p-dimensional dense vector corresponding to the token by querying the vector table; assuming that the second token sequence includes q tokens, the second token sequence can be represented as a p×q-dimensional matrix vector; in order to facilitate subsequent operations, the matrix vector can be flattened into an m-dimensional first vector, m=p×q.

[0085] In this exemplary embodiment, the second vector corresponding to each of the sample cloud resource scheduling requests may be determined in the following manner:

[0086] First, each of the current cloud resource scheduling requests is converted into a corresponding third token sequence; this step is similar to the step of obtaining the first token sequence in step S210, so it will not be repeated here.

[0087] Secondly, according to the word segmentation dictionary and the vector table, the vectorized representation of each token in each of the third token sequences is determined to obtain the second vector corresponding to each of the sample cloud resource scheduling requests. For example, for each token in a third token sequence, the p-dimensional dense vector corresponding to the token is determined by querying the vector table; assuming that the third token sequence includes q tokens, the third token sequence can be represented as a p×q-dimensional matrix vector; in order to facilitate subsequent operations, the matrix vector can be flattened into an m-dimensional second vector, m=p×q.

[0088] For example, refer to Figure 5As shown, there are a total of win sample cloud resource scheduling requests; the number of seed cloud resource scheduling requests is 1, and win is the preset step size of the window in the above step S430. The second vectors corresponding to the win sample cloud resource scheduling requests are respectively m-dimensional vectors O1, ... O i ,……O win .

[0089] It should be noted that, in some exemplary embodiments, the sample cloud resource scheduling request may also be derived from the historical cloud resource scheduling request in step S210 rather than a new cloud resource scheduling request. In this case, it is not necessary to calculate the corresponding second vector again.

[0090] In step S230, the nearest neighbor cloud resource scheduling request is determined from the sample cloud resource scheduling requests according to the distance between the first vector and each of the second vectors.

[0091] In this exemplary embodiment, a preset number K is first obtained; if the preset number K is too large, the amount of computation will increase, and if it is too small, it may be impossible to determine a suitable cloud resource scheduling strategy later. According to the inventor's practice, K is usually not greater than 20, and an odd number is preferred, such as K=3.

[0092] Next, the preset number, i.e., K, of second vectors closest to the first vector may be determined, and the sample cloud resource scheduling requests corresponding to each of the determined second vectors may be determined as the nearest neighbor cloud resource scheduling requests. Figure 6 As shown, the nearest neighbor cloud resource scheduling request can be determined through the following steps S610 to S650.

[0093] In step S610, initialization is first performed; for example, the reference distance dmax is initialized to the maximum value, and i is initialized to 1. Then the first vector O0 and the second vector O i The distance between them. Taking the Euclidean distance as an example, it can be calculated by the following formula:

[0094]

[0095] Where m is the first vector O0 and the second vector O i The number of dimensions; represents the kth element in the first vector O0; Represents the second vector O i The kth element in .

[0096] It should be noted that in other exemplary embodiments of the present disclosure, other methods such as edit distance, Fréchet distance or Hausdorff distance may also be used to characterize the distance between the first vector and each of the second vectors, and this exemplary embodiment is not limited thereto.

[0097] In step S620, determine d(O0,O i ) is less than the reference distance dmax.

[0098] In step S630, if d(O0,O i ) is less than the above reference distance dmax, then the second vector O i The corresponding sample cloud resource scheduling request is marked as the nearest neighbor cloud resource scheduling request of the current cloud resource scheduling request. i ) is greater than the above reference distance dmax, go to step S670.

[0099] In step S640, it is determined whether the number of current nearest neighbor cloud resource scheduling requests is greater than or equal to K.

[0100] In step S650, if the number of current nearest neighbor cloud resource scheduling requests is equal to K, the maximum value of the K distance values ​​is updated as the reference distance dmax; and go to step S670.

[0101] In step S660, if the number of the current nearest neighbor cloud resource scheduling requests is greater than K, the cloud resource scheduling request with a distance of reference distance dmax is cancelled as the nearest neighbor cloud resource scheduling request. At the same time, the maximum value of the remaining K distance values ​​is updated as the reference distance dmax; and the process goes to step S670.

[0102] In step S670, it is determined whether i is equal to win.

[0103] In step S680, if i is not equal to win, set i=i+1 and go to step S620; if i is equal to win, end the loop.

[0104] In other exemplary embodiments of the present disclosure, the nearest neighbor cloud resource scheduling request may also be determined in other ways. For example, in calculating d(O0,O1) to d(O0,O win ) and then, win ) Sort them in order of arrival from the smallest, and select the sample cloud resource scheduling requests corresponding to the first K second vectors as the nearest neighbor cloud resource scheduling requests of the current cloud resource scheduling request; this also falls within the protection scope of the present disclosure.

[0105] In step S240, the cloud resource scheduling policy corresponding to the current cloud resource scheduling request is determined according to the cloud resource scheduling policy corresponding to the nearest neighbor cloud resource scheduling request.

[0106] For example, in this exemplary embodiment, the number of times each cloud resource scheduling strategy corresponding to the nearest neighbor cloud resource scheduling request appears can be counted; then the cloud resource scheduling strategy with the largest number of appearances is used as the cloud resource scheduling strategy corresponding to the current cloud resource scheduling request.

[0107] For example, reference Figure 7 As shown, the key fields selected are<c1_free_space> as well as<c2_free_space> Assume that the token sequence corresponding to the current cloud resource scheduling request is: (cloud_space, C1_free_space, C2_free_space) = (100, 350, 200); the sample cloud resource scheduling request is Figure 7 The cloud resource scheduling requests with IDs from 1 to 10 in the above example are 3. By calculating the vector distance, we can determine Figure 7 The sample cloud resource scheduling requests with IDs 6, 7, and 8 are nearest neighbor cloud resource scheduling requests.

[0108] The cloud resource scheduling policy category identifiers corresponding to the nearest neighbor cloud resource scheduling requests with IDs 6 and 7 are both 2, i.e. (50, 50), indicating that cloud resources Cloud 1 and Cloud 2 each schedule 50 GB of resource space. The cloud resource scheduling policy category identifier corresponding to the nearest neighbor cloud resource scheduling request with ID 8 is 3, i.e. (100, 0), indicating that cloud resource Cloud1 alone schedules 100 GB of resource space.

[0109] Since according to the statistical results, the number of cloud resource scheduling policies with category identification 2 is greater than the number of cloud resource scheduling policies with category identification 3, the cloud resource scheduling policy with category identification 2 is used as the cloud resource scheduling policy corresponding to the current cloud resource scheduling request. Furthermore, the cloud resource scheduling policy corresponding to the current cloud resource scheduling request is that cloud resource Cloud1 and cloud resource Cloud2 each schedule 50GB of resource space, thus completing the cloud resource scheduling in this multi-cloud scenario.

[0110] In the above exemplary embodiment, the idea of ​​KNN (K-Nearest Neighbor) algorithm is used to complete cloud resource scheduling in multi-cloud scenarios. Its advantage is that it can handle classification problems and regression problems, and has strong anti-interference and high precision. Moreover, the number of sample cloud resource scheduling requests can be updated to control the inefficiency of the algorithm, so as to make the operation log size more suitable for multi-cloud resource scheduling. However, in other exemplary embodiments of the present disclosure, other algorithms such as decision trees or random forest models can also be used, and there is no special limitation on this in this exemplary embodiment.

[0111] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.

[0112] Furthermore, this example implementation also provides a cloud resource scheduling device. Figure 8 As shown, the cloud resource scheduling device 800 may include a word vector training module 810, a vector calculation module 820, and a scheduling strategy determination module 830. Among them:

[0113] The word vector training module 810 can be used to perform word vector training based on multiple historical cloud resource scheduling requests to obtain a word segmentation dictionary and vector table corresponding to the cloud resource scheduling request. The vector calculation module 820 can be used to select multiple sample cloud resource scheduling requests according to the current cloud resource scheduling request, and determine the first vector corresponding to the current cloud resource scheduling request and the second vector corresponding to each of the sample cloud resource scheduling requests based on the word segmentation dictionary and vector table. The scheduling strategy determination module 830 can be used to determine the nearest neighbor cloud resource scheduling request from the sample cloud resource scheduling request based on the distance between the first vector and each of the second vectors; and, based on the cloud resource scheduling policy corresponding to the nearest neighbor cloud resource scheduling request, determine the cloud resource scheduling policy corresponding to the current cloud resource scheduling request.

[0114] The specific details of each module and component in the above-mentioned cloud resource scheduling device have been described in detail in the corresponding cloud resource scheduling method or ground display method, so they will not be repeated here.

[0115] It should be noted that, although several modules or components of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or components described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into multiple modules or units to be embodied.

[0116] The various component embodiments of the present disclosure may be implemented in hardware, or in a software module running on one or more processors, or in a combination thereof.

[0117] In an exemplary embodiment of the present disclosure, an electronic device is further provided, comprising: a processor; and a memory configured to store processor-executable instructions; wherein the processor is configured to execute any of the methods described in the exemplary implementation.

[0118] Fig. 9 A schematic diagram of the structure of a computer system for implementing an electronic device of an embodiment of the present disclosure is shown. It should be noted that: Fig. 9 The computer system 900 of 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.

[0119] like Fig. 9 As shown, the computer system 900 includes a central processing unit 901, which can perform various appropriate actions and processes according to the program stored in the read-only memory 902 or the program loaded from the storage part 908 into the random access memory 903. Various programs and data required for system operation are also stored in the random access memory 903. The central processing unit 901, the read-only memory 902 and the random access memory 903 are connected to each other through a bus 904. The input / output interface 905 is also connected to the bus 904.

[0120] The following components are connected to the input / output interface 905: an input section 906 including a keyboard, a mouse, etc.; an output section 907 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 908 including a hard disk, etc.; and a communication section 909 including a network interface card such as a local area network (LAN) card, a modem, etc. The communication section 909 performs communication processing via a network such as the Internet. A drive 910 is also connected to the input / output interface 905 as needed. A removable medium 911, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 910 as needed, so that a computer program read therefrom is installed into the storage section 908 as needed.

[0121] 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 contains 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 the communication part 909, and / or installed from a removable medium 911. When the computer program is executed by the central processor 901, various functions defined in the device of the present application are executed.

[0122] In an exemplary embodiment of the present disclosure, a non-volatile computer-readable storage medium is further provided, on which a computer program is stored. When the computer program is executed by a computer, the computer executes any one of the above-described methods.

[0123] It should be noted that the non-volatile computer-readable storage medium shown in the present disclosure may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination thereof. 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, a read-only memory, 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 thereof. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in conjunction 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, in which a computer-readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. 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: wireless, wire, optical cable, radio frequency, etc., or any suitable combination of the above.

[0124] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary technical means in the art that are not disclosed in the present disclosure. The specification and examples are to be considered as exemplary only, and the true scope and spirit of the present disclosure are indicated by the claims.

Claims

1. A cloud resource scheduling method, characterized in that: The method comprises: Perform word vector training based on multiple historical cloud resource scheduling requests to obtain the word segmentation dictionary and vector table corresponding to the cloud resource scheduling requests; Selecting a plurality of sample cloud resource scheduling requests according to the current cloud resource scheduling request, and determining a first vector corresponding to the current cloud resource scheduling request and a second vector corresponding to each of the sample cloud resource scheduling requests based on the word segmentation dictionary and the vector table; Determine a nearest neighbor cloud resource scheduling request from the sample cloud resource scheduling requests according to the distance between the first vector and each of the second vectors; Determine the cloud resource scheduling policy corresponding to the current cloud resource scheduling request according to the cloud resource scheduling policy corresponding to the nearest neighbor cloud resource scheduling request; Among them, multiple sample cloud resource scheduling requests are selected according to the current cloud resource scheduling request, including: Taking a cloud resource scheduling request of the same category as the current cloud resource scheduling request as a candidate cloud resource scheduling request; Randomly extracting a seed cloud resource scheduling request from the candidate cloud resource scheduling requests; Taking the seed cloud resource scheduling request as the center, multiple consecutive candidate cloud resource scheduling requests are selected as the sample cloud resource scheduling requests according to a window with a preset step size.

2. The cloud resource scheduling method according to claim 1, characterized in that: The word vector training based on multiple historical cloud resource scheduling requests includes: Convert each of the historical cloud resource scheduling requests into a corresponding first token sequence; Word vector training is performed based on the first token sequence to obtain a vectorized representation of each token in the first token sequence to obtain the word segmentation dictionary and vector table.

3. The cloud resource scheduling method according to claim 2, characterized in that: The determining the first vector corresponding to the current cloud resource scheduling request includes: Convert the current cloud resource scheduling request into a second token sequence; According to the word segmentation dictionary and the vector table, a vectorized representation of each token in the second token sequence is determined to obtain a first vector corresponding to the current cloud resource scheduling request.

4. The cloud resource scheduling method according to claim 2, characterized in that: The determining the second vector corresponding to each of the sample cloud resource scheduling requests includes: Convert each of the current cloud resource scheduling requests into a corresponding third token sequence; According to the word segmentation dictionary and the vector table, a vectorized representation of each token in each of the third token sequences is determined to obtain a second vector corresponding to each of the sample cloud resource scheduling requests.

5. The cloud resource scheduling method according to claim 1, characterized in that: The determining the nearest neighbor cloud resource scheduling request from the sample cloud resource scheduling request includes: Get the preset quantity; The preset number of second vectors that are closest to the first vector are determined, and the sample cloud resource scheduling requests corresponding to the determined second vectors are determined as the nearest neighbor cloud resource scheduling requests.

6. The cloud resource scheduling method according to any one of claims 1 to 5, characterized in that: The determining, according to the cloud resource scheduling policy corresponding to the nearest neighbor cloud resource scheduling request, the cloud resource scheduling policy corresponding to the current cloud resource scheduling request includes: Counting the number of occurrences of each of the cloud resource scheduling strategies corresponding to the nearest neighbor cloud resource scheduling request; The cloud resource scheduling strategy that appears the most times is used as the cloud resource scheduling strategy corresponding to the current cloud resource scheduling request.

7. A cloud resource scheduling device, characterized in that: The device comprises: The word vector training module is used to perform word vector training based on multiple historical cloud resource scheduling requests to obtain the word segmentation dictionary and vector table corresponding to the cloud resource scheduling requests; A vector calculation module, configured to select a plurality of sample cloud resource scheduling requests according to the current cloud resource scheduling request, and determine a first vector corresponding to the current cloud resource scheduling request and a second vector corresponding to each of the sample cloud resource scheduling requests based on the word segmentation dictionary and the vector table; a scheduling strategy determination module, configured to determine a nearest neighbor cloud resource scheduling request from the sample cloud resource scheduling requests according to the distance between the first vector and each of the second vectors; and determine a cloud resource scheduling strategy corresponding to the current cloud resource scheduling request according to the cloud resource scheduling strategy corresponding to the nearest neighbor cloud resource scheduling request; Among them, multiple sample cloud resource scheduling requests are selected according to the current cloud resource scheduling request, including: Taking a cloud resource scheduling request of the same category as the current cloud resource scheduling request as a candidate cloud resource scheduling request; Randomly extracting a seed cloud resource scheduling request from the candidate cloud resource scheduling requests; Taking the seed cloud resource scheduling request as the center, multiple consecutive candidate cloud resource scheduling requests are selected as the sample cloud resource scheduling requests according to a window with a preset step size.

8. A non-volatile computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.

9. An electronic device, characterized in that: include: processor; as well as A memory, configured to store executable instructions of the processor; The processor is configured to perform the method of any one of claims 1 to 6 by executing the executable instructions.