CN106557359B - Task scheduling method and system - Google Patents

Task scheduling method and system Download PDF

Info

Publication number
CN106557359B
CN106557359B CN201510644165.7A CN201510644165A CN106557359B CN 106557359 B CN106557359 B CN 106557359B CN 201510644165 A CN201510644165 A CN 201510644165A CN 106557359 B CN106557359 B CN 106557359B
Authority
CN
China
Prior art keywords
processing filter
task
processing
chain
filter chain
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201510644165.7A
Other languages
Chinese (zh)
Other versions
CN106557359A (en
Inventor
郭懿心
杨耿彬
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201510644165.7A priority Critical patent/CN106557359B/en
Publication of CN106557359A publication Critical patent/CN106557359A/en
Application granted granted Critical
Publication of CN106557359B publication Critical patent/CN106557359B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Control By Computers (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses a task scheduling method and a system, wherein the method comprises the steps of receiving a task execution request; determining a processing filter chain of a corresponding task according to the task execution request, wherein at least one processing filter is arranged in the processing filter chain, and the formats of an input interface and an output interface of the processing filter are uniform; dispatching the task execution request to a processing filter chain; the control processing filter chain triggers the corresponding processing filter to execute the task. In the embodiment of the invention, the processing filter chain is composed of a series of processing filters, and the formats of the input interface and the output interface of the processing filters are uniform, so that the processing filter chain can be made into a standard interface, the processing filters are utilized to complete tasks, even if the network resources and the inputs required by the processing of each task are different, various job tasks can be scheduled by utilizing a standardized general flow, and the task scheduling cost is reduced.

Description

Task scheduling method and system
Technical Field
The invention belongs to the technical field of computers, and particularly relates to a task scheduling method and system.
Background
A computer cluster is a computer system that is connected by multiple computers (also called work nodes) to cooperate in performing computing jobs. These worker nodes are located in the same administrative domain, have a unified administrative policy, and provide services to users as a whole.
In the prior art, a job is usually split to obtain a plurality of tasks, and then the tasks are scheduled to a certain work node for execution.
In the process of research and practice of the prior art, the inventor of the present invention finds that, although one job can be split to obtain a plurality of tasks in the prior art, because each task needs different network resources and inputs for processing, it is difficult to make a standardized general flow to schedule a plurality of jobs, and the task scheduling cost is high.
Disclosure of Invention
The invention aims to provide a task scheduling method and a task scheduling system, aiming at scheduling different tasks by utilizing a standardized general flow and reducing task scheduling cost.
In order to solve the above technical problems, embodiments of the present invention provide the following technical solutions:
a task scheduling method comprises the following steps:
receiving a task execution request;
determining a processing filter chain of a corresponding task according to the task execution request, wherein at least one processing filter is arranged in the processing filter chain, and the formats of an input interface and an output interface of the processing filter are uniform;
dispatching the task execution request to the processing filter chain;
and controlling the processing filter chain to trigger the corresponding processing filter to execute the task.
In order to solve the above technical problems, embodiments of the present invention further provide the following technical solutions:
a task scheduling system, comprising:
a receiving unit configured to receive a task execution request;
the determining unit is used for determining a processing filter chain of a corresponding task according to the task execution request, wherein at least one processing filter is arranged in the processing filter chain, and the formats of an input interface and an output interface of the processing filter are uniform;
the scheduling unit is used for scheduling the task execution request to the processing filter chain;
and the control unit is used for controlling the processing filter chain to trigger the corresponding processing filter to execute the task.
Compared with the prior art, in the embodiment, after receiving a task execution request, a task scheduling system determines a processing filter chain of a corresponding task, wherein at least one processing filter is arranged in the processing filter chain, formats of an input interface and an output interface of the processing filter are unified, and the task execution request is scheduled to the processing filter chain so that the corresponding processing filter executes the task; that is, the processing filter chain for executing the operation according to the task scheduling is composed of a series of processing filters, and the formats of the input interface and the output interface of the processing filters are uniform, so that the processing filter chain can be made into a standard interface, the tasks can be completed by using the processing filters, even if the network resources and the inputs required by the processing of each task are different, various job tasks can be scheduled by using a standardized general flow, and the task scheduling cost is reduced.
Drawings
The technical solution and other advantages of the present invention will become apparent from the following detailed description of specific embodiments of the present invention, which is to be read in connection with the accompanying drawings.
Fig. 1 is a flowchart illustrating a task scheduling method according to a first embodiment of the present invention;
fig. 2a is a flowchart illustrating a task scheduling method according to a second embodiment of the present invention;
FIG. 2b is a schematic diagram of a task scheduling system according to a second embodiment of the present invention;
FIG. 2c is a schematic diagram of another scenario of a task scheduling system according to a second embodiment of the present invention;
FIG. 3a is a schematic structural diagram of a task scheduling system according to a third embodiment of the present invention;
fig. 3b is a schematic structural diagram of a task scheduling system according to a third embodiment of the present invention.
Detailed Description
Referring to the drawings, wherein like reference numbers refer to like elements, the principles of the present invention are illustrated as being implemented in a suitable computing environment. The following description is based on illustrated embodiments of the invention and should not be taken as limiting the invention with regard to other embodiments that are not detailed herein.
In the description that follows, specific embodiments of the present invention are described with reference to steps and symbols executed by one or more computers, unless otherwise indicated. Accordingly, these steps and operations will be referred to, several times, as being performed by a computer, the computer performing operations involving a processing unit of the computer in electronic signals representing data in a structured form. This operation transforms the data or maintains it at locations in the computer's memory system, which may be reconfigured or otherwise altered in a manner well known to those skilled in the art. The data maintains a data structure that is a physical location of the memory that has particular characteristics defined by the data format. However, while the principles of the invention have been described in language specific to above, it is not intended to be limited to the specific form set forth herein, but on the contrary, it is to be understood that various steps and operations described hereinafter may be implemented in hardware.
The term "module" as used herein may be considered a software object executing on the computing system. The various components, modules, engines, and services described herein may be viewed as objects implemented on the computing system. The system and method described herein are preferably implemented in software, but may be implemented in hardware without departing from the scope of the invention.
First embodiment
In this embodiment, a description will be given from the perspective of a task scheduling system, which may be specifically integrated in a device such as a server.
A task scheduling method comprises the following steps: receiving a task execution request; determining a processing filter chain of a corresponding task according to the task execution request, wherein at least one processing filter is arranged in the processing filter chain, and the formats of an input interface and an output interface of the processing filter are uniform; dispatching the task execution request to the processing filter chain; controlling the processing filter chain triggers the corresponding processing filter to execute the task.
Referring to fig. 1, fig. 1 is a flowchart illustrating a task scheduling method according to a first embodiment of the present invention. The method can comprise the following steps:
in step S101, a task execution request is received.
In step S102, according to the task execution request, a processing filter chain of the corresponding task is determined, where at least one processing filter is disposed in the processing filter chain, and formats of an input interface and an output interface of the processing filter are uniform.
The steps S101 and S102 may specifically be:
it can be understood that, in the embodiment of the present invention, a Filter Chain (Filter Chain) refers to a unit that completes all processing logic of a certain task; the system is composed of a series of processing filters (filters), and in the embodiment of the invention, a processing Filter refers to filtering logic or an organization unit of processing logic and is used for executing tasks.
Preferably, before the task scheduling system executes the task, the processing filter chain and the processing filter need to be set first; for example, before the task scheduling system receives the task execution request (i.e., step S101), the method may further include:
a. reading task configuration;
b. generating a corresponding processing filter chain according to the task configuration;
c. at least one processing filter is correspondingly arranged in the processing filter chain, and the formats of an input interface and an output interface of the processing filter are unified.
For another example, the task configuration may specifically refer to configuration files for processing a filter chain, and the task scheduling system may generate corresponding processing filter chains according to the configuration files, where the configuration files may be preset according to task needs; different task types can be provided with different task configurations, so that corresponding processing filter chains can be generated according to the task configurations.
After the processing filter chain is generated, at least one processing filter can be correspondingly arranged in the processing filter chain, wherein the formats of an input interface and an output interface of the processing filter are uniform, so that the processing of the processing filter chain can be made into a standard interface to complete different tasks.
Further preferably, for example, after "the formats of the input interface and the output interface of the processing filter are unified", the following steps may be further performed:
at least one action execution unit is correspondingly arranged in the processing filter, and the formats of an input interface and an output interface of the action execution unit are unified.
That is, the processing filter is composed of a series of Action execution units (actions), which are actions for processing single steps or events, and likewise, the formats of the input interface and the output interface of the Action execution units are unified, so that the processing of the processing filter chain can be made into a standard interface to complete different tasks.
In step S103, the task execution request is dispatched to the processing filter chain.
In step S104, control triggers the corresponding processing filter to execute the task.
The steps S103 and S104 may specifically be:
it can be understood that, in the embodiment of the present invention, scheduling refers to selecting, by a computer, a manner of processing execution of a filter chain; and after the task execution request is dispatched to the corresponding processing filter chain, the dispatching system controls the processing filter in the processing filter chain to execute the corresponding task.
Further, since the processing filter may further include a minimum execution unit and an action execution unit, the "controlling the processing filter chain to trigger the corresponding processing filter to execute the task" may specifically be: and the control processing filter chain triggers the action execution unit in the corresponding processing filter to execute the task.
There are many ways for controlling the processing filter chain to trigger the action execution unit in the corresponding processing filter to execute the task, for example, the ways may specifically include:
1. sending a scheduling instruction to the processing filter chain, so that the processing filter chain obtains a corresponding processing flow according to the scheduling instruction;
2. controlling the processing filter chain to call a processing filter according to the processing flow;
3. and executing the tasks according to the preset sequence by utilizing the action execution unit in the called processing filter.
That is to say, the task scheduling system sends a scheduling instruction to the determined processing filter chain, the processing filter chain acquires a corresponding processing flow according to the scheduling instruction, and the processing filter chain calls the processing filter according to the processing flow, so that the action execution unit in the called processing filter can execute the corresponding tasks according to a preset order.
Preferably, before controlling the processing filter chain to call the processing filter according to the processing flow, it needs to be determined which processing filters in the processing filter chain need to perform task scheduling, for example, the following may be specifically performed:
controlling the processing filter chain to determine a required processing filter according to a processing flow; the control processing filter chain may specifically call the processing filter according to the processing flow as follows: and controlling the processing filter chain to call a required processing filter according to the processing flow, and executing the task by an action execution unit in the required processing filter.
Still preferably, the processing flow in the embodiment of the present invention refers to a processing flow of a processing filter chain, which may specifically indicate an execution order of the processing filters and/or a processing filter that needs to perform an execution task in the processing filter chain.
For example, the processing flow may carry an identity of a processing filter, so as to determine a required processing filter according to the identity; meanwhile, the processing flow also carries an execution sequence identifier of the required processing filters, so that after one processing filter action is executed, the next processing filter is triggered to execute according to the execution sequence, which is not limited here by way of example.
The action execution unit in the processing filter may execute the corresponding tasks according to a preset order, for example, the preset order may be simply a sequence set for the action execution unit, or may be separately set according to the needs of the tasks, and the examples herein are not limited.
Preferably, if the type of the processing Filter Chain (Filter Chain) needs to be newly added or deleted by the task scheduling system, the task scheduling system can be directly configured in the configuration file according to a preset task configuration specification, so that the purpose of newly adding or deleting the processing Filter Chain can be achieved, and the corresponding processing Filter (Filter) and the Action execution unit (Action) of each processing Filter are configured at the same time, without extra system upgrade cost, which is not described in detail herein.
As can be seen from the above, in the task scheduling method provided in this embodiment, after receiving a task execution request, a task scheduling system determines a processing filter chain of a corresponding task, where at least one processing filter is arranged in the processing filter chain, and formats of an input interface and an output interface of the processing filter are uniform, and schedules the task execution request to the processing filter chain, so that the corresponding processing filter executes the task; that is, the processing filter chain for executing the operation according to the task scheduling is composed of a series of processing filters, and the formats of the input interface and the output interface of the processing filters are uniform, so that the processing filter chain can be made into a standard interface, the tasks can be completed by using the processing filters, even if the network resources and the inputs required by the processing of each task are different, various job tasks can be scheduled by using a standardized general flow, and the task scheduling cost is reduced.
Second embodiment
The method according to the first embodiment will be described in further detail below by way of example.
First, a corresponding processing filter chain is generated for each task type, and the processing filter chain is a unit for completing all processing logics of a certain task. And secondly, setting a processing filter and an action execution unit in the processing filter chain, and executing corresponding tasks based on the scheduled processing filter chain. As will be described in detail below.
Referring to fig. 2a, fig. 2a is a flowchart illustrating a task scheduling method according to a second embodiment of the present invention. The method can comprise the following steps:
in step S201, the task scheduling system reads the task configuration.
In step S202, the task scheduling system generates a corresponding processing filter chain according to the task configuration.
In step S203, the task scheduling system correspondingly sets at least one processing filter in the processing filter chain, and sets the formats of the input interface and the output interface of the processing filter to be uniform.
In step S204, the task scheduling system sets at least one action execution unit in the processing filter, and sets the formats of the input interface and the output interface of the action execution unit to be uniform.
The steps S201 to S204 may specifically be:
preferably, before the task scheduling system executes the task, the processing filter chain and the processing filter need to be set first.
The task configuration may specifically refer to configuration files for processing the filtering chain, and the task scheduling system may generate corresponding processing filtering chains according to the configuration files, where the configuration files may be preset according to task needs; different task types can be provided with different task configurations, so that corresponding processing filter chains can be generated according to the task configurations.
After the processing filter chain is generated, at least one processing filter can be correspondingly arranged in the processing filter chain, the processing filter is composed of a series of action execution units, and the action execution units are used for processing actions of single steps or events, wherein formats of input interfaces and output interfaces of the processing filter are unified, and formats of the input interfaces and the output interfaces of the action execution units are unified, so that processing of the processing filter chain can be made into standard interfaces to complete different tasks.
Fig. 2b may also be referred to as a schematic view of a scenario of the task scheduling system, where the processing filter chain and the processing filter and the action execution unit in the processing filter chain are configured according to the foregoing steps S201 to S204, formats of the input interface and the output interface of the processing filter are unified, and formats of the input interface and the output interface of the action execution unit are unified.
As shown in fig. 2b, the task scheduling system includes three processing Filter chains (Filter Chain1, Filter Chain2, and Filter Chain3), and each processing Filter Chain includes a plurality of processing filters (filters), where a processing Filter is responsible for filtering logic or processing logic, and each processing Filter includes a minimum execution unit, which is an Action execution unit (Action) for processing a single step or event Action.
For example, in Filter Chain1, the first Filter includes Action a, Action B, and Action C; for another example, in Filter Chain3, the first Filter contains Action F, Action H, and Action J.
It is easy to think that different task types may be provided with different task configurations, so that corresponding processing filter chains may be generated according to the task configurations, and processing filters and action execution units with different functions may be provided according to the different processing filter chains, which is not limited in this example.
In step S205, the task scheduling system receives a task execution request.
In step S206, the task scheduling system determines a processing filter chain of the corresponding task according to the task execution request.
The steps S205 and S206 may specifically be:
and scheduling the tasks based on the processing filters and the action execution units in the processing filters, namely controlling the processing filter chains to trigger the action execution units in the corresponding processing filters to execute the corresponding tasks by the task scheduling system.
For example, as shown in fig. 2b, it can be specifically: when the task scheduling system receives a task execution request, the generated/set three processing filter chains are identified according to the type of the task indicated by the task execution request, and the processing filter chain corresponding to the current task is determined so as to execute the task and end the scheduling process.
In step S207, the task scheduling system schedules the task execution request to the processing filter chain.
In step S208, the processing filter chain calls a processing filter according to the corresponding processing flow.
In step S209, the action execution unit in the processing filter executes the tasks in a preset order.
The steps S207 to S209 may specifically be:
the scheduling in the embodiment of the invention refers to the selection of a mode for processing the execution of the filter chain by a computer; and after the task execution request is dispatched to the corresponding processing filter chain, the dispatching system controls the processing filter in the processing filter chain to execute the corresponding task.
For example, the task scheduling mode may be specifically as follows:
the task scheduling system sends a scheduling instruction to the processing filter chain, the processing filter chain acquires a corresponding processing flow according to the scheduling instruction, and the processing filter chain calls the processing filter according to the processing flow, so that the action execution unit in the called processing filter can execute corresponding tasks according to a preset sequence.
It is to be understood that, before the processing filter chain calls the processing filter according to the processing flow, the processing filter chain may further include: the processing filter chain determines a required processing filter according to the acquired processing flow, and then calls the required processing filter according to the acquired processing flow, namely, not all the processing filters in the processing filter chain need to execute tasks.
The processing flow in the embodiment of the present invention refers to a processing flow of a processing filter chain, which may specifically indicate an execution order of processing filters and/or a processing filter that needs to perform an execution task in the processing filter chain.
For example, the processing flow may carry an identity of a processing filter, so as to determine a required processing filter according to the identity; meanwhile, the processing flow also carries the execution sequence identifiers of the required processing filters, so that after the execution of one processing filter action is finished, the execution of the next processing filter is triggered according to the execution sequence; the action execution unit in the processing filter may also execute the corresponding tasks according to a preset order, for example, the preset order may be simply a sequence set for the action execution unit, or may be separately set according to the needs of the tasks, and this example is not limited here.
It should be noted that, the processing filter and the action execution unit of each processing filter chain do not necessarily execute the operation, and need to determine according to the current state of the task, and the next operation will determine whether to execute according to the result of the previous operation, and if not, skip to the next operation.
Preferably, if the task scheduling system needs to add or delete the type of the processing filter chain, the task scheduling system can directly configure the processing filter chain in the configuration file according to the preset task configuration specification, so that the processing filter chain can be added or deleted, and the corresponding processing filter and the action execution unit of each processing filter are configured at the same time, without extra system upgrade cost.
For example, there may be specifically:
the task scheduling system acquires a configuration instruction, and the configuration instruction indicates that a processing filter chain needs to be added or deleted;
when the configuration instruction is determined to indicate that the processing filter chain needs to be added, triggering the task scheduling system to execute a step of reading task configuration (namely step 201) so as to generate and set the processing filter chain; and when the configuration instruction is determined to indicate that the processing filter chain needs to be deleted, deleting the corresponding processing filter chain.
That is, when the task scheduling system needs to add a processing filter chain, the task configuration is read, a corresponding processing filter chain is generated according to the task configuration, at least one processing filter is correspondingly arranged in the processing filter chain, formats of an input interface and an output interface of the processing filter are set to be uniform, at least one action execution unit is correspondingly arranged in the processing filter, and formats of the input interface and the output interface of the action execution unit are set to be uniform, so that the setting of the processing filter chain is completed. And when the configuration instruction is determined to indicate that the processing filter chain needs to be deleted, deleting the processing filter chain corresponding to the configuration instruction.
It can be understood that, similarly, if the task scheduling system needs to add a certain processing filter or delete a certain processing filter in the processing filter chain, it only needs to add or delete a configuration of a processing filter in the processing filter chain in the configuration file, and the system upgrade cost of secondary development is not brought about, which is not described in detail herein.
In order to better understand the scheduling process of the task scheduling system, the following description is given by using the practical application scenario of the fast rebate integral settlement system according to the technical scheme of the invention:
as shown in fig. 2c, a scene of the fast rebate integral settlement system is illustrated, which may be specifically as follows:
(1) the fast rebate integral settlement system receives a settlement order;
(2) the fast rebate point settlement system identifies the Filter Chain and dispatches a settlement order to the point settlement Filter Chain processing flow;
and (3) calling the required Filter according to the corresponding processing flow by the integral settlement Filter Chain, wherein the required Filter can comprise a quick return processing Filter and a normal return processing Filter, and the step (3) and the step (4) are respectively executed.
(3) Controlling the quick return processing Filter to execute operation;
and sequentially executing actions (Action execution units) in the quick return processing Filter, wherein the actions comprise an order warehousing Action, an order checking Action, an order updating Action and a credit line increasing Action.
(4) Controlling the Filter of the normal return processing to execute operation;
and executing a settlement order warehousing Action in the Filter of the normal return processing.
Because the formats of the input interface and the output interface of the quick return processing Filter and the normal return processing Filter are uniform, the integral settlement Filter Chain can be made into a standard interface to complete different tasks.
As can be seen from the above, in the task scheduling method provided in this embodiment, after receiving a task execution request, a task scheduling system determines a processing filter chain of a corresponding task, where at least one processing filter is arranged in the processing filter chain, and formats of an input interface and an output interface of the processing filter are uniform, and schedules the task execution request to the processing filter chain, so that the corresponding processing filter executes the task; that is, the processing filter chain for executing the operation according to the task scheduling is composed of a series of processing filters, and the formats of the input interface and the output interface of the processing filters are uniform, so that the processing filter chain can be made into a standard interface, the tasks can be completed by using the processing filters, even if the network resources and the inputs required by the processing of each task are different, various job tasks can be scheduled by using a standardized general flow, and the task scheduling cost is reduced. In addition, since the action execution unit is the smallest execution unit, the task scheduling system may also be configured as required, and the action execution units included in a certain processing filter may be reduced or increased. Similarly, the processing filter chain can also reduce or increase the processing filter according to the needs, so that the system upgrading cost caused by adding new functions can be greatly reduced.
Third embodiment
In order to better implement the task scheduling method provided by the embodiment of the present invention, the embodiment of the present invention further provides a system based on the task scheduling method. The terms are the same as those in the above method for task scheduling, and specific implementation details may refer to the description in the method embodiment.
Referring to fig. 3a, fig. 3a is a schematic structural diagram of a task scheduling system according to an embodiment of the present invention, which may include a receiving unit 301, a determining unit 302, a scheduling unit 303, and a control unit 304.
The receiving unit 301 is configured to receive a task execution request; the determining unit 302 is configured to determine, according to the task execution request, a processing filter chain of a corresponding task, where at least one processing filter is arranged in the processing filter chain, and formats of an input interface and an output interface of the processing filter are uniform.
It can be understood that, in the embodiment of the present invention, a Filter Chain (Filter Chain) refers to a unit that completes all processing logic of a certain task; the system is composed of a series of processing filters (filters), and in the embodiment of the invention, a processing Filter refers to filtering logic or an organization unit of processing logic and is used for executing tasks.
A scheduling unit 303, configured to schedule the task execution request to the processing filter chain; and the control unit 304 is used for controlling the processing filter chain to trigger the corresponding processing filter to execute the task.
In the embodiment of the invention, scheduling refers to the way that a computer selects to process the execution of a filter chain; and after the task execution request is dispatched to the corresponding processing filter chain, the dispatching system controls the processing filter in the processing filter chain to execute the corresponding task.
Preferably, before the task scheduling system executes the task, the processing filter chain and the processing filter need to be set first; for example, referring to fig. 3b, another schematic diagram of a task scheduling system is shown, wherein the system may further include:
a reading unit 305 for reading the task configuration;
a filter chain generating unit 306, configured to generate a corresponding processing filter chain according to the task configuration;
the first setting unit 307 is configured to set at least one processing filter in the processing filter chain, and set the formats of the input interface and the output interface of the processing filter to be uniform.
The task configuration may specifically refer to configuration files for processing the filtering chain, and the task scheduling system may generate corresponding processing filtering chains according to the configuration files, where the configuration files may be preset according to task needs; different task types can be provided with different task configurations, so that corresponding processing filter chains can be generated according to the task configurations.
After the processing filter chain is generated, at least one processing filter can be correspondingly arranged in the processing filter chain, wherein the formats of an input interface and an output interface of the processing filter are uniform, so that the processing of the processing filter chain can be made into a standard interface to complete different tasks.
Further preferably, as shown in fig. 3b, the system may further include:
the second setting unit 308 is configured to set at least one action execution unit in the processing filter, and set the formats of the input interface and the output interface of the action execution unit to be uniform;
that is, the processing filter is composed of a series of Action execution units (actions), which are actions for processing single steps or events, and likewise, the formats of the input interface and the output interface of the Action execution units are unified, so that the processing of the processing filter chain can be made into a standard interface to complete different tasks.
Since the processing filter may further include a minimum execution unit, i.e., an action execution unit, the control unit 304 may be specifically configured to control the processing filter chain to trigger the action execution unit in the corresponding processing filter to execute the task.
There are many ways for controlling the processing filter chain to trigger the action execution unit in the corresponding processing filter to execute the task, for example, the control unit 304 may include:
the sending subunit is configured to send a scheduling instruction to the processing filter chain, so that the processing filter chain obtains a corresponding processing flow according to the scheduling instruction;
the first control subunit is used for controlling the processing filter chain to call the processing filter according to the processing flow;
and the second control subunit is used for executing the tasks according to the preset sequence by utilizing the action execution unit in the called processing filter.
That is to say, the task scheduling system sends a scheduling instruction to the determined processing filter chain, the processing filter chain acquires a corresponding processing flow according to the scheduling instruction, and the processing filter chain calls the processing filter according to the processing flow, so that the action execution unit in the called processing filter can execute the corresponding tasks according to a preset order.
Preferably, before controlling the processing filter chain to call the processing filter according to the processing flow, it needs to determine which processing filters in the processing filter chain need to perform task scheduling, for example, the control unit 304 may further include:
the third control subunit is used for controlling the processing filter chain to determine a required processing filter according to the processing flow; the first control subunit is specifically configured to control the processing filter chain to call the required processing filter according to the processing flow, that is, the action execution unit in the required processing filter executes the task.
Still preferably, the processing flow in the embodiment of the present invention refers to a processing flow of a processing filter chain, which may specifically indicate an execution order of the processing filters and/or a processing filter that needs to perform an execution task in the processing filter chain.
For example, the processing flow may carry an identity of a processing filter, so as to determine a required processing filter according to the identity; meanwhile, the processing flow also carries an execution sequence identifier of the required processing filters, so that after one processing filter action is executed, the next processing filter is triggered to execute according to the execution sequence, which is not limited here by way of example.
The action execution unit in the processing filter may execute the corresponding tasks according to a preset order, for example, the preset order may be simply a sequence set for the action execution unit, or may be separately set according to the needs of the tasks, and the examples herein are not limited.
Preferably, if the task scheduling system needs to add or delete a type of a processing filter chain, the task scheduling system may directly perform configuration in the configuration file according to a preset task configuration specification, so as to add or delete the processing filter chain, and configure the corresponding processing filter and the action execution unit of each processing filter at the same time, without an additional system upgrade cost, for example, the system may further include:
the device comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring a configuration instruction which indicates that a processing filter chain needs to be added or deleted; a trigger control unit, configured to trigger the reading unit 305 to execute the step of reading task configuration to generate and set a processing filter chain when the configuration instruction indicates that the processing filter chain needs to be added; and the deleting unit is used for deleting the corresponding processing filter chain when the configuration instruction indicates that the processing filter chain needs to be deleted.
It can be understood that, similarly, if the task scheduling system needs to add a certain processing filter or delete a certain processing filter in the processing filter chain, it only needs to add or delete a configuration of a processing filter in the processing filter chain in the configuration file, and the system upgrade cost of secondary development is not brought about, which is not described in detail herein.
In a specific implementation, the above units may be implemented as independent entities, or may be combined arbitrarily to be implemented as the same or several entities, and the specific implementation of the above units may refer to the foregoing method embodiments, which are not described herein again.
The task scheduling system may be specifically integrated in a server or other devices.
As can be seen from the above, in the task scheduling system provided in this embodiment, after receiving the task execution request, the task scheduling system determines the processing filter chain of the corresponding task, where at least one processing filter is arranged in the processing filter chain, and formats of an input interface and an output interface of the processing filter are uniform, and schedules the task execution request to the processing filter chain, so that the corresponding processing filter executes the task; that is, the processing filter chain for executing the operation according to the task scheduling is composed of a series of processing filters, and the formats of the input interface and the output interface of the processing filters are uniform, so that the processing filter chain can be made into a standard interface, the tasks can be completed by using the processing filters, even if the network resources and the inputs required by the processing of each task are different, various job tasks can be scheduled by using a standardized general flow, and the task scheduling cost is reduced.
In the foregoing embodiments, descriptions of the respective embodiments have respective emphasis, and parts that are not described in detail in a certain embodiment may refer to the above detailed description of the task scheduling method, and are not described herein again.
The task scheduling system provided in the embodiment of the present invention and the task scheduling method in the above embodiment belong to the same concept, and any method provided in the embodiment of the task scheduling method can be run on the task scheduling system, and the specific implementation process thereof is described in detail in the embodiment of the task scheduling method, and is not described herein again.
It should be noted that, for the task scheduling method of the present invention, it can be understood by a person skilled in the art that all or part of the process of implementing the task scheduling method according to the embodiment of the present invention can be completed by controlling related hardware through a computer program, where the computer program can be stored in a computer readable storage medium, such as a memory of a terminal, and executed by at least one processor in the terminal, and during the execution process, the process of implementing the embodiment of the task scheduling method can be included. The storage medium may be a magnetic disk, an optical disk, a Read Only Memory (ROM), a Random Access Memory (RAM), or the like.
For the task scheduling system according to the embodiment of the present invention, each functional module may be integrated into one processing chip, or each module may exist alone physically, or two or more modules are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may also be stored in a computer readable storage medium, such as a read-only memory, a magnetic or optical disk, or the like.
The task scheduling method and system provided by the embodiment of the present invention are described in detail above, and a specific example is applied in the description to explain the principle and the implementation of the present invention, and the description of the above embodiment is only used to help understanding the method and the core idea of the present invention; meanwhile, for those skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (9)

1. A method for task scheduling, comprising:
reading task configuration, wherein the task configuration refers to a configuration file for processing a filter chain, the configuration file is preset according to task needs, and different task configurations are set according to different task types;
generating a corresponding processing filter chain according to the task configuration;
correspondingly setting at least one processing filter in the processing filter chain, and setting the formats of an input interface and an output interface of the processing filter to be uniform;
receiving a task execution request;
determining a processing filter chain of a corresponding task according to the task execution request, wherein at least one processing filter is arranged in the processing filter chain, and the processing filter is an organization unit of a filtering logic and is used for executing the task;
dispatching the task execution request to the processing filter chain;
controlling the processing filter chain to trigger the corresponding processing filter to execute the task, wherein the task comprises the following steps: and controlling the processing filter chain to determine a required processing filter according to a processing flow, wherein the processing flow indicates the processing filter which needs to execute the task in the processing filter chain.
2. The task scheduling method according to claim 1, wherein after the setting of the input interface and the output interface of the processing filter in a unified format, the method further comprises:
at least one action execution unit is correspondingly arranged in the processing filter, and the formats of an input interface and an output interface of the action execution unit are unified;
controlling the processing filter chain to trigger the corresponding processing filter to execute the task specifically as follows: and controlling the processing filter chain to trigger an action execution unit in the corresponding processing filter to execute the task.
3. The task scheduling method according to claim 2, wherein the controlling the processing filter chain triggers an action execution unit in a corresponding processing filter to execute the task, comprising:
sending a scheduling instruction to the processing filter chain, so that the processing filter chain obtains a corresponding processing flow according to the scheduling instruction;
controlling the processing filter chain to call the required processing filter according to the processing flow;
and executing the tasks according to a preset sequence by utilizing the action execution unit in the called processing filter.
4. A task scheduling method according to any one of claims 1 to 3, characterized in that the method further comprises:
acquiring a configuration instruction, wherein the configuration instruction indicates that a processing filter chain needs to be added or deleted;
when the configuration instruction indicates that a processing filter chain needs to be added, triggering the step of executing the reading task configuration to generate and set the processing filter chain;
and when the configuration instruction indicates that the processing filter chain needs to be deleted, deleting the corresponding processing filter chain.
5. A task scheduling system, comprising:
the device comprises a reading unit, a processing unit and a processing unit, wherein the reading unit is used for reading task configuration, the task configuration refers to a configuration file for processing a filter chain, the configuration file is preset according to task needs, and different task configurations are set according to different task types;
the filtering chain generating unit is used for generating a corresponding processing filtering chain according to the task configuration;
the first setting unit is used for correspondingly setting at least one processing filter in the processing filter chain and setting the formats of an input interface and an output interface of the processing filter to be uniform;
a receiving unit configured to receive a task execution request;
the determining unit is used for determining a processing filtering chain of a corresponding task according to the task execution request, wherein at least one processing filter is arranged in the processing filtering chain, and the processing filter is an organization unit of filtering logic and is used for executing the task;
the scheduling unit is used for scheduling the task execution request to the processing filter chain;
the control unit is configured to control the processing filter chain to trigger the corresponding processing filter to execute the task, and the control unit further includes a third control subunit configured to control the processing filter chain to determine a required processing filter according to a processing flow, where the processing flow indicates a processing filter in the processing filter chain, which needs to execute the task.
6. The task scheduling system of claim 5, wherein the system further comprises:
the second setting unit is used for correspondingly setting at least one action execution unit in the processing filter, and setting the formats of the input interface and the output interface of the action execution unit to be uniform;
the control unit is specifically configured to control the processing filter chain to trigger an action execution unit in the corresponding processing filter to execute the task.
7. The task scheduling system according to claim 6, wherein the control unit comprises:
a sending subunit, configured to send a scheduling instruction to the processing filter chain, so that the processing filter chain obtains a corresponding processing flow according to the scheduling instruction;
the first control subunit is used for controlling the processing filter chain to call the required processing filter according to the processing flow;
and the second control subunit is used for executing the tasks according to a preset sequence by utilizing the action execution unit in the called processing filter.
8. A task scheduling system according to any one of claims 5 to 7 wherein the system further comprises:
the device comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring a configuration instruction which indicates that a processing filter chain needs to be added or deleted;
the trigger control unit is used for triggering the step of executing the configuration of the reading task to generate and set a processing filter chain when the configuration instruction indicates that the processing filter chain needs to be added;
and the deleting unit is used for deleting the corresponding processing filter chain when the configuration instruction indicates that the processing filter chain needs to be deleted.
9. A computer-readable storage medium storing a computer program, wherein the computer program is executable by a processor to implement the method of any one of claims 1 to 4.
CN201510644165.7A 2015-09-30 2015-09-30 Task scheduling method and system Active CN106557359B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510644165.7A CN106557359B (en) 2015-09-30 2015-09-30 Task scheduling method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510644165.7A CN106557359B (en) 2015-09-30 2015-09-30 Task scheduling method and system

Publications (2)

Publication Number Publication Date
CN106557359A CN106557359A (en) 2017-04-05
CN106557359B true CN106557359B (en) 2021-02-05

Family

ID=58418127

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510644165.7A Active CN106557359B (en) 2015-09-30 2015-09-30 Task scheduling method and system

Country Status (1)

Country Link
CN (1) CN106557359B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102929602A (en) * 2012-09-28 2013-02-13 方正国际软件有限公司 System for unified treatment of processes based on process engine

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5621878A (en) * 1993-03-03 1997-04-15 Apple Computer, Inc. Method and apparatus or manipulating data from a suspended application program on a computer-controlled display system
US7711953B2 (en) * 2005-08-10 2010-05-04 Hewlett-Packard Development Company, L.P. Methods and systems that selectively permit changes to a cryptographic hardware unit's state
US8001367B2 (en) * 2006-10-10 2011-08-16 Symantec Corporation Performing application setting activity using a removable storage device
NZ554258A (en) * 2007-03-29 2009-01-31 Khipu Systems Ltd Predictive model implementation system and methodology
US8131875B1 (en) * 2007-11-26 2012-03-06 Adobe Systems Incorporated Device profile assignment based on device capabilities
CN103279351B (en) * 2013-05-31 2016-06-29 北京高森明晨信息科技有限公司 A kind of method of task scheduling and device
CN104346215A (en) * 2013-08-07 2015-02-11 中兴通讯股份有限公司 Task scheduling service system and method
CN103970851B (en) * 2014-05-05 2017-07-04 神华集团有限责任公司 The method that magnanimity Credential data directly provides general headquarters of large-size enterprise group financial statement

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102929602A (en) * 2012-09-28 2013-02-13 方正国际软件有限公司 System for unified treatment of processes based on process engine

Also Published As

Publication number Publication date
CN106557359A (en) 2017-04-05

Similar Documents

Publication Publication Date Title
CN106802826B (en) Service processing method and device based on thread pool
CN108614726B (en) Virtual machine creation method and device
CN107203465B (en) System interface testing method and device
CN106557470B (en) Data extraction method and device
CN110427258B (en) Resource scheduling control method and device based on cloud platform
CN108809683B (en) Method and device for deploying cloud application system
CN110162344B (en) Isolation current limiting method and device, computer equipment and readable storage medium
US20210224055A1 (en) Data interface processing method, device, server and medium
CN110555074A (en) method for extracting and processing data at fixed time, terminal and computer readable storage medium
CN111158800B (en) Method and device for constructing task DAG based on mapping relation
CN111294377B (en) Dependency network request sending method, terminal device and storage medium
CN112860412B (en) Service data processing method and device, electronic equipment and storage medium
CN108733536B (en) Monitoring management system and method
CN111090451A (en) Service configuration method, device and storage medium
CN114564249B (en) Recommendation scheduling engine, recommendation scheduling method and computer readable storage medium
CN106557359B (en) Task scheduling method and system
CN110908644A (en) Configuration method and device of state node, computer equipment and storage medium
CN115220887A (en) Processing method of scheduling information, task processing system, processor and electronic equipment
CN110659125A (en) Analysis task execution method, device and system and electronic equipment
CN112130900B (en) User information management method, system, equipment and medium for BMC
CN110737533B (en) Task scheduling method and device, electronic equipment and storage medium
CN111080250B (en) Flow backspacing compensation method and device, storage medium and electronic equipment
CN114036250A (en) High-precision map task processing method and device, electronic equipment and medium
CN113032118A (en) Asynchronous operation processing method for computer application program and corresponding system
CN106934555B (en) Workflow organization method and device, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant