Task scheduling method, system, computing device, storage medium and program product

Through the collaborative work of the snapshot master service and the snapshot cluster service, target tasks are selected and assigned according to task priority, which solves the execution delay problem caused by high concurrency tasks on the cloud server, improves user experience and achieves resource isolation.

CN114296891BActive Publication Date: 2025-09-26ALIBABA (CHINA) CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202111463111.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-02
Publication Date
2025-09-26
Estimated Expiration
2041-12-02

AI Technical Summary

Technical Problem

The storage resource usage of virtual machines on cloud servers is large and growing, resulting in high concurrency tasks causing some tasks to remain unfinished or unexecuted for a long time, resulting in a poor user experience.

Method used

The snapshot master service receives task requests, selects target tasks based on task priority, selects the target cluster through the snapshot cluster service, and assigns tasks to the working nodes in the target cluster for execution.

Benefits of technology

Prioritize important tasks, improve user experience, reduce the impact on other services, achieve non-invasive task allocation and resource isolation, and avoid task starvation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114296891B_ABST
    Figure CN114296891B_ABST
Patent Text Reader

Abstract

The embodiments of the present application provide a method, system, computing device, storage medium and program product for scheduling tasks. In the embodiments of the present application, a request associated with a task to be executed is received through a snapshot master service, and a task to be executed is generated according to the request; a target task is selected from multiple tasks to be executed according to the priority of the task to be executed through the snapshot master service, and a target cluster for executing the target task is selected through a snapshot cluster service; a target task is allocated according to the selected target cluster through the snapshot master service, so that the target cluster receives the target task through the snapshot cluster service and executes the target task through the working node in the target cluster. This allows the target task to be selected according to priority, so that target tasks with higher priorities can be executed first, that is, more important target tasks can be executed first, thereby improving the user experience.
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 task scheduling method, system, computing device, storage medium, and program product. Background Art

[0002] The amount of storage resources used by virtual machines on cloud servers is large and continues to grow. These used storage resources are involved in a variety of application scenarios, such as snapshot scenarios. However, due to these multiple application scenarios, there are many tasks that need to be completed at high concurrency, which can easily cause some tasks to be delayed or not executed for a long time. The user experience of these unexecuted tasks is very poor. Summary of the Invention

[0003] Various aspects of the present application provide a task scheduling method, system, computing device, storage medium, and program product, so that more important tasks are scheduled and executed first.

[0004] An embodiment of the present application provides a task scheduling method, which is applicable to a created snapshot management and control system, wherein the snapshot management and control system includes a snapshot master service and a snapshot cluster service, wherein the snapshot master service is deployed in a regional-level device, and the snapshot cluster service is deployed in a corresponding cluster device, and the method includes: receiving a request associated with a task to be executed through the snapshot master service, and generating a task to be executed according to the request; selecting a target task from multiple tasks to be executed according to the priority of the task to be executed through the snapshot master service, and selecting a target cluster for executing the target task through the snapshot cluster service; allocating the target task according to the selected target cluster through the snapshot master service, so that the target cluster receives the target task through the snapshot cluster service, and executes the target task through a working node in the target cluster.

[0005] An embodiment of the present application provides a snapshot management and control system, including: a snapshot master service and a snapshot cluster service, wherein the snapshot master service is deployed in a regional-level device, and the snapshot cluster service is deployed in a corresponding cluster device; the snapshot master service is used to receive a request associated with a task to be executed, and generate a task to be executed according to the request; the snapshot master service is used to select a target task from multiple tasks to be executed according to the priority of the task to be executed, and select a target cluster for executing the target task through the snapshot cluster service; the snapshot master service is used to allocate the target task according to the selected target cluster; the snapshot cluster service is used to receive the target task, enable the target cluster to receive the target task, and execute the target task through the working node in the target cluster.

[0006] An embodiment of the present application also provides a computing device, comprising: a memory and a processor; the memory is used to store a computer program; the processor executes the computer program to: receive a request associated with a task to be executed through a snapshot master service, and generate a task to be executed according to the request; select a target task from multiple tasks to be executed according to the priority of the task to be executed through the snapshot master service, and select a target cluster for executing the target task through a snapshot cluster service; allocate the target task according to the selected target cluster through the snapshot master service, so that the target cluster receives the target task through the snapshot cluster service and executes the target task through the working node in the target cluster; wherein the created snapshot management and control system includes a snapshot master service and a snapshot cluster service, the snapshot master service is deployed in the device at the regional level, and the snapshot cluster service is deployed in the corresponding cluster device.

[0007] An embodiment of the present application further provides a computer-readable storage medium storing a computer program. When the computer program is executed by one or more processors, the one or more processors implement the steps in the above method.

[0008] An embodiment of the present application also provides a computer program product, including a computer program or instructions, wherein when the computer program is executed by a processor, the processor is caused to implement the steps in the above method.

[0009] In an embodiment of the present application, a request associated with a task to be executed is received through a snapshot master service, and a task to be executed is generated according to the request; a target task is selected from multiple tasks to be executed according to the priority of the task to be executed through the snapshot master service, and a target cluster for executing the target task is selected through a snapshot cluster service; the target task is allocated according to the selected target cluster through the snapshot master service, so that the target cluster receives the target task through the snapshot cluster service, and executes the target task through the working node in the target cluster.

[0010] The snapshot master service selects a target task from multiple pending tasks based on their priority, and the snapshot cluster service selects a target cluster for executing the target task. This allows for priority-based selection, prioritizing higher-priority tasks, meaning more important tasks, improving the user experience.

[0011] Furthermore, the creation of a snapshot management system, including a snapshot master service and a snapshot cluster service, eliminates the need to disrupt or affect the logic of other services or modules, particularly those for cloud disks. This non-invasive approach to task allocation reduces the workload of services such as cloud disks, while also achieving isolation between services and laying a solid foundation for the subsequent development of independent services. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0013] Figure 1 A flowchart of a method for scheduling tasks according to an exemplary embodiment of the present application is provided;

[0014] Figure 2 A schematic diagram of a task scheduling architecture of an exemplary embodiment of the present application;

[0015] Figure 3 A schematic diagram of a task scheduling process according to an exemplary embodiment of the present application;

[0016] Figure 4 A schematic diagram of the structure of a task scheduling system according to an exemplary embodiment of the present application;

[0017] Figure 5 A schematic diagram of the structure of a task scheduling device provided by an exemplary embodiment of the present application;

[0018] Figure 6 A schematic diagram of the structure of a computing device provided as an exemplary embodiment of the present application. DETAILED DESCRIPTION

[0019] To make the purpose, technical solutions, and advantages of this application more clear, the technical solutions of this application will be clearly and completely described below in conjunction with the specific embodiments of this application and the corresponding drawings. 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.

[0020] As mentioned above, virtual machines on cloud servers consume a large amount of storage resources, such as a large and growing number of cloud disks. These used storage resources are used in a variety of application scenarios, such as snapshot scenarios. However, due to these multiple application scenarios, there are multiple tasks that need to be completed at high concurrency, which can easily cause some tasks to be delayed or not executed for a long time, resulting in a poor user experience. For example, if a single user can create a large number of snapshots at regular intervals, this will cause other users' snapshot tasks to be queued for a long time and not be executed, or even cause tasks to be "starved".

[0021] Based on this, the embodiments of the present application provide a task scheduling method, computing device, storage medium and program product, so that more important tasks are scheduled and executed first, thereby improving the user experience.

