CN109857533A - A kind of timed task dispatching method, device and intelligent terminal - Google Patents

A kind of timed task dispatching method, device and intelligent terminal Download PDF

Info

Publication number
CN109857533A
CN109857533A CN201910063991.0A CN201910063991A CN109857533A CN 109857533 A CN109857533 A CN 109857533A CN 201910063991 A CN201910063991 A CN 201910063991A CN 109857533 A CN109857533 A CN 109857533A
Authority
CN
China
Prior art keywords
timed task
thread
task
timed
receiving
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.)
Pending
Application number
CN201910063991.0A
Other languages
Chinese (zh)
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.)
Shenzhen Zhi Chain Physical Technology Co Ltd
Original Assignee
Shenzhen Zhi Chain Physical Technology 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 Shenzhen Zhi Chain Physical Technology Co Ltd filed Critical Shenzhen Zhi Chain Physical Technology Co Ltd
Priority to CN201910063991.0A priority Critical patent/CN109857533A/en
Publication of CN109857533A publication Critical patent/CN109857533A/en
Pending legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

The invention belongs to field of computer technology, provide a kind of timed task dispatching method, this method comprises: creating first thread according to first timed task when receiving first timed task;When receiving second timed task, second thread is created according to second timed task;When receiving n-th timed task, n-th thread is created according to n-th timed task;Wherein, N >=3 and be integer;Monitor whether corresponding timed task has reached trigger condition respectively by N number of thread created;If listening to M timed task has reached trigger condition, corresponding timed task is executed by the corresponding thread of the M timed task respectively;Wherein, the 1≤M≤N.The embodiment of the present invention can create multiple processes according to the multiple timed tasks received, monitor and execute corresponding timed task respectively by multiple processes, the traffic handing capacity timeliness of timed task can be improved.

Description

