CN114064241A - Task execution method and related device - Google Patents

Task execution method and related device Download PDF

Info

Publication number
CN114064241A
CN114064241A CN202111350496.1A CN202111350496A CN114064241A CN 114064241 A CN114064241 A CN 114064241A CN 202111350496 A CN202111350496 A CN 202111350496A CN 114064241 A CN114064241 A CN 114064241A
Authority
CN
China
Prior art keywords
information
execution
task
target
determining
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
CN202111350496.1A
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.)
Ping An Property and Casualty Insurance Company of China Ltd
Original Assignee
Ping An Property and Casualty Insurance Company of China 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 Ping An Property and Casualty Insurance Company of China Ltd filed Critical Ping An Property and Casualty Insurance Company of China Ltd
Priority to CN202111350496.1A priority Critical patent/CN114064241A/en
Publication of CN114064241A publication Critical patent/CN114064241A/en
Pending legal-status Critical Current

Links

Images

Classifications

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

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The embodiment of the application provides a task execution method and a related device, wherein the method comprises the following steps: acquiring task information of a target timing task; determining first execution information of the target timing task according to the task information; executing the target timing task according to the first execution information to obtain a target execution result of the target timing task; if the target execution result is a first execution result, determining abnormal information of the target timing task according to the execution parameters of the target timing task; adjusting the first execution information according to the abnormal information to obtain second execution information; and executing the target timing task according to the second execution information, so that the reliability of the timing task in execution can be improved.

Description