[0022] The following describes in detail the task scheduling process in conjunction with the method embodiment.

[0023] Figure 1 This is a flowchart of a task scheduling method according to an exemplary embodiment of the present application. The method 100 provided in this embodiment of the present application is executed by a computing device, such as a cloud server. The method 100 is applicable to a created snapshot management system, which includes a snapshot master service and a snapshot cluster service. The snapshot master service is deployed in a regional-level device, and the snapshot cluster service is deployed in a corresponding cluster device. The method 100 includes the following steps:

[0024] 101: Receive a request associated with a pending task through the snapshot master service, and generate a pending task according to the request.

[0025] 102: Select a target task from multiple tasks to be executed according to the priority of the tasks to be executed through the snapshot master service, and select a target cluster for executing the target task through the snapshot cluster service.

[0026] 103: Allocate the target task according to the selected target cluster through the snapshot master service, so that the target cluster receives the target task through the snapshot cluster service and executes the target task through the working nodes in the target cluster.

[0027] It should be noted that the execution subject of this embodiment can be a regional-level computing device. That is, the corresponding computing device is a device deployed in the area for a region, such as the device can be deployed with a snapshot master control service (also known as a snapshot master control module or component, etc.). There is also a computer room-level computing device downstream for receiving information sent by the execution subject. The computer room-level computing device can be a device deployed in different computer rooms set up in the area. For computer room-level computing devices, it can be deployed with a cloud disk management service (also known as a computer room-level cloud disk management service, or a computer room-level cloud disk master control service, or a computer room-level cloud disk management module or component, etc.). There can also be different clusters downstream of the computer room level, each cluster having multiple computing devices. A cluster-level cloud disk management service (or called a block control master service, or a cluster-level cloud disk management module or component, etc.) is deployed in each cluster, and a snapshot cluster service (or called a snapshot cluster module or component) can also be deployed.

[0028] Specifically, such as Figure 2 As shown, the Figure 2 The corresponding architecture is shown. A snapshot master service 202 is deployed on computing devices at the regional level 205. A cloud disk master service 206 is deployed on computing devices at the computer room level 204. At the computer room level 204, there can be multiple cloud disk master services 206, each deployed on different computing devices. At the cluster level 207, there are multiple clusters 203. Each cluster 203 can have a block master service (Block Master) 2033 and its corresponding multiple block servers (Block Servers) 2034, a snapshot cluster service 2031, and its corresponding multiple snapshot servers (Snapshot Servers) 2032.

[0029] In addition, the architecture may also have an application program interface gateway 201 .

[0030] Based on this, the above-mentioned snapshot management and control system was established.

[0031] The following is a detailed explanation of the above steps:

[0032] 101: Receive a request associated with a pending task through the snapshot master service, and generate a pending task according to the request.

[0033] Among them, a pending task is a task generated based on a received request, that is, it is related to the request. The task is to execute the content of the request. For example, if the request is a snapshot creation request (more specifically, a manual snapshot creation request), then the task is a snapshot creation task. In addition, there may be other requests, such as automatic snapshot creation request, snapshot disk creation request (i.e., generating a cloud disk based on a snapshot), and snapshot billing request (i.e., request to charge based on a snapshot).

[0034] For example, a user can obtain the service interface of the cloud server, such as the snapshot service interface, through a web browser installed on a terminal device, such as a computer. The user sends an API (Application Programming Interface) request through the interface, which is used to create a snapshot, that is, the API request can also be an API request to create a snapshot. The request is sent to the cloud server through the computer. After receiving the request, the cloud server generates a corresponding task to be executed based on the request, that is, the task of creating a snapshot. More specifically, the snapshot master control service deployed in the cloud server receives the request and generates the corresponding task.

[0035] More specifically, in order to enhance the security of the request, the request may also be received through a gateway.

[0036] For example, as described above, a user sends the above API request to the API gateway of the cloud server through a computer. The API gateway then filters the request and forwards it to the corresponding cloud server. After receiving it, the cloud server generates the corresponding task to be executed through the snapshot master service.

[0037] Among them, Figure 3 As shown, after receiving a snapshot creation request, application program interface gateway 201 (API gateway) executes step 311: sending the snapshot creation request to snapshot master service 202, more specifically, to remote procedure call service (RPC service) 301. After receiving the request, remote procedure call service 301 executes step 312: sending the snapshot creation request to task manager 302 in snapshot master service 202. After receiving the request, task manager 302 executes step 313: generating a corresponding task.

[0038] Specifically, a request associated with a task to be executed is received through the snapshot master service, and a task to be executed is generated according to the request, including: receiving a request associated with a snapshot service through the snapshot master service, determining the type of the task to be executed based on the request information carried in the request, and generating a corresponding task to be executed.

[0039] Snapshot service-related requests are requests associated with snapshots. As mentioned above, creating a snapshot automatically generates a snapshot request, a snapshot disk creation request, and a snapshot billing request. Of course, this request can also be associated with other services, not just one snapshot service. For example, it can be a video service or a data analysis service.

[0040] Request information refers to the content carried in the request, such as the purpose and type of the request. Specific parameters can be used to determine the purpose of the request, such as creating a snapshot. Specific parameters can also be used to determine the type of request, namely the task type, whether it is a synchronous or asynchronous pending task or request.

[0041] In addition, the type of task to be executed can be determined by the purpose of the request, such as a task or request to create a snapshot. Tasks or requests can also be categorized based on whether the request or task depends on a specific cluster (i.e., the cluster must meet pre-requisites such as load or computing resources), or whether it has no specific cluster requirements and no pre-requisites.

[0042] Tasks or requests can be further divided according to needs, so I will not go into details.

[0043] Since some of this has already been discussed, I won't repeat it here. Simply put, as mentioned above, the parameters carried in the API request can be used to determine the purpose of the request or the type of task to be executed. Therefore, upon receiving the request, the task manager in the snapshot master service can generate a corresponding task to be executed based on the parameters. This task can be used to determine, for example, creating a snapshot. It can also determine the type of task, such as an asynchronous task, and whether the task has cluster requirements.

[0044] It should also be noted that the received request may also have a corresponding priority identifier to indicate the priority of the request or the corresponding task to be executed. This priority identifier can be set by the user before sending the API request, or it can be automatically added by the API request based on the request information set by the user or the user's identifier (indicating the user's identity, thereby determining the user's importance).

[0045] In addition, it should be understood that a snapshot refers to a fully usable copy of a specified data set, which includes an image of the corresponding data at a certain point in time (the time when the copy begins). A snapshot can be a copy or a replica of the data it represents.

[0046] The services provided by cloud disks refer to the services provided by virtual machine block devices.

[0047] 102: Select a target task from multiple tasks to be executed according to the priority of the tasks to be executed through the snapshot master service, and select a target cluster for executing the target task through the snapshot cluster service.

[0048] As mentioned above, the priority of the task to be executed can be determined based on the priority identifier carried in the request. The priority can be determined based on the task to be executed itself or the priority of the user who triggered the task.

[0049] In addition, the priorities corresponding to the target tasks are selected from the plurality of tasks to be executed, which may cover the priorities of different tasks to be executed, but the number of target tasks with high priorities is greater than the number of target tasks with low priorities.

[0050] For example, as mentioned above, since the cloud server can receive multiple requests and generate corresponding tasks to be executed for the corresponding multiple requests. For these multiple tasks to be executed, the snapshot master service on the cloud server can select the corresponding tasks to be executed first from the multiple tasks to be executed according to the priority of the tasks to be executed. The selection principle can be to select the corresponding tasks to be executed as the target tasks according to different priorities. Then the priorities corresponding to the selected tasks to be executed should cover all priorities, but the number of tasks to be executed corresponding to higher priorities selected should be more than the number of tasks to be executed corresponding to lower priorities selected. After the tasks to be executed are selected, the snapshot cluster service can be used to select the corresponding cluster for each task to be executed. In the case where the task to be executed does not have too much dependence on a specific cluster, that is, the task to be executed is a task of this type, the corresponding cluster can be randomly selected.

[0051] Therefore, by setting the priority, it is possible to ensure that the snapshot request tasks of important users are scheduled first or that important tasks are executed first, while also taking into account the fair processing of the request tasks of other low-priority users, preventing low-priority snapshot requests from being starved, and improving the user experience of the cloud disk snapshot service.

[0052] Specifically, the snapshot master service selects a target task from multiple tasks to be executed according to the priority of the tasks to be executed, and the snapshot master service selects a target cluster for executing the target task, including: selecting multiple target tasks corresponding to different priorities from multiple tasks to be executed according to different priorities through the snapshot master service, the number of target tasks corresponding to high priority being greater than the number of target tasks corresponding to low priority; and selecting a target cluster according to the load capacity of multiple clusters through the snapshot cluster service.

[0053] The load capacity is represented by the performance of the corresponding cluster in executing the target task.

[0054] The load capacity of multiple clusters can be used to select a target cluster, and the cluster with better load capacity can be selected.

[0055] For example, as mentioned above, the snapshot master service on the cloud server can select multiple target tasks from the tasks to be executed corresponding to different priorities. For example, the number of tasks to be executed corresponding to different priorities is preset. Then, the snapshot master service can check the tasks to be executed in turn, and determine whether the current execution task can be selected based on its priority, that is, whether the number of target tasks of the priority corresponding to the task to be executed has been met. If it is met, skip the task and check the next task. If it is not met, select the task. I will not go into details. However, the number of target tasks corresponding to high priority is greater than the number of target tasks corresponding to low priority. Then, the snapshot cluster service is used to select the target cluster based on the load conditions of multiple clusters to execute the target task.

[0056] In addition, you can also select a target cluster that matches the execution conditions based on the execution conditions of multiple target tasks.

[0057] The execution conditions refer to the execution resources corresponding to different tasks to be executed, which may be corresponding computing resources, including CPU (central processing unit), memory, network bandwidth, etc. The execution conditions may be preset, and the preset execution conditions are determined by the type or purpose of the task to be executed.

[0058] Select a target task according to the above content. Then, for the selected target task, determine the corresponding execution condition according to the type or purpose of the target task, and thus select the corresponding target cluster that matches the execution condition.

[0059] In order to better implement the selection of the tasks to be executed, the tasks to be executed can be clustered according to their priorities, and then selected from the clusters.

[0060] Secondly, you can also create corresponding priority queues. Each priority queue corresponds to a priority. According to the priority of the task to be executed, the task to be executed is placed in the corresponding priority queue according to its priority identifier.

[0061] Specifically, the snapshot master service selects a target task from multiple tasks to be executed according to the priority of the task to be executed, including: placing the task to be executed into a priority queue corresponding to the priority according to the priority of the task to be executed through the snapshot master service; selecting multiple target tasks from different priority queues according to different priorities, and the number of target tasks selected from the high-priority queue is greater than the number of target tasks selected from the low-priority queue.

[0062] For example, according to the above, since some content has been explained above, it will not be repeated here. Just explain: the snapshot master service puts the tasks to be executed into the corresponding priority queues according to the priorities of the different tasks to be executed. Then, the snapshot master service polls these priority queues and selects the corresponding number of target tasks from the queues in turn according to the number of target tasks with different priorities. For example, the highest priority P1: the number of target tasks is 500, the second highest priority P2: the number of target tasks is 400, the third highest priority P3: the number of target tasks is 300, and the fourth highest priority P4: the number of target tasks is 200. Due to the large number, the time slice for polling each queue is very short, which can ensure that all other low-priority task queues can also be polled within one second.

[0063] like Figure 3 As shown, the task manager 302 executes step 318: inserting the corresponding task into the priority queue, i.e., placing the to-be-executed task into the corresponding priority queue. The task scheduler 303 then executes step 321: retrieving the corresponding task from the priority queue, i.e., selecting the target task. The task scheduler 303 executes step 322: selecting a cluster. This involves providing multiple clusters through the cluster manager 304, allowing the task scheduler 303 to select a cluster through the snapshot cluster service. Specifically, the corresponding cluster is selected for each target task to execute the target task.

[0064] During the scheduling phase, tasks can be taken out from the priority queue at regular intervals (the highest priority queue can be selected first).

[0065] This reduces the likelihood of snapshot tasks for other customers or users being delayed in queues due to large batches of scheduled snapshots or high-concurrency snapshot tasks for the same customer or user. Furthermore, if time-sensitive tasks that users care about are delayed or unexecuted for extended periods, the user experience can be poor, especially when the user's system experiences anomalies. This can affect the user's system data recovery process and create security and stability issues. The embodiments of the present application can effectively address these issues.

[0066] To better select the target cluster, you can obtain cluster load information to make a selection.

[0067] Specifically, the method 100 includes: obtaining, through the snapshot master control service, load information of multiple clusters used to execute the target task reported by the snapshot cluster service, and determining the load capacity corresponding to the cluster according to the load information.

[0068] The load information of the corresponding cluster can be collected by the snapshot cluster service in the cluster, and the load information can be sent to the snapshot master service.

[0069] Load information may include snapshot space usage, the bit-per-second (bps) or latency (delay between input data and output results) of the read / write object storage service (a cloud storage service that supports distributed storage) OSS, the bit-per-second (bps) or iops (number of read / write operations per second) or latency of the underlying read / write storage architecture (which is at the bottom of the object storage service and is used to support the service), network pressure (for example, the bandwidth flow of the current host, which can be the average over a period of time), the average memory of the entire machine, the CPU load of the entire machine, the number of normal worker nodes, and the number of tasks to be executed (that is, the number of target tasks).

[0070] Based on this load information, select the cluster with the best load parameters. For example, for a snapshot-based billing task, you can directly select the cluster with the best load parameters as the target cluster to execute the task. For tasks that depend on a specific cluster, such as creating a snapshot, you can also select the best cluster first.

[0071] However, for the target tasks that depend on a specific cluster, such as creating a snapshot, you can also select a target cluster from multiple clusters based on the execution conditions and load capacity of the target task.

[0072] For example, according to the execution condition described above, it is determined whether the better cluster described above meets the execution condition. If so, the cluster is selected as the target cluster.

[0073] Otherwise, the task can be skipped and the next target task can be continued. The next target task is a target task with a lower priority. If the cluster cannot execute the target task in P1, the task can be skipped and the target task in P2 can be executed.

[0074] That is, the method 100 further includes: when there is no target cluster meeting the execution condition of the current target task among the multiple clusters, selecting a corresponding target cluster for a target task with a lower priority than the current target task through the snapshot master service.

[0075] Since this has been explained in the previous article, I will not repeat it here.

[0076] Among them, Figure 3As shown above, when the execution conditions are met, the target cluster can be selected to execute the target task. In this case, the task scheduler 303 may execute step 322: select a cluster, that is, select a cluster with better load capacity. Then, the task scheduler 303 executes step 323: check whether the task can be started, that is, whether the cluster meets the execution conditions. If so, the task can be started. In other words, the task scheduler 303 executes step 324: start the task, that is, the task scheduler 303 may send information indicating the start of the task to the task manager 302, and also send the corresponding target task and the selected target cluster.

[0077] It should be noted that, as can be seen from the foregoing, for multiple snapshot tasks with high concurrency, it is necessary to schedule them uniformly according to priority from a global perspective, giving priority to important tasks while taking into account the scheduling of low-priority tasks from a fairness perspective. This may result in the creation of cloud disks from snapshots in batches, but if there is a lack of global download flow control, the downstream storage pressure will soar instantly, the service response will be delayed, and eventually many virtual machines will experience IO anomalies and become stuck. In addition, the request tasks between different users, as well as the competition for resources such as CPU, memory, and bandwidth, cannot be scheduled differentially, which will also cause the downstream storage execution tasks to affect each other. The present application therefore combines the load information reported by the downstream bottom layer to perform global and unified scheduling of multiple tasks, so as to achieve closed-loop control to solve the problem of resource competition and reduce the occurrence of problems.

[0078] In addition, the method 100 further includes: when the type of the task to be executed is a synchronous type, directly selecting the cluster with the highest load capacity from multiple clusters as the target cluster through the snapshot master service for allocating the task to be executed, so that the target cluster executes the task to be executed.

[0079] Since we've already explained a similar method for selecting a target cluster, I won't go into detail here. Simply note that, as mentioned above, synchronous tasks require waiting for the execution results. Therefore, we can select the optimal cluster to execute the synchronous target task using the method described above.

[0080] In order to better select the target cluster based on the load information, the cluster can be selected by determining the weight of the load information. That is, the weight can also be regarded as the weight of the target cluster.

[0081] Specifically, determining the load capacity corresponding to the cluster according to the load information includes: determining, by the snapshot master service, the load weight of the corresponding cluster according to the load information as the load capacity.

[0082] For example, the corresponding load weight can be determined based on the load information and weighting algorithm described above. The weight can be calculated based on the weights corresponding to the various load parameters in the load information, thereby obtaining the final load weight.

[0083] Based on the calculated weights, the Snapshot Master Service can directly select the cluster with the highest weight as the target cluster for the aforementioned snapshot-based billing tasks (i.e., tasks not dependent on a specific cluster) or synchronization-based tasks. For snapshot-based tasks, the Snapshot Master Service can select the target cluster based on the execution conditions and weights, or directly based on the weights. This process will not be discussed in detail here. Furthermore, the load weight can also be considered the cluster weight.

[0084] That is, the load capacity of multiple clusters mentioned above is used to select the target cluster, or the cluster with the highest weight can be selected as the target cluster.

[0085] It should also be noted that although the target tasks for snapshot billing do not depend on a specific cluster, a weighting algorithm can be used to determine load information and select the target cluster to better select the cluster. The corresponding weight for the cluster executing the target task for snapshot billing needs to consider the following load parameters: BPS or latency for reading and writing OSS, the average memory or CPU load of the entire machine, the host's network pressure, and the number of target tasks. In other words, the corresponding weights for different target tasks can take different load parameters into account. Therefore, for different target tasks, the weight of each cluster can be determined separately. Alternatively, a weight can be determined based on all load parameters to select the target cluster. This will not be discussed in detail.

[0086] In addition, after generating the corresponding target task, the idempotence of the task needs to be processed. Figure 3 As shown, task manager 302 executes step 314: processing task idempotence. That is, after generating a task, task manager 302 needs to determine whether the task is unique. Alternatively, it needs to determine whether the task has been generated before within a preset time. It can search for the task to determine whether the same task exists. This can be done by searching a database or a local cache. This search is performed based on the information carried by the task, which is also included in the request.

[0087] When the corresponding task is found, the task to be executed is not executed, otherwise the subsequent steps are continued to execute the task to be executed.

[0088] As mentioned above, it is also necessary to store the generated tasks. This can be done in local cache or database storage. Figure 3As shown, the task manager 302 executes step 315: caches the corresponding task (caches the task to be executed under the premise of meeting the task idempotence), for example, stores it in the cache map. Secondly, the task manager 302 executes to store the corresponding task in the database 308 (that is, stores the task to be executed). When the task manager 302 executes this step, it needs to store it through the storage manager (Store Manager (Cache)) 305. Specifically, the task manager 302 executes step 316: stores the corresponding task in the storage manager 305. Then, the storage manager 305 executes step 317: stores the corresponding task in the database 308. Among them, the database 308 is a database deployed on the computing equipment at the computer room level.

[0089] After executing step 318, task manager 302 may execute step 319: sending a response message to remote procedure call service 301. Remote procedure call service 301 then executes step 320: sending a response message to application program interface gateway 201, which then returns the response message to the computer's interface for display to the user. This response message indicates that the corresponding request has been received and processing has begun.

[0090] If the API gateway 201 does not receive a response, it will resend the corresponding request, such as a snapshot creation request, to ensure that the corresponding cloud server receives the request. Based on this, the task corresponding to the request needs to be processed idempotently. This will not be described in detail.

[0091] 103: Allocate the target task according to the selected target cluster through the snapshot master service, so that the target cluster receives the target task through the snapshot cluster service and executes the target task through the working nodes in the target cluster.

[0092] For example, as described above, after selecting the target cluster, the snapshot master service on the cloud server can send the target task to the corresponding cluster through the snapshot cluster service, so that the working nodes in the corresponding cluster can execute the target task.

[0093] More specifically, for target tasks that don't rely on a specific cluster, such as snapshot billing target tasks, the snapshot master service can send the target task directly to the snapshot cluster service in the target cluster. Upon receiving the target task, the snapshot cluster service can further assign the target task to a snapshot server in the cluster for execution. Alternatively, the target task can be assigned to at least two snapshot servers in the cluster, allowing them to collaborate in executing the target task. When executing the task, the task can be executed based on the information contained in the target task, such as which data to snapshot.

[0094] In addition, the execution of the target task is performed in a separate thread pool using coroutines.

[0095] For target tasks that depend on a specific cluster, such as creating a snapshot. Figure 3 As shown, the task manager 302 executes step 325: starting the task. That is, the task manager 302 sends the target task to the computer room-level cloud disk management and control service 306. The computer room-level cloud disk management and control service 306 sends the target task to the corresponding cluster-level cloud disk management and control service 307 based on the target cluster corresponding to the target task, so as to execute step 326: creating a snapshot.

[0096] More specifically, after receiving the target task, the cluster-level cloud disk management and control service 307 may send the target task to the cloud disk server corresponding to the target cluster, ie, the block server, to execute the creation of the snapshot.

[0097] In addition, if Figure 2 As shown, for each cluster 203, the block server 2034 (i.e., the cloud disk server) in cluster 203 can send load information to the block control master service 2033 (i.e., the cluster-level cloud disk control service), which then sends the load information to the snapshot cluster service 2031. Snapshot server 2032 can also send load information to the snapshot cluster service 2031, which then reports the load information to the snapshot master service 202. After receiving the load information, snapshot cluster service 2031 can return information indicating receipt to the block control master service 2033 and snapshot server 2032.