A kind of timed task dispatching method, device and intelligent terminal
Technical field
The invention belongs to field of computer technology more particularly to a kind of timed task dispatching methods, device and intelligent terminal.
Background technique
With the rapid development of big data, the requirement to data processing is higher and higher, at present in the business of enterprise, in order to It improves efficiency, needs to automatically process various businesses, timed task can be by the data task received in advance any specified Time executes automatically.
Currently, the processing to timed task mainly carries out batch processing by single background process, when the same time When the timed task of triggering is more, it is easy to so that task processing generates delay, so as to cause the timeliness of traffic handing capacity It is low.
Summary of the invention
In view of this, the embodiment of the invention provides a kind of timed task dispatching method, device and intelligent terminals, it is intended to solve The low problem of the timeliness of certainly existing timed task dispatching method processing capacity.
The first aspect of the embodiment of the present invention provides a kind of timed task dispatching method, comprising:
When receiving first timed task, first thread is created according to first timed task;
When receiving second timed task, second thread is created according to second timed task;
When receiving n-th timed task, n-th thread is created according to the n-th timed task;Wherein, the N >=3 and be integer;
Monitor whether corresponding timed task has reached trigger condition respectively by N number of thread created;
If listening to M timed task has reached trigger condition, pass through the corresponding thread difference of the M timed task Execute corresponding timed task;Wherein, the 1≤M≤N.
In one embodiment, the method also includes:
If the Thread Count created be equal to preset maximum thread, using receive again first timed task as K-th timed task, and monitored by first thread and execute the k-th timed task;
When receiving K+1 timed task, is monitored by second thread and execute the K+1 timing Task;
When receiving K+N-1 timed task, is monitored by the n-th thread and execute the K+N-1 Timed task.
In one embodiment, if having reached trigger condition listening to M timed task, pass through the M timing The corresponding thread of task is executed respectively after corresponding timed task, comprising:
The implementing result for executing timed task is sent to respectively by the corresponding thread of the M timed task corresponding Client.
In one embodiment, if having reached trigger condition listening to M timed task, pass through the M timing The corresponding thread of task is executed respectively after corresponding timed task, further includes:
Information is handled according to history, it is corresponding fixed to judge whether the corresponding thread of the M timed task has executed automatically When task;
If the corresponding thread of the M timed task does not execute corresponding timed task automatically, corresponding timing is judged Task execution failure, and adjust back the corresponding thread of the M timed task and execute corresponding timed task automatically again.
In one embodiment, the method also includes:
If the execution timed task frequency of failure for detecting the presence of corresponding thread reaches preset threshold, re-creates and hold The frequency of failure of row timed task reaches the thread of preset threshold.
The second aspect of the embodiment of the present application provides a kind of timed task dispatching device, comprising:
First creation module, for being created according to first timed task when receiving first timed task First thread;
Second creation module, for being created according to second timed task when receiving second timed task Second thread;
N creation module, for creating N according to the n-th timed task when receiving n-th timed task A thread;Wherein, N >=3 and be integer;
First monitors module, for monitoring whether corresponding timed task reaches respectively by N number of thread created Trigger condition;
First execution module passes through the M timing if having reached trigger condition for listening to M timed task The corresponding thread of task executes corresponding timed task respectively;Wherein, the 1≤M≤N.
In one embodiment, described device further include:
Second execution module, if the Thread Count for having created is equal to preset maximum thread, by what is received again First timed task is monitored by first thread as k-th timed task and executes the k-th timing and appointed Business;
Third execution module, for monitoring and holding by second thread when receiving K+1 timed task Row the K+1 timed task;
4th execution module, for being monitored simultaneously by the n-th thread when receiving K+N-1 timed task Execute the K+N-1 timed task.
In one embodiment, the timed task scheduler module further include:
Sending module, for the execution knot of timed task will to be executed respectively by the corresponding thread of the M timed task Fruit is sent to corresponding client.
The third aspect of the embodiment of the present invention provides a kind of intelligent terminal, including memory, processor and is stored in institute The computer program that can be run in memory and on the processor is stated, the processor executes real when the computer program The step of existing above method.
The fourth aspect of the embodiment of the present invention provides a kind of computer readable storage medium, computer readable storage medium The step of being stored with computer program, the above method realized when above-mentioned computer program is executed by processor.
In embodiments of the present invention, it when receiving first timed task, is created according to first timed task First thread;When receiving second timed task, second thread is created according to second timed task;When connecing When receiving n-th timed task, n-th thread is created according to the n-th timed task;Wherein, N >=3 and be integer; Monitor whether corresponding timed task has reached trigger condition respectively by N number of thread created;If listening to M timing to appoint Business has reached trigger condition, then executes corresponding timed task respectively by the corresponding thread of the M timed task;Wherein, 1≤the M≤N.Since multiple processes can be created according to the multiple timed tasks received, supervises and hold respectively by multiple processes Row listens corresponding timed task, and the traffic handing capacity timeliness of timed task can be improved.
Detailed description of the invention
It to describe the technical solutions in the embodiments of the present invention more clearly, below will be to embodiment or description of the prior art Needed in attached drawing be briefly described, it should be apparent that, the accompanying drawings in the following description is only of the invention some Embodiment for those of ordinary skill in the art without any creative labor, can also be according to these Attached drawing obtains other attached drawings.
Fig. 1 is the flow diagram for the timed task dispatching method that the embodiment of the present invention one provides;
Fig. 2 is the flow diagram of timed task dispatching method provided by Embodiment 2 of the present invention;
Fig. 3 is the structural schematic diagram for the timed task dispatching device that the embodiment of the present invention three provides
Fig. 4 is the structural schematic diagram for the intelligent terminal that the embodiment of the present invention four provides.
Specific embodiment
In being described below, for illustration and not for limitation, the tool of such as particular system structure, technology etc is proposed Body details, to understand thoroughly the embodiment of the present invention.However, it will be clear to one skilled in the art that there is no these specific The present invention also may be implemented in the other embodiments of details.In other situations, it omits to well-known system, device, electricity The detailed description of road and method, in case unnecessary details interferes description of the invention.
It should be understood that the size of the serial number of each step is not meant that the order of the execution order in following methods embodiment, respectively The execution sequence of process should be determined by its function and internal logic, and the implementation process without coping with each embodiment constitutes any limit It is fixed.
In order to illustrate technical solutions according to the invention, the following is a description of specific embodiments.
Embodiment one
Timed task dispatching method provided in an embodiment of the present invention, can be applied to server, Cloud Server or back-stage management The intelligent terminals such as equipment, the timed task dispatching method in the embodiment of the present invention can be completed by an intelligent terminal, can also be with It is completed, is not limited this jointly by multiple intelligent terminals.For the ease of those skilled in the art to the reason of the embodiment of the present invention Solution, below method and step be described with the completion of intelligent terminal.As shown in Figure 1, the timed task dispatching method includes:
Step S101 creates first line according to first timed task when receiving first timed task Journey;
It in embodiments of the present invention, can be according to the when receiving first timed task of client transmission for the first time One timed task creates first thread, and first thread is listening to for executing and monitoring first timed task When the trigger condition of one timed task, the task of first timed task is executed.
Step S102 creates second line according to second timed task when receiving second timed task Journey;
It in embodiments of the present invention, can be according to the when receiving second timed task of client transmission for the second time Two timed tasks create second thread, and second thread is listening to for executing and monitoring second timed task When the trigger condition of two timed tasks, the task of second timed task is executed.The visitor of above-mentioned second timed task of transmission Family end and the client for sending first timed task can be the affiliated client of same user, be also possible to belonging to different user Client.
Step S103 creates n-th thread according to the n-th timed task when receiving n-th timed task; Wherein, N >=3 and be integer.
It in embodiments of the present invention, can be according to n-th when n-th receives mono- timed task of N of client transmission Timed task creates n-th thread, and n-th thread is listening to n-th timing for executing and monitoring n-th timed task When the trigger condition of task, the task of n-th timed task is executed.
Step S104 monitors whether corresponding timed task has reached trigger condition by N number of thread created respectively.
In embodiments of the present invention, the corresponding timed task monitored of N number of thread is monitored by N number of thread created respectively Whether trigger condition has been reached.
Step S105, it is corresponding by the M timed task if listening to M timed task has reached trigger condition Thread execute corresponding timed task respectively;Wherein, the 1≤M≤N.
In embodiments of the present invention, if listening to M timed task by the thread created has reached trigger condition, Corresponding timed task is executed respectively by monitoring this corresponding thread of M timed task.
In a particular application, client can request timed task server-side cluster by modes such as sdk, http agreements Timing Task Server handles timed task, and timed task server-side cluster is created according to the timed task of client request Process establishes corresponding task schedule plan, is monitored by each thread, and reaches trigger condition in timed task and make Trigger action is carried out, carries out corresponding asynchronous triggering according to the request triggering URL of client.Timed task server-side cluster is established Plan target be all it is independent, do not influenced by other plan targets.Delay when task triggers is avoided the occurrence of with this.
In one embodiment, if having reached trigger condition listening to M timed task, pass through the M timing The corresponding thread of task is executed respectively after corresponding timed task, comprising: passes through the corresponding thread point of the M timed task The implementing result for executing timed task corresponding client is not sent to.M timing is listened in the thread by having created Task has reached trigger condition, then by monitoring after this corresponding thread of M timed task executes corresponding timed task respectively, The implementing result that timed task is executed by monitoring the corresponding thread of this M timed task is sent to corresponding client.
In one embodiment, if having reached trigger condition listening to M timed task, pass through the M timing The corresponding thread of task is executed respectively after corresponding timed task, further includes: is handled information according to history, is judged the M Whether the corresponding thread of timed task executes corresponding timed task automatically;If the corresponding thread of the M timed task is not Automatically corresponding timed task is executed, then judges that corresponding timed task executes failure, and it is corresponding to adjust back the M timed task Thread execute corresponding timed task automatically again.Corresponding timing is executed respectively in the corresponding thread of M timed task to appoint After business, within a preset time, can query history handle information, judge the corresponding thread of above-mentioned M timed task whether oneself It is dynamic to perform corresponding timed task, if having been carried out corresponding timed task, return to the information to run succeeded;If judgement It does not execute corresponding timed task automatically out, then adjusts back the execution pair automatically again of the corresponding thread of the M timed task again The timed task answered.
In one embodiment, the method also includes: if detect the presence of corresponding thread execution timed task failure When number reaches preset threshold, then the frequency of failure for re-creating execution timed task reaches the thread of preset threshold.If detection To created in thread exist execute the timed task frequency of failure reach preset threshold thread, then it is assumed that the thread failure, then The timed task for monitoring and executing according to the thread re-creates new thread and deletes the thread for thinking failure.
It can be seen that in embodiments of the present invention, since multiple processes can be created according to the multiple timed tasks received, It monitors and executes corresponding timed task respectively by multiple processes, the traffic handing capacity timeliness of timed task can be improved.
Embodiment two
The present embodiment is the further explanation to embodiment one, and the present embodiment is the same as example 1 or similar place tool Body can be found in the associated description of embodiment one, and details are not described herein again, as shown in Fig. 2, above-mentioned timed task dispatching method further include:
Step S201, it is fixed by receive again first if the Thread Count created is equal to preset maximum thread When task as k-th timed task, and monitored by first thread and execute the k-th timed task;
In embodiments of the present invention, maximum thread is preset according to practical situations, when the Thread Count created When more than maximum thread, by next receive again first timed task (as k-th timed task) by having created First thread built is monitored, and executes k-th timed task by first thread when reaching trigger condition.
Step S202 is monitored by second thread when receiving K+1 timed task and is executed described K+1 timed task;
In embodiments of the present invention, when the Thread Count created is more than maximum thread, by what is next received again It when second timed task (i.e. the K+1 timed task), is monitored by second thread created, and is reaching touching The K+1 timed task is executed by second thread when clockwork spring part.
Step S203 is monitored by the n-th thread and is executed described when receiving K+N-1 timed task The K+N-1 timed task.
In embodiments of the present invention, when the Thread Count created is more than maximum thread, by what is next received again It when n-th timed task (i.e. the K+N-1 timed task), is monitored by the n-th thread created, and is reaching touching The K+N-1 timed task is executed by n-th thread when clockwork spring part.
It can be seen that in embodiments of the present invention, on the one hand can according to the multiple timed tasks creation received it is multiple into Corresponding timed task is monitored respectively by multiple processes and executed to journey, and the traffic handing capacity timeliness of timed task can be improved Property.On the other hand timed task can be rationally monitored and executed according to the process created in the case where process number is too many, into The monitoring and execution to timed task can be further adjusted in the case that number of passes is more, to further improve timed task The timeliness of traffic handing capacity.
Embodiment three
The embodiment of the present invention provides a kind of timed task dispatching device, can be integrated in server, Cloud Server or backstage and manage The terminal devices such as equipment are managed, are only illustrated in for ease of description for executing the method and step in embodiment one or embodiment two The relevant part of the present invention, as shown in figure 3, the timed task dispatching device 300 includes:
First creation module 301, for being created according to first timed task when receiving first timed task Build first thread;
Second creation module 302, for being created according to second timed task when receiving second timed task Build second thread;
N creation module 303, for being created according to the n-th timed task when receiving n-th timed task N-th thread;Wherein, N >=3 and be integer;
First monitors module 304, for monitoring whether corresponding timed task reaches respectively by N number of thread created Trigger condition;
First execution module 305, it is fixed by the M if having reached trigger condition for listening to M timed task When the corresponding thread of task execute corresponding timed task respectively;Wherein, the 1≤M≤N.
In one embodiment, the timed task dispatching device 300 further include:
Second execution module 306 will receive again if the Thread Count for having created is equal to preset maximum thread First timed task as k-th timed task, and monitored by first thread and execute k-th timing Task;
Third execution module 307, for being monitored by second thread when receiving K+1 timed task And execute the K+1 timed task;
4th execution module 308, for being monitored by the n-th thread when receiving K+N-1 timed task And execute the K+N-1 timed task.
In one embodiment, the timed task dispatching device 300 further include:
Sending module, for the execution knot of timed task will to be executed respectively by the corresponding thread of the M timed task Fruit is sent to corresponding client.
In one embodiment, the timed task dispatching device 300 further include:
First judgment module, if for having reached trigger condition listening to M timed task, it is fixed by the M When the corresponding thread of task execute corresponding timed task respectively after, according to history handle information, judge it is described M timing times Whether corresponding thread of being engaged in executes corresponding timed task automatically;
Second judgment module, if not executing corresponding timed task automatically for the corresponding thread of the M timed task, Then judge that corresponding timed task executes failure, and adjusts back the corresponding thread of the M timed task and execute correspondence automatically again Timed task.
In one embodiment, the timed task dispatching device 300 further include:
Module is re-created, if the execution timed task frequency of failure for detecting the presence of corresponding thread reaches default threshold When value, then the frequency of failure for re-creating execution timed task reaches the thread of preset threshold.
It can be seen that in embodiments of the present invention, since multiple processes can be created according to the multiple timed tasks received, It monitors and executes corresponding timed task respectively by multiple processes, the traffic handing capacity timeliness of timed task can be improved.
Example IV
As shown in figure 4, being the structural schematic diagram of intelligent terminal provided in an embodiment of the present invention.The intelligent terminal 400 wraps It includes: processor 401, memory 402 and being stored in the meter that can be run in above-mentioned memory 402 and on above-mentioned processor 401 Calculation machine program 403.Above-mentioned processor 401 realizes that above-mentioned timed task dispatching method is implemented when executing above-mentioned computer program 403 Step in example, such as the method and step in embodiment one and/or the method and step in embodiment two.
Illustratively, above-mentioned computer program 403 can be divided into one or more units/modules, said one or The multiple units/modules of person are stored in above-mentioned memory 402, and are executed by above-mentioned processor 401, to complete the present invention.On Stating one or more units/modules can be the series of computation machine program instruction section that can complete specific function, the instruction segment For describing implementation procedure of the above-mentioned computer program 403 in above-mentioned intelligent terminal 400.For example, above-mentioned computer program 403 The first creation module can be divided into, the second creation module module, N creation module, first monitors module, and first executes mould Block, the second execution module, third execution module, the modules such as the 4th execution module, each module concrete function is in above-described embodiment three In have been described, details are not described herein again.
Above-mentioned intelligent terminal 400 can be the terminal devices such as server, Cloud Server or back-stage management equipment.Above-mentioned intelligence Terminal 400 may include, but be not limited only to, processor 401, memory 402.It will be understood by those skilled in the art that Fig. 4 is only The example of intelligent terminal 400 does not constitute the restriction to intelligent terminal 400, may include components more more or fewer than diagram, Perhaps certain components or different components are combined, such as above-mentioned intelligent terminal 400 can also include input-output equipment, net Network access device, bus etc..
Alleged processor 401 can be central processing unit (Central Processing Unit, CPU), can also be Other general processors, digital signal processor (Digital Signal Processor, DSP), specific integrated circuit (Application Specific Integrated Circuit, ASIC), ready-made programmable gate array (Field- Programmable Gate Array, FPGA) either other programmable logic device, discrete gate or transistor logic, Discrete hardware components etc..General processor can be microprocessor or the processor is also possible to any conventional processor Deng.
Above-mentioned memory 402 can be the internal storage unit of intelligent terminal 400, for example, intelligent terminal 400 hard disk or Memory.Above-mentioned memory 402 is also possible to the External memory equipment of above-mentioned intelligent terminal 400, such as on above-mentioned intelligent terminal 400 The plug-in type hard disk of outfit, intelligent memory card (Smart Media Card, SMC), secure digital (Secure Digital, SD) Card, flash card (Flash Card) etc..Further, above-mentioned memory 402 can also be both interior including above-mentioned intelligent terminal 400 Portion's storage unit also includes External memory equipment.Above-mentioned memory 402 is for storing above-mentioned computer program and above-mentioned intelligence Other programs and data needed for terminal 400.Above-mentioned memory 402, which can be also used for temporarily storing, have been exported or will The data of output.
It is apparent to those skilled in the art that for convenience of description and succinctly, only with above-mentioned each function Can unit, module division progress for example, in practical application, can according to need and by above-mentioned function distribution by different Functional unit, module are completed, i.e., the internal structure of above-mentioned apparatus is divided into different functional unit or module, more than completing The all or part of function of description.Each functional unit in embodiment, module can integrate in one processing unit, can also To be that each unit physically exists alone, can also be integrated in one unit with two or more units, it is above-mentioned integrated Unit both can take the form of hardware realization, can also realize in the form of software functional units.In addition, each function list Member, the specific name of module are also only for convenience of distinguishing each other, the protection scope being not intended to limit this application.Above-mentioned intelligence The specific work process of unit in terminal, module, can refer to corresponding processes in the foregoing method embodiment, no longer superfluous herein It states.
In the above-described embodiments, it all emphasizes particularly on different fields to the description of each embodiment, is not described in detail or remembers in some embodiment The part of load may refer to the associated description of other embodiments.
Those of ordinary skill in the art may be aware that list described in conjunction with the examples disclosed in the embodiments of the present disclosure Member and algorithm steps can be realized with the combination of electronic hardware or computer software and electronic hardware.These functions are actually It is implemented in hardware or software, the specific application and design constraint depending on technical solution.Professional technician Each specific application can be used different methods to achieve the described function, but this realization is it is not considered that exceed The scope of the present invention.
In embodiment provided by the present invention, it should be understood that disclosed device and method can pass through others Mode is realized.For example, the apparatus embodiments described above are merely exemplary, for example, the division of above-mentioned module or unit, Only a kind of logical function partition, there may be another division manner in actual implementation, such as multiple units or components can be with In conjunction with or be desirably integrated into another system, or some features can be ignored or not executed.Another point, it is shown or discussed Mutual coupling or direct-coupling or communication connection can be through some interfaces, the INDIRECT COUPLING of device or unit or Communication connection can be electrical property, mechanical or other forms.
Above-mentioned unit as illustrated by the separation member may or may not be physically separated, aobvious as unit The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple In network unit.Some or all of unit therein can be selected to realize the embodiment of the present invention according to the actual needs Purpose.
It, can also be in addition, the functional units in various embodiments of the present invention may be integrated into one processing unit It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list Member both can take the form of hardware realization, can also realize in the form of software functional units.
If above-mentioned integrated unit is realized in the form of SFU software functional unit and sells or use as independent product When, it can store in a computer readable storage medium.Based on this understanding, the present invention realizes above-described embodiment side All or part of the process in method can also instruct relevant hardware to complete, above-mentioned computer by computer program Program can be stored in a computer readable storage medium, and the computer program is when being executed by processor, it can be achieved that above-mentioned each The step of a embodiment of the method.Wherein, above-mentioned computer program includes computer program code, and above-mentioned computer program code can Think source code form, object identification code form, executable file or certain intermediate forms etc..Above-mentioned computer-readable medium can be with It include: any entity or device, recording medium, USB flash disk, mobile hard disk, magnetic disk, light that can carry above-mentioned computer program code Disk, computer storage, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium etc..It should be noted that above-mentioned computer The content that readable medium includes can carry out increase and decrease appropriate according to the requirement made laws in jurisdiction with patent practice, such as In certain jurisdictions, according to legislation and patent practice, computer-readable medium do not include be electric carrier signal and telecommunications letter Number.
Embodiment described above is merely illustrative of the technical solution of the present invention, rather than its limitations;Although referring to aforementioned reality Applying example, invention is explained in detail, those skilled in the art should understand that: it still can be to aforementioned each Technical solution documented by embodiment is modified or equivalent replacement of some of the technical features;And these are modified Or replacement, the spirit and scope for technical solution of various embodiments of the present invention that it does not separate the essence of the corresponding technical solution should all It is included within protection scope of the present invention.

