Resource scheduling method and device, electronic equipment and computer readable storage medium

By dividing the cloud resource scheduling process into multi-level pipeline tasks and processing them according to scheduling priorities, the problem of low efficiency in cloud platform creation of cloud resources is solved, efficient parallel scheduling of multiple tasks is achieved, and creation failures caused by resource preemption are avoided.

CN120687210APending Publication Date: 2025-09-23JINAN INSPUR DATA TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510740151.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-04
Publication Date
2025-09-23

AI Technical Summary

Technical Problem

Cloud platforms are inefficient in creating cloud resources, especially when multiple target applications are creating cloud resources simultaneously, which can easily lead to resource preemption and creation failure.

Method used

The resource scheduling process is divided into multi-level pipeline tasks. The scheduling priority is determined according to the optional resource indicators of the target pipeline task and the resource scheduling duration of the previous level pipeline task, and the target pipeline task is scheduled according to the scheduling priority.

Benefits of technology

It improves the efficiency of cloud resource scheduling, avoids creation failures due to resource preemption, and enables efficient parallel processing of multiple cloud resource tasks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120687210A_ABST
    Figure CN120687210A_ABST
Patent Text Reader

Abstract

The invention discloses a resource scheduling method and device, electronic equipment and a computer readable storage medium, and relates to the technical field of computers, the resource scheduling process is divided into multiple levels of assembly line tasks by utilizing the scheduling characteristics of the resource scheduling process when at least one target cloud resource is created. Aiming at a target assembly line task in the multi-level assembly line tasks, determining a scheduling priority of the target assembly line task according to an optional resource index corresponding to the target assembly line task and a resource scheduling duration of an upper-level assembly line task of the target assembly line task; according to the method and the device, the scheduling priorities are selected according to the scheduling priorities, and then the target assembly line tasks corresponding to the scheduling priorities are scheduled according to the scheduling priorities, because the corresponding assembly line tasks are scheduled through the scheduling priorities, a plurality of tasks for creating cloud resources can be scheduled at the same time, the scheduling is not limited to the scheduling of a single resource, and the scheduling efficiency can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a resource scheduling method, device, electronic device, and computer-readable storage medium. Background Art

[0002] With the development of cloud computing technology, more and more businesses are running on cloud hosts instead of physical servers. Cloud platforms, which manage these hosts, play a crucial role. Recently, users are demanding more than just a single cloud host; they want to directly deliver complete applications, which in turn makes cloud platform services increasingly complex.

[0003] Cloud platforms need to rationally schedule each cloud resource creation task to create cloud resources. Traditionally, scheduling cloud resource creation tasks involves scheduling individual resources, which results in low efficiency in creating and scheduling single resources. If multiple target applications are deployed simultaneously on a cloud platform, and cloud resources are created for multiple target applications simultaneously, resource preemption can occur. This can cause the creation of the first target application to fail due to a lack of resources. Summary of the Invention

[0004] The present application provides a resource scheduling method, device, electronic device and computer-readable storage medium to at least solve the problem of low efficiency of cloud platforms when creating cloud resources.

[0005] The present application provides a resource scheduling method, including: obtaining at least one target cloud resource to be created and creating a resource scheduling process for the at least one target cloud resource; dividing the resource scheduling process into multi-level pipeline tasks according to the scheduling characteristics of the resource scheduling process; for a target pipeline task in the multi-level pipeline task, determining the scheduling priority of the target pipeline task using the optional resource indicators corresponding to the target pipeline task and the resource scheduling duration of the previous-level pipeline task; scheduling the target pipeline task according to the scheduling priority to create at least one target cloud resource.

[0006] The present application also provides a resource scheduling device, including: an acquisition module for acquiring at least one target cloud resource to be created and a resource scheduling process for creating at least one target cloud resource; a division module for dividing the resource scheduling process into multi-level pipeline tasks according to the scheduling characteristics of the resource scheduling process; a determination module for determining the scheduling priority of the target pipeline task in the multi-level pipeline task by using the optional resource indicators corresponding to the target pipeline task and the resource scheduling duration of the previous-level pipeline task; a scheduling module for scheduling the target pipeline task according to the scheduling priority to create at least one target cloud resource.

[0007] The present application also provides an electronic device, comprising: a memory for storing a computer program; and a processor for implementing the steps of any of the above-mentioned resource scheduling methods when executing the computer program.

[0008] The present application also provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above-mentioned resource scheduling methods are implemented.

[0009] The resource scheduling method of the present application utilizes the scheduling characteristics of the resource scheduling process when creating at least one target cloud resource to divide the resource scheduling process into multi-level pipeline tasks, that is, to hierarchically process different resource scheduling processes, which can avoid complex scheduling tasks or scheduling tasks with mutual dependencies blocking threads. For the target pipeline task in the multi-level pipeline task, the scheduling priority of the target pipeline task is determined according to the optional resource indicators corresponding to the target pipeline task and the resource scheduling duration of the previous-level pipeline task; then, the target pipeline task corresponding to the scheduling priority is scheduled according to the scheduling priority. Since the corresponding pipeline tasks are scheduled according to the scheduling priority, multiple tasks for creating cloud resources can be scheduled at the same time, and are no longer limited to the scheduling of a single resource, thereby improving scheduling efficiency and avoiding the situation where the application created first fails to create due to failure to seize resources. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] In order to more clearly illustrate the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0011] Figure 1 This is a traditional resource scheduling diagram;

[0012] Figure 2 A schematic diagram of interaction between a user and a cloud platform provided in an embodiment of the present application;

[0013] Figure 3 A schematic diagram of a resource scheduling method provided in an embodiment of the present application;

[0014] Figure 4 A schematic diagram of scheduling a five-stage pipeline task provided in an embodiment of the present application;

[0015] Figure 5 A flowchart of another resource scheduling method provided in an embodiment of the present application;

[0016] Figure 6A schematic diagram of a flow chart of another resource scheduling method provided in an embodiment of the present application;

[0017] Figure 7 A schematic diagram of resource scheduling when deploying an OA system on a cloud platform provided in an embodiment of the present application;

[0018] Figure 8 A structural block diagram of a resource scheduling device provided in an embodiment of the present application;

[0019] Figure 9 This is a structural block diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0020] The following will be combined with the accompanying drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0021] It should be noted that, in the description of this application, the terms "comprises," "includes," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. The terms "first," "second," etc., in this application are used to distinguish similar objects, and are not used to describe a particular order or sequence.

[0022] With the development of cloud computing technology, more and more businesses are no longer running on physical servers, but instead on cloud hosts. Cloud platforms, which manage these cloud hosts, play a crucial role in this process. Recently, users are demanding more than just a single cloud host; they want to directly present a complete application. For example, a user might want to deploy an office automation (OA) system on a cloud platform. This requires cloud resources such as high-performance cloud hosts, OA cloud hosts, cache cloud hosts, and file storage cloud hosts. The cloud platform must automatically schedule these cloud hosts, networks, and storage through interface orchestration, and then successfully configure and deliver them to the user.

[0023] As the complexity of cloud services increases, cloud platform services also become more and more complex, requiring more reasonable scheduling of tasks to create cloud resources. For scheduling tasks to create cloud resources, the traditional method is to schedule a single resource, for example, Figure 1As shown in the figure, deploying an OA system on a cloud platform requires creating a high-performance cloud host, an OA cloud host, and a cache cloud host. Only after the high-performance cloud host is scheduled and created can the OA system cloud host be scheduled and created, and finally the cache cloud host can be scheduled and created, etc. This makes the creation and scheduling of a single resource inefficient. If multiple target applications create and configure cloud resources at the same time, resource preemption will occur, causing the target application created first to fail to preempt resources.

[0024] In view of this, the present application proposes a resource scheduling method, device, electronic device, and computer-readable storage medium. The scheduling method includes: obtaining at least one target cloud resource to be created and a resource scheduling process for creating at least one target cloud resource; dividing the resource scheduling process into multiple levels of pipeline tasks based on the scheduling characteristics of the resource scheduling process; for a target pipeline task in the multi-level pipeline task, determining the scheduling priority of the target pipeline task using the optional resource indicators corresponding to the target pipeline task and the resource scheduling duration of the previous-level pipeline task; scheduling the target pipeline task based on the scheduling priority to create at least one target cloud resource.

[0025] The resource scheduling method of the present application utilizes the scheduling characteristics of the resource scheduling process when creating at least one target cloud resource to divide the resource scheduling process into multi-level pipeline tasks, that is, to hierarchically process different resource scheduling processes, which can avoid complex scheduling tasks or scheduling tasks with mutual dependencies blocking threads. For the target pipeline task in the multi-level pipeline task, the scheduling priority of the target pipeline task is determined according to the optional resource indicators corresponding to the target pipeline task and the resource scheduling duration of the previous-level pipeline task; then, the target pipeline task corresponding to the scheduling priority is scheduled according to the scheduling priority. Since the corresponding pipeline tasks are scheduled according to the scheduling priority, multiple tasks for creating cloud resources can be scheduled at the same time, and are no longer limited to the scheduling of a single resource, thereby improving scheduling efficiency and avoiding the situation where the application created first fails to create due to failure to seize resources.

[0026] In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below with reference to the accompanying drawings and specific implementation methods.

[0027] In conjunction with the specific application environment architecture or specific hardware architecture on which the execution of the resource scheduling method depends, the specific application environment architecture or specific hardware architecture is described herein.

[0028] like Figure 2As shown, an interactive interface related to the cloud platform is deployed on the electronic device, for example, a creation page. The user can input the target application to be deployed and the resource configuration parameters required to deploy the target application through the creation page. After that, the user can click the creation control on the creation page to submit the task of deploying the target application to the cloud platform. After receiving the task of deploying the target application, the cloud platform can determine the various cloud resources required to deploy the target application based on the resource configuration parameters input by the user, and execute the resource scheduling method of the present application, thereby creating and configuring the various cloud resources required to deploy the target application on the cloud platform, and then realizing the deployment of the target application on the cloud platform.

[0029] According to an embodiment of the present application, an embodiment of a resource scheduling method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0030] In this embodiment, a resource scheduling method is provided, which can be used in the above-mentioned cloud platform. Figure 3 is a flow chart of a resource scheduling method according to an embodiment of the present application, such as Figure 3 As shown, the process includes the following steps:

[0031] Step S302: Acquire at least one target cloud resource to be created and a resource scheduling process for creating the at least one target cloud resource.