[0098] After starting a task, you can update the task status for subsequent query of the task status.

[0099] Specifically, the method 100 also includes: assigning the target task to the target task through the snapshot master service and completing the execution, recording the task status of the target task; receiving a request to query the task status through the snapshot master service, and searching for the task status of the corresponding task from the local memory; if not found, searching for the task status of the corresponding task through the database; if not found, searching for the task status of the corresponding task from the target cluster.

[0100] For example, according to the above, after starting the task, if Figure 3 As shown, task manager 302 executes step 327: updates the task status to storage manager 305. For example, the task status of creating a snapshot is recorded as started, in progress, or completed. Storage manager 305 executes step 328: updates the task status to database 308. For example, the task status of creating a snapshot is recorded as started, in progress, or completed.

[0101] After recording the task status, you can provide a query of the task status. Figure 3As shown, the application program interface gateway 201 can send a query request to the remote procedure call service 301 based on the query request sent by the user through the computer's web interface to execute step 329: querying the snapshot task status. The application program interface gateway 201 can also automatically and periodically send a query request to the remote procedure call service 301. After receiving the request, the remote procedure call service 301 sends a query request to the task manager 302 to execute step 330: querying the snapshot task status. After receiving the request, the task manager 302 executes step 331: querying the task status from the (local) storage. If the task status is found, the remote procedure call service 301 executes step 336: sending the task status. If not, the task status is queried from the database. At this time, the task manager 302 will first send a request to the storage manager 305 to query the task status from the database to execute step 332: querying the task status from the database. After receiving the request, the storage manager 305 first sends a request to the database 308 to query the task status from the database, thereby executing step 333: Querying the task status from the database. If the query is successful, the query result is returned to the task manager 302, and step 336: Sending the task status is executed through the remote procedure call service 301. If the query is not successful, the task manager 302 can send a query request to the data center-level cloud disk management service 306 to execute step 334: Querying the task status from the data center-level cloud disk management service. After receiving the request, the data center-level cloud disk management service 306 sends a query request to the cluster-level cloud disk management service 307 that is executing the target task, thereby executing step 335: Querying the snapshot task status. After the task status is found, such as "Processing" or "Completed", the query result is returned to the task manager 302, and step 336: Sending the task status is executed through the remote procedure call service 301.

[0102] It should be understood that in addition to the aforementioned database that can record task status, the cluster-level cloud disk management service in the corresponding target cluster can also record task status, as well as the snapshot master control service.

[0103] When the stored data in the database expires, the expired data can be recycled. The expired data may include task status and stored tasks to be executed. Figure 3As shown, the storage manager 305 in the quick find master control service 202 can recycle expired data on a regular basis. The storage manager 305 can send a recycling request or instruction to the database to execute step 337: recycle task data. Among them, task data is expired data about the task. Specifically, the storage manager 305 can obtain or relocate expired data from the data table in the database to a preset history table as historical data. Then, the preset history table is cleaned up on a regular basis, and expired data in the historical data in the preset history table can be recycled or destroyed (the expired data here is the expired data in the historical data).

[0104] In addition, the method 100 also includes: creating a snapshot management and control system, the snapshot management and control system includes a snapshot master service and a snapshot cluster service; the snapshot master service is deployed in a regional-level device and can be used to execute the method 100; the snapshot cluster service is deployed in a corresponding cluster and can be used to report load information to the snapshot master module and execute target tasks; a storage management service is also deployed in the corresponding cluster and can be used to execute target tasks and store corresponding task execution results.

[0105] Since it has been explained in the previous article, I will not repeat it here. I will just explain that the architecture including snapshot master service and snapshot cluster service is called snapshot control system. Figure 2 The content shown.

[0106] The SnapshotMaster service primarily manages requests and responds to snapshot control requests within the entire region, including external API requests and internal control command requests. It also manages clusters. It manages all clusters hosting snapshot cluster services within the region, collects load information reported by clusters, and calculates the weight for scheduling tasks of each type across all clusters, known as the cluster weight. It also manages policies, such as snapshot policy configuration, which generates scheduled tasks, such as snapshot billing and snapshot recycling. (Snapshot billing and snapshot recycling tasks can be generated periodically, and subsequent task processing is performed based on the above descriptions, which will not be discussed in detail here.) It also manages tasks. For example, it converts external user requests into corresponding pending tasks, handles task idempotence, persistence (such as database storage), and adds tasks to priority queues. This service also features a global task scheduler: it selects the cluster with the highest weight based on task type, enabling intelligent global task scheduling and upload or download flow control. If the target cluster has the highest weight and meets the execution conditions, it indicates that the current cluster can fully meet the task's processing requirements, including bandwidth control. On the contrary, it means that it cannot be satisfied, then the control of computing resources and the control of bandwidth flow in the network are also achieved.

[0107] As for the snapshot cluster service (SnapshotCluster), its main implementation is: management of working nodes within the cluster. For example, managing the working node workers within the cluster: snapshot server (SnapshotServer). It can also implement task management. For example, the response processing of the snapshot control function within the cluster, including task scheduling and retry mechanism, metadata persistence, etc. Among them, after receiving the target task, the target task can be assigned to the corresponding snapshot server. When the response information of receiving the target task is not received from the corresponding server, it can also be retried and the target task can be resent to the corresponding snapshot server. In addition, the task status of the target task can also be persistently stored. The service can also implement data collection, such as regularly sending heartbeat information to SnapshotMaster to collect and report the snapshot task progress (that is, the task status, so that the service stores the received task status in the local storage), cluster load information, cluster storage capacity and other information.

[0108] It should also be noted that the system deployed through the embodiment of the present application can manage cloud disk and snapshot management services separately, and has priority-based closed-loop management and scheduling capabilities, that is, the underlying information is fed back to the upper layer through a feedback mechanism for global scheduling to achieve decision-making analysis and utilization.

[0109] This can reduce the poor isolation and poor online stability caused by the tight coupling between the cloud disk and the snapshot service. The service level agreement (SLA) of the snapshot service is much lower than the SLA of the cloud disk service. Therefore, bugs in the snapshot function may cause abnormalities in the cloud disk function and even seriously amplify the fault level. The newly added management and control requirements in the embodiment of the present application do not require modifications to the existing cloud disk management services or modules, thereby improving scalability. Without intruding into the cloud disk management service, combined with the load information of the cluster reported by the downstream, a decision factor is provided for task scheduling to achieve closed-loop management and control, ultimately ensuring the safe and stable operation of the underlying layer.

[0110] Based on this, the embodiments of the present application have the ability to schedule according to snapshot service priority and the ability to perform global flow control based on cluster service load information, which enhances scalability. The decoupling of snapshot and cloud disk services enables independent development and operation and maintenance. Bugs in snapshots will not affect the functionality of cloud disk services. Through the API gateway, we focus on API control entry and achieve service sinking.

[0111] Load balancing can also be performed for tasks that don't rely on specific clusters. Snapshot services don't impact cloud disk services, while fully utilizing computing resources within the region. This makes cloud disk management and control services more lightweight and enhances service security isolation. This provides a strong guarantee for the stable operation of region snapshots and cloud disk services across the entire region.

