CN114138433B - Task timing strategy method, device and medium - Google Patents

Task timing strategy method, device and medium Download PDF

Info

Publication number
CN114138433B
CN114138433B CN202111370711.4A CN202111370711A CN114138433B CN 114138433 B CN114138433 B CN 114138433B CN 202111370711 A CN202111370711 A CN 202111370711A CN 114138433 B CN114138433 B CN 114138433B
Authority
CN
China
Prior art keywords
time
timing
time stamp
timer
task
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
CN202111370711.4A
Other languages
Chinese (zh)
Other versions
CN114138433A (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.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent 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 Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202111370711.4A priority Critical patent/CN114138433B/en
Publication of CN114138433A publication Critical patent/CN114138433A/en
Application granted granted Critical
Publication of CN114138433B publication Critical patent/CN114138433B/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/485Task life-cycle, e.g. stopping, restarting, resuming execution

Abstract

The invention discloses a method, a device and a medium for task timing strategy, which are applied to the field of management systems and comprise the steps of obtaining a starting time stamp for starting a timing task and a first time stamp of a current timer, and calculating a second time stamp of a next time timer according to a time interval of the timer, wherein the time interval is in the unit of seconds, judging whether a target moment for executing the timing task exists in the time interval of the current timer, and if the target moment exists, selecting the target moment as the execution moment of the timing task in the time interval of the current timer. By setting the second-level timing strategy, the dimension of the timing strategy is expanded, so that the task execution time falls within the time interval of the timer to more accurately execute the timing task, the problem that the minute-level timing strategy cannot be executed within the time interval of the timer, the task execution time is delayed due to the fact that the timer can execute until the time reaches the timing is avoided, the performance of an application program is improved, and the experience effect of a user is improved.

Description

Task timing strategy method, device and medium
Technical Field
The present invention relates to the field of management systems, and in particular, to a method, an apparatus, and a medium for task timing policy.
Background
With the development of application programs, the application programs cannot be realized by simple addition, deletion, modification, checking and splicing programs, and the high-complexity programs have become standard, wherein the timing scheduling and execution of tasks are basic requirements on the programs, in the practical application development, if the tasks do not occupy normal resources, the tasks need to be executed at a certain time, and the background can start a timer with a certain number of minutes to detect and execute related tasks at fixed time.
The current scheme for realizing the timing strategy mostly comprises the steps that the minimum granularity is minute, the time of a current timer subtracts the starting time of a task, if the time difference is a multiple of the time interval, the condition meeting the setting of the timing strategy is indicated, the task can only be executed by the set minutes of two timers, the task can not be executed in the set interval of the timers, the minimum granularity can not meet the timing strategy of a second level, the execution time of the task is inaccurate and even delayed, the experience effect of a user is influenced, and the performance of program application is reduced.
Therefore, a person skilled in the art is highly required to solve how to improve the accuracy of task execution.
Disclosure of Invention
The invention aims to provide a method, a device and a medium for task timing strategy, which improve the accuracy of task execution.
In order to solve the technical problems, the invention provides a task timing strategy method, which comprises the following steps:
acquiring a starting time stamp for starting a timing task and a first time stamp of a current timer, and calculating a second time stamp of a next timer according to a time interval of the timer, wherein the unit of the time interval is a second level;
judging whether a target moment for executing a timing task exists in the time interval of the timer or not;
if so, selecting the target time as the execution time of the timing task in the time interval of the timer.
Preferably, determining whether there is a target time for executing the timing task in the time interval of the present timer includes:
acquiring a current timing strategy, wherein the timing strategy comprises a time interval strategy and a timing moment strategy;
if the current timing strategy is a time interval strategy, traversing numbers between a first difference value and a second difference value, wherein the first difference value is a difference value between a first time stamp and a starting time stamp, and the second difference value is a difference value obtained by subtracting 1 from the difference value between the second time stamp and the starting time stamp;
Judging whether the target number is an integral multiple of the time interval of the timing task in the numbers;
if so, determining that a target moment for executing a timing task exists in the time interval of the timer;
if the target time does not exist, determining that the target time for executing the timing task does not exist in the time interval of the timer.
Preferably, determining whether there is a target time for executing the timing task in the time interval of the present timer includes:
acquiring a current timing strategy, wherein the timing strategy comprises a time interval strategy and a timing moment strategy;
if the current timing strategy is a timing strategy, judging whether the first time stamp and the second time stamp are on the same day;
if the time stamp is the same day, judging whether the starting time stamp is larger than or equal to the first time stamp and smaller than the second time stamp;
if so, determining that a target moment for executing a timing task exists in the time interval of the timer;
if the time interval of the timer does not exist, determining that the target moment for executing the timing task does not exist in the time interval of the timer;
if the time stamp is not the same day, the next starting time stamp of the timing task is obtained, and whether the starting time stamp is larger than or equal to the first time stamp and smaller than the second time stamp is judged;
If so, determining that a target moment for executing a timing task exists in the time interval of the timer;
if the time stamp is not stored, judging whether the next starting time stamp is greater than or equal to the first time stamp and less than the second time stamp;
if so, determining that a target moment for executing a timing task exists in the time interval of the timer;
if the target time does not exist, determining that the target time for executing the timing task does not exist in the time interval of the timer.
Preferably, selecting the target time as the execution time of the timing task in the time interval of the present timer includes:
and selecting the difference value between the target number and the first time stamp in the time interval of the timer, and taking the sum of the difference value and the starting time stamp as the execution time of the timing task.
Preferably, selecting the target time as the execution time of the timing task in the time interval of the present timer includes:
when the first time and the second time are the same day and the starting time stamp is larger than or equal to the first time stamp and smaller than the second time stamp, selecting the difference value between the starting time stamp and the first time stamp as the execution time of the timing task in the time interval of the timer;
When the first time and the second time are not the same day and the starting time stamp is larger than or equal to the first time stamp and smaller than the second time stamp, selecting the difference value between the starting time stamp and the first time stamp as the execution time of the timing task in the time interval of the timer;
when the first time and the second time are not the same day, and the starting time stamp is not greater than or equal to the first time stamp and less than the second time stamp, and the next starting time stamp is greater than or equal to the first time stamp and less than the second time stamp, selecting the difference value between the next starting time stamp and the first time stamp as the execution time of the timing task in the time interval of the present timer.
Preferably, the time interval of the timing task is greater than or equal to the time interval of the timer.
In order to solve the above technical problems, the present invention provides a device for task timing policy, including:
the acquisition module is used for acquiring a starting time stamp for starting a timing task and a first time stamp of the current timer, and calculating a second time stamp of the next timer according to a time interval of the timer, wherein the unit of the time interval is a second level;
The judging module is used for judging whether a target moment for executing the timing task exists in the time interval of the timer or not, and entering the executing module if the target moment exists;
and the execution module is used for selecting the target moment as the execution moment of the timing task in the time interval of the timer.
In order to solve the above technical problems, the present invention provides a device for task timing policy, including:
a memory for storing a computer program;
a processor for implementing the steps of the method of task timing strategies as described above when executing a computer program.
To solve the above technical problem, the present invention further provides a computer readable storage medium, on which a computer program is stored, which when executed by a processor implements the steps of the method for task timing policy as described above.
The invention provides a task timing strategy method, which comprises the steps of obtaining a starting time stamp for starting a timing task and a first time stamp of a current timer, and calculating a second time stamp of a next time timer according to a time interval of the timer, wherein the time interval is in a second level, judging whether a target moment for executing the timing task exists in the time interval of the current timer, and if the target moment exists, selecting the target moment as the execution moment of the timing task in the time interval of the current timer. According to the method, the dimension of the timing strategy is expanded by setting the second-level timing strategy, whether the execution time of the timing task exists in the time interval of the timer is judged, if so, the execution time of the task falls within the time interval of the timer to more accurately execute the timing task, the problem that the minute-level timing strategy cannot be executed in the time interval of the timer, and the execution time of the task is delayed due to the fact that the timer can execute until the time of the timer reaches the timing is avoided, the performance of an application program is improved, and the experience effect of a user is improved.
In addition, the invention also provides a device and a medium for task timing strategy, which have the same beneficial effects as the method for task timing strategy.
Drawings
For a clearer description of embodiments of the present invention, the drawings that are required to be used in the embodiments will be briefly described, it being apparent that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to the drawings without inventive effort for those skilled in the art.
FIG. 1 is a flow chart of a method for task timing strategy provided by an embodiment of the present invention;
FIG. 2 is a block diagram of a task timing strategy device according to an embodiment of the present invention;
FIG. 3 is a block diagram of an apparatus for another task timing strategy provided by an embodiment of the present invention;
fig. 4 is a flowchart of a method for providing another task timing strategy according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by a person of ordinary skill in the art without making any inventive effort are within the scope of the present invention.
The core of the invention is to provide a method, a device and a medium for task timing strategy, which improve the accuracy of task execution.
In order to better understand the aspects of the present invention, the present invention will be described in further detail with reference to the accompanying drawings and detailed description.
In the current Web application, most applications have a task scheduling function, and the task scheduling automatically performs tasks at a given time interval or a given number of executions based on a given time point. The invention provides a method for realizing the timing tasks, which is different in realization methods according to different underlying languages of a server, comprises a Java-based Timer, a Scheduled Executor, a Quartz and a JCron Tab method, a standard Timer based on Windows in C# language, a server Timer and a thread Timer, and a timing task method based on PHP and Python languages.
Fig. 1 is a flowchart of a method for task timing policy according to an embodiment of the present invention, as shown in fig. 1, where the method includes:
s11: and acquiring a starting time stamp for starting the timing task and a first time stamp of the current timer, and calculating a second time stamp of the next timer according to a time interval of the timer, wherein the unit of the time interval is a second level.
In the management system, a timing task is added, the timing task is checked and configured, the task of a user is checked first, the timing task is written in a file form in the task of the user, at the moment, the starting time of the timing task is set, namely, the starting time is converted into a starting time stamp, wherein the time stamp is obtained by subtracting a time value of 1:00:00:00 of 1 month in 1970 from the current time, namely, the starting time of the timing task is subtracted by a time stamp obtained by subtracting 1:00:00 of 1 month in 1970.
After the configuration is completed, a timing task is started and is resident in the memory to return to the root directory to run, after the timing task is started, the timer is timed according to the timing strategy, the task is inquired, and finally the task is executed. The timing task comprises a starting time stamp and a time for executing the task, the time for executing the timing task is set according to the time interval of the timing task, the timing task has only one starting time stamp, the execution task and the starting timing task need to record a running time catalog in an application program bottom layer of a management system, the running time catalog is recorded in the form of a log or a cache catalog, the timing task can be executed once every 10s by adding a class method type, for example, a process is started, and the time interval of the timing task is 10s.
The timer comprises two types, one is triggered when reaching the designated time and is triggered once, and the other is triggered when being spaced by the specific time. The time interval of the present timer and the next timer is set according to the time interval of the timers, if the time interval of the timers is 1 minute, the first 1 minute timer is the moment of the present timer, the second 1 minute timer is the moment of the next timer, the time stamp of the corresponding timer is the same as the time stamp of the timing task, the value obtained by subtracting the time stamp of the present timer from the time stamp of the 1970 1 month 1 day 00:00:00 is obtained by subtracting the time stamp of the 1 minute 1 from the time stamp of the time of the present timer, the first time stamp of the corresponding timer is the time stamp of the first 1 minute, and the second time stamp of the next timer is the time stamp of the second 1 minute timer.
It will be appreciated that, in the above-mentioned time interval is of the order of seconds, if a task is added during the task starting and executing process according to the minute-order timing strategy, the interval time is 2 minutes, the time for starting the task is 12 hours and 10 minutes, the first 1 minute timer is 12 hours and 11 minutes, the second 1 minute timer is 12 hours and 12 minutes, the third 1 minute timer is 12 hours and 13 minutes, the fourth 1 minute timer is 12 hours and 14 minutes, and according to the difference between the time of the timer and the time for starting the task, we can easily see that the time difference between the 12 hours and the time of starting is a multiple of 2 minutes which satisfies the interval time, and the task is executed in the two timers. If a task is set at a second-level time interval, a minute-level timing strategy cannot be met, and in the minute-level timing strategy, as the set minimum unit is the minute level, no matter how accurate the set time interval and the timing strategy are, the target moment of executing the task can only reach the timing moment of the timer to execute the task, and the task cannot be executed in the interval of the timer, so that the task execution needs to be executed in a delayed time, the process is slow, and the user experience effect is affected.
In addition, the timing method based on the second-level timing strategy can be also suitable for the millisecond-level timing strategy, and for an actual management system, the millisecond-level task execution speed is high, but the number of tasks executed in the millisecond level is difficult to match, 1000 tasks cannot be processed in 1 millisecond, and the complexity of task execution is only increased. The task timing strategy aims at an in-process running scene, and the storage before stopping and the loading after starting are considered for restarting, so that the method does not need to consider.
S12: and judging whether the target time for executing the timing task exists in the time interval of the timer, and if so, proceeding to step S13.
Whether the target time for executing the timing task exists in the time interval of the present timer or not, the target time is the execution time of the timing task, it can be understood that the time interval of the present timer is a timing interval of a first time stamp and a second time stamp, whether the target time exists or not is judged in the interval, the present timer is the first 1 minute time, the next timer is the second 1 minute time in combination with the above example, the present invention only discusses the present time and the next timer as the time interval of one round, the second 1 minute of the present timer of the time interval of the next round, and the next timer is the third 1 minute calculation. If so, the process proceeds to step S13, and if not, the timing task is not executed, and the search and judgment are continued in the next time interval.
S13: and selecting the target time as the execution time of the timing task in the time interval of the timer.
When the target time for executing the timing task exists in the time interval of the timer, the target time is selected as the execution time of the timing task in the time interval of the timer. The target time is calculated according to a certain algorithm, the algorithm is different according to different timing strategies, and the target time is required to be set according to actual conditions.
For example, a timer with 5 seconds interval is started in the background, all tasks are detected at regular time, and the time interval of a certain task is 8 seconds, and the task is started for time t 0 Timer t of first one after task is started, which is 12:10:02 1 Time of the second timer t is 12:10:05 2 Time t of the third timer is 12:10:10 3 Time t of the fourth timer is 12:10:15 4 12:10:20, for the first timer t 1 Calculating the current timer t 1 And a task start time t 0 Corresponding to the difference in the time stamps, then calculate the next timer t 2 And a task start time t 0 The difference between 3 and 7 is found to be in the range of [3,8 ], a multiple of 8 is traversed between 3 and 7, a junctionIf not, not executing the process; time t of timer of the second 2 The traversal [8, 13) has or has not a multiple of 8, and as a result, 8 is a multiple of 8, which is executed this time. Time t of the third timer 3 The number of times 8 between the traversals [13,18 ] is found to be a number of times 8, and 16 is executed after this time the timer 16-13=3 seconds.
The example is based on one of the timing strategies alone, and in combination with the example, the distance is calculated within the time interval of this time (t 1 And t 2 ) Since the condition for the target time is not an integral multiple of the time interval of the timing task, the target time is not present and the next time interval (t 2 And t 3 ) I.e. as the next round (t 1 And t 2 ) And continuing to search and judge, finding out the condition meeting the target moment, and calculating a specific value of the target moment as the execution moment of the task to execute.
It should be noted that, the condition of the target time and the calculation of the target time are executed according to different formulated timing strategies, and the invention does not make specific requirements.
The invention provides a task timing strategy method, which comprises the steps of obtaining a starting time stamp for starting a timing task and a first time stamp of a current timer, and calculating a second time stamp of a next time timer according to a time interval of the timer, wherein the time interval is in a second level, judging whether a target moment for executing the timing task exists in the time interval of the current timer, and if the target moment exists, selecting the target moment as the execution moment of the timing task in the time interval of the current timer. According to the method, the dimension of the timing strategy is expanded by setting the second-level timing strategy, whether the execution time of the timing task exists in the time interval of the timer is judged, if so, the execution time of the task falls within the time interval of the timer to more accurately execute the timing task, the problem that the minute-level timing strategy cannot be executed in the time interval of the timer, and the execution time of the task is delayed due to the fact that the timer can execute until the time of the timer reaches the timing is avoided, the performance of an application program is improved, and the experience effect of a user is improved.
On the basis of the above embodiment, the determining whether the target time for executing the timing task exists in the time interval of the present timer specifically includes:
acquiring a current timing strategy, wherein the timing strategy comprises a time interval strategy and a timing moment strategy;
if the current timing strategy is a time interval strategy, traversing numbers between a first difference value and a second difference value, wherein the first difference value is a difference value between a first time stamp and a starting time stamp, and the second difference value is a difference value obtained by subtracting 1 from the difference value between the second time stamp and the starting time stamp;
judging whether the target number is an integral multiple of the time interval of the timing task in the numbers;
if so, determining that a target moment for executing a timing task exists in the time interval of the timer;
if the target time does not exist, determining that the target time for executing the timing task does not exist in the time interval of the timer.
The method comprises the steps that a current timing strategy is obtained, different timing strategies can be selected by a user according to a Web interface established by the front end and the rear end of a management system, the timing strategies comprise a time interval strategy and a timing moment strategy, and the time interval strategy is detected and executed according to a set time interval, such as interval 5s, of the timing tasks. The timing strategy is executed according to the fixed time of setting a certain timing task, such as summarizing a report in the early morning or cleaning other data. After the user selects the timing strategy, the timing strategy is sent to a program at the back end through a trigger instruction to start the task.
If the current timing strategy is the time interval strategy, the timing triggering is carried out according to the time interval strategy, a timer with an interval of N seconds (such as an interval of 5 seconds) is started in the background to detect all tasks at fixed time, and for each task, the time interval of the task is M (M)>Time stamp of recording this timer is t =n) 1 The time stamp of the next timer is t 2 Task start time stamp t 0 Traversing the number between the first difference and the second difference, whereinThe first difference is the difference t between the first timestamp and the start timestamp 1 -t 0 The second difference is the difference t obtained by subtracting 1 from the difference between the second time stamp and the starting time stamp 2 -t 0 -1, traversing t 1 -t 0 To t 2 -t 0 Numbers between-1, judging whether the target number is an integer multiple of the time interval M of the timing task in the traversed numbers, if the target number x is equal to the integer multiple of M, indicating that the timer meets the condition set by the timing strategy, waiting (x-t 1 +t 0 ) And executing after seconds, wherein the waiting target moment is the moment of executing the task to execute the task. The minimum value is the difference value of the time stamp of the present timer minus the task starting time stamp, the maximum value is the difference value of the time stamp of the next timer minus the task starting time stamp minus 1, if the number between the minimum value and the maximum value satisfies the integral multiple of the time interval of the task, the condition of task execution is satisfied, the target moment for executing the timing task is determined to exist in the time interval of the present timer, if the number does not satisfy the target moment for executing the timing task is determined to not exist in the time interval of the present timer.
In combination with the above example, the background starts a timer with an interval of 5 seconds to detect all tasks at regular time, and the task start time t is assumed that the time interval of a certain task is 8 seconds 0 Timer t of first one after task is started, which is 12:10:02 1 Time of the second timer t is 12:10:05 2 Time t of the third timer is 12:10:10 3 Time t of the fourth timer is 12:10:15 4 12:10:20, for the first timer t 1 Calculating the current timer t 1 And a task start time t 0 Corresponding to the difference in the time stamps, then calculate the next timer t 2 And a task start time t 0 The difference between the time intervals of the timer is determined to be no, namely the target time for executing the timing task does not exist in the time interval of the timer, the time t of the second timer is not executed this time, and the range is obtained to be [3,8 ], and the multiple of 8 exists between the time intervals of the timer 3 and 7 2 With or without a multiple of 8 between traversals [8,13 ], the result is that 8 is a multiple of 8,executing this time. Time t of the third timer 3 The number of times 8 between the traversals [13,18 ] is found to be a number of times 8, and 16 is executed after this time the timer 16-13=3 seconds. Wherein for t in this example 2 Is performed after waiting 8-10+2 = 0 seconds, i.e. t 2 Executing the timed task at the moment, and detecting at t the next execution task 3 Is performed after waiting 16-15+2 = 3 seconds, i.e. at t 3 The timed task is performed 3 seconds after the moment.
The method comprises the steps of obtaining a current timing strategy, traversing numbers between a first difference value and a second difference value if the current timing strategy is a time interval strategy, judging whether the numbers are integer multiples of a time interval of a timing task or not, and if the numbers are integer multiples of the time interval of the timing task, determining that the target task for executing the timing task exists in the time interval of the timer. By judging whether the execution time of the timing task exists in the time interval of the timer, if so, the execution time of the task falls in the time interval of the timer to more accurately execute the timing task.
On the basis of the above embodiment, the determining whether the target time for executing the timing task exists in the time interval of the present timer specifically includes:
acquiring a current timing strategy, wherein the timing strategy comprises a time interval strategy and a timing moment strategy;
if the current timing strategy is a timing strategy, judging whether the first time stamp and the second time stamp are on the same day;
If the time stamp is the same day, judging whether the starting time stamp is larger than or equal to the first time stamp and smaller than the second time stamp;
if so, determining that a target moment for executing a timing task exists in the time interval of the timer;
if the time interval of the timer does not exist, determining that the target moment for executing the timing task does not exist in the time interval of the timer;
if the time stamp is not the same day, the next starting time stamp of the timing task is obtained, and whether the starting time stamp is larger than or equal to the first time stamp and smaller than the second time stamp is judged;
if so, determining that a target moment for executing a timing task exists in the time interval of the timer;
if the time stamp is not stored, judging whether the next starting time stamp is greater than or equal to the first time stamp and less than the second time stamp;
if so, determining that a target moment for executing a timing task exists in the time interval of the timer;
if the target time does not exist, determining that the target time for executing the timing task does not exist in the time interval of the timer.
After the user selects the timing strategy, the timing strategy is sent to a program at the back end through a trigger instruction to start the task. The method comprises the steps that a current timing strategy is obtained as a timing strategy, the time of the timing moment of a timing task is fixed, but the timing of the timer is always calculated, the first time stamp is in the early morning of a first day and is close to the early morning of a second day, the second time stamp is in the early morning of the second day, whether the first time stamp and the second time stamp are the same day or not is needed to be judged, if the first time stamp and the second time stamp are the same day, whether the starting time stamp of the timing task is larger than or equal to the first time stamp and smaller than the second time stamp or not is judged, and if the starting time stamp of the timing task is larger than or equal to the first time stamp and smaller than the second time stamp, the target time for executing the timing task is determined to exist in a time interval of the timer; if the target time does not exist, determining that the target time for executing the timing task does not exist in the time interval of the timer.
If the first time stamp and the second time stamp are not in the same day, the next starting time stamp of the timing task needs to be acquired, and it is to be noted that the starting time stamp of the timing task is only once, after the timing task is started, the timing task is detected and executed according to the time interval of the timing task, the timing task is started and executed at a fixed time in one day, and if the time stamps of the timers are not in the same day, the starting time of the timing task in the other day is started and executed. Firstly judging whether the starting time stamp is larger than or equal to the first time stamp and smaller than the second time stamp, namely judging whether the starting time stamp is in the time interval of the present timer, if so, determining that the target moment for executing the timing task exists in the time interval of the present timer; if the time stamp is not stored, continuing to judge whether the next starting time stamp is greater than or equal to the first time stamp and less than the second time stamp; if so, determining that a target moment for executing a timing task exists in the time interval of the timer; if the target time does not exist, determining that the target time for executing the timing task does not exist in the time interval of the timer.
For example: if a certain task is set to be executed every day at H time M minutes S seconds, the time stamp of the current timer is recorded as t 1 The next time the timer has a time stamp t 2 If the current timer and the next timer are on the same day, the time stamp of M minutes S seconds at H time of the day is set as t 0 If t 0 Satisfy t 0 >=t 1 And t 0 <t 2 The timer satisfies the condition of executing the task. If the current timer and the next timer are not in the same day, setting the time stamp of M minutes S seconds at the H time of the day of the current timer as t 0 Setting the time stamp of M minutes S seconds at H time of the day of the next timer as S, if t 0 Satisfy t 0 >=t 1 And t 0 <t 2 If the timer meets the condition of executing the task, continuously judging whether s meets s or not>=t 1 And s is<t 2 If so, determining that the target moment for executing the timing task exists in the time interval of the timer.
The method comprises the steps of obtaining a current timing strategy, judging whether a starting time stamp of a timing task is in a time interval of a current timer if the current timing strategy is a timing moment strategy, and determining that a target task for executing the timing task is in the time interval of the current timer if the starting time stamp of the timing task is in the time interval of the current timer. By judging whether the execution time of the timing task exists in the time interval of the timer, if so, the execution time of the task falls in the time interval of the timer to more accurately execute the timing task.
On the basis of the above embodiment, the current timing policy is a time interval policy, and determining whether there is a target time for executing the timing task in the time interval of the present timer, and if there is a target time, selecting the target time as the execution time of the timing task in the time interval of the present timer specifically includes:
and selecting the difference value between the target number and the first time stamp in the time interval of the timer, and taking the sum of the difference value and the starting time stamp as the execution time of the timing task.
In combination with the above embodiment of the time interval strategy, the execution time is the selected target number x and the first timestamp t 1 And the difference value of (2) is then equal to the start time stamp t 0 The moment of the sum of the two, i.e. x-t 1 +t 0 . Wherein for t in this example 2 Is performed after waiting 8-10+2 = 0 seconds, i.e. t 2 Executing the timed task at the moment, and detecting at t the next execution task 3 Is performed after waiting 16-15+2 = 3 seconds, i.e. at t 3 The timed task is performed 3 seconds after the moment. The 0 second and 3 seconds are execution time of the timing task, and it should be noted that, the calculation formula of the execution time is that the current time and the next time in the timer are described as one round for the current time timer, and the above embodiments are described in detail and are not described herein again.
In addition, the calculation method of the execution time can be some other function, as long as the relation formed by combining the first time stamp, the starting time stamp and the like of the timer is satisfied, the time task is executed in the internal medicine at the time interval of the timer (x-t 1 +t 0 ) Is but one preferred embodiment.
The invention provides a method for selecting the difference value between a target number and a first time stamp in the time interval of the timer, and taking the sum of the difference value and a starting time stamp as the execution time of a timing task. The execution time can be calculated to be executed in the time interval of the timer, so that the delay of task execution time caused by waiting until the timer reaches the time of the timer is avoided, the performance of an application program is improved, and the experience effect of a user is improved.
On the basis of the above embodiment, the current timing policy is a timing policy, and determining whether there is a target time for executing the timing task in the time interval of the present timer, and if there is a target time, selecting the target time as the execution time of the timing task in the time interval of the present timer specifically includes:
when the first time and the second time are the same day and the starting time stamp is larger than or equal to the first time stamp and smaller than the second time stamp, selecting the difference value between the starting time stamp and the first time stamp as the execution time of the timing task in the time interval of the timer;
When the first time and the second time are not the same day and the starting time stamp is larger than or equal to the first time stamp and smaller than the second time stamp, selecting the difference value between the starting time stamp and the first time stamp as the execution time of the timing task in the time interval of the timer;
when the first time and the second time are not the same day, and the starting time stamp is not greater than or equal to the first time stamp and less than the second time stamp, and the next starting time stamp is greater than or equal to the first time stamp and less than the second time stamp, selecting the difference value between the next starting time stamp and the first time stamp as the execution time of the timing task in the time interval of the present timer.
When the first time and the second time are the same day, starting the time stamp t 0 The presence of a first time stamp t greater than or equal to 1 And is smaller than the second time stamp t 2 For example, a certain task is set to be executed 12:10:08 seconds per day, and the time of recording the timer is 2021, 10 month 22 day 12:10:05, and the time stamp t is 1 1634875805 (this value is 2021, 10, 22, 12:10:05 minus 1970, 1, 00:00:00 seconds), the next timer time is 2021, 10, 22, 12:10:10 seconds, timestamp t 2 1634875810 for 22 days of 2021, 10 months, 12:10:05; timestamp t of 2021, 10 month 22 day 12:10:08 0 1634875808, t 0 >=t 1 And t is 0 <t 2 Determining the time of the timerThe target time for executing the timing task exists in the interval, and the execution time is the starting time stamp t 0 With a first timestamp t 1 The difference of (t) 0 -t 1 Tasks were performed after 3 seconds.
When the first time and the second time are not the same day, starting the time stamp t 0 The presence of a first time stamp t greater than or equal to 1 And is smaller than the second time stamp t 2 If so, selecting the difference between the starting time stamp and the first time stamp in the time interval of the present timer as the execution time of the timing task, where the execution time has the same calculation method as the above embodiment, and will not be described herein.
When the first time and the second time are not the same day, starting the time stamp t 0 Absence of more than or equal to the first time stamp t 1 And is smaller than the second time stamp t 2 And the next start-up timestamp s is greater than or equal to the first timestamp t 1 And is smaller than the second time stamp t 2 In the case of (1), a certain task is set to be executed every 00:00:02 seconds, the time of recording the timer is 2021, 10, 21, 23:59:58 seconds, and the time stamp t is 1 1634831998, the next timer time is 2021, 10 months, 22 days, 00:00:03 seconds, timestamp t 2 Timestamp t of 1634832003, 2021, 10-month 21-day 00:00:02 0 1634745602, 2021, 10, 22, 00:00:02 with a time stamp s of 1634832002; t is t 0 Not satisfy t 0 >=t 1 And t 0 <t 2 Then it is determined whether s satisfies s=>t 1 And s is<t 2 In combination with the example, s exists greater than or equal to the first timestamp t 1 And is smaller than the second time stamp t 2 If so, determining that the target time for executing the timing task exists in the time interval of the present timer, wherein the execution time is the next starting time stamp s and the first time stamp t 1 Is the difference of s-t 1 Tasks were performed after 4 seconds.
In addition, the method for calculating the execution time of the timer may be some other function, so long as the relation formed by combining the first time stamp, the start time stamp and the like of the timer is satisfied, and the method for calculating the execution time of the timer is only a preferred embodiment.
The execution time of the timing task is respectively selected according to the condition whether the first time stamp and the second time stamp are on the same day or not in the time interval of the timer. The execution time can be calculated to be executed in the time interval of the timer, so that the delay of task execution time caused by waiting until the timer reaches the time of the timer is avoided, the performance of an application program is improved, and the experience effect of a user is improved.
On the basis of the embodiment, the time interval of the timing task is larger than or equal to the time interval of the timer, the time length of executing the task is considered, the time interval of the timing task is larger than or equal to the time interval of the timer because the time interval of the timing task is considered to occupy a part of time when the scanning task timer is started and the time is also needed to be occupied when the timing task is detected, a plurality of tasks can be created to be executed simultaneously when the timing task is executed, if the time interval of the timer is smaller than the time interval of the timing task, the task cannot be completed in the response time interval of the timing task, the task is overtime, if the task is overtime all the time, the thread is accumulated, the execution time of the next task is influenced, the thread progress problem is influenced, and the performance of an application program is reduced.
The time interval of the timing task provided by the invention is larger than or equal to the time interval of the timer, so that the normal running of the thread progress is ensured, the overtime execution of the task is avoided, and the performance of an application program is improved.
The invention further discloses a task timing strategy device corresponding to the method, and fig. 2 is a block diagram of the task timing strategy device provided by the embodiment of the invention. As shown in fig. 2, the apparatus for task timing policy includes:
The acquiring module 11 is configured to acquire a start time stamp for starting a timing task and a first time stamp of a current timer, and calculate a second time stamp of a next time timer according to a time interval of the timer, where a unit of the time interval is a second level;
a judging module 12, configured to judge whether a target time for executing the timing task exists in a time interval of the present timer, and if so, enter an executing module 13;
and the execution module 13 is used for selecting the target moment as the execution moment of the timing task in the time interval of the current timer.
Since the embodiments of the device portion correspond to the above embodiments, the embodiments of the device portion are described with reference to the above embodiments of the device portion, and are not repeated herein.
The device comprises a starting time stamp for starting a timing task and a first time stamp of a current timer, and calculates a second time stamp of a next time timer according to a time interval of the timer, wherein the time interval is in a second level, whether a target moment for executing the timing task exists in the time interval of the current timer is judged, and if the target moment exists, the target moment is selected as the execution moment of the timing task in the time interval of the current timer. The device expands the dimension of the timing strategy by setting the second-level timing strategy, judges whether the execution time of the timing task exists in the time interval of the timer, if so, enables the execution time of the task to fall in the time interval of the timer to more accurately execute the timing task, avoids the situation that the minute-level timing strategy cannot be executed in the time interval of the timer, and needs to wait for the delay of the execution time of the task caused by the execution of the time party when the timer reaches the timing, improves the performance of the application program and improves the experience effect of the user.
Referring to fig. 3, a block diagram of an apparatus for task timing policy according to another embodiment of the present invention is shown in fig. 3, where the apparatus includes:
a memory 21 for storing a computer program;
a processor 22 for executing the steps of the method of implementing the task timing strategy when executing the computer program.
The task timing policy device provided in this embodiment may include, but is not limited to, a smart phone, a tablet computer, a notebook computer, a desktop computer, or the like.
Processor 22 may include one or more processing cores, such as a 4-core processor, an 8-core processor, or the like, among others. The processor 22 may be implemented in hardware in at least one of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), programmable logic array (Programmable Logic Array, PLA). The processor 22 may also include a main processor, which is a processor for processing data in an awake state, also referred to as a central processor (Central Processing Unit, CPU), and a coprocessor; a coprocessor is a low-power processor for processing data in a standby state. In some embodiments, the processor 22 may be integrated with an image processor (Graphics Processing Unit, GPU) for use in connection with rendering and rendering of content to be displayed by the display screen. In some embodiments, the processor 22 may also include an artificial intelligence (Artificial Intelligence, AI) processor for processing computing operations related to machine learning.
Memory 21 may include one or more computer-readable storage media, which may be non-transitory. Memory 21 may also include high-speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In this embodiment, the memory 21 is at least used for storing a computer program 201, where the computer program, when loaded and executed by the processor 22, is capable of implementing the relevant steps of the method of task timing strategy disclosed in any of the foregoing embodiments. In addition, the resources stored in the memory 21 may further include an operating system 202, data 203, and the like, and the storage manner may be transient storage or permanent storage. The operating system 202 may include Windows, unix, linux, among others. The data 203 may include, but is not limited to, data related to the method of task timing policy, and the like.
In some embodiments, the task timing strategy device may further comprise a display screen 23, an input/output interface 24, a communication interface 25, a power supply 26 and a communication bus 27.
It will be appreciated by those skilled in the art that fig. 3 is a block diagram of an apparatus for another task timing strategy provided by an embodiment of the present invention. The architecture shown in fig. 3 is not limiting of the task timing strategy mechanism and may include more or fewer components than illustrated.
The processor 22 implements the method of task timing strategy provided by any of the embodiments described above by invoking instructions stored in the memory 21.
The device comprises a starting time stamp for starting a timing task and a first time stamp of a current timer, and calculates a second time stamp of a next time timer according to a time interval of the timer, wherein the time interval is in a second level, whether a target moment for executing the timing task exists in the time interval of the current timer is judged, and if the target moment exists, the target moment is selected as the execution moment of the timing task in the time interval of the current timer. The device expands the dimension of the timing strategy by setting the second-level timing strategy, judges whether the execution time of the timing task exists in the time interval of the timer, if so, enables the execution time of the task to fall in the time interval of the timer to more accurately execute the timing task, avoids the situation that the minute-level timing strategy cannot be executed in the time interval of the timer, and needs to wait for the delay of the execution time of the task caused by the execution of the time party when the timer reaches the timing, improves the performance of the application program and improves the experience effect of the user.
Further, the present invention also provides a computer readable storage medium having stored thereon a computer program which, when executed by the processor 22, implements the steps of the method of task timing strategy as described above.
It will be appreciated that the methods of the above embodiments, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored on a computer readable storage medium. Based on this understanding, the technical solution of the present invention may be embodied essentially or in part or all of the technical solution or in part in the form of a software product stored in a storage medium for performing all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RandomAccess Memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
For an introduction to a computer readable storage medium provided by the present invention, please refer to the above method embodiment, the present invention is not described herein, and the method has the same advantages as the method of the task timing policy.
In connection with the above embodiment, fig. 4 is a flowchart of a method for providing another task timing strategy according to an embodiment of the present invention, as shown in fig. 4, including:
s21: starting a timer with a time interval of N seconds, and detecting each task in each interval time of the timer;
s22: acquiring a starting time stamp for starting a timing task and a time stamp of the timer, and calculating the time stamp of the next timer according to the time interval N of the timer;
s23: judging whether the current timing strategy is a time interval strategy or not, if so, entering a step S24, and if not, entering a step S27, wherein the current timing strategy is a timing moment strategy;
s24: traversing the numbers between a first difference value and a second difference value, wherein the first difference value is the difference value between the first time stamp and the starting time stamp, and the second difference value is the difference value obtained by subtracting 1 from the difference value between the second time stamp and the starting time stamp;
s25: judging whether the target number is an integral multiple of the time interval of the timing task in the numbers, and if so, proceeding to step S26;
s26: selecting a difference value between a target number and a first time stamp in the time interval of the timer, and taking the sum of the difference value and a starting time stamp as the execution time of a timing task;
S27: judging whether the first time stamp and the second time stamp are on the same day, if so, entering a step S28, and if not, entering a step S30;
s28: judging whether the starting time stamp is larger than or equal to the first time stamp and smaller than the second time stamp, and if so, entering step S29;
s29: selecting the difference value between the starting time stamp and the first time stamp in the time interval of the timer as the execution time of the timing task;
s30: acquiring the next starting time stamp of the timing task, judging whether the starting time stamp is larger than or equal to the first time stamp and smaller than the second time stamp, if so, entering step S29, and if not, entering step S31;
s31: judging whether the next starting time stamp is larger than or equal to the first time stamp and smaller than the second time stamp, and if so, entering step S32;
s32: and selecting the difference value between the next starting time stamp and the first time stamp as the execution time of the timing task in the time interval of the timer.
The above description has been made on the flowchart of the method of another task timing strategy provided by the embodiment of the present invention, which has the same advantageous effects as the above-mentioned method of task timing strategy.
The method, the device and the medium for task timing strategy provided by the invention are described in detail. In the description, each embodiment is described in a progressive manner, and each embodiment is mainly described by the differences from other embodiments, so that the same similar parts among the embodiments are mutually referred. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant points refer to the description of the method section. It should be noted that it will be apparent to those skilled in the art that various modifications and adaptations of the invention can be made without departing from the principles of the invention and these modifications and adaptations are intended to be within the scope of the invention as defined in the following claims.
It should also be noted that in this specification, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.

Claims (7)

1. A method of task timing strategy, comprising:
acquiring a starting time stamp for starting a timing task and a first time stamp of a current timer, and calculating a second time stamp of the next timer according to a time interval of the timer, wherein the unit of the time interval is a second level;
judging whether a target moment for executing the timing task exists in the time interval of the current timer;
if yes, selecting the target time as the execution time of the timing task in the time interval of the current timer;
the determining whether the target time for executing the timing task exists in the time interval of the present timer at least includes one of the following two ways:
mode one: acquiring a current timing strategy, wherein the timing strategy comprises a time interval strategy and a timing moment strategy;
if the current timing strategy is the time interval strategy, traversing numbers between a first difference value and a second difference value, wherein the first difference value is a difference value between the first time stamp and the starting time stamp, and the second difference value is a difference value obtained by subtracting 1 from a difference value between the second time stamp and the starting time stamp;
Judging whether a target number is an integral multiple of the time interval of the timing task in the numbers;
if so, determining that the target moment for executing the timing task exists in the time interval of the current timer;
if not, determining that the target moment for executing the timing task does not exist in the time interval of the current timer;
mode two: acquiring the current timing strategy, wherein the timing strategy comprises the time interval strategy and the timing moment strategy;
if the current timing strategy is the timing moment strategy, judging whether the first time stamp and the second time stamp are on the same day or not;
if the starting time stamp is the same day, judging whether the starting time stamp is larger than or equal to the first time stamp and smaller than the second time stamp;
if so, determining that the target moment for executing the timing task exists in the time interval of the current timer;
if not, determining that the target moment for executing the timing task does not exist in the time interval of the current timer;
if the time stamp is not the same day, acquiring the next starting time stamp of the timing task, and judging whether the starting time stamp is larger than or equal to the first time stamp and smaller than the second time stamp;
If so, determining that the target moment for executing the timing task exists in the time interval of the current timer;
if not, judging whether the next starting time stamp is greater than or equal to the first time stamp and less than the second time stamp;
if so, determining that the target moment for executing the timing task exists in the time interval of the current timer;
if not, determining that the target time for executing the timing task does not exist in the time interval of the current timer.
2. The method according to claim 1, wherein selecting the target time as the execution time of the timing task in the time interval of the present timer includes:
and selecting the difference value between the target number and the first timestamp in the time interval of the current timer, wherein the sum of the difference value and the starting timestamp is used as the execution time of the timing task.
3. The method according to claim 1, wherein selecting the target time as the execution time of the timing task in the time interval of the present timer includes:
When the first time and the second time are the same day and the starting time stamp is larger than or equal to the first time stamp and smaller than the second time stamp, selecting a difference value between the starting time stamp and the first time stamp as the execution time of the timing task in the time interval of the present timer;
when the first time and the second time are not the same day and the starting time stamp is larger than or equal to the first time stamp and smaller than the second time stamp, selecting a difference value between the starting time stamp and the first time stamp as the execution time of the timing task in the time interval of the present timer;
when the first time and the second time are not the same day and the starting time stamp is not greater than or equal to the first time stamp and less than the second time stamp, and the next starting time stamp is greater than or equal to the first time stamp and less than the second time stamp, then a difference value between the next starting time stamp and the first time stamp is selected as the execution time of the timing task in the time interval of the present timer.
4. The method of task timing strategies according to claim 1, characterized in that the time interval of the timing tasks is greater than or equal to the time interval of the timer.
5. An apparatus for a task timing strategy, comprising:
the acquisition module is used for acquiring a starting time stamp for starting a timing task and a first time stamp of the current timer, and calculating a second time stamp of the next timer according to a time interval of the timer, wherein the unit of the time interval is a second level;
the judging module is used for judging whether the target moment for executing the timing task exists in the time interval of the timer or not, and entering the executing module if the target moment exists;
the execution module is used for selecting the target moment as the execution moment of the timing task in the time interval of the current timer;
the determining whether the target time for executing the timing task exists in the time interval of the present timer at least includes one of the following two ways:
mode one: acquiring a current timing strategy, wherein the timing strategy comprises a time interval strategy and a timing moment strategy;
if the current timing strategy is the time interval strategy, traversing numbers between a first difference value and a second difference value, wherein the first difference value is a difference value between the first time stamp and the starting time stamp, and the second difference value is a difference value obtained by subtracting 1 from a difference value between the second time stamp and the starting time stamp;
Judging whether a target number is an integral multiple of the time interval of the timing task in the numbers;
if so, determining that the target moment for executing the timing task exists in the time interval of the current timer;
if not, determining that the target moment for executing the timing task does not exist in the time interval of the current timer;
mode two: acquiring the current timing strategy, wherein the timing strategy comprises the time interval strategy and the timing moment strategy;
if the current timing strategy is the timing moment strategy, judging whether the first time stamp and the second time stamp are on the same day or not;
if the starting time stamp is the same day, judging whether the starting time stamp is larger than or equal to the first time stamp and smaller than the second time stamp;
if so, determining that the target moment for executing the timing task exists in the time interval of the current timer;
if not, determining that the target moment for executing the timing task does not exist in the time interval of the current timer;
if the time stamp is not the same day, acquiring the next starting time stamp of the timing task, and judging whether the starting time stamp is larger than or equal to the first time stamp and smaller than the second time stamp;
If so, determining that the target moment for executing the timing task exists in the time interval of the current timer;
if not, judging whether the next starting time stamp is greater than or equal to the first time stamp and less than the second time stamp;
if so, determining that the target moment for executing the timing task exists in the time interval of the current timer;
if not, determining that the target time for executing the timing task does not exist in the time interval of the current timer.
6. An apparatus for a task timing strategy, comprising:
a memory for storing a computer program;
processor for implementing the steps of the method of task timing strategy according to any of claims 1 to 4 when executing said computer program.
7. A computer readable storage medium, characterized in that it has stored thereon a computer program which, when executed by a processor, implements the steps of the method of task timing strategy according to any of claims 1 to 4.
CN202111370711.4A 2021-11-18 2021-11-18 Task timing strategy method, device and medium Active CN114138433B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111370711.4A CN114138433B (en) 2021-11-18 2021-11-18 Task timing strategy method, device and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111370711.4A CN114138433B (en) 2021-11-18 2021-11-18 Task timing strategy method, device and medium

Publications (2)

Publication Number Publication Date
CN114138433A CN114138433A (en) 2022-03-04
CN114138433B true CN114138433B (en) 2024-01-12

Family

ID=80390298

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111370711.4A Active CN114138433B (en) 2021-11-18 2021-11-18 Task timing strategy method, device and medium

Country Status (1)

Country Link
CN (1) CN114138433B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1577278A (en) * 2003-07-22 2005-02-09 株式会社东芝 Method and system for scheduling real-time periodic tasks
CN106339255A (en) * 2016-08-24 2017-01-18 北京小米移动软件有限公司 Timed task scheduling method, system and device, and servers
CN107391188A (en) * 2017-07-17 2017-11-24 聚好看科技股份有限公司 A kind of method and apparatus for controlling timed task
CN109324879A (en) * 2017-07-28 2019-02-12 华为技术有限公司 The method and terminal device of Admin Trigger

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10241832B2 (en) * 2016-06-20 2019-03-26 Steering Solutions Ip Holding Corporation Runtime determination of real time operating systems task timing behavior

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1577278A (en) * 2003-07-22 2005-02-09 株式会社东芝 Method and system for scheduling real-time periodic tasks
CN106339255A (en) * 2016-08-24 2017-01-18 北京小米移动软件有限公司 Timed task scheduling method, system and device, and servers
CN107391188A (en) * 2017-07-17 2017-11-24 聚好看科技股份有限公司 A kind of method and apparatus for controlling timed task
CN109324879A (en) * 2017-07-28 2019-02-12 华为技术有限公司 The method and terminal device of Admin Trigger