Task execution method and related device
Technical Field
The present application relates to the field of data processing technologies, and in particular, to a task execution method and a related apparatus.
Background
Although the current inner-industry framework can well support the execution time configuration of the timing task, in the actual project maintenance process, the abnormal situation of the execution failure can be passively found after the execution failure of the timing task, the execution failure of the timing task cannot be timely adjusted, and the like, so that the reliability of the execution of the timing task is low.
Disclosure of Invention
The embodiment of the application provides a task execution method and a related device, which can improve the reliability of timing task execution.
A first aspect of an embodiment of the present application provides a task execution method, where the method includes:
acquiring task information of a target timing task;
determining first execution information of the target timing task according to the task information;
executing the target timing task according to the first execution information to obtain a target execution result of the target timing task;
if the target execution result is a first execution result, determining abnormal information of the target timing task according to the execution parameters of the target timing task;
adjusting the first execution information according to the abnormal information to obtain second execution information;
and executing the target timing task according to the second execution information.
A second aspect of an embodiment of the present application provides a task execution apparatus, including:
the acquisition unit is used for acquiring task information of the target timing task;
the first determining unit is used for determining first execution information of the target timing task according to the task information;
the first execution unit is used for executing the target timing task according to the first execution information so as to obtain a target execution result of the target timing task;
a second determining unit, configured to determine, if the target execution result is the first execution result, exception information of the target timing task according to an execution parameter of the target timing task;
the adjusting unit is used for adjusting the first execution information according to the abnormal information to obtain second execution information;
and the second execution unit is used for executing the target timing task according to the second execution information.
A third aspect of the embodiments of the present application provides a terminal, including a processor, an input device, an output device, and a memory, where the processor, the input device, the output device, and the memory are connected to each other, where the memory is used to store a computer program, and the computer program includes program instructions, and the processor is configured to call the program instructions to execute the step instructions in the first aspect of the embodiments of the present application.
A fourth aspect of embodiments of the present application provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program for electronic data exchange, where the computer program makes a computer perform part or all of the steps as described in the first aspect of embodiments of the present application.
A fifth aspect of embodiments of the present application provides a computer program product, wherein the computer program product comprises a non-transitory computer readable storage medium storing a computer program operable to cause a computer to perform some or all of the steps as described in the first aspect of embodiments of the present application. The computer program product may be a software installation package.
The embodiment of the application has at least the following beneficial effects:
the method comprises the steps of obtaining task information of a target timing task, determining first execution information of the target timing task according to the task information, executing the target timing task according to the first execution information to obtain a target execution result of the target timing task, determining abnormal information of the target timing task according to an execution parameter of the target timing task if the target execution result is the first execution result, adjusting the first execution information according to the abnormal information to obtain second execution information, and executing the target timing task according to the second execution information.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic flowchart of a task execution method according to an embodiment of the present application;
FIG. 2 is a flowchart illustrating another task execution method according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of a terminal according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of a task execution device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The terms "first," "second," and the like in the description and claims of the present application and in the above-described drawings are used for distinguishing between different objects and not for describing a particular order. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus.
Reference in the specification to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the specification. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
In order to better understand a method for executing a timed task provided in an embodiment of the present application, a brief description is first given below of a system for executing a timed task to which the method for executing a timed task is applied. The timing task execution system comprises a general module and a monitoring module, wherein the general module comprises a timing task strategy interface module, a distributed lock and a timing task execution condition recording module. The timed task strategy interface module is used for defining task names of tasks and determining execution information of the timed tasks, and the execution information comprises execution logic and execution Cron expressions of the timed tasks. The distributed lock acquires a timing task set realizing a timing task policy interface by using an automatic assembly mode and stores the timing task set into the set, and the key of the set is used as the key of the distributed lock, so that the management of the lock under the distributed scene is uniformly managed; the timed task execution condition recording module records the name, the starting time, the ending time, the execution result (success/failure) and the abnormal information when the execution fails. The monitoring module is configured to check the timing task to obtain an execution result of the timing task, for example, extract the timing task whose execution result is a failure. The timing task execution system can be applied to a terminal device, and can also be applied to a server and the like.
Referring to fig. 1, fig. 1 is a schematic flowchart illustrating a task execution method according to an embodiment of the present disclosure. As shown in fig. 1, the task execution method applied to the terminal device is described here as an example, and the method includes:
101. and acquiring task information of the target timing task.
The method for acquiring the task information of the target timing task by the terminal device may be that the task information input by the user is received, so that the task information is acquired. Or the user sets the task information of the timing task on the terminal device through the timing task construction template, so as to obtain the task information.
The timing task may be a task periodically executed in a project, and is used for executing the task at a set time point, for example, the timing task may be a task for controlling the inspection equipment to perform security check, timing prompt, and the like. This is by way of example only.
The task information may be demand information of the task or attribute information of the task, and the attribute information of the task is taken as an example for description, and the attribute information of the task may be understood as the execution time of the task, the execution content of the task, and the like.
102. And determining first execution information of the target timing task according to the task information.
Timing information and execution logic information of the task may be determined from the task information, and the first execution information may be determined from the timing information and the execution logic information. The execution logic information may be understood as: the service of the timing task realizes logic, and the timing information can be a Cron expression of the timing task and the like.
103. And executing the target timing task according to the first execution information to obtain a target execution result of the target timing task.
And executing the target timing task based on the first execution information to obtain a target execution result. The target execution result may include an execution result when the task is executed, or may include information indicating whether the task is executed successfully. Whether a task is successfully executed or not may be understood as a task not being executed, a task execution failure, a task execution timeout, and the like.
104. And if the target execution result is a first execution result, determining abnormal information of the target timing task according to the execution parameters of the target timing task.
The first execution result is an execution result indicating that the task fails to be executed.
In determining the exception information of the target timed task, the exception information may be determined by an execution start time and an execution end time of execution of the task among the execution parameters, and a parameter corresponding to the execution logic information and the timing information among the execution parameters.
Of course, the abnormal information may be determined according to the state information of the execution device corresponding to the target timing task when the execution parameter corresponding to the execution logic information is a normal parameter.
105. And adjusting the first execution information according to the abnormal information to obtain second execution information.
The first execution information may be adjusted to obtain the second execution information by determining adjustment information corresponding to the execution logic information and offset information between the timing information and the preset timing information according to the exception information.
Or determining the adjustment information according to the normal function information in the execution device corresponding to the target timing task, and adjusting the first execution information according to the adjustment information to obtain the second execution information.
106. And executing the target timing task according to the second execution information.
The target timed task may be executed at the next timing based on the second execution information, or the target timed task may be immediately executed based on the second execution information.
In this example, by acquiring task information of a target timing task, determining first execution information of the target timing task according to the task information, executing the target timing task according to the first execution information to obtain a target execution result of the target timing task, if the target execution result is a first execution result, determining abnormal information of the target timing task according to an execution parameter of the target timing task, adjusting the first execution information according to the abnormal information to obtain second execution information, and executing the target timing task according to the second execution information, the execution information of the timing task can be adjusted when the timing task is abnormal, and the timing task can be executed again, thereby improving reliability of execution of the timing task.
In one possible implementation manner, one possible method for determining first execution information of the target timing task according to the task information includes:
a1, determining the execution logic information and the timing information of the target timing task according to the task information;
a2, determining the first execution information according to the execution logic information and the timing information.
The execution time and the execution period of the target timing task can be extracted from the task information, a Cron expression is determined according to the execution time and the execution period, and the Cron expression is determined as the timing information.
And determining the execution logic information according to the task information and the service logic information corresponding to the task information. The service logic information corresponding to the task information is preset service logic information, and may be a logic module set based on a service scene, and the logic module is combined according to the task information to obtain execution logic information. The method for combining the task information with the logic modules may be to determine an order of the logic modules according to the task information, and combine the logic modules according to the order to obtain the execution logic information.
Timing information may be embedded in the execution logic information to obtain the first execution information. The timing information may be embedded into the execution logic information by setting the timing information at the timing information in the execution logic to enable the embedding of the timing information into the execution logic information.
In this example, the accuracy of determining the first execution information can be improved by determining the execution logic information and the timing information through the task information and embedding the timing information into the execution logic information to obtain the first execution information.
In a possible implementation manner, a possible method for determining exception information of the target timing task according to an execution parameter of the target timing task includes:
b1, acquiring the execution starting time and the execution ending time of the target timing task from the execution parameters;
b2, determining a target execution duration according to the execution starting time and the execution ending time;
b3, if the target execution duration is an abnormal execution duration, acquiring a first sub-execution parameter corresponding to the execution logic information and a second sub-execution parameter corresponding to the timing information from the execution parameters;
and B4, determining the abnormal information according to the first sub-execution parameter and the second sub-execution parameter.
The execution parameter includes an execution start time and an execution end time of the target timing task, and a time difference between the execution end time and the execution start time may be determined as the target execution duration.
The target execution duration being the abnormal execution duration may be understood as: if the target execution duration is outside the preset execution duration range, for example, the preset execution duration range is 5-10 minutes, and the target execution duration is 11 minutes, the target execution duration is determined to be the abnormal execution duration.
The first sub-execution parameters corresponding to the execution logic information may be understood as: executing the execution result of each logic module corresponding to the logic information; the second execution parameter corresponding to the timing information may be understood as: an execution start time of actual execution and an execution end time of actual execution.
And acquiring an execution result of a logic module with a first execution error in the execution results of the logic modules, first time offset information between the execution starting time of actual execution and the execution starting time in the timing information, and second time offset information between the execution ending time of actual execution and a preset execution ending time. And determining first sub-abnormal information according to the execution result of the first logic module with the execution error, determining second sub-abnormal information according to the first time offset information and the second time offset information, and determining the first sub-abnormal information and the second sub-abnormal information as the abnormal information.
The first sub-exception information may be determined according to the error information in the execution result, and the error information may be determined by comparing the execution result with a normal result, and determining information that is not matched as the error information. Different error information corresponds to different abnormal information, so that the corresponding first sub-abnormal information can be determined according to the error information.
And if the offset information in the first time offset information and the second time offset information indicates that the offset is not generated, the second sub-abnormal information is null.
In this example, when the target execution duration is the abnormal execution duration, the abnormal information is determined according to the first sub-execution parameter corresponding to the execution logic information and the second sub-execution parameter corresponding to the timing information, so that the accuracy of determining the abnormal information is improved.
In a possible implementation manner, a possible method for adjusting the first execution information according to the abnormal information to obtain the second execution information includes:
c1, determining first adjustment information corresponding to the execution logic information according to the abnormal information;
c2, determining offset information between the timing information and preset timing information according to the abnormal information;
c3, determining second adjustment information according to the offset information;
and C4, adjusting the first execution information according to the first adjustment information and the second adjustment information to obtain the second execution information.
The first adjustment information may be determined based on first sub-abnormality information determined from error information in the abnormality information. Specifically, the first adjustment information may be determined according to the scene information of the target timing task and the logic information corresponding to the first sub-exception information. The first adjustment information is adjustment information adapted to the scene information. Because the logic module may not match the scene, the first adjustment information matched with the scene information is determined through the logic information corresponding to the scene information and the first sub-abnormal information, so that the accuracy of the subsequent adjustment of the first adjustment information is improved.
The preset timing information is set by empirical values or historical data. The offset between the timing information and the preset timing information may be understood as a time offset between the timing information and the preset timing information. The offset information may be determined as the second adjustment information.
A portion of the first execution information corresponding to the first adjustment information may be acquired, and the portion may be subjected to superimposition processing with the first adjustment information to perform adjustment. The method of adjusting the first execution information by the second adjustment information refers to the adjustment method of the first adjustment information. Thereby completing the adjustment of the first execution information to obtain the second execution information.
In this example, the first execution information is adjusted by the first adjustment information and the second adjustment information to obtain the second execution information, so that the accuracy in determining the second execution information is improved.
In a possible implementation manner, another possible method for determining exception information of the target timing task according to an execution parameter of the target timing task includes:
d1, acquiring a third sub-execution parameter corresponding to the execution logic information in the execution parameters;
d2, if the third sub-execution parameter is a normal parameter, acquiring the state information of the target device corresponding to the target timing task in the execution parameters;
d3, determining the abnormal information according to the state information of the target device.
The third sub-execution parameter may be compared with a preset execution parameter corresponding to the execution logic information, and if the third sub-execution parameter may be matched with the preset execution parameter corresponding to the execution logic information, the third sub-execution parameter is determined to be a normal parameter. The preset execution parameters corresponding to the execution logic information may be obtained from the historical execution data.
The state information of the target device may include hardware state information, software state information, operation state information, etc. of the target device. The state information of the target device can be judged, whether the state information is normal state information or not is judged, and if the state information is abnormal state information, the corresponding state information is determined to be abnormal information. The method for judging whether the state information is normal state information may be: and if the state information is out of the preset normal state information set, determining that the state information is in an abnormal state, otherwise, determining that the state information is in a normal state.
In this example, when the third sub-execution parameter corresponding to the execution logic information of the target timing task is a normal parameter, the abnormal information is determined according to the state information of the target device, and the abnormal information can be accurately determined, so that the reliability is improved.
In a possible implementation manner, a possible method for adjusting the first execution information according to the abnormal information to obtain the second execution information includes:
e1, determining the normal function information of the target equipment according to the abnormal information;
e2, determining the adjustment information of the execution logic information according to the normal function information;
and E3, adjusting the first execution information according to the adjustment information of the execution logic information to obtain second execution information.
And determining the function information except the function information corresponding to the abnormal information in the function information of the target equipment as normal function information.
The normal function module associated with the target timed task may be determined from the normal function information. The normal function information may correspond to a plurality of normal function modules, and the normal function module associated with the target timing task may be determined from the plurality of normal function modules. The normal functional modules associated with the target timed task may be understood as functional modules required to implement the target timed task.
At least one reference execution logic information can be determined according to a normal function module associated with the target timing task; according to the at least one reference execution logic information, adjustment information of the execution logic information is determined. Since the normal function module associated with the target timed task may include various execution logic, the reference execution logic information may include a plurality. The method may further include randomly selecting one reference execution logic information from the at least one reference execution logic information, and determining adjustment information of the execution logic information according to the selected reference execution logic information. Specifically, for example, the selected reference execution logic information may be directly determined as the adjustment information of the execution logic information. Of course, the difference between the reference execution logic information and the execution logic information in the first execution information may be determined as the adjustment information of the execution logic information.
The first execution information may be adjusted to obtain the second execution information according to the adjustment information of the execution logic information, where a portion of the first execution information corresponding to the reference execution logic information is replaced with the reference execution logic information to obtain the second execution information. The second execution information may be obtained by superimposing the adjustment information on a portion of the first execution information corresponding to the adjustment information. After the part corresponding to the adjustment information in the first execution information is subjected to superposition processing with the adjustment information, the part corresponding to the adjustment information is adjusted to be reference execution logic information.
In this example, the normal function information of the target device is determined through the abnormal information, the adjustment information of the execution logic information is determined according to the normal function information, and the first execution information is adjusted according to the adjustment information of the execution logic information to obtain the second execution information, so that the accuracy of determining the second execution information is improved.
In a possible implementation manner, after determining the abnormal information of the target timing task according to the execution parameter of the target timing task, the embodiment of the present application may further perform an abnormal alarm on the abnormal information, which specifically includes:
f1, determining alarm information according to the abnormal information;
f2, displaying the alarm information.
The abnormal type of the abnormal information can be obtained, and the alarm information is determined according to the type of the abnormal information. The abnormal type corresponds to the abnormal information, so that the alarm information can be determined according to the abnormal type, the abnormal type corresponds to the alarm information, and different alarm information corresponds to different abnormal types.
The method for displaying the alarm information can be as follows: the mail notification can be sent based on the alarm information, so that the failure of the timing task can be known within a short time after the failure of the timing task, the problem can be solved quickly, and the time for solving the problem is reduced.
The alarm information can be collected and displayed at the designated time every day, so that the execution condition of the timing task is visualized, the execution time length, the execution condition and the like of the timing task are conveniently analyzed, and the overall operation and maintenance cost of the timing task is reduced.
In a possible implementation manner, the timed task execution system can execute a plurality of timed tasks, and when the plurality of timed tasks are executed, the plurality of timed tasks can be managed in a distributed locking manner, for example, an automatic assembly manner is used to obtain a plurality of timed task sets and store the timed task sets into a task set, and keys of the task set are used as keys of the distributed locking, so that the management of locking in a distributed scene is uniformly managed, the distributed locking is not sensitive, the abnormal business scene caused by mistaken use of the distributed locking is uniformly processed and reduced, and the development and learning cost is reduced.
Referring to fig. 2, fig. 2 is a flowchart illustrating another task execution method according to an embodiment of the present disclosure. As shown in fig. 2, the task execution method applied to the terminal device is described here as an example, and the method includes:
201. acquiring task information of a target timing task;
202. determining execution logic information and timing information of the target timing task according to the task information;
203. determining the first execution information according to the execution logic information and the timing information;
204. executing the target timing task according to the first execution information to obtain a target execution result of the target timing task;
205. if the target execution result is a first execution result, acquiring the execution starting time and the execution ending time of the target timing task from the execution parameters;
206. determining a target execution duration according to the execution starting time and the execution ending time;
207. if the target execution duration is an abnormal execution duration, acquiring a first sub-execution parameter corresponding to the execution logic information and a second sub-execution parameter corresponding to the timing information from the execution parameters;
208. determining the abnormal information according to the first sub-execution parameter and the second sub-execution parameter;
209. adjusting the first execution information according to the abnormal information to obtain second execution information;
210. and executing the target timing task according to the second execution information.
In this example, when the target execution duration is the abnormal execution duration, the abnormal information is determined according to the first sub-execution parameter corresponding to the execution logic information and the second sub-execution parameter corresponding to the timing information, so that the accuracy of determining the abnormal information is improved.
In accordance with the foregoing embodiments, please refer to fig. 3, fig. 3 is a schematic structural diagram of a terminal according to an embodiment of the present application, and as shown in the drawing, the terminal includes a processor, an input device, an output device, and a memory, and the processor, the input device, the output device, and the memory are connected to each other, where the memory is used to store a computer program, the computer program includes program instructions, the processor is configured to call the program instructions, and the program includes instructions for performing the following steps;
acquiring task information of a target timing task;
determining first execution information of the target timing task according to the task information;
executing the target timing task according to the first execution information to obtain a target execution result of the target timing task;
if the target execution result is a first execution result, determining abnormal information of the target timing task according to the execution parameters of the target timing task;
adjusting the first execution information according to the abnormal information to obtain second execution information;
and executing the target timing task according to the second execution information.
The above description has introduced the solution of the embodiment of the present application mainly from the perspective of the method-side implementation process. It is understood that the terminal includes corresponding hardware structures and/or software modules for performing the respective functions in order to implement the above-described functions. Those of skill in the art will readily appreciate that the present application is capable of hardware or a combination of hardware and computer software implementing the various illustrative elements and algorithm steps described in connection with the embodiments provided herein. Whether a function is performed as hardware or computer software drives hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiment of the present application, the terminal may be divided into the functional units according to the above method example, for example, each functional unit may be divided corresponding to each function, or two or more functions may be integrated into one processing unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit. It should be noted that the division of the unit in the embodiment of the present application is schematic, and is only a logic function division, and there may be another division manner in actual implementation.
In accordance with the above, please refer to fig. 4, and fig. 4 is a schematic structural diagram of a task execution device according to an embodiment of the present application. As shown in fig. 4, the apparatus includes:
an obtaining unit 401, configured to obtain task information of a target timing task;
a first determining unit 402, configured to determine first execution information of the target timing task according to the task information;
a first executing unit 403, configured to execute the target timing task according to the first execution information, so as to obtain a target execution result of the target timing task;
a second determining unit 404, configured to determine, if the target execution result is a first execution result, abnormal information of the target timing task according to an execution parameter of the target timing task;
an adjusting unit 405, configured to adjust the first execution information according to the abnormal information to obtain second execution information;
a second executing unit 406, configured to execute the target timing task according to the second execution information.
In one possible implementation manner, the first determining unit 402 is configured to:
determining execution logic information and timing information of the target timing task according to the task information;
and determining the first execution information according to the execution logic information and the timing information.
In one possible implementation, the second determining unit 404 is configured to:
acquiring the execution starting time and the execution ending time of the target timing task from the execution parameters;
determining a target execution duration according to the execution starting time and the execution ending time;
if the target execution duration is an abnormal execution duration, acquiring a first sub-execution parameter corresponding to the execution logic information and a second sub-execution parameter corresponding to the timing information from the execution parameters;
and determining the abnormal information according to the first sub-execution parameter and the second sub-execution parameter.
In one possible implementation, the adjusting unit 405 is configured to:
determining first adjustment information corresponding to the execution logic information according to the abnormal information;
determining offset information between the timing information and preset timing information according to the abnormal information;
determining second adjustment information according to the offset information;
and adjusting the first execution information according to the first adjustment information and the second adjustment information to obtain the second execution information.
In one possible implementation, the second determining unit 404 is configured to:
acquiring a third sub-execution parameter corresponding to the execution logic information in the execution parameters;
if the third sub-execution parameter is a normal parameter, acquiring state information of the target device corresponding to the target timing task in the execution parameters;
and determining the abnormal information according to the state information of the target equipment.
In one possible implementation, the adjusting unit 405 is configured to:
determining normal function information of the target equipment according to the abnormal information;
determining adjustment information of the execution logic information according to the normal function information;
and adjusting the first execution information according to the adjustment information of the execution logic information to obtain second execution information.
In one possible implementation, the apparatus is further configured to:
determining alarm information according to the abnormal information;
and displaying the alarm information.
Embodiments of the present application also provide a computer storage medium, wherein the computer storage medium stores a computer program for electronic data exchange, and the computer program enables a computer to execute part or all of the steps of any one of the task execution methods as described in the above method embodiments.
Embodiments of the present application also provide a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program causes a computer to execute some or all of the steps of any one of the task execution methods as described in the above method embodiments.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present application is not limited by the order of acts described, as some steps may occur in other orders or concurrently depending on the application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application.
In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus may be implemented in other manners. For example, the above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one type of division of logical functions, and there may be other divisions when actually implementing, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not implemented. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of some interfaces, devices or units, and may be an electric or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit may be implemented in the form of hardware, or may be implemented in the form of a software program module.
The integrated units, if implemented in the form of software program modules and sold or used as stand-alone products, may be stored in a computer readable memory. Based on such understanding, the technical solution of the present application may be substantially implemented or a part of or all or part of the technical solution contributing to the prior art may be embodied in the form of a software product stored in a memory, and including several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method described in the embodiments of the present application. And the aforementioned memory comprises: various media capable of storing program codes, such as a usb disk, a read-only memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and the like.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by associated hardware instructed by a program, which may be stored in a computer-readable memory, which may include: flash memory disks, read-only memory, random access memory, magnetic or optical disks, and the like.
The foregoing detailed description of the embodiments of the present application has been presented to illustrate the principles and implementations of the present application, and the above description of the embodiments is only provided to help understand the method and the core concept of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (10)