Claims (10)

1. a kind of timed task dispatching method characterized by comprising
When receiving first timed task, first thread is created according to first timed task;
When receiving second timed task, second thread is created according to second timed task;
When receiving n-th timed task, n-th thread is created according to the n-th timed task;Wherein, N >=3 It and is integer;
Monitor whether corresponding timed task has reached trigger condition respectively by N number of thread created;
If listening to M timed task has reached trigger condition, executed respectively by the corresponding thread of the M timed task Corresponding timed task;Wherein, the 1≤M≤N.
2. timed task dispatching method according to claim 1, which is characterized in that the method also includes:
If the Thread Count created is equal to preset maximum thread, using receive again first timed task as K A timed task, and monitored by first thread and execute the k-th timed task;
When receiving K+1 timed task, is monitored by second thread and execute the K+1 timing and appointed Business;
When receiving K+N-1 timed task, is monitored by the n-th thread and execute the K+N-1 timing Task.
3. timed task dispatching method according to claim 1, which is characterized in that if being reached listening to M timed task Trigger condition is arrived, then after executing corresponding timed task respectively by the corresponding thread of the M timed task, comprising:
The implementing result for executing timed task is sent to corresponding client respectively by the corresponding thread of the M timed task End.
4. timed task dispatching method according to claim 1, which is characterized in that if being reached listening to M timed task Trigger condition has been arrived, then after executing corresponding timed task respectively by the corresponding thread of the M timed task, has also been wrapped It includes:
Information is handled according to history, judges whether the corresponding thread of the M timed task has executed corresponding timing automatically and appointed Business;
If the corresponding thread of the M timed task does not execute corresponding timed task automatically, corresponding timed task is judged Failure is executed, and adjusts back the corresponding thread of the M timed task and executes corresponding timed task automatically again.
5. timed task dispatching method according to claim 4, which is characterized in that the method also includes:
If the execution timed task frequency of failure for detecting the presence of corresponding thread reaches preset threshold, it is fixed to re-create execution When task the frequency of failure reach the thread of preset threshold.
6. a kind of timed task dispatching device characterized by comprising
First creation module, for creating first according to first timed task when receiving first timed task A thread;
Second creation module, for creating second according to second timed task when receiving second timed task A thread;
N creation module, for creating n-th line according to the n-th timed task when receiving n-th timed task Journey;Wherein, N >=3 and be integer;
First monitors module, for monitoring whether corresponding timed task has reached triggering respectively by N number of thread created Condition;
First execution module passes through the M timed task if having reached trigger condition for listening to M timed task Corresponding thread executes corresponding timed task respectively;Wherein, the 1≤M≤N.
7. timed task dispatching device according to claim 6, which is characterized in that described device further include:
Second execution module, if Thread Count for having created is equal to preset maximum thread, will receive again first A timed task is monitored by first thread as k-th timed task and executes the k-th timed task;
Third execution module, for being monitored by second thread and executing institute when receiving K+1 timed task State the K+1 timed task;
4th execution module, for monitoring and executing by the n-th thread when receiving K+N-1 timed task The K+N-1 timed task.
8. timed task dispatching device according to claim 6, which is characterized in that the timed task scheduler module is also wrapped It includes:
Sending module, for respectively being sent out the implementing result for executing timed task by the corresponding thread of the M timed task It send to corresponding client.
9. a kind of intelligent terminal, including memory, processor and storage are in the memory and can be on the processor The computer program of operation, which is characterized in that the processor realizes such as claim 1 to 5 when executing the computer program The step of any one the method.
10. a kind of computer readable storage medium, the computer-readable recording medium storage has computer program, and feature exists In when the computer program is executed by processor the step of any one of such as claim 1 to 5 of realization the method.
CN201910063991.0A 2019-01-23 2019-01-23 A kind of timed task dispatching method, device and intelligent terminal Pending CN109857533A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910063991.0A CN109857533A (en) 2019-01-23 2019-01-23 A kind of timed task dispatching method, device and intelligent terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910063991.0A CN109857533A (en) 2019-01-23 2019-01-23 A kind of timed task dispatching method, device and intelligent terminal