[0032] Cloud resources can be various types of computing, storage, and network resources that can be flexibly called upon and managed in a cloud computing environment. The target cloud resources in this application are the resources required to deploy the target application on the cloud platform. For example, target cloud resources can be, but are not limited to, high-performance cloud hosts, database cloud hosts, storage resources, and network resources.

[0033] As a specific example, the cloud platform provides an interactive interface, such as a creation page, through which users can input the target application to be deployed and the resource configuration parameters required to deploy the target application. After receiving the task, the cloud platform can determine one or more target cloud resources that need to be created to deploy the target application based on the deployed target application and resource configuration parameters. For example, a user needs to create an OA system on the cloud platform and the resource configuration parameters of the OA system are 1 database cloud host, 1 high-performance host, and 25Gbps of bandwidth, etc. Based on this, the cloud platform can know that the target cloud resources to be created are 1 database cloud host, 1 high-performance host, and 25Gbps of bandwidth.

[0034] The resource scheduling process refers to a series of processes for dividing, managing, and coordinating multiple physical servers when creating target cloud resources (such as cloud hosts, storage, networks, etc.) on a cloud platform. In a specific example, the cloud platform can pre-set the correspondence between cloud resources and resource scheduling processes. For example, if the target cloud resource is a database cloud host, it corresponds to the first resource scheduling process; if the cloud resource is a high-performance host, it corresponds to the second resource scheduling process; if the cloud resource is a network, it corresponds to the third resource scheduling process. Subsequently, when the cloud platform receives the target cloud resource to be created, it can obtain the resource scheduling process of the target cloud resource by searching for the correspondence.

[0035] Step S304: Divide the resource scheduling process into multi-stage pipeline tasks according to the scheduling characteristics of the resource scheduling process.

[0036] Pipeline tasks refer to breaking down complex resource scheduling processes into multiple orderly and continuous processing stages (similar to industrial production lines), with each stage responsible for specific subtasks, thereby achieving efficient task flow and parallel processing. As a specific example, Figure 4 As shown in the figure, the resource scheduling process can be divided into five pipeline tasks, including pre-screening resources, host scheduling, storage scheduling, resource creation, and resource configuration. Figure 4 The five-stage pipeline tasks shown can also be other numbers of pipeline tasks, and this application does not limit this. In addition, it should be understood that for different types of target cloud resources to be created, the corresponding multi-stage pipeline tasks can be the same or different. For example, when creating a cloud host, it can correspond to a five-stage pipeline task; when creating a network resource, it can correspond to a three-stage pipeline task.

[0037] Step S306 , for a target pipeline task in the multi-stage pipeline task, the scheduling priority of the target pipeline task is determined by using the optional resource indicators corresponding to the target pipeline task and the resource scheduling duration of the previous-stage pipeline task.

[0038] For multi-stage pipeline tasks, the next stage pipeline task can generally be continued only after the previous stage pipeline task is completed. Based on this, the scheduling priority of the first stage pipeline task in the multi-stage pipeline task can be set to the highest. For pipeline tasks other than the first stage pipeline task, that is, the target pipeline task, the scheduling priority of the target pipeline task can be determined based on the optional resource indicators and the resource scheduling duration of the previous stage pipeline task. In this way, the target pipeline task can be the host scheduling, storage scheduling, resource creation, and resource configuration shown above.

[0039] The optional resource indicator can be the number of physical servers that can split resources when creating the target cloud resources, wherein the physical servers that can split resources can also include physical servers whose resources are being split, that is, physical servers that are executing tasks. The resource scheduling duration of the previous-level pipeline task is the actual resource scheduling duration to complete the previous-level pipeline task. Specifically, the optional resource indicators corresponding to the target pipeline task and the resource scheduling duration of its previous-level pipeline task are collaboratively analyzed to determine the scheduling priority of the target pipeline task, so that the scheduling priority of the target pipeline task can be determined reasonably and accurately.

[0040] Step S308: Schedule the target pipeline task according to the scheduling priority and create at least one target cloud resource.

[0041] By determining the execution order of each target pipeline task through the scheduling priority of each target pipeline task, and scheduling the target pipeline task according to the order, at least one target cloud resource is created. Furthermore, this can avoid blocking threads and avoid situations where the application created first fails to create due to failure to seize resources. It should be understood that when creating multiple target cloud resources at the same time, two adjacent target pipeline tasks may correspond to different target cloud resources. For example, if cloud host A and cloud host B are created at the same time, the two adjacent target pipeline tasks can be the host scheduling of cloud host A and the host scheduling of cloud host B, or the host scheduling of cloud host A and the storage scheduling of cloud host A. In this way, it is no longer the scheduling of a single cloud resource, that is, it is no longer scheduling cloud host A and creating cloud host A, and then scheduling cloud host B and creating cloud host B. This not only improves efficiency, but also avoids situations where the application created first fails to create due to failure to seize resources.

[0042] The resource scheduling method provided in this embodiment utilizes the scheduling characteristics of the resource scheduling process when creating at least one target cloud resource to divide the resource scheduling process into multi-level pipeline tasks, that is, to hierarchically process different resource scheduling processes, which can avoid complex scheduling tasks or scheduling tasks with mutual dependencies blocking threads. For the target pipeline task in the multi-level pipeline task, the scheduling priority of the target pipeline task is determined based on the optional resource indicators corresponding to the target pipeline task and the resource scheduling duration of the previous-level pipeline task; then, the target pipeline task corresponding to the scheduling priority is scheduled according to the scheduling priority. Since the corresponding pipeline tasks are scheduled according to the scheduling priority, multiple tasks for creating cloud resources can be scheduled at the same time, and are no longer limited to the scheduling of a single resource, thereby improving scheduling efficiency and avoiding the situation where the application created first fails to create due to failure to seize resources.