1. A method of task execution, the method comprising:
acquiring task information of a target timing task;
determining first execution information of the target timing task according to the task information;
executing the target timing task according to the first execution information to obtain a target execution result of the target timing task;
if the target execution result is a first execution result, determining abnormal information of the target timing task according to the execution parameters of the target timing task;
adjusting the first execution information according to the abnormal information to obtain second execution information;
and executing the target timing task according to the second execution information.
2. The method of claim 1, wherein determining first execution information of the target timed task according to the task information comprises:
determining execution logic information and timing information of the target timing task according to the task information;
and determining the first execution information according to the execution logic information and the timing information.
3. The method according to claim 2, wherein the determining the exception information of the target timing task according to the execution parameter of the target timing task comprises:
acquiring the execution starting time and the execution ending time of the target timing task from the execution parameters;
determining a target execution duration according to the execution starting time and the execution ending time;
if the target execution duration is an abnormal execution duration, acquiring a first sub-execution parameter corresponding to the execution logic information and a second sub-execution parameter corresponding to the timing information from the execution parameters;
and determining the abnormal information according to the first sub-execution parameter and the second sub-execution parameter.
4. The method of claim 3, wherein the adjusting the first execution information to obtain second execution information according to the exception information comprises:
determining first adjustment information corresponding to the execution logic information according to the abnormal information;
determining offset information between the timing information and preset timing information according to the abnormal information;
determining second adjustment information according to the offset information;
and adjusting the first execution information according to the first adjustment information and the second adjustment information to obtain the second execution information.
5. The method according to claim 2, wherein the determining the exception information of the target timing task according to the execution parameter of the target timing task comprises:
acquiring a third sub-execution parameter corresponding to the execution logic information in the execution parameters;
if the third sub-execution parameter is a normal parameter, acquiring state information of the target device corresponding to the target timing task in the execution parameters;
and determining the abnormal information according to the state information of the target equipment.
6. The method of claim 5, wherein the adjusting the first execution information to obtain second execution information according to the exception information comprises:
determining normal function information of the target equipment according to the abnormal information;
determining adjustment information of the execution logic information according to the normal function information;
and adjusting the first execution information according to the adjustment information of the execution logic information to obtain second execution information.
7. The method according to any of claims 1-6, wherein after determining the exception information of the target timed task according to the execution parameters of the target timed task, the method further comprises:
determining alarm information according to the abnormal information;
and displaying the alarm information.
8. A task execution apparatus, characterized in that the apparatus comprises:
the acquisition unit is used for acquiring task information of the target timing task;
the first determining unit is used for determining first execution information of the target timing task according to the task information;
the first execution unit is used for executing the target timing task according to the first execution information so as to obtain a target execution result of the target timing task;
a second determining unit, configured to determine, if the target execution result is the first execution result, exception information of the target timing task according to an execution parameter of the target timing task;
the adjusting unit is used for adjusting the first execution information according to the abnormal information to obtain second execution information;
and the second execution unit is used for executing the target timing task according to the second execution information.
9. A terminal, comprising a processor, an input device, an output device, and a memory, the processor, the input device, the output device, and the memory being interconnected, wherein the memory is configured to store a computer program comprising program instructions, the processor being configured to invoke the program instructions to perform the method of any of claims 1-7.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program comprising program instructions that, when executed by a processor, cause the processor to carry out the method according to any one of claims 1-7.
CN202111350496.1A 2021-11-15 2021-11-15 Task execution method and related device Pending CN114064241A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111350496.1A CN114064241A (en) 2021-11-15 2021-11-15 Task execution method and related device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111350496.1A CN114064241A (en) 2021-11-15 2021-11-15 Task execution method and related device