Publications (1)

Publication Number Publication Date
CN109857533A true CN109857533A (en) 2019-06-07

Family

ID=66895940

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910063991.0A Pending CN109857533A (en) 2019-01-23 2019-01-23 A kind of timed task dispatching method, device and intelligent terminal

Country Status (1)

Country Link
CN (1) CN109857533A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111258733A (en) * 2020-01-14 2020-06-09 明见(厦门)技术有限公司 Embedded OS task scheduling method and device, terminal equipment and storage medium
CN112463348A (en) * 2021-01-27 2021-03-09 北京搜狐新媒体信息技术有限公司 Timed task processing method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104503761A (en) * 2014-12-30 2015-04-08 浪潮(北京)电子信息产业有限公司 Method and device of utilizing time table to process timed task
CN107797859A (en) * 2017-11-16 2018-03-13 山东浪潮云服务信息科技有限公司 A kind of dispatching method of timed task and a kind of dispatch server
CN107918556A (en) * 2016-10-11 2018-04-17 北京京东尚科信息技术有限公司 A kind of timed task performs method and apparatus in the parallel of multiple servers
CN108182108A (en) * 2017-12-19 2018-06-19 山东浪潮商用系统有限公司 A kind of timed task cluster and its execution method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104503761A (en) * 2014-12-30 2015-04-08 浪潮(北京)电子信息产业有限公司 Method and device of utilizing time table to process timed task
CN107918556A (en) * 2016-10-11 2018-04-17 北京京东尚科信息技术有限公司 A kind of timed task performs method and apparatus in the parallel of multiple servers
CN107797859A (en) * 2017-11-16 2018-03-13 山东浪潮云服务信息科技有限公司 A kind of dispatching method of timed task and a kind of dispatch server
CN108182108A (en) * 2017-12-19 2018-06-19 山东浪潮商用系统有限公司 A kind of timed task cluster and its execution method

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111258733A (en) * 2020-01-14 2020-06-09 明见(厦门)技术有限公司 Embedded OS task scheduling method and device, terminal equipment and storage medium
CN112463348A (en) * 2021-01-27 2021-03-09 北京搜狐新媒体信息技术有限公司 Timed task processing method and device
CN112463348B (en) * 2021-01-27 2021-06-15 北京搜狐新媒体信息技术有限公司 Timed task processing method and device

Similar Documents

Publication Publication Date Title
Kang et al. Towards agents and ontology for cloud service discovery
CN107682397B (en) Customer resources acquisition methods, device, terminal device and storage medium
CN108833161B (en) Method for establishing intelligent contract micro-service model based on fog calculation
CN109344172A (en) A kind of high concurrent data processing method, device and client-server
CN105677462A (en) Distributed task system based on internet of things and business processing method
CN107197091A (en) Terminal control method, terminal control device, terminal equipment and computer readable storage medium
CN107888716A (en) A kind of sort method of domain name resolution server, terminal device and storage medium
CN110245029A (en) A kind of data processing method, device, storage medium and server
CN109857533A (en) A kind of timed task dispatching method, device and intelligent terminal
CN104765641A (en) Job scheduling method and system
CN109343972A (en) Task processing method and terminal device
CN107623731A (en) A kind of method for scheduling task, client, service cluster and system
CN111338787B (en) Data processing method and device, storage medium and electronic device
CN109840141A (en) Thread control method, device, electronic equipment and storage medium based on cloud monitoring
AlOrbani et al. Load balancing and resource allocation in smart cities using reinforcement learning
CN110493736A (en) Note transmission method, device and storage medium
CN111831452A (en) Task execution method and device, storage medium and electronic device
CN114510299A (en) Method, device and storage medium for processing artificial intelligence service
CN114595075A (en) Network scheduling asynchronous task execution method based on distributed scheduling
CN104503885A (en) Timing door watching device and system
CN107197043A (en) A kind of cloud computing system
Wei et al. Drl-deploy: adaptive service function chains deployment with deep reinforcement learning
CN106127396A (en) A kind of method of intelligent grid medium cloud scheduler task
CN115328457A (en) Method and device for realizing form page based on parameter configuration
CN109358983A (en) Server data processing method, device 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
RJ01 Rejection of invention patent application after publication

Application publication date: 20190607

RJ01 Rejection of invention patent application after publication