[0043] In this embodiment, a resource scheduling method is provided, which can be used in the above-mentioned cloud platform. Figure 5 is a flow chart of a resource scheduling method according to an embodiment of the present invention. Figure 5 As shown, the process includes the following steps:

[0044] Step S502: Obtain at least one target cloud resource to be created and a resource scheduling process for creating at least one target cloud resource. Figure 3 Step S302 of the illustrated embodiment will not be described in detail here.

[0045] Step S504: Divide the resource scheduling process into multiple pipeline tasks according to the scheduling characteristics of the resource scheduling process. Figure 3 Step S304 of the illustrated embodiment will not be described in detail here.

[0046] Step S506 , for a target pipeline task in the multi-stage pipeline task, the scheduling priority of the target pipeline task is determined by using the optional resource indicators corresponding to the target pipeline task and the resource scheduling duration of the previous-stage pipeline task.

[0047] The optional resource indicators include a first resource indicator and a second resource indicator. The first resource indicator is used to represent the number of optional resources corresponding to the creation of at least one target cloud resource, that is, the number of physical servers that can split resources when creating and configuring target cloud resources. The second resource indicator is used to represent the number of pipeline tasks in scheduling corresponding to each optional resource, that is, for a physical server that can split resources, the number of pipeline tasks that are splitting the physical server.

[0048] For example, when creating and configuring target cloud resources, the number of physical servers that can split resources is determined to be 1 according to user needs, and the number of pipeline tasks being scheduled corresponding to this physical server that can split resources is 2.

[0049] Specifically, the above step S506 includes:

[0050] Step S5062: Determine the scheduling priority of the target pipeline task based on the fusion result of the first resource indicator, the second resource indicator corresponding to the target pipeline task and the resource scheduling duration of the previous-level pipeline task.

[0051] As previously mentioned, the first resource metric is the number of physical servers that can be partitioned when creating and configuring the target cloud resource, i.e., the dimension of associated resources. The second resource metric is the number of currently scheduled pipeline tasks corresponding to each optional resource, i.e., the dimension of whether there are scheduled tasks for associated resources. The resource scheduling duration of the previous-level pipeline task is also the dimension of the execution duration of the previous-level pipeline task. By comprehensively determining the scheduling priority of the target pipeline task based on the dimensions of associated resources, whether there are scheduled tasks for associated resources, and the execution duration of the previous-level pipeline task, the scheduling priority of the target pipeline task can be determined more accurately.

[0052] As a specific example, when determining the scheduling priority of the target pipeline task, it is not limited to comprehensively determining the scheduling priority of the target pipeline task from the three dimensions of associated resources, whether there is a scheduling task with associated resources, and the execution time dimension of the previous-level pipeline task. The scheduling priority of the target pipeline task can also be determined from dimensions such as the user's level and the CPU occupancy rate of the physical server.

[0053] In some optional implementations, step S5062 includes:

[0054] Step a1: Obtain resource quantity parameters under the first resource indicator, resource-associated task parameters under the second resource indicator, scheduling duration parameters of the previous-level pipeline task, and priority parameters of the target pipeline task.

[0055] Step a2: Perform weighted fusion on the resource quantity parameter, resource-associated task parameter, scheduling duration parameter, and priority parameter to obtain the scheduling priority of the target pipeline task.

[0056] For the five-level pipeline task consisting of pre-screening resources, host scheduling, storage scheduling, resource creation, and resource configuration, the priority parameters of pipeline tasks at different levels vary due to their characteristics. For example, resource creation, since it has no relationship with the scheduling of other resources, can be directly placed in the high-priority queue for execution. In this way, the scheduling priority of the target pipeline task is comprehensively determined from the dimensions of associated resources, whether there are scheduled tasks for associated resources, the execution duration of the previous-level pipeline task, and the priority of the target pipeline task itself. This allows for more accurate determination of the scheduling priority of the target pipeline task.

[0057] When creating the target cloud resources, for the selected optional resources, it is also necessary to evaluate the various performance of the optional resources to determine the physical server to be ultimately split. Therefore, in the pre-screening resource stage, the more optional resources there are, the slower the subsequent scheduling will be. In order to prevent the scheduling queue from being blocked, the scheduling priority should be appropriately lowered; conversely, the fewer pre-selected resources, the higher the scheduling efficiency will be, and the scheduling priority can be appropriately increased. Based on this, the resource quantity parameter can be expressed as Among them, M s is a constant, and m is the number of currently available resources.

[0058] In the resource scheduling phase, if the pre-selected optional resources are being scheduled, the scheduling priority of the target pipeline task can be appropriately lowered because the target pipeline task needs to wait for the running pipeline tasks to be completed. For example, for the target pipeline task, the number of pipeline tasks of the corresponding optional resources that are running is 2, and the priority of the target pipeline task should be appropriately lowered. In this way, the resource-related task parameters can be expressed as Among them, C n is a constant, and C is the number of running pipeline tasks corresponding to the optional resource.