[0112] Figure 4 This is a structural diagram of a task scheduling system provided by an exemplary embodiment of the present application. Figure 4 As shown, the system 400 may include: a first device 401 and a second device 402 .

[0113] The first device 401 may be a device with certain computing capabilities, capable of sending data to the second device 402 and receiving data sent by the second device 402. The basic structure of the first device 401 may include at least one processor. The number of processors may depend on the configuration and type of the device with certain computing capabilities. The device with certain computing capabilities may also include memory, which may be volatile, such as RAM, or non-volatile, such as read-only memory (ROM), flash memory, or both. The memory typically stores an operating system (OS), one or more application programs, and may also store program data. In addition to the processing unit and memory, the device with certain computing capabilities also includes some basic configurations, such as a network card chip, an I / O bus, a display component, and some peripheral devices. Optionally, some peripheral devices may include, for example, a keyboard, a stylus, etc. Other peripheral devices are well known in the art and are not described in detail here. Optionally, the first device 401 may be a smart terminal, such as a mobile phone, a desktop computer, a laptop, a tablet computer, etc.

[0114] Second device 402 refers to a device that can provide computing and processing services in a network virtual environment, and can also refer to a device that utilizes a network to perform task processing. Physically, second device 402 can be any device capable of providing computing services, responding to service requests, and performing task processing, such as a cloud server, cloud host, virtual center, or conventional server, with a database configured thereon. Second device 402 primarily comprises a processor, hard drive, memory, and system bus, similar to a general-purpose computer architecture.

[0115] Specifically, the second device 402 receives a request associated with a task to be executed through the snapshot master service, and generates a task to be executed according to the request; selects a target task from multiple tasks to be executed according to the priority of the task to be executed through the snapshot master service, and selects a target cluster for executing the target task through the snapshot cluster service; allocates the target task according to the selected target cluster through the snapshot master service, so that the target cluster receives the target task through the snapshot cluster service, and executes the target task through the working node in the target cluster.

[0116] Specifically, the first device 401 sends a request associated with the task to be performed to the second device 402 .

[0117] Specifically, the second device 402 receives a request associated with the snapshot service through the snapshot master service, determines the type of the task to be executed according to the request information carried in the request, and generates a corresponding task to be executed.

[0118] Specifically, the second device 402 selects multiple target tasks corresponding to different priorities from multiple tasks to be executed through the snapshot master service according to different priorities, and the number of target tasks corresponding to high priorities is greater than the number of target tasks corresponding to low priorities; and selects the target cluster according to the load capacity of multiple clusters through the snapshot cluster service, and the load capacity is expressed as the situation of the corresponding cluster executing the target task.

[0119] Specifically, the second device 402, through the snapshot master service, places the task to be executed into a priority queue corresponding to the priority according to the priority of the task to be executed; according to different priorities, multiple target tasks are selected from different priority queues, and the number of target tasks selected from the high priority queue is greater than the number of target tasks selected from the low priority queue.

[0120] In addition, the second device 402 obtains the load information of multiple clusters used to execute the target task reported by the snapshot cluster service through the snapshot master service, and determines the load capacity corresponding to the cluster according to the load information.

[0121] In addition, the second device 402 selects a target cluster from the plurality of clusters according to the execution condition and load capacity of the target task through the snapshot master service.

[0122] In addition, when there is no target cluster that meets the execution condition of the current target task among the multiple clusters, the second device 402 selects a corresponding target cluster for a target task with a lower priority than the current target task through the snapshot master service.

[0123] In addition, when the type of the task to be executed is a synchronous type, the second device 402 directly selects the cluster with the highest load capacity from multiple clusters as the target cluster through the snapshot master service for allocating the task to be executed, so that the target cluster executes the task to be executed.

[0124] Specifically, the second device 402 determines the load weight of the corresponding cluster as the load capacity according to the load information through the snapshot master service.

[0125] In addition, the second device 402, through the snapshot master service, assigns the target task to the target task and completes the execution, and records the task status of the target task; receives a request to query the task status through the snapshot master service, and searches for the task status of the corresponding task from the local storage; if not found, searches for the task status of the corresponding task through the database; if not found, searches for the task status of the corresponding task from the target cluster.

[0126] The system may further include a third device, which is similar in implementation to the second device 402 and will not be described in detail. It is only to be noted that the third device may be implemented in the form of a cluster device.

[0127] The third device may be deployed with a snapshot cluster service, which may be used to report load information to the snapshot master control module and execute target tasks; a storage management service may also be deployed in the corresponding cluster, which may be used to execute target tasks and store corresponding task execution results.

[0128] In the scenario of creating a snapshot, the user can obtain the service interface of the second device 402, such as the cloud server, such as the snapshot service interface, through the web browser installed on the first device 401, such as a computer. The user sends an API (Application Programming Interface) request through the interface, that is, executes step 411: send a snapshot creation request. The request is used to create a snapshot, that is, the API request can also be an API request to create a snapshot. The request is sent to the API gateway of the cloud server through the computer. Then, the API gateway filters the request and forwards it to the snapshot master service on the corresponding cloud server to generate a corresponding task to be executed: create a snapshot task to be executed.

[0129] The Snapshot Master Service places pending tasks into corresponding priority queues based on their priorities. The Snapshot Master Service then polls these priority queues and selects the corresponding number of target tasks from the queues, based on the number of target tasks at each priority level. For example, the highest priority, P1, has 500 target tasks; the second highest priority, P2, has 400 target tasks; the third highest priority, P3, has 300 target tasks; and the fourth highest priority, P4, has 200 target tasks.

[0130] When a pending snapshot creation task is polled, it can be used as the target task. Based on the cluster load information reported by the snapshot cluster service, the cluster with the best load information is selected. For target tasks that depend on a specific cluster, such as the snapshot creation task, the best cluster can be selected first.

[0131] Then, it is also possible to determine whether the better cluster meets the execution condition based on the execution condition. If it does, the cluster is selected. Otherwise, the task can be skipped and the next target task can be continued. The next target task is a target task with a low priority. If the cluster cannot execute the target task in P1, the task is skipped and the target task in P2 is executed.

[0132] After the cluster is selected, the target task can be sent to the corresponding cluster, so that the working nodes in the corresponding cluster can execute the target task. The result of successful creation is returned to the user's computer, that is, step 412 is executed: returning the result of successful creation.

[0133] For the contents not described in detail here, please refer to the previous content and I will not repeat them here.

[0134] In the above embodiment, the first device 401 and the second device 402 are connected to the network. If the first device 401 and the second device 402 are connected for communication, the network standard of the mobile network can be any one of 2G (GSM), 2.5G (GPRS), 3G (WCDMA, TD-SCDMA, CDMA2000, UTMS), 4G (LTE), 4G+ (LTE+), WiMax, 5G, etc.

[0135] Figure 5 A schematic diagram of the structural framework of a task scheduling device provided for an exemplary embodiment of the present application. The device 500 can be applied to a computing device, such as a cloud server. More specifically, it can be applied to the created snapshot management and control system, which includes a snapshot master service and a snapshot cluster service. The snapshot master service is deployed in a regional-level device (such as the above-mentioned cloud server), and the snapshot cluster service is deployed in the corresponding cluster device. The device 500 includes: a generation module 501, a selection module 502, and an allocation module 503; the functions of each module are described in detail below:

[0136] The generating module 501 is configured to receive a request associated with a task to be executed through the snapshot master service, and generate the task to be executed according to the request.

