Job scheduling method, system, device and computer-readable storage medium

By receiving the target job constructed by the client, scheduling it using triggers and sharders, splitting it into target tasks and assigning them to the execution end for processing, the problem of insufficient applicability of the job scheduling framework in the existing technology is solved, and multi-dimensional cost reduction and sustainable integration improvement are achieved.

CN114995905BActive Publication Date: 2025-09-05JINAN INSPUR DATA TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210611143.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-31
Publication Date
2025-09-05
Estimated Expiration
2042-05-31

AI Technical Summary

Technical Problem

Existing job scheduling frameworks such as Quartz and xx-job have shortcomings in applicability and distributed scheduling, leading to chain reactions of job downtime and high development costs.

Method used

By receiving the target job constructed by the client, it is scheduled using triggers and sharders, split into target tasks, and assigned to the execution end for processing. It supports single-body and distributed startup methods, adopts asynchronous distribution and current limiting strategies, and persists jobs to avoid backlogs.

Benefits of technology

It achieves functional separation of the client, scheduling, and execution ends, reduces business development, operation and maintenance, and deployment costs, and improves the sustainable integration and applicability of operations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114995905B_ABST
    Figure CN114995905B_ABST
Patent Text Reader

Abstract

The present application discloses a method, system, device and computer-readable storage medium for job scheduling, which relates to job scheduling and is applied to a scheduling end to receive a target job constructed by a client, wherein the target job includes a trigger and a sharding device; if the triggering condition of the trigger is met, the target job is scheduled; according to the sharding condition of the sharding device, the target job is split into corresponding target tasks; and the target tasks are assigned to the execution end so that the execution end processes the target tasks. In the present application, the scheduling end starts to schedule the target job according to the triggering condition in the trigger, splits the target job into corresponding target tasks according to the sharding condition of the sharding device, and assigns the target tasks to the execution end so that the execution end executes the target job with the target task as the granularity, thereby ensuring the functional separation of the client, the scheduling end and the execution end, and can reduce business development costs, operation and maintenance costs and deployment costs in multiple dimensions, and improve the sustainable integration of the job, with good applicability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of job scheduling, and more specifically, to a job scheduling method, system, device, and computer-readable storage medium. Background Art

[0002] Currently, in the operation of computers and other systems, tasks are processed accurately and quickly in the form of jobs, which involves job scheduling. Currently, various job scheduling frameworks exist, such as Quartz and xx-job. Quartz has made significant contributions and provided guidance in the area of ​​time-based scheduling. However, as a development framework, Quartz's job submission is relatively static, meaning that the method for running each job is consistent. Furthermore, it cannot be directly used as middleware, requiring secondary development. xx-job has made significant efforts at the distributed level, expanding the requirements for microservices and RPC (Remote Procedure Call) approaches. However, its over-centralization can easily lead to service quality issues in its own scheduling center caused by customer implementations, resulting in a chain reaction of downtime for other microservice jobs, and its approach has limited applicability.

[0003] In summary, how to improve the applicability of job scheduling is an urgent problem to be solved by those skilled in the art. Summary of the Invention

[0004] The purpose of this application is to provide a job scheduling method that can, to a certain extent, solve the technical problem of how to improve the applicability of job scheduling. This application also provides a job scheduling system, an electronic device, and a computer-readable storage medium.

[0005] In order to achieve the above objectives, this application provides the following technical solutions:

[0006] A job scheduling method, applied to a scheduling end, includes:

[0007] Receive a target job constructed by a client, wherein the target job includes a trigger and a sharder;

[0008] If the triggering condition of the trigger is met, the target job is scheduled;

[0009] Splitting the target job into corresponding target tasks according to the sharding conditions of the sharder;

[0010] The target task is assigned to an execution end so that the execution end processes the target task.

[0011] Preferably, the startup mode of the dispatching terminal includes out-of-the-box use in a single-body mode;

[0012] Splitting the target job into corresponding target tasks includes:

[0013] Locally calling a sharding interface to split the target job into corresponding target tasks;

[0014] The allocating the target task to the execution end includes:

[0015] The execution interface is called locally to assign the target task to the execution end.

[0016] Preferably, the startup mode of the scheduling end includes microservice startup under distributed mode;

[0017] Splitting the target job into corresponding target tasks includes:

[0018] Remotely call the sharding interface to split the target job into the corresponding target tasks;

[0019] The allocating the target task to the execution end includes:

[0020] Remotely call the execution interface and assign the target task to the execution end.

[0021] Preferably, allocating the target task to the execution end includes:

[0022] Based on an asynchronous distribution method, the target task is assigned to the execution end.

[0023] Preferably, allocating the target task to the execution end includes:

[0024] Based on the current limiting strategy, the target task is assigned to the execution end.

[0025] Preferably, after receiving the target job constructed by the client, the method further includes:

[0026] Persist the target job in the database.

[0027] Preferably, the receiving client constructs a target job, wherein the target job includes a trigger and a sharder, including:

[0028] Receive the target job constructed by the client, where the target job includes a trigger, a sharder, and a job strategy; wherein the job strategy includes a logging strategy, a task backlog prevention strategy, a job execution recording strategy, a failure retry strategy, and a flow control strategy.

[0029] A job scheduling system, applied to a scheduling end, includes:

[0030] A first receiving module is configured to receive a target job constructed by a client, wherein the target job includes a trigger and a sharder;

[0031] A first scheduling module, configured to schedule the target job if a triggering condition of the trigger is met;

[0032] A first sharding module, configured to split the target job into corresponding target tasks according to the sharding conditions of the sharder;

[0033] The first allocation module is configured to allocate the target task to an execution end so that the execution end processes the target task.

[0034] An electronic device, comprising:

[0035] memory for storing computer programs;

[0036] A processor is used to implement the steps of any of the above-mentioned job scheduling methods when executing the computer program.

[0037] A computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the steps of any of the above-mentioned job scheduling methods.

[0038] The present application provides a job scheduling method, which is applied to the scheduling end and includes: receiving a target job constructed by a client, the target job including a trigger and a sharder; scheduling the target job if the triggering condition of the trigger is met; splitting the target job into corresponding target tasks according to the sharding condition of the sharder; and assigning the target task to the execution end so that the execution end processes the target task. In the present application, the client constructs the target job and sends it to the scheduling end; then the scheduling end starts to schedule the target job according to the triggering condition in the trigger. During this process, the target job can be split into corresponding target tasks according to the sharding condition of the sharder, and the target task is assigned to the execution end so that the execution end executes the target job with the target task as the granularity, ensuring the functional separation of the client, the scheduling end, and the execution end, and can reduce business development costs, operation and maintenance costs, and deployment costs in multiple dimensions. In addition, the scheduling settings of the job can be completed by performing corresponding business settings on the client, the scheduling end, and the execution end, thereby improving the sustainable integration of the job and having good applicability. The present application provides a job scheduling system, electronic device, and computer-readable storage medium that also solves corresponding technical problems. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are merely embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without any creative work.

[0040] Figure 1 A first flow chart of a job scheduling method provided in an embodiment of the present application;

[0041] Figure 2 A second flow chart of a job scheduling method provided in an embodiment of the present application;

[0042] Figure 3 A third flow chart of a job scheduling method provided in an embodiment of the present application;

[0043] Figure 4 A fourth flow chart of a job scheduling method provided in an embodiment of the present application;

[0044] Figure 5 A fifth flow chart of a job scheduling method provided in an embodiment of the present application;

[0045] Figure 6 A sixth flow chart of a job scheduling method provided in an embodiment of the present application;

[0046] Figure 7 A schematic diagram of the structure of a job scheduling system provided in an embodiment of the present application;

[0047] Figure 8 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application;

[0048] Figure 9 Another structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0049] The following will be combined with the 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 the embodiments. 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.

[0050] Currently, in the operation process of computers, etc., in order to process tasks accurately and quickly, tasks are processed in the form of jobs, which involves the scheduling of jobs. Currently, there are many solutions for job scheduling frameworks, such as Quartz and xx-job. Among them, Quartz has made many important contributions and guidance in the direction of time-wheel scheduling. However, as a development framework, Quartz is relatively static for job submission, that is, the method of each job running is consistent. At the same time, it cannot be used directly as middleware and requires secondary development. xx-job has made great efforts at the distributed level, expanding the requirements for microservices and RPC (Remote Procedure Call) directions. However, it is too centralized and easily causes service quality problems in its own scheduling center caused by customer implementation, thereby causing a chain reaction of downtime of other microservice jobs, and the method has poor applicability. In order to solve this technical problem, the present application provides a job scheduling method, system, electronic device and computer-readable storage medium.

[0051] See also Figure 1 , Figure 1 This is a first flow chart of a job scheduling method provided in an embodiment of the present application.

[0052] An embodiment of the present application provides a job scheduling method, which is applied to a scheduling end and may include the following steps:

[0053] Step S101: receiving a target job constructed by a client, where the target job includes a trigger and a sharder.