[0059] In the resource scheduling phase, if the target pipeline task's previous pipeline task cannot be completed within the specified time, it can be considered that both the target pipeline task's previous pipeline task and the target pipeline task are time-consuming, and the priority of the target pipeline task is reduced. The scheduling duration parameter can be expressed as T s It is used to indicate the preset scheduling duration of the previous-level pipeline task, and t is used to indicate the actual scheduling duration of the previous-level pipeline task.

[0060] In summary, the resource quantity parameter, resource-associated task parameter, scheduling duration parameter and priority parameter are weighted and integrated to obtain the scheduling priority of the target pipeline task, which can be expressed as Among them, S is used to represent the scheduling priority, m is used to represent the first resource indicator, C is used to represent the second resource indicator, and M s 、C n and T s is a constant, t is used to represent the actual scheduling duration of the previous level pipeline task, p m 、p c 、p t and p b is the weight, b i It is used to indicate the priority coefficient corresponding to the target pipeline task. Different target pipeline tasks have different corresponding priority coefficients.

[0061] It should be noted that M s 、C n 、T s 、p m 、p c 、p t and p b The specific settings can be set according to the resource scale and specific planning of different cloud platforms, and this application does not make specific limitations on this.

[0062] Step S508: Schedule the target pipeline task according to the scheduling priority and create at least one target cloud resource. Figure 3 Step S308 of the illustrated embodiment will not be described in detail here.

[0063] The resource scheduling method provided in this embodiment utilizes the scheduling characteristics of the resource scheduling process when creating at least one target cloud resource to divide the resource scheduling process into multi-level pipeline tasks, that is, to hierarchically process different resource scheduling processes, which can avoid complex scheduling tasks or scheduling tasks with mutual dependencies blocking threads. For the target pipeline task in the multi-level pipeline task, the resource quantity parameter, resource-related task parameter, scheduling duration parameter and priority parameter are weighted and integrated to more accurately determine the scheduling priority of the target pipeline task; then, the target pipeline task corresponding to the scheduling priority is scheduled according to the scheduling priority. Since the corresponding pipeline task is scheduled by scheduling priority, multiple tasks for creating cloud resources can be scheduled at the same time, and are no longer limited to the scheduling of a single resource, thereby improving scheduling efficiency and avoiding the situation where the application created first fails to create due to failure to seize resources.

[0064] In this embodiment, a resource scheduling method is provided, which can be used in the above-mentioned cloud platform. Figure 6 is a flow chart of a resource scheduling method according to an embodiment of the present invention. Figure 6 As shown, the process includes the following steps:

[0065] Step S602: Obtain at least one target cloud resource to be created and a resource scheduling process for creating at least one target cloud resource. Figure 3 Step S302 of the illustrated embodiment will not be described in detail here.

[0066] Step S604: Divide the resource scheduling process into multiple pipeline tasks according to the scheduling characteristics of the resource scheduling process. Figure 3 Step S304 of the illustrated embodiment will not be described in detail here.

[0067] Step S606: For the target pipeline task in the multi-stage pipeline task, the scheduling priority of the target pipeline task is determined by using the optional resource indicators corresponding to the target pipeline task and the resource scheduling duration of the previous-stage pipeline task. Figure 3 Step S306 of the illustrated embodiment will not be described in detail here.

[0068] Step S608: Schedule the target pipeline task according to the scheduling priority and create at least one target cloud resource.

[0069] Specifically, the above step S608 includes:

[0070] Step S6082: Add the target pipeline task to the target queue according to the scheduling priority.

[0071] Step S6084: Use the thread corresponding to the target queue to consume the target pipeline task in the target queue and create at least one target cloud resource.

[0072] By dividing each target pipeline task into different target queues according to the scheduling priority, and using the threads corresponding to different target queues to consume the target pipeline tasks in the target queues, the task scheduling is no longer limited to a single resource. The parallel processing method can not only further improve the task scheduling efficiency, but also avoid the thread blocking problem caused by resource preemption.

[0073] Specifically, the target queue can be the first queue, the second queue, or the third queue, wherein the first queue can be a high priority queue, the second queue can be a low priority queue, and the third queue can be a waiting queue. The number of threads in the first queue is greater than the number of threads in the second queue, and the number of threads in the second queue is greater than the number of threads in the third queue. For example, the number of threads in the first queue can be set to 20, the number of threads in the second queue can be set to 10, and the number of threads in the third queue can be set to 0. Regarding the setting of the number of threads in the first queue and the second queue, this application does not impose any restrictions and can be flexibly set according to the actual situation. As a specific example, the zset of redis can be used to create the first queue, the second queue, and the third queue.

[0074] In addition, as a specific example, a priority scheduler can be used to schedule target pipeline tasks with different scheduling priorities; an event-driven architecture based on a publish-subscribe model can also be used to schedule target pipeline tasks with different scheduling priorities.

[0075] In some optional implementations, the above step S6082 includes:

[0076] Step b1: If the scheduling priority of the target pipeline task is greater than or equal to a first preset value, the target pipeline task is added to the first queue.

[0077] Step b2: If the scheduling priority of the target pipeline task is less than the first preset value and greater than or equal to the second preset value, add the target pipeline task to the second queue.

[0078] Step b3: If the scheduling priority of the target pipeline task is less than the second preset value, add the target pipeline task to the third queue.

