CN112445597B - Timing task scheduling method and device - Google Patents

Timing task scheduling method and device Download PDF

Info

Publication number
CN112445597B
CN112445597B CN202011367212.5A CN202011367212A CN112445597B CN 112445597 B CN112445597 B CN 112445597B CN 202011367212 A CN202011367212 A CN 202011367212A CN 112445597 B CN112445597 B CN 112445597B
Authority
CN
China
Prior art keywords
task
executed
timing
detection operation
information
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
CN202011367212.5A
Other languages
Chinese (zh)
Other versions
CN112445597A (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.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
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 Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202011367212.5A priority Critical patent/CN112445597B/en
Publication of CN112445597A publication Critical patent/CN112445597A/en
Application granted granted Critical
Publication of CN112445597B publication Critical patent/CN112445597B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
    • G06F9/4887Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues involving deadlines, e.g. rate based, periodic

Abstract

The present disclosure provides a method for scheduling timed tasks, which may be used in the financial or other fields, including: detecting a timing task set, and determining a task to be executed which needs to be triggered between the current detection operation and the next detection operation to obtain a task detection result; generating a task trigger instruction according to the task to be executed indicated by the task detection result; and sending the task trigger instruction to a target service node so that the target service node can call the task to be executed from the timed task set and execute the task based on the task trigger instruction. The disclosure also provides a timing task scheduling device, an electronic device and a computer storage medium.

Description

Timing task scheduling method and device
Technical Field
The disclosure relates to the field of distributed technology, and in particular relates to a timing task scheduling method and device.
Background
Timed task scheduling has a very wide range of application scenarios, for example, in many engineering projects, timed send tasks, timed batch processing tasks, timed detect tasks, and the like are designed.
In the process of realizing the technical conception of the present disclosure, the inventor finds that the timing task scheduling method in the related art has the problems of low scheduling efficiency and large scheduling consumption.
Disclosure of Invention
One aspect of the present disclosure provides a method of scheduling timed tasks, comprising: detecting a timing task set, and determining a task to be executed which needs to be triggered between the current detection operation and the next detection operation to obtain a task detection result; generating a task trigger instruction according to the task to be executed indicated by the task detection result; and sending the task trigger instruction to a target service node so that the target service node can call the task to be executed from the timed task set and execute the task based on the task trigger instruction.
Optionally, the detecting the set of timing tasks, determining a task to be performed that needs to be triggered between the current detecting operation and an adjacent next detecting operation includes: detecting task information of at least one timing task in a timing task set, wherein the task information comprises task trigger time; and determining a task to be executed, wherein the task triggering time is reached between the current detection operation and the next detection operation.
Optionally, the determining the task to be executed reaching the task trigger time between the current detection operation and the next detection operation includes: determining a system machine time period between the current detection operation and the next detection operation; and determining that the task triggering time meets the timing task of the system machine time period to serve as the task to be executed.
Optionally, the task information further includes a service node identifier, and the generating a task trigger instruction according to the task to be executed indicated by the task detection result includes: determining a target service node for executing the task to be executed according to the service node identification indicated by the task information; and generating a task trigger instruction for triggering the target service node to execute the task to be executed according to the service trigger time indicated by the task information.
Optionally, the method further comprises: in the case where the task information further includes execution frequency information, for any of the timed tasks having the execution frequency information, after the timed task is executed, the next trigger time of the timed task is updated in the timed task set according to the execution frequency information.
Optionally, the method further comprises: and adjusting the time interval of adjacent detection operations according to the number of tasks to be executed indicated by the task detection result and the maximum difference value of task trigger time of different tasks to be executed.
Optionally, the method further comprises: displaying the configurable scheduling parameters in a visual mode; receiving a scheduling parameter configuration request, wherein the configuration request comprises scheduling parameters to be updated; and updating the scheduling parameters according to the configuration request.
Optionally, the method further comprises: and monitoring consumption information when the target service node executes the task to be executed, wherein the consumption information comprises at least one of memory consumption information, CPU consumption information and network bandwidth consumption information, and triggering alarm information by accessing a manual processing mode when the consumption information reaches an alarm threshold.
Another aspect of the present disclosure provides a timed task scheduling device, including: the first processing module is used for detecting a timing task set, determining a task to be executed which needs to be triggered between the current detection operation and the next detection operation to obtain a task detection result; the second processing module is used for generating a task trigger instruction according to the task to be executed indicated by the task detection result; and the sending module is used for sending the task trigger instruction to a target service node so that the target service node can call the task to be executed from the timed task set and execute the task based on the task trigger instruction.
Optionally, the first processing module includes: the first processing sub-module is used for detecting task information of at least one timing task in the timing task set, wherein the task information comprises task trigger time; and determining a task to be executed, wherein the task triggering time is reached between the current detection operation and the next detection operation.
Optionally, the first processing submodule includes: a first processing unit, configured to determine a system machine time period between the current detection operation and an adjacent next detection operation; and determining that the task triggering time meets the timing task of the system machine time period to serve as the task to be executed.
Optionally, the task information further includes a service node identifier, and the second processing module includes: the second processing sub-module is used for determining a target service node for executing the task to be executed according to the service node identification indicated by the task information; and the third processing sub-module is used for generating a task trigger instruction for triggering the target service node to execute the task to be executed according to the service trigger time indicated by the task information.
Optionally, the apparatus further includes: and the third processing module is used for updating the next trigger time of the timing task in the timing task set according to the execution frequency information after the timing task is executed and completed for any timing task with the execution frequency information when the task information also comprises the execution frequency information.
Optionally, the apparatus further includes: and the fourth processing module is used for adjusting the time interval of the adjacent detection operation according to the number of the tasks to be executed indicated by the task detection result and the maximum difference value of the task trigger time of different tasks to be executed.
Optionally, the apparatus further includes: the fifth processing module is used for displaying the configurable scheduling parameters in a visual mode; receiving a scheduling parameter configuration request, wherein the configuration request comprises scheduling parameters to be updated; and updating the scheduling parameters according to the configuration request.
Optionally, the apparatus further includes: and the seventh processing module is used for monitoring consumption information when the target service node executes the task to be executed, wherein the consumption information comprises at least one of memory consumption information, CPU consumption information and network bandwidth consumption information, and when the consumption information reaches an alarm threshold value, the alarm information is triggered by accessing a manual processing mode.
Another aspect of the present disclosure provides an electronic device comprising one or more processors; and a memory for storing one or more programs, wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the methods of embodiments of the present disclosure.
Another aspect of the present disclosure provides a computer-readable storage medium storing computer-executable instructions that, when executed, are configured to implement a method of an embodiment of the present disclosure.
Drawings
For a more complete understanding of the present disclosure, and the advantages thereof, reference is now made to the following descriptions taken in conjunction with the accompanying drawings, in which,
FIG. 1 schematically illustrates a system architecture of a timed task scheduling method and apparatus according to an embodiment of the present disclosure;
FIG. 2 schematically illustrates a flow chart of a method of timed task scheduling in accordance with an embodiment of the present disclosure;
FIG. 3 schematically illustrates a schematic diagram of a timed task scheduling process according to an embodiment of the present disclosure;
FIG. 4 schematically illustrates a flow chart of another timed task scheduling method according to an embodiment of the disclosure;
FIG. 5 schematically illustrates a block diagram of a timed task scheduler according to an embodiment of the present disclosure;
fig. 6 schematically illustrates a block diagram of an electronic device according to an embodiment of the disclosure.
Detailed Description
Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. It should be understood that the description is intended by way of example only and is not intended to limit the scope of the disclosure. In the following detailed description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the embodiments of the present disclosure. It may be evident, however, that one or more embodiments may be practiced without these specific details. In addition, in the following description, descriptions of well-known structures and techniques are omitted so as not to unnecessarily obscure the concepts of the present disclosure.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. The terms "comprises," "comprising," and the like, as used herein, specify the presence of stated features, operations, and/or components, but do not preclude the presence or addition of one or more other features, operations, or components.
All terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art unless otherwise defined. It should be noted that the terms used herein should be construed to have meanings consistent with the context of the present specification and should not be construed in an idealized or overly formal manner.
Where expressions like at least one of "A, B and C, etc. are used, the expressions should generally be interpreted in accordance with the meaning as commonly understood by those skilled in the art (e.g.," a system having at least one of A, B and C "shall include, but not be limited to, a system having a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.).
Some of the block diagrams and/or flowchart illustrations are shown in the figures. It will be understood that some blocks of the block diagrams and/or flowchart illustrations, or combinations of blocks in the block diagrams and/or flowchart illustrations, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable timing task scheduling apparatus, such that the instructions, when executed by the processor, create means for implementing the functions/acts specified in the block diagrams and/or flowchart. The techniques of this disclosure may be implemented in hardware and/or software (including firmware, microcode, etc.). Additionally, the techniques of this disclosure may take the form of a computer program product on a computer-readable storage medium having instructions stored thereon, the computer program product being for use by or in connection with an instruction execution system.
The embodiment of the disclosure provides a timing task scheduling method and a timing task scheduling device capable of applying the method. The method may include, for example, detecting a set of timing tasks, determining a task to be executed to be triggered between the current detection operation and an adjacent next detection operation, obtaining a task detection result, generating a task trigger instruction according to the task to be executed indicated by the task detection result, and sending the task trigger instruction to a target service node, so that the target service node can call the task to be executed from the set of timing tasks and execute the task based on the task trigger instruction.
Fig. 1 schematically illustrates a system architecture of a timed task scheduling method and apparatus according to an embodiment of the present disclosure. It should be noted that fig. 1 is only an example of a system architecture to which embodiments of the present disclosure may be applied to assist those skilled in the art in understanding the technical content of the present disclosure, but does not mean that embodiments of the present disclosure may not be used in other devices, systems, environments, or scenarios.
As shown in fig. 1, the system architecture 100 includes service nodes (a plurality of which are shown, such as service nodes 101, 102, 103) and scheduling nodes (such as scheduling node 104). The service node and the scheduling node are in communication connection, and the actual form of each node may be physical equipment, virtual machine, application program, code tool, etc., and illustratively, the service node may be a resource manager of a cluster associated with a task to be executed, or may be a downstream server in the cluster, and the specific form of the service node and the scheduling node is not limited herein.
A scheduling node (such as scheduling node 104 in fig. 1) detects a timed task set, determines a task to be executed to be triggered between the current detection operation and the next adjacent detection operation, and obtains a task detection result. Then, based on the task to be executed indicated by the task detection result, a task trigger instruction is generated, and the task trigger instruction is sent to a target service node (such as service nodes 101, 102 and 103 in fig. 1), so that the target service node can call the task to be executed from the timed task set and execute the task based on the task trigger instruction.
It should be noted that, the method and the device for scheduling the timing tasks according to the embodiments of the present disclosure may be used in the financial field, and may also be used in any field other than the financial field. The disclosure will be described in detail below with reference to the drawings and specific examples.
Fig. 2 schematically illustrates a flow chart of a timed task scheduling method according to an embodiment of the present disclosure, which is applied to a scheduling node.
As shown in fig. 2, the method 200 may include operations S210 to S230.
In operation S210, a set of timing tasks is detected, and a task to be executed that needs to be triggered between the current detection operation and the next detection operation is determined, so as to obtain a task detection result.
In the embodiment of the present disclosure, the timed task set may specifically be a timed task registry pre-added in a database, where at least one timed task is recorded in the timed task registry, where each timed task has corresponding task information, and the task information includes at least a task trigger time and a service node identifier. The service node identification indicates a target service node capable of performing the timing tasks, and may include information such as the name, ID, communication address, etc. of the service node. The timed tasks may include, for example, timed send tasks, timed detect tasks, timed batch process tasks, and the like. The target service node capable of executing the same timing task can be one or a plurality of target service nodes. In the case that the target service nodes are multiple, after generating a task trigger instruction for triggering the target service node to execute the task to be executed, the scheduling node can send the task trigger instruction to the multiple target nodes in a broadcast mode.
The timing task set can comprise a plurality of timing tasks, the scheduling node detects the timing task set, batch detection of the plurality of timing tasks can be achieved, and whether at least one timing task in the timing task set needs to be triggered to be executed or not is judged, so that a task detection result is obtained. The batch detection of the plurality of timing tasks in the timing task set is beneficial to improving the scheduling efficiency of the timing tasks and reducing the scheduling consumption of the timing tasks.
The scheduling node may be a stand-alone system service process, which may be self-contained in a runtime environment, may be installed and run directly in a different operating system. Illustratively, the scheduling node may be implemented using Entegor (a batch scheduling tool). The timing task set can be added in a third party database independent of the service node and the scheduling node, and a user can perform operations such as adding, deleting, modifying and the like on the timing task set in the database.
Illustratively, the timing task includes pushing voting prompt information to company staff in the morning of 9:00, 9:30 and 10:00 to remind the staff to vote in a company management system, and a target service node for executing the timing task pushes APP for information of an administrator. For the timing task, the scheduling center can send a task trigger instruction to the information push APP of the manager in the morning of 8:55, 9:25 and 9:55 so that the manager can push voting prompt information to the employee account through the information push APP according to the task trigger instruction. The scheduling center may be a code tool capable of implementing timed task scheduling, for example, may be a batch scheduling tool Entegor.
At least one timing task in the timing task set is detected, and a task to be executed, which needs to be triggered between the current detection operation and the next detection operation, is determined. Specifically, at least one timing task in the timing task set is periodically and circularly detected, and the timing task reaching the task trigger time between two adjacent detection operations is determined to be the task to be executed, so that a task detection result is obtained. The task detection result may indicate at least one task to be executed, or may indicate that there is no task to be executed that needs to be triggered to execute.
The timing task set is added with a plurality of timing tasks, and the plurality of timing tasks can be ordered according to the task trigger time. When the scheduling node circularly detects the timing task set, the scheduling node can detect the task to be executed, the task triggering time of which is positioned in the preset time period, and the design can ensure that the triggering of the timing task is not missed, effectively improve the scheduling efficiency of the timing task scheduling and reduce the scheduling consumption of the timing task scheduling.
Next, in operation S220, a task trigger instruction is generated based on the task to be executed indicated by the task detection result.
In the embodiment of the disclosure, specifically, each timing task has corresponding task information, and the task information indicates a task trigger time and a service node identifier. And determining a target service node for executing the task to be executed according to the service node identification indicated by the task information, and generating a task trigger instruction for triggering the target service node to execute the task to be executed according to the service trigger time indicated by the task information. Specifically, an independent timing trigger task may be configured for each target service node, or a common timing trigger task may be configured for multiple target service nodes.
For a target service node, a task trigger instruction for the target service node may be generated, where a task trigger instruction may indicate task trigger times of a plurality of tasks to be performed. When one task trigger instruction indicates task trigger time of a plurality of tasks to be executed, the task trigger instruction for triggering the target service node to execute a plurality of timing tasks can be generated within a preset time before the system machine time reaches the earliest task trigger time. Or, for a certain target service node, a plurality of task trigger instructions for the target service node may be generated, where each task trigger instruction indicates a task trigger time of a task to be executed. When a task trigger instruction indicates a task trigger time of a task to be executed, a task trigger instruction for triggering a target service node to execute the timed task can be generated within a preset duration before the system machine time reaches the task trigger time.
Next, in operation S230, a task trigger instruction is sent to the target service node, so that the target service node invokes a task to be executed from the timed task set and executes the task based on the task trigger instruction.
In the embodiment of the disclosure, specifically, a task trigger instruction is sent to a target service node, so that the target service node can call a task to be executed from a timed task set and execute the task according to the task trigger time indicated by the task trigger instruction based on the acquired task trigger instruction. The target service node may feed back the task execution result to the scheduling node, and after the scheduling node receives the task feedback message from the service node and determines that the task to be executed is completed, the scheduling node may delete the timing task from the timing task set, or update task information of the timing task. For any timed task having execution frequency information, after determining that the timed task is completed, the scheduling node may update the next trigger time for the timed task in the set of timed tasks.
Optionally, the scheduling node may monitor consumption information of the target service node when executing the task to be executed, where the consumption information includes at least one of memory consumption information, CPU consumption information, and network bandwidth consumption information, and trigger the alarm information by accessing a manual processing manner when the consumption information reaches the alarm threshold. When the consumption information is too large or too small, the situation that the target service node executes the task is likely to occur, and when the monitored CPU consumption value is smaller than a preset threshold value, the server for executing the task to be executed is judged to be abnormal, and at the moment, the alarm information can be triggered by accessing a manual processing mode. Specifically, the method can be accessed to manual processing by means of sending mails, mobile phone short messages, public number information, APP prompt reminding, mobile phone voice and the like, so that alarm information triggering is achieved. And after the exception is processed manually, continuing to execute the timing task scheduling work. The design is beneficial to realizing that a developer does not need to passively check the log to find the abnormality, receives the abnormality information in real time and gives corresponding treatment, is beneficial to reducing the maintenance cost of timing task scheduling, is beneficial to improving the abnormality treatment efficiency and reducing the abnormality emergency time length, and can effectively ensure the efficient and stable operation of the timing task scheduling.
Fig. 3 schematically illustrates a schematic diagram of a timed task scheduling process according to an embodiment of the present disclosure, as shown in fig. 3, in which a scheduling node 301 cyclically detects a timed task set in which n timed tasks are recorded, where n is an integer greater than 4. The scheduling node 301 determines, in the timed task set, that the tasks to be executed, which need to be triggered between the current detection operation and the next adjacent detection operation, include a timed task 1, a timed task 2, and a timed task 3. Based on the detected task information of the task to be executed, the scheduling node 301 generates a task trigger instruction, and sends the task trigger instruction to the target service node 302, so that the target service node 302 invokes and executes the timing task 1, the timing task 2 and the timing task 3 from the timing task set based on the received task trigger instruction. After the task to be executed is executed, the target service node 302 feeds back a task execution result to the scheduling node 301, so that the scheduling node 301 performs an update operation for the timed task set according to the received task execution result.
In the embodiment of the disclosure, a timing task set is detected, a task to be executed, which needs to be triggered between the current detection operation and the next detection operation, is determined, and a task detection result is obtained; generating a task trigger instruction according to the task to be executed indicated by the task detection result; and sending the task trigger instruction to the target service node so that the target service node can call the task to be executed from the timed task set and execute the task based on the task trigger instruction. The batch cycle detection timing task set is beneficial to reducing the number of detection operations for determining whether to trigger the timing tasks on the basis of ensuring that the timing task scheduling is normal, and is beneficial to improving the scheduling efficiency of the timing task scheduling and reducing the scheduling consumption of the timing task scheduling by detecting a plurality of timing tasks once and determining the tasks to be executed which need to be triggered between two adjacent detection operations.
Fig. 4 schematically illustrates a flow chart of another timed task scheduling method according to an embodiment of the disclosure.
As shown in fig. 4, operation S210 may include operations S410 to S420.
In operation S410, a system machine time period between the current inspection operation and the next adjacent inspection operation is determined.
In an embodiment of the disclosure, a set of timing tasks is detected in a loop detection manner, and a system machine time period between every two detection operations in the loop detection is determined. Specifically, determining the current time of the system machine corresponding to the current detection operation, determining the time of the system machine in the next adjacent detection operation according to the cycle detection period of the preset dispatching center, and further determining the time period of the system machine between the two adjacent detection operations.
Next, in operation S420, task information of at least one timing task in the timing task set is detected, and a task to be executed reaching a task trigger time between the current detection operation and an adjacent next detection operation is determined according to the system machine time period, where the task information includes the task trigger time and a service node identifier.
In the embodiment of the disclosure, specifically, according to a system machine time period between two adjacent detection operations, a timing task of which the task trigger time meets the system machine time period is determined, and the task to be executed, which needs to be triggered and executed between the two adjacent detection operations, is determined. That is, a timed task whose task trigger time is within the system machine time period is determined as a task to be executed.
The scheduling node periodically circularly detects the timing task set, and the circulation detection parameters can be configured manually or according to the task detection result. Specifically, the cycle detection parameter of the scheduling node may be adjusted according to the number of tasks to be executed indicated by the task detection result and the maximum difference value of the task trigger time of different tasks to be executed. When the task detection result of the continuous multiple detection operation indicates that no task to be executed needs to be triggered and executed in the system machine time period, the time interval of the adjacent cycle detection can be increased, and the detection frequency of the cycle detection can be reduced. When the number of tasks to be executed indicated by the single task detection result is excessive, the maximum difference value of the task trigger time of different tasks to be executed exceeds a preset threshold value, the time interval of adjacent cycle detection can be reduced, and the detection frequency of cycle detection can be increased.
The scheduling node supports displaying configurable scheduling parameters in a visual mode, wherein the scheduling parameters comprise, for example, a cycle detection period, a time parameter for generating a task trigger instruction, a sending mode for sending the task trigger instruction, an alarm threshold value, an alarm mode and the like. And the user performs scheduling parameter configuration aiming at the scheduling node through the scheduling parameter configuration options displayed in a visual mode. Specifically, the scheduling node receives a scheduling parameter configuration request from a user, the configuration request includes scheduling parameters to be updated, and then performs scheduling parameter update based on the received scheduling parameter configuration request. The design is beneficial to realizing the visual dynamic configuration of the dispatching center, reducing the professional requirement of the configuration of the dispatching center and reducing the maintenance difficulty and the maintenance cost of the maintenance of the dispatching center.
Illustratively, the batch scheduling tool Entegor is utilized to replace a timing task framework Quatz commonly used by a timing task scheduling method in the related art, specifically, a loop detector of Entegor is utilized to detect a timing task set, so as to obtain a task detection result. Entegor supports scheduling parameter configuration according to a task detection result, and compared with a timing task framework Quatz, entegor supports visual on-demand configuration scheduling parameters, the method is beneficial to reducing maintenance difficulty of a timing task scheduling tool. And when the timing task triggers abnormality, entegor supports a manual access processing mechanism of automatic mail notification, which is beneficial to shortening the abnormal processing time of timing task scheduling and ensuring the efficient and stable operation of the timing task scheduling.
Fig. 5 schematically illustrates a block diagram of a timed task scheduler according to an embodiment of the present disclosure.
As shown in fig. 5, the timed task scheduler 500 includes a first processing module 501, a second processing module 502, and a transmitting module 503.
Specifically, the first processing module 501 is configured to detect a set of timing tasks, determine a task to be executed that needs to be triggered between the current detection operation and an adjacent next detection operation, and obtain a task detection result; the second processing module 502 is configured to generate a task trigger instruction according to a task to be executed indicated by the task detection result; and a sending module 503, configured to send the task trigger instruction to the target service node, so that the target service node invokes the task to be executed from the timed task set and executes the task based on the task trigger instruction.
In the embodiment of the disclosure, a timing task set is detected, a task to be executed, which needs to be triggered between the current detection operation and the next detection operation, is determined, and a task detection result is obtained; generating a task trigger instruction according to the task to be executed indicated by the task detection result; and sending the task trigger instruction to the target service node so that the target service node can call the task to be executed from the timed task set and execute the task based on the task trigger instruction. The batch cycle detection timing task set is beneficial to reducing the number of detection operations for determining whether to trigger the timing tasks on the basis of ensuring that the timing task scheduling is normal, and is beneficial to improving the scheduling efficiency of the timing task scheduling and reducing the scheduling consumption of the timing task scheduling by detecting a plurality of timing tasks once and determining the tasks to be executed which need to be triggered between two adjacent detection operations.
As a possible embodiment, the first processing module includes: the first processing sub-module is used for detecting task information of at least one timing task in the timing task set, wherein the task information comprises task trigger time; and determining a task to be executed, wherein the task triggering time is reached between the current detection operation and the next detection operation.
As a possible embodiment, the first processing sub-module comprises: a first processing unit, configured to determine a system machine time period between the current detection operation and an adjacent next detection operation; and determining that the task triggering time meets the timing task of the system machine time period to serve as a task to be executed.
As a possible embodiment, the task information further includes a service node identifier, and the second processing module includes: the second processing sub-module is used for determining a target service node for executing the task to be executed according to the service node identification indicated by the task information; and the third processing sub-module is used for generating a task trigger instruction for triggering the target service node to execute the task to be executed according to the service trigger time indicated by the task information.
As a possible embodiment, the present device further comprises: and the third processing module is used for updating the next trigger time of the timing task in the timing task set according to the execution frequency information after the timing task is executed according to any timing task with the execution frequency information when the task information also comprises the execution frequency information.
As a possible embodiment, the present device further comprises: and the fourth processing module is used for adjusting the time interval of the adjacent detection operation according to the number of the tasks to be executed indicated by the task detection result and the maximum difference value of the task trigger time of different tasks to be executed.
As a possible embodiment, the present device further comprises: the fifth processing module is used for displaying the configurable scheduling parameters in a visual mode; receiving a scheduling parameter configuration request, wherein the configuration request comprises scheduling parameters to be updated; and updating the scheduling parameters according to the configuration request.
As a possible embodiment, the present device further comprises: the seventh processing module is configured to monitor consumption information when the target service node executes the task to be executed, where the consumption information includes at least one of memory consumption information, CPU consumption information, and network bandwidth consumption information, and trigger alarm information by accessing a manual processing mode when the consumption information reaches an alarm threshold.
In the embodiment of the disclosure, target data to be approved is obtained from a blockchain platform through a client of an approval mechanism, and approval operation aiming at the target data is performed to obtain an approval result; and generating a payment instruction under the condition that the approval result indicates pass, and writing the payment instruction into the blockchain platform so that the blockchain platform transmits the payment instruction to a client of the financial institution, so that the financial institution performs fund payment according to the payment instruction. The target data to be examined and approved are obtained from the blockchain platform, and the generated payment instruction is written into the blockchain platform, so that the blockchain platform transmits the payment instruction to the client of the financial institution, which is beneficial to reducing the manpower consumption and time consumption of business handling, improving the business handling efficiency, improving the business handling effect and improving the intelligent degree of business handling.
It should be noted that, in the embodiment of the present disclosure, the implementation manner of the device portion is the same as or similar to the implementation manner of the method portion, and will not be described herein.
Any number of the modules, or at least some of the functionality of any number, according to embodiments of the present disclosure may be implemented in one module. Any one or more of the modules according to embodiments of the present disclosure may be implemented as split into multiple modules. Any one or more of the modules according to embodiments of the present disclosure may be implemented at least in part as a hardware circuit, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system-on-chip, a system-on-a-substrate, a system-on-a-package, an Application Specific Integrated Circuit (ASIC), or in hardware or firmware in any other reasonable manner of integrating or packaging the circuits, or in any one of or in any suitable combination of three of software, hardware, and firmware. Or one or more of the modules according to embodiments of the present disclosure may be at least partially implemented as computer program modules that, when executed, perform the corresponding functions.
For example, any of the first processing module 501, the second processing module 502, and the transmitting module 503 may be combined and implemented in one module, or any of the modules may be split into a plurality of modules. Alternatively, at least some of the functionality of one or more of the modules may be combined with at least some of the functionality of other modules and implemented in one module. According to embodiments of the present disclosure, at least one of the first processing module 501, the second processing module 502, and the transmitting module 503 may be implemented at least in part as hardware circuitry, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system on a chip, a system on a substrate, a system on a package, an Application Specific Integrated Circuit (ASIC), or may be implemented in hardware or firmware in any other reasonable way of integrating or packaging circuitry, or in any one of or a suitable combination of any of the three. At least one of the first processing module 501, the second processing module 502 and the transmitting module 503 may be at least partly implemented as computer program modules which, when executed, may perform the respective functions.
Fig. 6 schematically illustrates a block diagram of an electronic device according to an embodiment of the disclosure. The electronic device shown in fig. 6 is merely an example and should not be construed to limit the functionality and scope of use of the disclosed embodiments.
As shown in fig. 6, the electronic device 600 includes a processor 610, a computer-readable storage medium 620. The electronic device 600 may perform methods according to embodiments of the present disclosure.
In particular, the processor 610 may include, for example, a general purpose microprocessor, an instruction set processor and/or an associated chipset and/or a special purpose microprocessor (e.g., an Application Specific Integrated Circuit (ASIC)), or the like. The processor 610 may also include on-board memory for caching purposes. Processor 610 may be a single processing module or multiple processing modules for performing the different actions of the method flows according to embodiments of the disclosure.
Computer-readable storage medium 620, which may be, for example, a non-volatile computer-readable storage medium, specific examples include, but are not limited to: magnetic storage devices such as magnetic tape or hard disk (HDD); optical storage devices such as compact discs (CD-ROMs); a memory, such as a Random Access Memory (RAM) or a flash memory; etc.
The computer-readable storage medium 620 may include a computer program 621, which computer program 621 may include code/computer-executable instructions that, when executed by the processor 610, cause the processor 610 to perform a method according to an embodiment of the present disclosure or any variation thereof.
The computer program 621 may be configured with computer program code comprising, for example, computer program modules. For example, in an example embodiment, code in computer program 621 may include one or more program modules, including 621A, modules 621B, … …, for example. It should be noted that the division and number of modules is not fixed, and that a person skilled in the art may use suitable program modules or combinations of program modules depending on the actual situation, which when executed by the processor 610, enable the processor 610 to perform the methods according to embodiments of the present disclosure or any variations thereof.
At least one of the first processing module 501, the second processing module 502, and the transmitting module 503 may be implemented as computer program modules described with reference to fig. 6, which, when executed by the processor 610, may implement the respective operations described above, according to embodiments of the present disclosure.
The present disclosure also provides a computer-readable storage medium that may be embodied in the apparatus/device/system described in the above embodiments; or may exist alone without being assembled into the apparatus/device/system. The computer-readable storage medium carries one or more programs which, when executed, implement methods in accordance with embodiments of the present disclosure.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
It will be understood by those skilled in the art that while the present disclosure has been shown and described with reference to particular exemplary embodiments thereof, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the present disclosure as defined by the appended claims and their equivalents. The scope of the disclosure should, therefore, not be limited to the above-described embodiments, but should be determined not only by the following claims, but also by the equivalents of the following claims.

Claims (9)

1. A timed task scheduling method comprising:
detecting a timing task set, determining a task to be executed which needs to be triggered between the current detection operation and the next adjacent detection operation, and obtaining a task detection result, wherein the detecting the timing task set, determining the task to be executed which needs to be triggered between the current detection operation and the next adjacent detection operation, comprises the following steps: detecting task information of at least one timing task in a timing task set, wherein the task information comprises task trigger time; determining a task to be executed, wherein the task triggering time is reached between the current detection operation and the next detection operation; according to the number of tasks to be executed indicated by the task detection result and the maximum difference value of task trigger time of different tasks to be executed, adjusting the time interval of adjacent detection operations;
generating a task trigger instruction according to the task to be executed indicated by the task detection result;
and sending the task trigger instruction to a target service node so that the target service node can call the task to be executed from the timed task set and execute the task based on the task trigger instruction.
2. The method according to claim 1, wherein the determining the task to be performed for reaching the task trigger time between the current detection operation and the next detection operation comprises:
determining a system machine time period between the current detection operation and the next detection operation;
and determining that the task triggering time meets the timing task of the system machine time period to serve as the task to be executed.
3. The method of claim 1, wherein the task information further includes a service node identifier, and the generating a task trigger instruction according to the task to be executed indicated by the task detection result includes:
determining a target service node for executing the task to be executed according to the service node identification indicated by the task information;
and generating a task trigger instruction for triggering the target service node to execute the task to be executed according to the service trigger time indicated by the task information.
4. The method of claim 1, further comprising:
in the case where the task information further includes execution frequency information, for any of the timed tasks having the execution frequency information, after the timed task is executed, the next trigger time of the timed task is updated in the timed task set according to the execution frequency information.
5. The method of claim 1, further comprising:
displaying the configurable scheduling parameters in a visual mode;
receiving a scheduling parameter configuration request, wherein the configuration request comprises scheduling parameters to be updated;
and updating the scheduling parameters according to the configuration request.
6. The method of claim 1, further comprising:
monitoring consumption information of the target service node when executing the task to be executed, wherein the consumption information comprises at least one of memory consumption information, CPU consumption information and network bandwidth consumption information, and,
when the consumption information reaches the alarm threshold, the alarm information is triggered by accessing a manual processing mode.
7. A timed task scheduler comprising:
the first processing module is configured to detect a set of timing tasks, determine a task to be executed that needs to be triggered between a current detection operation and an adjacent next detection operation, and obtain a task detection result, where the detecting the set of timing tasks determines the task to be executed that needs to be triggered between the current detection operation and the adjacent next detection operation, and includes: detecting task information of at least one timing task in a timing task set, wherein the task information comprises task trigger time; determining a task to be executed, wherein the task triggering time is reached between the current detection operation and the next detection operation; according to the number of tasks to be executed indicated by the task detection result and the maximum difference value of task trigger time of different tasks to be executed, adjusting the time interval of adjacent detection operations;
the second processing module is used for generating a task trigger instruction according to the task to be executed indicated by the task detection result;
and the sending module is used for sending the task trigger instruction to a target service node so that the target service node can call the task to be executed from the timed task set and execute the task based on the task trigger instruction.
8. An electronic device, comprising:
one or more processors; and
a memory for storing one or more programs,
wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method of any of claims 1 to 6.
9. A computer readable storage medium having stored thereon executable instructions which when executed by a processor cause the processor to implement the method of any of claims 1 to 6.
CN202011367212.5A 2020-11-27 2020-11-27 Timing task scheduling method and device Active CN112445597B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011367212.5A CN112445597B (en) 2020-11-27 2020-11-27 Timing task scheduling method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011367212.5A CN112445597B (en) 2020-11-27 2020-11-27 Timing task scheduling method and device

Publications (2)

Publication Number Publication Date
CN112445597A CN112445597A (en) 2021-03-05
CN112445597B true CN112445597B (en) 2024-02-02

Family

ID=74738843

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011367212.5A Active CN112445597B (en) 2020-11-27 2020-11-27 Timing task scheduling method and device

Country Status (1)

Country Link
CN (1) CN112445597B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113138807B (en) * 2021-04-25 2022-09-09 上海淇玥信息技术有限公司 Method and device for executing multi-node service task and electronic equipment

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109634728A (en) * 2018-11-16 2019-04-16 深圳市云智融科技有限公司 Job scheduling method, device, terminal device and readable storage medium storing program for executing
CN110414840A (en) * 2019-07-29 2019-11-05 中国工商银行股份有限公司 Method, system and the relevant device of across dispatch area carry out United Dispatching

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109634728A (en) * 2018-11-16 2019-04-16 深圳市云智融科技有限公司 Job scheduling method, device, terminal device and readable storage medium storing program for executing
CN110414840A (en) * 2019-07-29 2019-11-05 中国工商银行股份有限公司 Method, system and the relevant device of across dispatch area carry out United Dispatching

Also Published As

Publication number Publication date
CN112445597A (en) 2021-03-05

Similar Documents

Publication Publication Date Title
CN111049705B (en) Method and device for monitoring distributed storage system
US20190158626A1 (en) Method, apparatus and computer readable storage medium for processing service
AU2014364419A1 (en) System and method to utilize geo-fences
EP2985730A1 (en) Method and device for partially-upgrading
CN111355622A (en) Container traffic monitoring method, system and computer readable storage medium
CN112445597B (en) Timing task scheduling method and device
US20100131598A1 (en) User alert if a person will become unavailable
CN114090198A (en) Distributed task scheduling method and device, electronic equipment and storage medium
CN111538602A (en) Message forwarding method and device for message queue
CN110417597B (en) Method and device for monitoring certificate, electronic equipment and readable storage medium
CN111652681A (en) Receipt processing method, server and computer readable storage medium
CN110737655A (en) Method and device for reporting data
CN110968433A (en) Information processing method and system and electronic equipment
CN115373886A (en) Service group container shutdown method, device, computer equipment and storage medium
CN114356713A (en) Thread pool monitoring method and device, electronic equipment and storage medium
CN109960659B (en) Method and device for detecting application program
CN113760708A (en) Automatic testing method and device
CN111290873A (en) Fault processing method and device
CN112540838B (en) System resource scheduling method and device and computer storage medium
CN115664936A (en) Abnormal service warning method and device, electronic equipment and storage medium
CN113778800B (en) Error information processing method, device, system, equipment and storage medium
CN110601875B (en) Information output method, information output apparatus, management device, and computer-readable storage medium
CN112835804B (en) Test case processing method, device, electronic equipment and medium
CN116185648A (en) Synchronous execution control method, device and equipment for multi-channel advertisement front-end tasks
US10251031B1 (en) Advanced automatic loop detection in short message service (SMS) two-way messaging

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