[0054] In actual applications, the scheduler can first receive the target job constructed by the client, and the target job can include triggers, splitters, etc. The trigger can be used to instruct the scheduler when to start scheduling the target job, and the splitter can be used to instruct the scheduler how to split the target job. The structure and type of the target job, trigger, and splitter can be determined according to actual needs and are not specifically limited in this application.

[0055] It should be noted that a job in this application refers to the collection of tasks a user requests a computer system to perform during a problem solving process or transaction processing. A job is a broader concept than a program. It encompasses not only the usual programs and data but also a job specification. The system uses this job specification to control the execution and operation of programs and data in file format, and establishes the data structure of a job control block in the system. In a batch processing system, jobs are the basic unit of data transferred from external storage to internal memory.

[0056] It should be noted that in specific application scenarios, the client can be embedded in the customer's business process, generate target business according to the corresponding business needs, and process the target business according to customer needs, such as modification, deletion, query, etc.; In addition, in the process of generating the target job, the client can use JobBuilder to build the target job according to user needs, and the user can set the three properties of job ID, trigger, and sharder. At the same time, it can also include but not be limited to the following job strategies: logging strategy, task backlog prevention strategy, job execution record strategy, failure retry strategy, current limiting strategy, etc. Correspondingly, the scheduling end receives the target job built by the client. Job, the target job includes triggers and shards, and the target job constructed by the client can be received. The target job includes triggers, shards, and job strategies, among which the job strategies include logging strategies, task backlog prevention strategies, job execution record strategies, failure retry strategies, and current limiting strategies. Afterwards, when the client transmits the target job to the scheduling end, it can use JobClient for RPC to submit the user-constructed target job to the scheduling end. At the same time, JobClient can also provide a series of job CRUD (add, query, modify, and delete) functions to meet the job operations that customers are concerned about, so that customers can use the client to obtain information such as the processing progress of the job.

[0057] Step S102: If the triggering condition of the trigger is met, the target job is scheduled.

[0058] In actual applications, after receiving the target job constructed by the client, the scheduling end can determine whether the trigger conditions in the trigger are met. If the trigger conditions are met, the target job can be scheduled. Otherwise, it can wait until the trigger conditions of the target job are met before scheduling the target job.

[0059] It should be noted that the trigger conditions in the trigger can be determined according to the specific application scenario. For example, the trigger conditions can be the execution time of the job, the prerequisites for executing the job, the performance of the scheduling end meeting the preset requirements, etc. This application does not make specific limitations here.

[0060] Step S103: Split the target job into corresponding target tasks according to the sharding conditions of the sharder.

[0061] In actual applications, after scheduling the target job, the scheduler can split the target job into corresponding target tasks according to the sharding conditions in the sharder, so that the target job can be processed in task units later.

[0062] It should be noted that the sharding conditions in the sharder can be determined according to the specific application scenario. For example, the sharding conditions can be sharding according to the preset task size, sharding according to the job process, etc. This application does not make specific restrictions here. In addition, it should be noted that because the target job is split into corresponding target tasks, and the target job is subsequently processed in units of tasks, the target tasks can be processed in parallel in the specific application scenario, thereby speeding up the processing efficiency of the target job, etc. Of course, the target tasks can also be processed accordingly according to other needs, and this application does not make specific restrictions here.

[0063] Step S104: Allocate the target task to the execution end so that the execution end processes the target task.

[0064] In actual applications, after the scheduler splits the target job into corresponding target tasks according to the sharding conditions of the sharder, it can assign the target tasks to the execution end so that the execution end processes the target tasks.

[0065] It should be noted that the number of execution terminals can be determined according to the specific application scenario, and the number of target tasks processed by a single execution terminal can also be determined according to the specific application scenario. In addition, in the process of allocating target tasks to the execution terminal from the scheduling terminal, the target tasks can be allocated to the execution terminal by routing, or a registration center can be set up at the scheduling terminal first, and the execution terminal registers the executable task range to the registration center, and the scheduling terminal then routes the target task to the execution terminal for execution based on the executable task range. In addition, in the process of processing target tasks at the execution terminal, the execution terminal can, based on the different tasks, customize the thread pool by the user, isolate the execution of tasks, etc. It should also be noted that in specific application scenarios, the execution terminal can also record the execution results of the target tasks and the corresponding operation logs and feedback, etc. This application does not make specific limitations here.

[0066] It should be noted that in specific application scenarios, the job scheduling method provided in this application can also be expanded as needed. For example, a task tracker and user submission strategy can be set in the scheduling end to track the task execution status with the help of the task tracker, and based on the user submission strategy, retries can be performed after task execution fails, and the task execution status and operation log can be reported.

[0067] The present application provides a job scheduling method, which is applied to the scheduling end and includes: receiving a target job constructed by a client, the target job including a trigger and a sharder; scheduling the target job if the triggering condition of the trigger is met; splitting the target job into corresponding target tasks according to the sharding condition of the sharder; and assigning the target task to the execution end so that the execution end processes the target task. In the present application, the client constructs the target job and sends it to the scheduling end; then the scheduling end starts to schedule the target job according to the triggering condition in the trigger. During this process, the target job can be split into corresponding target tasks according to the sharding condition of the sharder, and the target task is assigned to the execution end so that the execution end executes the target job with the target task as the granularity, ensuring the functional separation of the client, the scheduling end, and the execution end, and can reduce business development costs, operation and maintenance costs, and deployment costs in multiple dimensions. In addition, the scheduling settings of the job can be completed by simply making corresponding business settings for the client, the scheduling end, and the execution end, thereby improving the sustainable integration of the job and having good applicability.

[0068] See also Figure 2 , Figure 2 This is a second flow chart of a job scheduling method provided in an embodiment of the present application.

[0069] An embodiment of the present application provides a job scheduling method, which is applied to a scheduling end, and wherein the startup mode of the scheduling end includes out-of-the-box use in a single-unit mode, and may include the following steps:

[0070] Step S201: Receive a target job constructed by a client, where the target job includes a trigger and a sharder.

[0071] Step S202: If the triggering condition of the trigger is met, the target job is scheduled.

[0072] Step S203: According to the sharding conditions of the sharder, the sharding interface is called locally to split the target job into corresponding target tasks.

[0073] Step S204: locally calling the execution interface and assigning the target task to the execution end so that the execution end processes the target task.

[0074] In actual applications, the configuration method of the scheduling end can be set according to specific needs. For example, the scheduling end can be configured as a monolithic application. In this case, the startup method of the scheduling end includes out-of-the-box use under the monolithic type. During this process, when the scheduling end splits the target job into corresponding target tasks, it only needs to locally call the sharding interface to split the target job into corresponding target tasks; when allocating the target task to the execution end, it only needs to locally call the execution interface to allocate the target task to the execution end.

[0075] It should be noted that in this embodiment, the scheduling end is configured as a monolithic application. The scheduling end schedules the target job through an out-of-the-box startup method. During the scheduling process, the target job can be split into corresponding target tasks by simply calling the sharding interface locally. The target task can be assigned to the execution end by simply calling the execution interface locally, which meets the user's demand for a monolithic application of the scheduling end and improves the user experience of the job scheduling method provided in this application.

[0076] See also Figure 3 , Figure 3 This is a third flow chart of a job scheduling method provided in an embodiment of the present application.

[0077] An embodiment of the present application provides a job scheduling method, which is applied to a scheduling end, and wherein a startup mode of the scheduling end includes a distributed microservice startup, and may include the following steps:

[0078] Step S301: Receive a target job constructed by a client, where the target job includes a trigger and a sharder.

[0079] Step S302: If the triggering condition of the trigger is met, the target job is scheduled.

[0080] Step S303: According to the sharding conditions of the sharder, the sharding interface is remotely called to split the target job into corresponding target tasks.

[0081] Step S304: remotely call the execution interface and assign the target task to the execution end so that the execution end processes the target task.

[0082] In actual applications, the configuration method of the scheduling end can be set according to specific needs. For example, the scheduling end can be configured as a distributed application. In this case, the startup method of the scheduling end includes the startup of microservices under distribution. In this process, when the scheduling end splits the target job into corresponding target tasks, it only needs to remotely call the sharding interface to split the target job into corresponding target tasks. When allocating target tasks to the execution end, it only needs to remotely call the execution interface to allocate the target tasks to the execution end.

[0083] It should be noted that in this embodiment, the scheduling end is configured as a distributed application, and the scheduling end schedules the target job through the startup method of microservice startup. During the scheduling process, the target job can be split into corresponding target tasks by simply calling the sharding interface remotely, and the target task can be assigned to the execution end by simply calling the execution interface remotely, which meets the user's demand for distributed applications of the scheduling end and improves the user experience of the job scheduling method provided in this application.

[0084] See also Figure 4 , Figure 4This is a fourth flow chart of a job scheduling method provided in an embodiment of the present application.

[0085] An embodiment of the present application provides a job scheduling method, which is applied to a scheduling end and may include the following steps:

[0086] Step S401: Receive a target job constructed by a client, where the target job includes a trigger and a sharder.

[0087] Step S402: If the triggering condition of the trigger is met, the target job is scheduled.

[0088] Step S403: Split the target job into corresponding target tasks according to the sharding conditions of the sharder.

[0089] Step S404: allocating the target task to the execution end based on the asynchronous distribution method, so that the execution end processes the target task.

[0090] In actual applications, when the scheduling end allocates target tasks to the execution end, if the number of target tasks is large, synchronously transmitting all target tasks to the execution end will occupy a large amount of the scheduling end's performance, making it difficult for the scheduling end to handle other matters. In order to avoid this problem, the scheduling end can allocate target tasks to the execution end based on asynchronous distribution.

[0091] It should be noted that in specific application scenarios, asynchronous distribution can be achieved by using the default asynchronous dispatcher provided by the delay queue. In this process, in order to facilitate users to know the running status of the job, the job execution tracker interface and the task tracker interface can also be set up. The job execution tracker interface intervenes to listen to the running status of the job, and the task tracker interface intervenes to listen to the start and end of the task, etc., so as to provide users with detailed job running status.

[0092] See also Figure 5 , Figure 5 This is the fifth flow chart of a job scheduling method provided in an embodiment of the present application.

[0093] An embodiment of the present application provides a job scheduling method, which is applied to a scheduling end and may include the following steps:

[0094] Step S501: Receive a target job constructed by a client, where the target job includes a trigger and a sharder.

[0095] Step S502: If the triggering condition of the trigger is met, the target job is scheduled.

[0096] Step S503: Split the target job into corresponding target tasks according to the sharding conditions of the sharder.

[0097] Step S504: Based on the current limiting strategy, the target task is assigned to the execution end so that the execution end processes the target task.

[0098] In actual applications, when the scheduling end allocates target tasks to the execution end, if the number of target tasks is large, the traffic consumed in transmitting the target tasks will be large, that is, a large amount of traffic on the scheduling end will be concentrated, making it difficult for the scheduling end to handle other matters. To avoid this problem, the scheduling end can allocate target tasks to the execution end based on the flow control strategy when allocating target tasks to the execution end.

[0099] See also Figure 6 , Figure 6 This is the sixth flow chart of a job scheduling method provided in an embodiment of the present application.

[0100] An embodiment of the present application provides a job scheduling method, which is applied to a scheduling end and may include the following steps:

[0101] Step S601: Receive a target job constructed by a client, where the target job includes a trigger and a sharder.

[0102] Step S602: persist the target job to the database.

[0103] In actual applications, when the client transmits a large number of target jobs to the scheduling end, the scheduling end may not be able to process the target jobs in a timely manner, that is, some target jobs will be accumulated in the scheduling end. At this time, in order for the scheduling end to receive the target jobs constructed by the client, the target jobs include triggers and shards, and can first persist the target jobs to the database. In this way, when a target job needs to be scheduled later, it only needs to obtain the target job from the database. This can avoid the situation where the scheduling end loses the target job in the process of processing the backlog of target jobs, thereby ensuring the accuracy of the job scheduling process.

[0104] Step S603: If the triggering condition of the trigger is met, the target job is scheduled.

[0105] Step S604: Split the target job into corresponding target tasks according to the sharding conditions of the sharder.

[0106] Step S605: Allocate the target task to the execution end so that the execution end processes the target task.

[0107] See also Figure 7 , Figure 7 A schematic diagram of the structure of a job scheduling system provided in an embodiment of the present application.

[0108] An embodiment of the present application provides a job scheduling system, which is applied to a scheduling end and may include:

[0109] The first receiving module 101 is used to receive a target job constructed by a client, where the target job includes a trigger and a sharder;

[0110] A first scheduling module 102 is configured to schedule a target job if a trigger condition of a trigger is met;

[0111] The first sharding module 103 is used to split the target job into corresponding target tasks according to the sharding conditions of the sharder;

[0112] The first assigning module 104 is configured to assign the target task to the execution end so that the execution end processes the target task.

[0113] The present application provides a job scheduling system, which is applied to the scheduling end and includes: a first receiving module 101 for receiving a target job constructed by a client, the target job including a trigger and a sharding device; a first scheduling module 102 for scheduling the target job if the trigger condition of the trigger is met; a first sharding module 103 for splitting the target job into corresponding target tasks according to the sharding condition of the sharding device; a first allocation module 104 for allocating the target task to the execution end so that the execution end processes the target task. In the present application, the client constructs the target job and sends it to the scheduling end; then the scheduling end starts to schedule the target job according to the trigger condition in the trigger. During this process, the target job can be split into corresponding target tasks according to the sharding condition of the sharding device, and the target task is allocated to the execution end so that the execution end executes the target job with the target task as the granularity, ensuring the functional separation of the client, the scheduling end, and the execution end, and can reduce the business development cost, operation and maintenance cost and deployment cost in multiple dimensions. In addition, only the corresponding business settings need to be made for the client, the scheduling end, and the execution end to complete the scheduling setting of the job, thereby improving the sustainable integration of the job and having good applicability.