[0079] According to the scheduling priority of the target pipeline task, the target pipeline task is added to the first queue, the second queue or the third queue, so that the target end queue can be allocated to the target pipeline task more reasonably and efficiently.

[0080] Specifically, if the scheduling priority of the target pipeline task is greater than or equal to the first preset value S max , then add the target pipeline task to the first queue; if the scheduling priority of the target pipeline task is less than the first preset value S max and is greater than or equal to the second preset value S min , then add the target pipeline task to the second queue; if the scheduling priority of the target pipeline task is less than the second preset value S min , then the target pipeline task is added to the third queue. It should be noted that, since the target pipeline task in the third queue is generally a task that needs to be scheduled after the scheduling of the target pipeline task in the first queue or the second queue is completed, there will be no threads in the third queue to consume. However, the third queue can set a timer task to continuously refresh the scheduling priority of each target pipeline task in the third queue. Once the scheduling of the tasks in the first queue or the second queue that are related to the target pipeline task in the third queue is completed, the scheduling priority of each target pipeline task in the third queue will be refreshed immediately, so that the target pipeline task in the third queue will enter the first queue or the second queue for scheduling. In addition, if the target pipeline task in the first queue is empty, the threads in the first queue will also consume the tasks in the second queue. The queue hierarchy can be expressed as:

[0081]

[0082] Wherein, S is used to represent the scheduling priority of the target pipeline task. It should be noted that the first preset value S max and the second preset value S min , can be flexibly set according to actual conditions, and this application does not limit this.

[0083] In an optional embodiment, a first-level pipeline task is added to the first queue. The first-level pipeline task is a pipeline task in the multi-level pipeline task except the target pipeline task. The first-level pipeline task is used to determine the corresponding optional resources when creating at least one target cloud resource based on user tags.

[0084] As mentioned above, for multi-stage pipeline tasks, the next stage can generally only be started after the previous stage has completed. Based on this, the scheduling priority of the first stage of the multi-stage pipeline task can be set to the highest. Therefore, when creating each target cloud resource, the first stage of the pipeline task corresponding to the target cloud resource can be added to the first queue, that is, the high-priority queue, to quickly filter out the optional resources required to create the target cloud resource.

[0085] The first-level pipeline task can be the pre-screened resources in the five-level pipeline task. It can comprehensively screen out all resources that meet the conditions based on the user tag. For example, if the user tag is high performance, all hosts and storage with high performance can be screened out. For another example, if the user tag is affinity policy, all available hosts under the affinity policy can be screened out, and the same applies to other policies. Host scheduling can select the one with the largest remaining resources for the host resources filtered by the first-level pipeline task. Storage scheduling can select the one with the largest remaining resources for the storage resources filtered by the first-level pipeline task. The same is true for other levels of pipeline tasks, so they will not be repeated one by one. Through the above five-level pipeline tasks, the target cloud resources can be finally created, and then configured according to the requirements of deploying the target application.

[0086] The resource scheduling method provided in this embodiment utilizes the scheduling characteristics of the resource scheduling process when creating at least one target cloud resource to divide the resource scheduling process into multi-level pipeline tasks, that is, to hierarchically process different resource scheduling processes, which can avoid complex scheduling tasks or scheduling tasks with mutual dependencies blocking threads. For the target pipeline task in the multi-level pipeline task, the scheduling priority of the target pipeline task is determined according to the optional resource indicators corresponding to the target pipeline task and the resource scheduling duration of the previous-level pipeline task; then, the target pipeline task corresponding to the scheduling priority is scheduled according to the scheduling priority. Since the corresponding pipeline tasks are scheduled according to the scheduling priority, multiple tasks for creating cloud resources can be scheduled at the same time, and are no longer limited to the scheduling of a single resource, thereby improving scheduling efficiency and avoiding the situation where the application created first fails to create because it cannot grab resources.

[0087] In an optional embodiment, obtaining at least one target cloud resource to be created includes: displaying a creation page, the creation page including a creation control; in response to a creation operation acting on the creation control, obtaining resource configuration parameters when deploying the target application; and determining at least one target cloud resource to be created based on the resource configuration parameters.

[0088] like Figure 2 The creation page shown is used by users to submit the target application to be deployed and the resource configuration parameters corresponding to the target application to the cloud platform. After the cloud platform receives the creation task submitted by the user, it can determine one or more target cloud resources to be created based on the resource configuration parameters.

[0089] By responding to the user's creation operation on the creation page, obtaining the resource configuration parameters corresponding to the target application, and then determining one or more target cloud resources to be created based on the resource configuration parameters, one or more target cloud resources can be determined more quickly and efficiently.