Publications (1)

Publication Number Publication Date
CN114064241A true CN114064241A (en) 2022-02-18

Family

ID=80272310

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111350496.1A Pending CN114064241A (en) 2021-11-15 2021-11-15 Task execution method and related device

Country Status (1)

Country Link
CN (1) CN114064241A (en)

Similar Documents

Publication Publication Date Title
CN109639751B (en) Block chain link point monitoring method, device and system and computer storage medium
CN109145590B (en) Function hook detection method, detection equipment and computer readable medium
CN108804399B (en) Form verification method and device
CN110088744A (en) A kind of database maintenance method and its system
KR102130582B1 (en) Web-based brute force attack blocking device and method using machine learning
CN111338608A (en) Distributed application development method and device, node equipment and readable storage medium
CN111209339B (en) Block synchronization method, device, computer and storage medium
CN110191097B (en) Method, system, equipment and storage medium for detecting security of login page
CN107872446B (en) Communication account management method and device and server
CN107294981B (en) Authentication method and equipment
CN113468276A (en) Trusted data acquisition method and device of on-chain prediction machine and electronic equipment
CN109981573B (en) Security event response method and device
CN114064241A (en) Task execution method and related device
WO2016188223A1 (en) Fault information collection method and apparatus
CN109067738B (en) Port vulnerability detection method, terminal and computer readable medium
CN112650557A (en) Command execution method and device
CN111475400A (en) Verification method of service platform and related equipment
CN113138872A (en) Abnormal processing device and method for database system
CN111507840A (en) Block chain consensus method, device, computer and readable storage medium
CN110781146A (en) Event storage method, power terminal and computer-readable storage medium
CN117235686B (en) Data protection method, device and equipment
CN106933876B (en) Filtering method and device for screen recording file
CN112288990A (en) Method, system, medium and device for generating internet of things event based on internet of things data
CN114817868B (en) License verification method, device, equipment and storage medium
CN111191199B (en) Voice information acquisition method and device, storage medium and electronic device

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