[0137] The selection module 502 is configured to select a target task from a plurality of tasks to be executed according to the priorities of the tasks to be executed through the snapshot master service, and select a target cluster for executing the target task through the snapshot cluster service.

[0138] The allocation module 503 is configured to allocate the target task according to the selected target cluster through the snapshot master service, so that the target cluster receives the target task through the snapshot cluster service and executes the target task through the working nodes in the target cluster.

[0139] Specifically, the generation module 501 is used to: receive a request associated with the snapshot service through the snapshot master service, determine the type of the task to be executed according to the request information carried in the request, and generate the corresponding task to be executed.

[0140] Specifically, the selection module 502 includes: a selection unit, which is used to select multiple target tasks corresponding to different priorities from multiple tasks to be executed according to different priorities through the snapshot master service, and the number of target tasks corresponding to high priorities is greater than the number of target tasks corresponding to low priorities; a selection unit, which is used to select a target cluster according to the load capacity of multiple clusters through the snapshot cluster service, and the load capacity is expressed as the situation of the corresponding cluster executing the target task.

[0141] Specifically, the selection module 502 includes: a placement unit, which is used to place the task to be executed into a priority queue corresponding to the priority according to the priority of the task to be executed through the snapshot master service; the selection unit is also used to select multiple target tasks from different priority queues according to different priorities, and the number of target tasks selected from the high-priority queue is greater than the number of target tasks selected from the low-priority queue.

[0142] Specifically, the selection unit is configured to obtain load information of multiple clusters used to execute the target task reported by the snapshot cluster service through the snapshot master control service, and determine the load capacity corresponding to the cluster according to the load information.

[0143] In addition, the selection unit is used to select a target cluster from multiple clusters according to the execution conditions and load capacity of the target task through the snapshot master service.

[0144] Specifically, the selection unit is configured to select a corresponding target cluster for a target task with a lower priority than the current target task through the snapshot master service when no target cluster meeting the execution condition of the current target task exists among the multiple clusters.

[0145] In addition, the selection unit is used to select the cluster with the highest load capacity from multiple clusters as the target cluster through the snapshot master service when the type of the task to be executed is a synchronous type, and to allocate the task to be executed so that the target cluster executes the task to be executed.

[0146] Specifically, the selection unit is configured to determine the load weight of the corresponding cluster as the load capacity according to the load information through the snapshot master service.

[0147] In addition, the device 500 also includes: a recording module, which is used to assign the target task to the target task through the snapshot master service and record the task status of the target task; a search module, which is used to receive a request for querying the task status through the snapshot master service and search for the task status of the corresponding task from the local storage; a search module, which is used to search for the task status of the corresponding task in the database if the task status is not found; if the task status is not found, the task status of the corresponding task is searched from the target cluster.

[0148] For details of the device 500 that are not fully detailed, please refer to the above description and will not be repeated here.

[0149] The above describes Figure 5 The internal functions and structure of the device 500 shown, in one possible design, Figure 5 The structure of the apparatus 500 shown can be implemented as a computing device, such as a cloud server. Figure 6 As shown, the device 600 may include: a memory 601, a processor 602;

[0150] The memory 601 is used to store computer programs.

[0151] Processor 602 is used to execute a computer program to: receive a request associated with a task to be executed through a snapshot master service, and generate a task to be executed according to the request; select a target task from multiple tasks to be executed according to the priority of the task to be executed through the snapshot master service, and select a target cluster for executing the target task through the snapshot cluster service; allocate the target task according to the selected target cluster through the snapshot master service, so that the target cluster receives the target task through the snapshot cluster service and executes the target task through the working node in the target cluster; wherein the created snapshot management and control system includes a snapshot master service and a snapshot cluster service, the snapshot master service is deployed in the regional-level device, and the snapshot cluster service is deployed in the corresponding cluster device.

[0152] Specifically, the processor 602 is configured to: receive a request associated with the snapshot service through the snapshot master service, determine the type of the task to be executed according to the request information carried in the request, and generate a corresponding task to be executed.

[0153] Specifically, processor 602 is specifically used to: select multiple target tasks corresponding to different priorities from multiple tasks to be executed according to different priorities through the snapshot master service, and the number of target tasks corresponding to high priorities is greater than the number of target tasks corresponding to low priorities; select the target cluster according to the load capacity of multiple clusters through the snapshot cluster service, and the load capacity is expressed as the situation of the corresponding cluster executing the target task.

[0154] Specifically, processor 602 is specifically used to: place the task to be executed into a priority queue corresponding to the priority according to the priority of the task to be executed through the snapshot master service; select multiple target tasks from different priority queues according to different priorities, and the number of target tasks selected from the high priority queue is greater than the number of target tasks selected from the low priority queue.

[0155] In addition, the processor 602 is further configured to obtain load information of multiple clusters used to execute the target task reported by the snapshot cluster service through the snapshot master service, and determine the load capacity corresponding to the cluster according to the load information.

[0156] In addition, the processor 602 is further configured to select a target cluster from multiple clusters according to the execution conditions and load capacity of the target task through the snapshot master service.

[0157] Specifically, the processor 602 is configured to: when there is no target cluster meeting the execution condition of the current target task among the multiple clusters, select a corresponding target cluster for a target task with a lower priority than the current target task through the snapshot master service.

[0158] In addition, the processor 602 is specifically configured to: when the type of the task to be executed is a synchronous type, directly select the cluster with the highest load capacity from multiple clusters as the target cluster through the snapshot master service for allocating the task to be executed, so that the target cluster executes the task to be executed.

[0159] Specifically, the processor 602 is configured to determine the load weight of the corresponding cluster as the load capacity according to the load information through the snapshot master service.

[0160] In addition, processor 602 is also used to: assign the target task to the target task through the snapshot master service and record the task status of the target task; receive a request to query the task status through the snapshot master service, and search for the task status of the corresponding task from the local memory; if not found, search for the task status of the corresponding task through the database; if not found, search for the task status of the corresponding task from the target cluster.

[0161] An exemplary embodiment of the present application provides a snapshot management and control system, including: a snapshot master service and a snapshot cluster service, the snapshot master service is deployed in a regional-level device, and the snapshot cluster service is deployed in a corresponding cluster device; the snapshot master service is used to receive requests associated with tasks to be executed, and generate tasks to be executed according to the requests; the snapshot master service is used to select a target task from multiple tasks to be executed according to the priority of the tasks to be executed, and select a target cluster for executing the target task through the snapshot cluster service; the snapshot master service is used to allocate the target task according to the selected target cluster; the snapshot cluster service is used to receive the target task, enable the target cluster to receive the target task, and execute the target task through the working node in the target cluster.

[0162] Since this has been explained in the previous article, I will not repeat it here. If you find it is not exhaustive, please refer to the previous article.

[0163] In addition, an embodiment of the present invention provides a computer program product, including a computer program or instructions, wherein when the computer program is executed by a processor, the processor is caused to implement Figure 1-3 The steps of a task scheduling method in the method embodiment will not be described in detail.

[0164] An embodiment of the present invention provides a computer storage medium, which, when a computer program is executed by one or more processors, causes the one or more processors to implement Figure 1-3The steps of a task scheduling method in the method embodiment will not be described in detail.