[0090] As a specific example, Figure 7As shown, this is a schematic diagram of resource scheduling when deploying an OA system on a cloud platform. According to the resource configuration parameters input by the user, it can be obtained that the OA system is deployed on the cloud platform, and cloud host A, cloud host B, cloud host C, etc. need to be created and configured. In this way, according to the scheduling characteristics of the resource scheduling process of creating and configuring cloud host A, cloud host B, and cloud host C, the resource scheduling process of creating and configuring cloud host A, cloud host B, and cloud host C is divided into five-level pipeline tasks consisting of pre-screening resources, host scheduling, storage scheduling, resource creation, and resource configuration. As shown above, the first-level pipeline task, that is, pre-screening resources, has the highest scheduling priority, so the A pre-screening resources (wherein the A pre-screening resources are used to represent the pre-screening resources corresponding to cloud host A, and the subsequent description is the same, so they will not be repeated one by one) B pre-screening resources and C pre-screening resources can be directly added to the first queue. Then, based on the resource screening results of pre-screened resources A, pre-screened resources B, and pre-screened resources C, the scheduling priorities of host A scheduling, storage A scheduling, resource creation A, resource configuration A, host B scheduling, storage B scheduling, and so on are calculated accordingly. Next, based on the scheduling priorities, host A scheduling, storage A scheduling, resource creation A, resource configuration A, host B scheduling, storage B scheduling, and so on are added to the first queue, the second queue, and the third queue. For example, host A scheduling is added to the first queue; host B scheduling and storage A scheduling are added to the second queue; storage B scheduling, host C scheduling, and storage C scheduling are added to the third queue. Finally, the number of threads in the first queue is used to consume the target pipeline tasks in the first queue, and the number of threads in the second queue is used to consume the target pipeline tasks in the second queue. At the same time, a scheduled task is set for the third queue to continuously refresh the scheduling priorities of B storage scheduling, C host scheduling, and C storage scheduling in the third queue. This allows the target pipeline tasks in the third queue, such as B storage scheduling, C host scheduling, and C storage scheduling, to be updated to the first and second queues for consumption, ultimately creating and configuring cloud host A, cloud host B, and cloud host C. Finally, after creating and configuring cloud host A, cloud host B, and cloud host C, the OA system is deployed using the created cloud resources.

[0091] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus the necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method.

[0092] The embodiment of the present application also provides a resource scheduling device, such as Figure 8 As shown, the apparatus includes an acquisition module 810 , a division module 820 , a determination module 830 and a scheduling module 840 .

[0093] The acquisition module 810 is configured to acquire at least one target cloud resource to be created and a resource scheduling process for creating the at least one target cloud resource.

[0094] The division module 820 is used to divide the resource scheduling process into multi-stage pipeline tasks according to the scheduling characteristics of the resource scheduling process.

[0095] The determination module 830 is used to determine the scheduling priority of the target pipeline task in the multi-stage pipeline task by using the optional resource indicators corresponding to the target pipeline task and the resource scheduling duration of the previous-stage pipeline task.

[0096] The scheduling module 840 is used to schedule the target pipeline task according to the scheduling priority and create at least one target cloud resource.

[0097] In an optional implementation, the optional resource indicator includes a first resource indicator and a second resource indicator, the first resource indicator is used to represent the number of optional resources corresponding to the creation of at least one target cloud resource, and the second resource indicator is used to represent the number of pipeline tasks corresponding to each optional resource that are being scheduled; the determination module 830 is also used to determine the scheduling priority of the target pipeline task based on the fusion result of the first resource indicator, the second resource indicator and the resource scheduling duration of the previous-level pipeline task corresponding to the target pipeline task.

[0098] In an optional implementation, the determination module 830 is also used to obtain the resource quantity parameter under the first resource indicator, the resource-associated task parameter under the second resource indicator, the scheduling duration parameter of the previous-level pipeline task, and the priority parameter of the target pipeline task; the resource quantity parameter, resource-associated task parameter, scheduling duration parameter and priority parameter are weighted and integrated to obtain the scheduling priority of the target pipeline task.

[0099] In an optional implementation, the scheduling module 840 is further used to add the target pipeline task to the target queue according to the scheduling priority; use the thread corresponding to the target queue to consume the target pipeline task in the target queue and create at least one target cloud resource.

[0100] In an optional embodiment, the target queue is the first queue, the second queue or the third queue, the number of threads in the first queue is greater than the number of threads in the second queue, and the number of threads in the second queue is greater than the number of threads in the third queue; the scheduling module 840 is also used to add the target pipeline task to the first queue if the scheduling priority of the target pipeline task is greater than or equal to the first preset value; if the scheduling priority of the target pipeline task is less than the first preset value and greater than or equal to the second preset value, add the target pipeline task to the second queue; if the scheduling priority of the target pipeline task is less than the second preset value, add the target pipeline task to the third queue.

[0101] In an optional embodiment, the device also includes an adding module for adding a first-level pipeline task to the first queue. The first-level pipeline task is a pipeline task in the multi-level pipeline task except the target pipeline task. The first-level pipeline task is used to determine the corresponding optional resources when creating at least one target cloud resource based on user tags.

[0102] In an optional embodiment, the acquisition module 810 is also used to display a creation page, which includes a creation control; in response to a creation operation acting on the creation control, obtain resource configuration parameters when deploying the target application; and determine at least one target cloud resource to be created based on the resource configuration parameters.

[0103] The resource scheduling device of the present application utilizes the scheduling characteristics of the resource scheduling process when creating at least one target cloud resource to divide the resource scheduling process into multi-level pipeline tasks, that is, to hierarchically process different resource scheduling processes, which can avoid complex scheduling tasks or scheduling tasks with mutual dependencies blocking threads. For the target pipeline task in the multi-level pipeline task, the scheduling priority of the target pipeline task is determined according to the optional resource indicators corresponding to the target pipeline task and the resource scheduling duration of the previous-level pipeline task; then, the target pipeline task corresponding to the scheduling priority is scheduled according to the scheduling priority. Since the corresponding pipeline tasks are scheduled according to the scheduling priority, multiple tasks for creating cloud resources can be scheduled at the same time, and are no longer limited to the scheduling of a single resource, thereby improving scheduling efficiency and avoiding the situation where the application created first fails to create due to failure to seize resources.