Also Published As

Publication number Publication date
CN114138433A (en) 2022-03-04

Similar Documents

Publication Publication Date Title
Alvarez et al. A simple planning problem for COVID-19 lock-down, testing, and tracing
EP1337919B1 (en) Security method making deterministic real time execution of multitask applications of control and command type with error confinement
US8555281B1 (en) Scheduling of tasks based upon historical execution times
US9218199B2 (en) Identifying thread progress information by monitoring transitions between interesting states
CN109450659B (en) Block delay broadcasting method, equipment and storage medium
CN110990435A (en) Data synchronization method, device and computer readable storage medium
CN109697247B (en) Method and device for detecting data accuracy
CN112348648B (en) Resource processing method and device
CN115794342A (en) Method and device for estimating remaining time of pipeline task and electronic equipment
Argente et al. A simple planning problem for COVID-19 lockdown, testing and tracing
CN114138433B (en) Task timing strategy method, device and medium
CN109388550B (en) Cache hit rate determination method, device, equipment and readable storage medium
CN109634822B (en) Function time consumption statistical method and device, storage medium and terminal equipment
CN108874375B (en) Timer implementation method and device
CN111078418B (en) Operation synchronization method, device, electronic equipment and computer readable storage medium
CN110109970B (en) Data query processing method and device
CN110058996B (en) Program debugging method, device, equipment and storage medium
US20200326766A1 (en) Idle state estimation by scheduler
CN114461323B (en) Clamping and processing method and device, electronic equipment and storage medium
CN107678945B (en) Method and device for judging webpage application blocking
CN110908587A (en) Method and device for storing time sequence data
CN103902371A (en) Method and system for acquiring inner core jiffies from user mode program
CN108920722B (en) Parameter configuration method and device and computer storage medium
CN113655958A (en) Application data storage method
CN113849758A (en) Webpage index generation method and device, electronic equipment and storage medium

Legal Events

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