[0165] In addition, some of the processes described in the above embodiments and the accompanying drawings include multiple operations that appear in a specific order, but it should be clearly understood that these operations may not be executed in the order in which they appear in this article or may be executed in parallel. The sequence numbers of the operations, such as 101, 102, 103, etc., are only used to distinguish between different operations, and the sequence numbers themselves do not represent any execution order. In addition, these processes may include more or fewer operations, and these operations may be executed in sequence or in parallel. It should be noted that the descriptions of "first", "second", etc. in this article are used to distinguish different messages, devices, modules, etc., and do not represent a sequential order, nor do they limit "first" and "second" to different types.

[0166] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, i.e., they may be located in one location or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of the present embodiment. Persons of ordinary skill in the art will be able to understand and implement the present invention without inventive effort.

[0167] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by adding a necessary general hardware platform, and of course can also be implemented by a combination of hardware and software. Based on this understanding, the above technical solution, or the part that contributes to the prior art, can be embodied in the form of a computer product. The present invention can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0168] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as a combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable multimedia data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable multimedia data processing device generate instructions for implementing the process in the flowchart and / or block diagram. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0169] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable multimedia data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.

[0170] These computer program instructions can also be loaded onto a computer or other programmable multimedia data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable device to implement the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0171] In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.

[0172] Memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.

[0173] Computer-readable media includes permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory computer-readable media (transitory media), such as modulated data signals and carrier waves.

[0174] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.

Claims

1. A task scheduling method, applicable to a snapshot management system for decoupling cloud disk snapshots from cloud disk services provided by a cloud disk management service. The snapshot management system includes a snapshot master service and a snapshot cluster service. The snapshot master service is deployed on a regional device, and the snapshot cluster service is deployed on corresponding cluster devices. The method comprises: Receive a snapshot request through the snapshot master service, and generate a snapshot task to be executed according to the snapshot request; Selecting a target snapshot task from a plurality of snapshot tasks to be executed according to the priority of the snapshot task to be executed by the snapshot master service, and selecting a target cluster for executing the target snapshot task by the snapshot cluster service; The target snapshot task is allocated according to the selected target cluster through the snapshot master service, so that the target cluster receives the target snapshot task through the snapshot cluster service and executes the target snapshot task through the working nodes in the target cluster.

2. The method according to claim 1, wherein receiving a snapshot request through a snapshot master service and generating a snapshot task to be executed according to the snapshot request comprises: A snapshot request is received through the snapshot master service, and the type of the snapshot task to be executed is determined according to the request information carried in the snapshot request, and a corresponding snapshot task to be executed is generated.

3. The method according to claim 1, wherein the selecting, by the snapshot master service, a target snapshot task from a plurality of snapshot tasks to be executed according to the priority of the snapshot task to be executed, and selecting, by the snapshot cluster service, a target cluster for executing the target snapshot task, comprises: The snapshot master service selects multiple target snapshot tasks corresponding to different priorities from multiple snapshot tasks to be executed according to different priorities. The number of target snapshot tasks corresponding to high priorities is greater than the number of target snapshot tasks corresponding to low priorities. The snapshot cluster service selects a target cluster based on the load capacity of multiple clusters. The load capacity is represented by the performance of the target snapshot task by the corresponding cluster.

4. The method according to claim 1, wherein selecting a target snapshot task from a plurality of snapshot tasks to be executed according to the priority of the snapshot task to be executed by the snapshot master service comprises: Putting the snapshot task to be executed into a priority queue corresponding to the priority according to the priority of the snapshot task to be executed by the snapshot master service; According to different priorities, multiple target snapshot tasks are selected from different priority queues, and the number of target snapshot tasks selected from the high priority queue is greater than the number of target snapshot tasks selected from the low priority queue.

5. The method according to claim 3, further comprising: The snapshot master service obtains the load information of the cluster reported by the snapshot cluster service, and determines the load capacity corresponding to the cluster based on the load information.

6. The method according to claim 3 or 5, further comprising: The snapshot master service selects a target cluster from multiple clusters according to the execution conditions of the target snapshot task and the load capacity of the cluster.

7. The method according to claim 6, further comprising: When there is no target cluster that meets the execution condition of the current target snapshot task among the multiple clusters, the snapshot master service selects a corresponding target cluster for the target snapshot task with a lower priority than the current target snapshot task.

8. The method according to claim 3 or 4, further comprising: When the type of the snapshot task to be executed is a synchronous type, the snapshot master service directly selects the cluster with the highest load capacity from multiple clusters as the target cluster for allocating the snapshot task to be executed, so that the target cluster executes the snapshot task to be executed.

9. The method according to claim 5, wherein determining the load capacity corresponding to the cluster based on the load information comprises: The snapshot master service determines the load weight of the corresponding cluster based on the load information as the load capacity.

10. The method according to claim 1, further comprising: After the target snapshot task is assigned to the target snapshot task by the snapshot master service, the snapshot task status of the target snapshot task is recorded; Receive a request to query the snapshot task status through the snapshot master service, and search the snapshot task status of the corresponding snapshot task from the local storage; If not found, search the database for the task status of the corresponding snapshot task; If not found, search the target cluster for the task status of the corresponding snapshot task.

11. A snapshot management system, the snapshot management system being used to decouple cloud disk snapshots from cloud disk services provided through a cloud disk management service, comprising: A snapshot master service and a snapshot cluster service, wherein the snapshot master service is deployed in a regional-level device and the snapshot cluster service is deployed in a corresponding cluster device; The snapshot master control service is used to receive a snapshot request and generate a snapshot task to be executed according to the snapshot request; The snapshot master service is configured to select a target snapshot task from a plurality of snapshot tasks to be executed according to the priority of the snapshot task to be executed, and select a target cluster for executing the target snapshot task through the snapshot cluster service; The snapshot master service is used to allocate the target snapshot task according to the selected target cluster; The snapshot cluster service is configured to receive a target snapshot task, enable the target cluster to receive the target snapshot task, and execute the target snapshot task through a working node in the target cluster.

12. A computing device comprising: Memory, processor; The memory is used to store computer programs; The processor executes the computer program to: Receive a snapshot request through the snapshot master service, and generate a snapshot task to be executed according to the snapshot request; Selecting a target snapshot task from a plurality of snapshot tasks to be executed according to the priority of the snapshot task to be executed by the snapshot master service, and selecting a target cluster for executing the target snapshot task by the snapshot cluster service; Allocate the target snapshot task according to the selected target cluster through the snapshot master service, so that the target cluster receives the target snapshot task through the snapshot cluster service and executes the target snapshot task through the working nodes in the target cluster; Among them, the snapshot management system created for decoupling cloud disk snapshots from cloud disk services provided through cloud disk management services includes a snapshot master service and a snapshot cluster service. The snapshot master service is deployed in the device at the regional level, and the snapshot cluster service is deployed in the corresponding cluster device.

13. A computer-readable storage medium storing a computer program, wherein when the computer program is executed by one or more processors, the one or more processors are caused to implement the steps of the method according to any one of claims 1 to 10.

14. A computer program product comprising a computer program or instructions, wherein: When the computer program is executed by a processor, the processor is caused to implement the steps of the method according to any one of claims 1 to 10.

Citation Information

Patent Citations

  • Computing system for hierarchical task scheduling

    CN110914805A

  • Task scheduling method and device, electronic equipment and computer readable storage medium

    CN111831420A

  • Task selection data processing method, device and equipment and storage medium

    CN111930486A