[0114] An embodiment of the present application provides a job scheduling system, which is applied to a scheduling end. The startup mode of the scheduling end can include out-of-the-box use in a single-body mode.

[0115] Accordingly, the first sharding module may include:

[0116] The first sharding unit is used to locally call the sharding interface to split the target job into corresponding target tasks;

[0117] The first allocation module may include:

[0118] The first allocation unit is used to locally call the execution interface and allocate the target task to the execution end.

[0119] An embodiment of the present application provides a job scheduling system, which is applied to a scheduling end. The startup method of the scheduling end may include microservice startup in a distributed manner.

[0120] Accordingly, the first sharding module may include:

[0121] The first sharding unit is used to remotely call the sharding interface to split the target job into corresponding target tasks;

[0122] The first allocation module may include:

[0123] The first allocation unit is used to remotely call the execution interface and allocate the target task to the execution end.

[0124] An embodiment of the present application provides a job scheduling system, which is applied to a scheduling end. The first allocation module may include:

[0125] The second allocating unit is used to allocate the target task to the execution end based on an asynchronous distribution method.

[0126] An embodiment of the present application provides a job scheduling system, which is applied to a scheduling end. The first allocation module may include:

[0127] The third allocation unit is used to allocate target tasks to the execution end based on the current limiting strategy.

[0128] An embodiment of the present application provides a job scheduling system, which is applied to a scheduling end and may further include:

[0129] The first persistence module is configured to persist the target job in the database after the first receiving module receives the target job constructed by the client.

[0130] An embodiment of the present application provides a job scheduling system, which is applied to a scheduling end. The first receiving module may include:

[0131] The first receiving unit is used to receive the target job constructed by the client, where the target job includes a trigger, a sharder, and a job strategy; wherein the job strategy includes a logging strategy, a task backlog prevention strategy, a job execution recording strategy, a failure retry strategy, and a flow control strategy.

[0132] This application also provides an electronic device and a computer-readable storage medium, both of which have the corresponding effects of the job scheduling method provided in the embodiment of this application. Figure 8 , Figure 8 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.

[0133] An electronic device provided in an embodiment of the present application includes a memory 201 and a processor 202. The memory 201 stores a computer program. When the processor 202 executes the computer program, the following steps are implemented:

[0134] Receive the target job constructed by the client, which includes triggers and sharders;

[0135] If the triggering conditions of the trigger are met, the target job is scheduled;

[0136] Split the target job into corresponding target tasks according to the sharding conditions of the sharder;

[0137] Assign the target task to the execution end so that the execution end processes the target task.

[0138] An electronic device provided in an embodiment of the present application includes a memory 201 and a processor 202. A computer program is stored in the memory 201. When the processor 202 executes the computer program, the following steps are implemented: the startup method of the scheduling end includes out-of-the-box use in a single-body mode; receiving a target job constructed by a client, the target job includes a trigger and a sharder; if the triggering condition of the trigger is met, the target job is scheduled; the sharding interface is locally called to split the target job into corresponding target tasks and assign the target tasks to the execution end; the execution interface is locally called to assign the target task to the execution end so that the execution end processes the target task.

[0139] An electronic device provided by an embodiment of the present application includes a memory 201 and a processor 202. The memory 201 stores a computer program. When the processor 202 executes the computer program, the following steps are implemented: the startup method of the scheduling end includes the startup of a distributed microservice; receiving a target job constructed by a client, the target job includes a trigger and a sharder; if the triggering condition of the trigger is met, the target job is scheduled; a sharding interface is remotely called to split the target job into corresponding target tasks; an execution interface is remotely called to assign the target task to the execution end so that the execution end processes the target task

[0140] An electronic device provided in an embodiment of the present application includes a memory 201 and a processor 202. A computer program is stored in the memory 201. When the processor 202 executes the computer program, the following steps are implemented: receiving a target job constructed by a client, where the target job includes a trigger and a sharder; scheduling the target job if the triggering condition of the trigger is met; splitting the target job into corresponding target tasks according to the sharding condition of the sharder; and allocating the target task to the execution end based on an asynchronous distribution method so that the execution end processes the target task.