[0104] For the description of the features in the embodiment corresponding to the resource scheduling device, please refer to the relevant description of the embodiment corresponding to the resource scheduling method, and no further details will be given here.

[0105] The embodiment of the present application also provides an electronic device, such as Figure 9As shown, it includes a memory 910 and a processor 920, the memory 910 stores a computer program, and the processor 920 is configured to run the computer program to execute the steps in any of the above resource scheduling method embodiments.

[0106] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above-mentioned resource scheduling method embodiments when running.

[0107] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk, or an optical disk.

[0108] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps of any of the above-mentioned resource scheduling method embodiments are implemented.

[0109] An embodiment of the present application further provides another computer program product, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in any of the above-mentioned resource scheduling method embodiments are implemented.

[0110] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example according to their functions. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0111] The above is a detailed introduction to the resource scheduling method, device, electronic device and computer-readable storage medium provided by the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core idea of ​​the present application. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the claims of the present application.

Claims

1. A resource scheduling method, characterized in that: include: Acquire at least one target cloud resource to be created and a resource scheduling process for creating the at least one target cloud resource; Dividing the resource scheduling process into multi-stage pipeline tasks according to the scheduling characteristics of the resource scheduling process; For a target pipeline task in the multi-level pipeline tasks, the scheduling priority of the target pipeline task is determined by using the optional resource indicators corresponding to the target pipeline task and the resource scheduling duration of the pipeline task at the previous level; The target pipeline task is scheduled according to the scheduling priority, and the at least one target cloud resource is created.

2. The method according to claim 1, characterized in that The optional resource indicator includes a first resource indicator and a second resource indicator, wherein the first resource indicator is used to represent the number of optional resources corresponding to the creation of the at least one target cloud resource, and the second resource indicator is used to represent the number of the pipeline tasks being scheduled corresponding to each of the optional resources; Determining the scheduling priority of the target pipeline task by using the optional resource indicators corresponding to the target pipeline task and the resource scheduling duration of the previous-level pipeline task includes: The scheduling priority of the target pipeline task is determined based on a fusion result of the first resource indicator, the second resource indicator, and the resource scheduling duration of the previous-level pipeline task corresponding to the target pipeline task.

3. The method according to claim 2, characterized in that Determining the scheduling priority of the target pipeline task based on a fusion result of the first resource indicator, the second resource indicator, and the resource scheduling duration of the previous-level pipeline task corresponding to the target pipeline task includes: Obtaining a resource quantity parameter under the first resource indicator, a resource-associated task parameter under the second resource indicator, a scheduling duration parameter of the previous-level pipeline task, and a priority parameter of the target pipeline task; The resource quantity parameter, the resource-associated task parameter, the scheduling duration parameter, and the priority parameter are weighted and integrated to obtain the scheduling priority of the target pipeline task.

4. The method according to claim 1, wherein Scheduling the target pipeline task according to the scheduling priority and creating the at least one target cloud resource includes: Adding the target pipeline task to a target queue according to the scheduling priority; The target pipeline task in the target queue is consumed by using the thread corresponding to the target queue to create the at least one target cloud resource.

5. The method according to claim 4, characterized in that The target queue is the first queue, the second queue, or the third queue, the number of threads in the first queue is greater than the number of threads in the second queue, and the number of threads in the second queue is greater than the number of threads in the third queue; Adding the target pipeline task to the target queue according to the scheduling priority includes: If the scheduling priority of the target pipeline task is greater than or equal to a first preset value, adding the target pipeline task to the first queue; If the scheduling priority of the target pipeline task is less than the first preset value and greater than or equal to the second preset value, add the target pipeline task to the second queue; If the scheduling priority of the target pipeline task is less than the second preset value, the target pipeline task is added to the third queue.

6. The method according to claim 5, characterized in that The method further comprises: Add the first-level pipeline task to the first queue. The first-level pipeline task is the pipeline task in the multi-level pipeline task except the target pipeline task. The first-level pipeline task is used to determine the optional resources corresponding to the creation of the at least one target cloud resource based on the user tag.

7. The method according to claim 1, characterized in that Obtain at least one target cloud resource to be created, including: Displaying a create page, wherein the create page includes a create control; In response to a create operation on the create control, obtaining resource configuration parameters for deploying a target application; The at least one target cloud resource to be created is determined according to the resource configuration parameters.

8. A resource scheduling device, characterized in that: include: An acquisition module, configured to acquire at least one target cloud resource to be created and a resource scheduling process for creating the at least one target cloud resource; A division module, configured to divide the resource scheduling process into multi-stage pipeline tasks according to the scheduling characteristics of the resource scheduling process; A determination module is used to determine the scheduling priority of a target pipeline task in the multi-level pipeline tasks by using the optional resource indicators corresponding to the target pipeline task and the resource scheduling duration of the previous-level pipeline task; A scheduling module is used to schedule the target pipeline task according to the scheduling priority and create the at least one target cloud resource.

9. An electronic device, characterized in that: include: memory for storing computer programs; A processor, configured to implement the steps of the resource scheduling method according to any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, the steps of the resource scheduling method according to any one of claims 1 to 7 are implemented.