Cross-cloud platform resource scheduling method, device, terminal device and storage medium
By setting dynamic labels and static labels in the multi-cloud management platform and determining preference values based on the trigger conditions, resource scheduling across cloud platforms is realized, scheduling efficiency is improved, and the problem of inefficient resource scheduling in the existing technology is solved.
Patent Information
- Application Number
- CN202111176680.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-09
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2041-10-09
AI Technical Summary
The existing multi-cloud management platform is inefficient in resource scheduling and cannot realize resource scheduling across cloud platforms.
By obtaining the physical resource information of each cloud platform, setting dynamic tags and static tags, and determining the preference value of tags based on the trigger conditions, resource scheduling is flexibly performed.
It improves the efficiency of resource scheduling, and can flexibly respond to different business needs without modifying the main scheduling logic, solving the problem of inefficient resource scheduling on the multi-cloud management platform.
Smart Images

Figure CN113961321B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of resource scheduling, and in particular, to a cross-cloud platform resource scheduling method, apparatus, terminal device and storage medium. Background Art
[0002] At present, large enterprises and medium-sized and large organizations such as multinational groups usually choose cloud services from multiple cloud vendors in order to solve the problem of vendor binding when migrating to the cloud. Therefore, multi-cloud management has become an inevitable trend in the development of cloud computing. In response to this, more and more cloud service providers have provided multi-cloud management platforms, which can manage cloud platforms from different cloud vendors.
[0003] In a multi-cloud management platform, resource creation is basically achieved by calling the open API of the cloud platform. The selection and scheduling of physical resources still rely on the scheduling rules within a single cloud platform, and cross-cloud resource scheduling cannot be achieved. At present, in most multi-cloud management platforms, resource management is usually achieved by using tag-based retrieval and scheduling. However, this method uses static tags, which cannot achieve flexible resource scheduling and has low resource scheduling efficiency.
[0004] In summary, the current multi-cloud management platform has the technical problem of low resource scheduling efficiency. Summary of the invention
[0005] The embodiments of the present invention provide a cross-cloud platform resource scheduling method, apparatus, terminal device and storage medium, which solve the technical problem of low resource scheduling efficiency in the current multi-cloud management platform.
[0006] In a first aspect, an embodiment of the present invention provides a cross-cloud platform resource scheduling method, comprising the following steps:
[0007] Acquire resource information of physical resources of each cloud platform connected, and synchronize the physical resources of each cloud platform according to the resource information;
[0008] Setting a label and associating the label with each physical resource, wherein the label is a dynamic label or at least one static label, wherein the static label is correspondingly provided with a preference value, and wherein the dynamic label is associated with two static labels having opposite preference values;
[0009] Setting a trigger condition for the tag;
[0010] A virtual resource is created, a triggered first tag is determined according to the trigger condition, and whether a physical resource associated with the first tag is allocated to the virtual resource according to a preference value of the first tag.
[0011] Preferably, the resource information includes the ID of the physical resource, the name of the physical resource, and resource attributes of the physical resource used to allocate virtual resources.
[0012] Preferably, the specific process of setting the label is:
[0013] When the tag is the static tag, setting the tag name, the tag type and the tag preference value;
[0014] When the tag is the dynamic tag, a static tag associated with the dynamic tag is set.
[0015] Preferably, the dynamic tag is associated with the static tag through an association condition.
[0016] Preferably, the specific process of determining the triggered first tag according to the trigger condition and determining whether to allocate the physical resource associated with the first tag to the virtual resource according to the preference value of the first tag is:
[0017] Determine a triggered first tag according to the trigger condition;
[0018] Determining whether the first tag is a dynamic tag;
[0019] If so, selecting a corresponding first static tag from static tags associated with the first tag according to the association condition;
[0020] determining, according to a preference value of a first static tag, whether to allocate a physical resource associated with the first static tag to the virtual resource;
[0021] If not, determining whether to allocate the physical resource associated with the first tag to the virtual resource is performed according to the preference value of the first tag.
[0022] Preferably, the association condition is a resource judgment condition;
[0023] Correspondingly, the specific process of selecting the corresponding first static tag from the static tags associated with the dynamic tag according to the association condition is:
[0024] The corresponding resource data is acquired according to the resource judgment condition, and the corresponding first static tag is selected from the static tags associated with the first tag according to the resource data and the resource judgment condition.
[0025] In a second aspect, an embodiment of the present invention provides a cross-cloud platform resource scheduling device, including a physical resource confirmation module, a label setting module, a trigger condition setting module and a resource allocation module:
[0026] The physical resource confirmation module is used to obtain resource information of each cloud platform connected, and confirm the physical resources of each cloud platform according to the resource information;
[0027] The label setting module is used to define a label and set a label for each physical resource, the label is a dynamic label or at least one static label, the static label is correspondingly set with a preference value, and the dynamic label is associated with two static labels with opposite preference values;
[0028] The trigger condition setting module is used to set the trigger condition of the tag;
[0029] The resource allocation module is used to create virtual resources, determine the first tag that needs to be scheduled according to the trigger condition, and determine whether to allocate the physical resources associated with the first tag to the virtual resources according to the preference value of the first tag.
[0030] Preferably, the label setting module includes a static label setting submodule and a dynamic label setting submodule;
[0031] The static tag setting submodule is used to set the tag name, the tag type and the tag preference value when the tag is the static tag;
[0032] The dynamic label setting submodule is used for setting a static label associated with the dynamic label when the label is the dynamic label.
[0033] In a third aspect, an embodiment of the present invention provides a terminal device, wherein the terminal device includes a processor and a memory;
[0034] The memory is used to store a computer program and transmit the computer program to the processor;
[0035] The processor is used to execute a cross-cloud platform resource scheduling method as described in the first aspect according to the instructions in the computer program.
[0036] In a fourth aspect, an embodiment of the present invention provides a storage medium storing computer executable instructions, which, when executed by a computer processor, are used to execute a cross-cloud platform resource scheduling method as described in the first aspect.
[0037] As mentioned above, the embodiment of the present invention provides a cross-cloud platform resource scheduling method, device, terminal device and storage medium, the method includes the following steps: obtaining resource information of physical resources of each cloud platform accessed, synchronizing the physical resources of each cloud platform according to the resource information; setting tags and associating tags for each physical resource, the tag is a dynamic tag or at least one static tag, the static tag is correspondingly set with a preference value, and the dynamic tag is associated with two static tags with opposite preference values; setting the triggering conditions of the tags; creating virtual resources, determining the first tag to be triggered according to the triggering conditions, and determining whether to allocate the physical resources associated with the first tag to the virtual resource according to the preference value of the first tag. The embodiment of the present invention sets the tags as dynamic tags and static tags, and associates the dynamic tags with the static tags, so that different tags can be flexibly set for physical resources according to different conditions during resource scheduling. When a new business need arises, there is no need to modify the scheduling logic of the subject, only the dynamic tags need to be set, reducing the insufficiency of frequent program changes due to the flexibility and variability of scheduling conditions, improving the efficiency of resource scheduling, and solving the technical problem of low resource scheduling efficiency in the current multi-cloud management platform. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Figure 1 A flow chart of a cross-cloud platform resource scheduling method provided in an embodiment of the present invention.
[0039] Figure 2 A schematic diagram of binding a physical resource to a static tag provided by an embodiment of the present invention.
[0040] Figure 3 A schematic diagram of binding a physical resource to a dynamic tag provided by an embodiment of the present invention.
[0041] Figure 4 A schematic diagram of the structure of a cross-cloud platform resource scheduling device provided in an embodiment of the present invention.
[0042] Figure 5 A schematic diagram of the structure of a terminal device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0043] The following description and accompanying drawings fully illustrate the specific embodiments of the present application so that those skilled in the art can practice them. The examples represent possible variations only. Unless explicitly required, separate components and functions are optional, and the order of operations can vary. The parts and features of some embodiments may be included in or replace the parts and features of other embodiments. The scope of the embodiments of the present application includes the entire scope of the claims, and all available equivalents of the claims. In this article, each embodiment may be represented individually or generally by the term "invention", which is only for convenience, and if more than one invention is disclosed in fact, it is not intended to automatically limit the scope of the application to any single invention or inventive concept. In this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, without requiring or implying any actual relationship or order between these entities or operations. Moreover, the term "include", "comprise" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method or terminal device including a series of elements includes not only those elements, but also includes other elements that are not explicitly listed. The various embodiments are described in a progressive manner herein, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other. As for the structures, products, etc. disclosed in the embodiments, since they correspond to the parts disclosed in the embodiments, the description is relatively simple, and the relevant parts can be referred to the description of the method part.
[0044] Embodiment 1
[0045] like Figure 1 As shown, Figure 1 A flow chart of a cross-cloud platform resource scheduling method provided by an embodiment of the present invention. The cross-cloud platform resource scheduling method provided by an embodiment of the present invention can be executed by a cross-cloud platform resource scheduling device, which can be implemented by software and / or hardware. The cross-cloud platform resource scheduling device can be composed of two or more physical entities, or can be composed of one physical entity. For example, the cross-cloud platform resource scheduling device can be a computer, a host computer, a tablet or other device. The method includes the following steps:
[0046] Step 101: Obtain resource information of the physical resources of each cloud platform connected, and synchronize the physical resources of each cloud platform according to the resource information.
[0047] Creating virtual resources in a cloud platform is essentially selecting a physical resource for resource allocation. Resource scheduling in a multi-cloud platform is essentially selecting physical resources for allocation in a physical resource pool. Generally speaking, the physical resources of a cloud platform usually include: physical servers, storage devices, and network IP addresses. In this embodiment, after the physical resources are connected to the multi-cloud platform, the resource information of the physical resources needs to be synchronized to the database of the multi-cloud platform, so that the multi-cloud platform can obtain the current resource information of the physical resources and facilitate the unified management of resource information by the multi-cloud platform.
[0048] In one embodiment, the resource information includes the ID of the physical resource, the name of the physical resource, and the resource attributes of the physical resource used to allocate virtual resources. Exemplarily, after the physical server is connected to the multi-cloud platform, the multi-cloud platform obtains the resource information of the physical server, and synchronizes the physical resources of the physical server according to the resource information. The synchronization result is as follows: the ID of the physical resource is P-A1, the name of the physical resource is the physical server, and the resource attributes of the physical resource used to allocate virtual resources are CPU 16 cores and memory 128GB. In one embodiment, the resource information also includes the resource pool where the physical resource is stored and the capacity of the resource pool. Exemplarily, the storage resource pool is S-B2 with a capacity of 300GB.
[0049] Step 102: set a label and associate the label with each physical resource. The label is a dynamic label or at least one static label. The static label is correspondingly set with a preference value. The dynamic label is associated with two static labels with opposite preference values.
[0050] After synchronizing the resource information of the physical resources, it is necessary to set tags. After the tags are set, the tags are associated with each physical resource so that when the physical resources are subsequently scheduled, the associated physical resources can be found according to the tags and the physical resources can be allocated to the virtual resources. In this embodiment, the tags include static tags and dynamic tags. Static tags are the most basic units for physical resources to participate in scheduling. Each physical resource can be set with one or more static tags. The final selection of physical resources during resource scheduling is based on the static tags. The static tags are set with preference values. The preference value of the tag is the default scheduling policy of the tag. The preference values include must use, try to use, avoid use, and prohibit use. Static tags are set on physical resources such as Figure 2 The description of the preference value is as follows:
[0051] Must be used: Only physical resources associated with this tag can be scheduled;
[0052] Maximize use: Prioritize physical resources associated with the label. If physical resources are insufficient, other physical resources can be scheduled.
[0053] Avoid using: give priority to using other physical resources. When physical resources are insufficient, use the physical resources associated with the tag.
[0054] Prohibited use: The physical resource associated with this tag cannot be used.
[0055] It should be further explained that dynamic tags are an extension mode based on static tags. When using static tags, if two static tags with opposite preference values are attached to a physical resource at the same time, the corresponding business logic must be available to select a static tag for scheduling. The scheduling logic needs to be modified every time a new business appears, and the flexible scheduling of physical resources cannot be achieved. However, using dynamic tags can dynamically set static tags to static tags associated with dynamic tags, thereby determining the static tags selected during scheduling and achieving flexible scheduling of physical resources.
[0056] In this embodiment, the specific process of setting the label is as follows:
[0057] When the tag is a static tag, set the tag name, tag type, and tag preference value.
[0058] When the tag is a static tag, you need to set the tag name, tag category (such as host, storage, and network, etc.) and tag preference value. When the tag is a dynamic tag, you need to set the static tag associated with the dynamic tag.
[0059] When the tag is a dynamic tag, a static tag associated with the dynamic tag is set. It should be further explained that in this embodiment, the dynamic tag is associated with the static tag through an association condition. Figure 3 As shown. Exemplarily, the structure of a dynamic tag is as follows:
[0060] Dynamic tag A: When condition 1 is met, static tag 1 is selected; when condition 2 is met, static tag 2 is selected. The embodiment of the present invention associates conditions so that the dynamic tag can dynamically set the static tag of the resource to the static tag associated with the dynamic tag according to the conditions set by the user, so as to determine the static tag to be selected during scheduling, so that each time a new business need arises, there is no need to modify the scheduling logic of the subject, and only the association conditions of the dynamic tag need to be set, which greatly improves the efficiency of resource scheduling.
[0061] Step 103: Set the triggering condition of the tag.
[0062] After setting the tags for the physical resources, it is necessary to set the trigger conditions for each tag so that when a certain trigger condition is met, the corresponding tag is selected to implement the scheduling of the physical resources. In this embodiment, the trigger condition is set as a condition related to the business. Exemplarily, in one embodiment, the trigger condition is: if user A is a user of group B, then when creating resources, the physical resource associated with static tag 1 is selected for creation. It can be understood that the specific content of the trigger condition can be set by the user according to actual needs, and the specific content of the trigger condition is not limited in this embodiment.
[0063] Step 104: Create a virtual resource, determine a triggered first tag according to a trigger condition, and determine whether to allocate the physical resource associated with the first tag to the virtual resource according to a preference value of the first tag.
[0064] After setting the triggering conditions of the tag, physical resources can be allocated according to the tag during the process of creating virtual resources. Specifically: first, create virtual resources, which are resources used by each user. Then, the triggering conditions of the pre-set tags can determine the first tag to be triggered. Exemplarily, in one embodiment, if the virtual resource is a resource used by user A, user A is a user in project C, and the triggering condition of static tag B is that user A is a user in project C, then the virtual resource meets the triggering condition of static tag B, and tag B is determined to be the first tag to be triggered. Afterwards, according to the preference value of the triggered first tag, determine whether to allocate the physical resources associated with the first tag to the virtual resource. For example, if the preference value of the first tag is to use as much as possible, the physical resources associated with the first tag will be scheduled first. If the physical resources associated with the first tag are insufficient, other physical resources can be used; if the preference value of the first tag is to prohibit use, the physical resources associated with the first tag cannot be used, and other physical resources are used.
[0065] On the basis of the above embodiment, the specific process of determining the triggered first tag according to the trigger condition and determining whether to allocate the physical resource associated with the first tag to the virtual resource according to the preference value of the first tag is implemented by steps 1041 to 1045, which are specifically:
[0066] Step 1041: Determine a triggered first tag according to a trigger condition.
[0067] Step 1042: Determine whether the first tag is a dynamic tag.
[0068] In this embodiment, since the tags include dynamic tags and static tags, after determining the triggered first tag, it is necessary to further determine whether the tag is a dynamic tag or a static tag. If the first tag is a dynamic tag, it is also necessary to select the corresponding static tag according to the association condition of the dynamic tag.
[0069] Step 1043: If yes, select a corresponding first static tag from static tags associated with the first tag according to the association condition.
[0070] If the triggered first tag is a dynamic tag, it is necessary to select a corresponding first static tag from static tags associated with the first tag according to the association condition of the first tag.
[0071] In one embodiment, the association condition is a resource judgment condition.
[0072] The resource judgment condition is a condition for judging the physical resource. When the physical resource meets the association condition, a certain associated static tag is selected. If the physical resource does not meet the association condition, another associated static tag is selected.
[0073] Correspondingly, the specific process of selecting the corresponding first static tag from the static tags associated with the first tag according to the association condition is:
[0074] The corresponding resource data is acquired according to the resource judgment condition, and the corresponding first static tag is selected from the static tags associated with the first tag according to the resource data and the resource judgment condition.
[0075] In one embodiment, the first tag that is triggered is a dynamic tag, and the resource judgment condition of the first tag is that when the CPU usage of the host machine is monitored to be > 80%, static tag 1 is used, otherwise, static tag 2 is used. Then, according to the resource judgment condition of the first tag, the corresponding resource data, that is, the CPU usage of the host machine, is obtained, and then it is judged whether the CPU usage of the host machine > 80% is established. If so, static tag 1 is selected as the first static tag, and if not, static tag 2 is selected as the first static tag.
[0076] Step 1044: Determine whether to allocate the physical resource associated with the first static tag to the virtual resource according to the preference value of the first static tag.
[0077] Afterwards, it can be determined whether to allocate the physical resource associated with the first static tag to the virtual resource according to the preference value of the first static tag. The specific process can be referred to step 104, which will not be described in detail in this step.
[0078] Step 1045: If not, determine whether to allocate the physical resource associated with the first tag to the virtual resource according to the preference value of the first tag.
[0079] If the first tag is not a dynamic tag, it means that the first tag is a static tag. In this case, the first tag is directly called, and according to the preference value of the first tag, it is determined whether to allocate the physical resource associated with the first tag to the virtual resource.
[0080] As described above, the embodiment of the present invention provides a cross-cloud platform resource scheduling method, which obtains the resource information of the physical resources of each cloud platform connected, synchronizes the physical resources of each cloud platform according to the resource information; sets a tag and associates the tag for each physical resource, the tag is a dynamic tag or at least one static tag, the static tag is correspondingly set with a preference value, and the dynamic tag is associated with two static tags with opposite preference values; sets the triggering condition of the tag; creates a virtual resource, determines the first tag to be triggered according to the triggering condition, and determines whether to allocate the physical resource associated with the first tag to the virtual resource according to the preference value of the first tag. The embodiment of the present invention sets the tag as a dynamic tag and a static tag, and associates the dynamic tag with the static tag through an association condition, so that different tags can be flexibly set for the physical resource according to different conditions during resource scheduling. When a new business need arises, there is no need to modify the scheduling logic of the subject, and only the dynamic tag needs to be set, which reduces the insufficiency of frequent program changes caused by the flexibility and variability of the scheduling conditions, improves the efficiency of resource scheduling, and solves the technical problem of low resource scheduling efficiency in the current multi-cloud management platform.
[0081] Embodiment 2
[0082] like Figure 4 As shown, Figure 4 A cross-cloud platform resource scheduling device provided by an embodiment of the present invention includes a physical resource confirmation module 201, a tag setting module 202, a trigger condition setting module 203 and a resource allocation module 204:
[0083] The physical resource confirmation module 201 is used to obtain resource information of each cloud platform connected, and confirm the physical resources of each cloud platform according to the resource information;
[0084] The label setting module 202 is used to define labels and set labels for each physical resource. The label is a dynamic label or at least one static label. The static label is correspondingly set with a preference value. The dynamic label is associated with two static labels with opposite preference values.
[0085] The trigger condition setting module 203 is used to set the trigger condition of the tag;
[0086] The resource allocation module 204 is used to create virtual resources, determine the first tag that needs to be scheduled according to the trigger condition, and determine whether to allocate the physical resources associated with the first tag to the virtual resources according to the preference value of the first tag.
[0087] Based on the above embodiment, the label setting module 202 includes a static label setting submodule and a dynamic label setting submodule;
[0088] The static tag setting submodule is used to set the tag name, tag type and tag preference value when the tag is a static tag;
[0089] The dynamic label setting submodule is used to set a static label associated with the dynamic label when the label is a dynamic label.
[0090] Based on the above embodiment, the resource information includes the ID of the physical resource, the name of the physical resource, and the resource attributes of the physical resource used to allocate the virtual resource.
[0091] Based on the above embodiment, the dynamic tag is associated with the static tag through an association condition.
[0092] On the basis of the above embodiment, the resource allocation module 204 includes a label determination submodule, a label judgment submodule, a first resource allocation submodule and a second resource allocation submodule;
[0093] The tag determination submodule is used to determine the triggered first tag according to the trigger condition;
[0094] The tag determination submodule is used to determine whether the first tag is a dynamic tag;
[0095] The first resource allocation submodule is used to select a corresponding first static label from static labels associated with the dynamic label according to an association condition if the first label is a dynamic label; and determine whether to allocate a physical resource associated with the first static label to a virtual resource according to a preference value of the first static label;
[0096] The second resource allocation submodule is used to determine whether to allocate the physical resource associated with the first label to the virtual resource according to the preference value of the first label if the first label is not a dynamic label.
[0097] Based on the above embodiment, the association condition is a resource judgment condition;
[0098] Correspondingly, the specific process of the first resource allocation submodule for selecting the corresponding first static label from the static labels associated with the dynamic label according to the association condition is:
[0099] It is used to obtain corresponding resource data according to the resource judgment condition, and select a corresponding first static tag from static tags associated with the dynamic tag according to the resource data and the resource judgment condition.
[0100] Embodiment 3
[0101] This embodiment also provides a terminal device, such as Figure 5 As shown, a terminal device 30 includes a processor 300 and a memory 301;
[0102] The memory 301 is used to store a computer program 302 and transmit the computer program 302 to the processor;
[0103] The processor 300 is used to execute the steps in the above-mentioned embodiment of the cross-cloud platform resource scheduling method according to the instructions in the computer program 302.
[0104] Exemplarily, the computer program 302 may be divided into one or more modules / units, which are stored in the memory 301 and executed by the processor 300 to complete the present application. The one or more modules / units may be a series of computer program instruction segments capable of completing specific functions, which are used to describe the execution process of the computer program 302 in the terminal device 30.
[0105] The terminal device 30 may be a computing device such as a desktop computer, a notebook, a PDA, or a cloud server. The terminal device 30 may include, but is not limited to, a processor 300 and a memory 301. Those skilled in the art will appreciate that Figure 5 It is only an example of the terminal device 30 and does not constitute a limitation of the terminal device 30. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the terminal device 30 may also include input and output devices, network access devices, buses, etc.
[0106] The processor 300 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0107] The memory 301 may be an internal storage unit of the terminal device 30, such as a hard disk or memory of the terminal device 30. The memory 301 may also be an external storage terminal device of the terminal device 30, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the terminal device 30. Further, the memory 301 may also include both an internal storage unit of the terminal device 30 and an external storage device. The memory 301 is used to store the computer program and other programs and data required by the terminal device 30. The memory 301 may also be used to temporarily store data that has been output or is to be output.
[0108] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0109] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0110] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0111] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0112] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store computer programs.
[0113] Embodiment 4
[0114] An embodiment of the present invention further provides a storage medium containing computer executable instructions, wherein the computer executable instructions are used to execute a cross-cloud platform resource scheduling method when executed by a computer processor, the method comprising the following steps:
[0115] Obtain resource information of the physical resources of each cloud platform connected, and synchronize the physical resources of each cloud platform based on the resource information;
[0116] Set a label and associate it with each physical resource. The label is a dynamic label or at least one static label. The static label is correspondingly set with a preference value. The dynamic label is associated with two static labels with opposite preference values.
[0117] Set the trigger conditions for the tag;
[0118] A virtual resource is created, a triggered first tag is determined according to a trigger condition, and whether a physical resource associated with the first tag is allocated to the virtual resource according to a preference value of the first tag.
[0119] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the embodiments of the present invention are not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the protection scope of the embodiments of the present invention. Therefore, although the embodiments of the present invention are described in more detail through the above embodiments, the embodiments of the present invention are not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the embodiments of the present invention, and the scope of the embodiments of the present invention is determined by the scope of the appended claims.
Claims
1. A cross-cloud platform resource scheduling method, characterized in that: The following steps are involved: Acquire resource information of physical resources of each cloud platform connected, and synchronize the physical resources of each cloud platform according to the resource information; Setting a label and associating the label with each physical resource, wherein the label is a dynamic label, a static label is correspondingly set with a preference value, and the dynamic label is associated with two static labels with opposite preference values; Setting a trigger condition for the tag; Creating a virtual resource, determining a triggered first tag according to the trigger condition, and determining whether to allocate a physical resource associated with the first tag to the virtual resource according to a preference value of the first tag; The specific process of setting the label is as follows: When the tag is the dynamic tag, a static tag associated with the dynamic tag is set, and the dynamic tag is associated with the static tag through an association condition; The specific process of determining the triggered first tag according to the trigger condition and determining whether to allocate the physical resource associated with the first tag to the virtual resource according to the preference value of the first tag is as follows: Determine a triggered first tag according to the trigger condition; Determining whether the first tag is the dynamic tag; If so, selecting a corresponding first static tag from static tags associated with the first tag according to the association condition; According to the preference value of the first static tag, it is determined whether to allocate the physical resource associated with the first static tag to the virtual resource.
2. A cross-cloud platform resource scheduling method according to claim 1, characterized in that: The resource information includes the ID of the physical resource, the name of the physical resource, and resource attributes of the physical resource used to allocate virtual resources.
3. A cross-cloud platform resource scheduling method according to claim 1, characterized in that: The label also includes the static label, and the specific process of setting the label is as follows: When the tag is the static tag, the tag name, the tag type, and the tag preference value are set.
4. A cross-cloud platform resource scheduling method according to claim 3, characterized in that: In the case where the first tag is the static tag, the method further includes: Determine, according to the preference value of the first tag, whether to allocate the physical resource associated with the first tag to the virtual resource.
5. A cross-cloud platform resource scheduling method according to claim 1, characterized in that: The association condition is a resource judgment condition; Correspondingly, the specific process of selecting the corresponding first static tag from the static tags associated with the dynamic tag according to the association condition is: The corresponding resource data is acquired according to the resource judgment condition, and the corresponding first static tag is selected from the static tags associated with the first tag according to the resource data and the resource judgment condition.
6. A cross-cloud platform resource scheduling device, characterized in that: It includes physical resource confirmation module, label setting module, trigger condition setting module and resource allocation module: The physical resource confirmation module is used to obtain resource information of each cloud platform connected, and confirm the physical resources of each cloud platform according to the resource information; The label setting module is used to define a label and set a label for each physical resource, the label is a dynamic label, a static label is correspondingly set with a preference value, and the dynamic label is associated with two static labels with opposite preference values; The trigger condition setting module is used to set the trigger condition of the tag; The resource allocation module is used to create a virtual resource, determine a first tag to be scheduled according to the trigger condition, and determine whether to allocate a physical resource associated with the first tag to the virtual resource according to a preference value of the first tag; Wherein, the label setting module includes a dynamic label setting submodule; The dynamic label setting submodule is used for setting a static label associated with the dynamic label when the label is the dynamic label; the dynamic label is associated with the static label through an association condition; Wherein, the resource allocation module includes: A tag determination submodule, used to determine a triggered first tag according to the trigger condition; A tag determination submodule, used to determine whether the first tag is a dynamic tag; The first resource allocation submodule is used to select a corresponding first static label from the static labels associated with the first label according to the association condition if the first label is a dynamic label; and determine whether to allocate the physical resources associated with the first static label to the virtual resources according to the preference value of the first static label.
7. A terminal device, characterized in that: The terminal device includes a processor and a memory; The memory is used to store a computer program and transmit the computer program to the processor; The processor is used to execute a cross-cloud platform resource scheduling method as described in any one of claims 1-5 according to the instructions in the computer program.
8. A storage medium storing computer executable instructions, characterized in that: The computer executable instructions, when executed by a computer processor, are used to execute a cross-cloud platform resource scheduling method as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Tagging physical resources in cloud computing environment
CN104106051A