[0141] An electronic device provided in an embodiment of the present application includes a memory 201 and a processor 202. A computer program is stored in the memory 201. When the processor 202 executes the computer program, the following steps are implemented: receiving a target job constructed by a client, where the target job includes a trigger and a sharder; scheduling the target job if the triggering condition of the trigger is met; splitting the target job into corresponding target tasks according to the sharding condition of the sharder; and allocating the target task to the execution end based on the current limiting strategy so that the execution end processes the target task.

[0142] An electronic device provided in an embodiment of the present application includes a memory 201 and a processor 202. A computer program is stored in the memory 201. When the processor 202 executes the computer program, the following steps are implemented: receiving a target job constructed by a client, the target job including a trigger and a sharder; persisting the target job in a database; scheduling the target job if the triggering condition of the trigger is met; splitting the target job into corresponding target tasks according to the sharding condition of the sharder; and allocating the target task to an execution end so that the execution end processes the target task.

[0143] An electronic device provided by an embodiment of the present application includes a memory 201 and a processor 202. A computer program is stored in the memory 201. When the processor 202 executes the computer program, the following steps are implemented: receiving a target job constructed by a client, the target job includes a trigger, a sharder, and a job strategy; wherein the job strategy includes a logging strategy, a task backlog prevention strategy, a job execution logging strategy, a failure retry strategy, and a current limiting strategy; if the triggering condition of the trigger is met, the target job is scheduled; according to the sharding condition of the sharder, the target job is split into corresponding target tasks; and the target task is assigned to the execution end so that the execution end processes the target task.

[0144] See also Figure 9 Another electronic device provided in an embodiment of the present application may further include: an input port 203 connected to the processor 202, for transmitting commands inputted from the outside to the processor 202; a display unit 204 connected to the processor 202, for displaying the processing results of the processor 202 to the outside world; and a communication module 205 connected to the processor 202, for enabling communication between the electronic device and the outside world. The display unit 204 may be a display panel, a laser scanning display, etc. The communication method adopted by the communication module 205 includes but is not limited to mobile high-definition link technology (HML), universal serial bus (USB), high-definition multimedia interface (HDMI), wireless connection: wireless fidelity technology (WiFi), Bluetooth communication technology, low-power Bluetooth communication technology, and communication technology based on IEEE802.11s.

[0145] An embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the following steps are implemented:

[0146] Receive the target job constructed by the client, which includes triggers and sharders;

[0147] If the triggering conditions of the trigger are met, the target job is scheduled;

[0148] Split the target job into corresponding target tasks according to the sharding conditions of the sharder;

[0149] Assign the target task to the execution end so that the execution end processes the target task.

[0150] An embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented: a startup method of the scheduling end includes out-of-the-box use in a single-body mode; receiving a target job constructed by a client, the target job includes a trigger and a sharder; if the triggering condition of the trigger is met, the target job is scheduled; a sharding interface is locally called to split the target job into corresponding target tasks and assign the target tasks to the execution end; and an execution interface is locally called to assign the target task to the execution end so that the execution end processes the target task.

[0151] The embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented: the scheduling end starts in a distributed microservice mode; receives a target job constructed by a client, the target job includes a trigger and a sharder; if the triggering condition of the trigger is met, the target job is scheduled; a sharding interface is remotely called to split the target job into corresponding target tasks; an execution interface is remotely called to assign the target task to the execution end so that the execution end processes the target task

[0152] An embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented: receiving a target job constructed by a client, where the target job includes a trigger and a sharder; scheduling the target job if the triggering condition of the trigger is met; splitting the target job into corresponding target tasks according to the sharding condition of the sharder; and allocating the target tasks to an execution end based on an asynchronous distribution method so that the execution end processes the target tasks.

[0153] An embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented: receiving a target job constructed by a client, where the target job includes a trigger and a sharder; scheduling the target job if the triggering condition of the trigger is met; splitting the target job into corresponding target tasks according to the sharding condition of the sharder; and allocating the target tasks to an execution end based on a current limiting strategy so that the execution end processes the target tasks.

[0154] An embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented: receiving a target job constructed by a client, where the target job includes a trigger and a sharder; persisting the target job in a database; scheduling the target job if the triggering condition of the trigger is met; splitting the target job into corresponding target tasks according to the sharding condition of the sharder; and allocating the target tasks to an execution end so that the execution end processes the target tasks.

[0155] An embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented: receiving a target job constructed by a client, where the target job includes a trigger, a sharder, and a job policy; wherein the job policy includes a logging policy, a task backlog prevention policy, a job execution recording policy, a failure retry policy, and a flow limiting policy; if the triggering condition of the trigger is met, the target job is scheduled; according to the sharding condition of the sharder, the target job is split into corresponding target tasks; and the target task is assigned to the execution end so that the execution end processes the target task.

[0156] The computer-readable storage medium involved in this application includes random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disks, removable disks, CD-ROMs, or any other form of storage medium known in the technical field.

[0157] For the description of the relevant parts of the job scheduling system, electronic device, and computer-readable storage medium provided in the embodiments of the present application, please refer to the detailed description of the corresponding parts in the job scheduling method provided in the embodiments of the present application, and no further details are given here. In addition, the parts of the above-mentioned technical solutions provided in the embodiments of the present application that are consistent with the implementation principles of the corresponding technical solutions in the prior art are not described in detail to avoid excessive elaboration.

[0158] It should also be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," 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. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or device comprising the element.

[0159] The above description of the disclosed embodiments will enable one skilled in the art to implement or use the present application. Various modifications to these embodiments will be readily apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application is not limited to the embodiments shown herein, but is intended to conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A job scheduling method, characterized in that: Applied to the scheduling end, including: Receive a target job constructed by a client, which includes a trigger and a sharder. A job is a collection of tasks that a user requires a computer system to perform during a problem solving process or a transaction. If the triggering condition of the trigger is met, the target job is scheduled; Splitting the target job into corresponding target tasks according to the sharding conditions of the sharder; Allocating the target task to an execution end so that the execution end processes the target task; The allocating the target task to the execution end includes: Set up a registration center; Receive the executable task range registered by the execution end at the registration center; Routing the target task to the execution end based on the executable task range; Among them, also include: Track the task execution status with the help of the set task tracker; Retry task execution failures based on the configured user submission policy, and report task execution status and operation logs. The startup mode of the dispatch terminal includes out-of-the-box startup in a single-body mode; Splitting the target job into corresponding target tasks includes: Locally calling a sharding interface to split the target job into corresponding target tasks; The allocating the target task to the execution end includes: Locally calling the execution interface and assigning the target task to the execution end; The startup mode of the scheduling end includes the startup of microservices in a distributed manner; Splitting the target job into corresponding target tasks includes: Remotely call the sharding interface to split the target job into the corresponding target tasks; The allocating the target task to the execution end includes: Remotely call the execution interface and assign the target task to the execution end.

2. The method according to claim 1, characterized in that The allocating the target task to the execution end includes: Based on an asynchronous distribution method, the target task is assigned to the execution end.

3. The method according to claim 1, characterized in that The allocating the target task to the execution end includes: Based on the current limiting strategy, the target task is assigned to the execution end.

4. The method according to claim 1, wherein After receiving the target job constructed by the client, the method further includes: Persist the target job in the database.

5. The method according to any one of claims 1 to 4, characterized in that The target job constructed by the receiving client includes a trigger and a sharder, including: Receive the target job constructed by the client, where the target job includes a trigger, a sharder, and a job strategy; wherein the job strategy includes a logging strategy, a task backlog prevention strategy, a job execution recording strategy, a failure retry strategy, and a flow control strategy.

6. A job scheduling system, characterized in that: Applied to the scheduling end, including: A first receiving module is configured to receive a target job constructed by a client, wherein the target job includes a trigger and a sharder. A job is a set of tasks that a user requires a computer system to perform during a problem solving process or a transaction processing. A first scheduling module, configured to schedule the target job if a triggering condition of the trigger is met; A first sharding module, configured to split the target job into corresponding target tasks according to the sharding condition of the sharder; A first allocation module is used to allocate the target task to an execution end so that the execution end processes the target task; The first allocation module is used to: set up a registration center; receive the executable task range registered by the execution end in the registration center; and route the target task to the execution end for execution based on the executable task range; The scheduling end is further used to: track the task execution status with the help of a set task tracker; retry the task execution after failure based on the set user submission strategy, and report the task execution status and operation log; The startup mode of the scheduling end includes out-of-the-box use in a single-body mode; the first sharding module is used to locally call the sharding interface to split the target job into the corresponding target tasks; the first allocation module is used to locally call the execution interface to allocate the target task to the execution end; Among them, the startup method of the scheduling end includes the startup of microservices under distributed conditions; the first sharding module is used to remotely call the sharding interface to split the target job into the corresponding target tasks; the first allocation module is used to remotely call the execution interface to allocate the target task to the execution end.

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

8. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the job scheduling method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Job processing method and device

    CN112559179A

  • Job scheduling method and device based on distributed cache

    CN113204420A