CN117290113A - Task processing method, device, system and storage medium - Google Patents

Task processing method, device, system and storage medium Download PDF

Info

Publication number
CN117290113A
CN117290113A CN202311559213.3A CN202311559213A CN117290113A CN 117290113 A CN117290113 A CN 117290113A CN 202311559213 A CN202311559213 A CN 202311559213A CN 117290113 A CN117290113 A CN 117290113A
Authority
CN
China
Prior art keywords
task
sub
virtual
time
type
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.)
Granted
Application number
CN202311559213.3A
Other languages
Chinese (zh)
Other versions
CN117290113B (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.)
Taiping Finance Technology Services Shanghai Co ltd
Original Assignee
Taiping Finance Technology Services Shanghai 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 Taiping Finance Technology Services Shanghai Co ltd filed Critical Taiping Finance Technology Services Shanghai Co ltd
Priority to CN202311559213.3A priority Critical patent/CN117290113B/en
Publication of CN117290113A publication Critical patent/CN117290113A/en
Application granted granted Critical
Publication of CN117290113B publication Critical patent/CN117290113B/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/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5061Partitioning or combining of resources
    • G06F9/5066Algorithms for mapping a plurality of inter-dependent sub-tasks onto a plurality of physical CPUs
    • 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
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

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 invention discloses a task processing method, a device, a system and a storage medium, relating to the field of data task processing, wherein the method comprises the following steps: traversing tasks in a task execution list within preset processing time to decouple the current task into a first sub-task according to the execution period of the current task and the preset processing time; if the father tasks of the current task are all located outside the task execution list, creating a first virtual task corresponding to the father task; and taking the first virtual task as a pre-dependent task of the first sub-task. According to the technical scheme provided by the embodiment of the invention, the father task outside the task execution list is regarded as executed, so that the complete pre-dependency condition of the task execution list when the current task depending on the father task is executed is ensured, the situation that the follow-up task cannot be executed due to the incomplete pre-dependency task is avoided, meanwhile, the resource cost required by task processing is not increased in the first virtual task, and the high-efficiency execution of the task processing is ensured.

Description

Task processing method, device, system and storage medium
Technical Field
The present invention relates to the field of data task processing, and in particular, to a task processing method, device, system, and storage medium.
Background
With the continuous development of computer technology, the number of tasks facing a task processing system is continuously increasing, and the execution logic dependency relationship often exists between each data task, so how to process the dependency relationship between the data tasks is also an important subject in the task processing field.
In the prior art, for a plurality of data tasks with a dependency relationship, a task processing system generally sets a fixed execution time for each task, and sequentially executes each data task according to the dependency relationship between the data tasks; however, the execution cycle of the data task is often different based on the own business requirement, and it is difficult to ensure that all tasks under the dependency relationship can be executed according to a predetermined sequence.
Particularly, when the execution period of the parent task is longer than that of the subtask, the execution of the subtask often fails due to the non-execution of the parent task, that is, the execution condition of the subtask does not meet the task dependency condition; in addition, for the processing manner of the above-mentioned dependency relationship, the task processing system often has to be completed by means of accessing an external function script, which often results in higher development cost of the task processing system.
Disclosure of Invention
The invention provides a task processing method, a device, a system and a storage medium, which are used for solving the problem that a task to be executed cannot be executed when the execution period of the task to be executed is inconsistent with that of a parent task.
According to an aspect of the present invention, there is provided a task processing method including:
traversing tasks in a task execution list within preset processing time to decouple the current task into at least one first sub-task according to the execution period of the current task and the preset processing time;
if it is determined that at least one matched parent task exists in the current task and the at least one parent task is located outside the task execution list, at least one first virtual task corresponding to the at least one parent task is created according to the execution time of the first sub task; the first virtual task is in an automatic completion state;
and taking the first virtual task as a matched pre-dependent task of the first sub-task.
After decoupling the current task into at least one first sub-task, further comprising: if it is determined that at least one matched parent task exists in the current task and the at least one parent task is located in the task execution list, decoupling the at least one parent task into at least one second sub task; if the first type time exists in the preset processing time, creating at least one second virtual task corresponding to the at least one father task according to the first type time; wherein the first type of time is a time when a first subtask exists and a second subtask does not exist in at least one parent task; and taking the second virtual task or the second sub task as a matched pre-dependent task of the first sub task. The second virtual task is set so that a father task of the current task exists in the task execution list, but when the execution period of the father task is different from that of the current task, the completeness of the pre-dependent condition of the current task can be ensured, the situation that the follow-up task cannot be executed due to the fact that the pre-dependent task is not completed is avoided, meanwhile, the resource cost required by task processing is not increased by the second virtual task in practice, the task processing time is not increased, and high-efficiency execution of the task processing is ensured.
After decoupling the at least one parent task into at least one second subtask, further comprising: if the second type time exists in the preset processing time, creating at least one third virtual task corresponding to the current task according to the second type time; wherein the second type of time is a time when the first subtask is not present and the second subtask is present in at least one of the parent tasks; and taking the first sub task or the third virtual task as a post-dependent task of the matched second sub task. By setting the third virtual task, when the execution of the father task in the task execution list is completed, the created third virtual task can be continuously executed, so that the complete execution of the task dependency relationship of the father task in the task execution list is ensured, and the task interruption phenomenon in the task dependency relationship is avoided, and the task management is abnormal.
After decoupling the current task into at least one first sub-task, further comprising: if it is determined that a plurality of matched father tasks exist in the current task, wherein the plurality of father tasks comprise at least one first-type father task and at least one second-type father task, decoupling the at least one first-type father task into at least one third sub task; wherein the first type of parent task is a parent task located in the task execution list; the second type of parent task is a parent task located outside the task execution list; if the third type of time exists in the preset processing time, creating at least one fourth virtual task corresponding to the at least one first type of father task according to the third type of time; the third type of time is a time when the first sub-task exists and the third sub-task does not exist in at least one father task of the first type; creating at least one fifth virtual task corresponding to the at least one second-type parent task according to the execution time of the first sub task; and taking the fourth virtual task and the fifth virtual task as the matched pre-dependent tasks of the first sub-task, or taking the third sub-task and the fifth virtual task as the matched pre-dependent tasks of the first sub-task. The setting of the fourth virtual task and the fifth virtual task ensures that the father task outside the task execution list can be considered to be executed and completed, ensures that the preposed dependent condition is complete when the current task depending on the father task is executed in the task execution list, avoids the situation that the follow-up task cannot be executed due to the incompletion of the preposed dependent task, simultaneously ensures that the father task in the task execution list can ensure the integrity of the preposed dependent condition of the current task when the execution period of the father task is different from that of the current task, and avoids the situation that the follow-up task cannot be executed due to the incompletion of the preposed dependent task.
After decoupling the at least one parent task of the first type into at least one third sub-task, further comprising: if the fourth type time exists in the preset processing time, creating at least one sixth virtual task corresponding to the current task in the task execution list according to the fourth type time; the fourth type of time is a time when the first sub task does not exist and the third sub task exists in at least one father task of the first type; and taking the sixth virtual task as a post-dependent task of the matched third sub-task. The setting of the sixth virtual task ensures that the established sixth virtual task can be continuously executed when the execution of the father task in the task execution list is completed, ensures the complete execution of the task dependency relationship of the father task in the task execution list, and avoids the task interruption phenomenon in the task dependency relationship, thereby causing the abnormality of task management.
After decoupling the current task into at least one first sub-task, further comprising: if at least one matched sub-task exists in the current task and the at least one sub-task is located outside the task execution list, creating at least one seventh virtual task corresponding to the at least one sub-task according to the execution time of the first sub-task; and taking the seventh virtual task as a post-dependent task of the matched first sub-task. The setting of the seventh virtual task enables the subtasks outside the task execution list to be identified as executed and completed, ensures the complete execution of the task dependency relationship of the current task in the task execution list, and avoids task interruption in the task dependency relationship, thereby causing task management to be abnormal.
After decoupling the current task into at least one first sub-task, further comprising: if the fact that a plurality of matched subtasks exist in the current task is determined, wherein the plurality of subtasks comprise at least one first type subtask and at least one second type subtask, creating an eighth virtual task corresponding to the at least one second type subtask according to the execution time of the first subtask; wherein the first type subtasks are subtasks located in the task execution list; the second type subtasks are subtasks located outside the task execution list; and taking the eighth virtual task as a post-dependent task of the matched first sub-task. The setting of the eighth virtual task enables subtasks outside the task execution list to be considered to be executed and completed, ensures complete execution of the task dependency relationship of the current task in the task execution list, and avoids task interruption in the task dependency relationship, thereby causing task management to be abnormal.
According to another aspect of the present invention, there is provided a task processing device including:
the first sub-task acquisition module is used for traversing tasks in a task execution list within preset processing time so as to decouple the current task into at least one first sub-task according to the execution period of the current task and the preset processing time;
The first virtual task acquisition module is used for creating at least one first virtual task corresponding to at least one father task according to the execution time of the first sub task if the fact that the current task has the matched at least one father task and the at least one father task is located outside the task execution list is determined; the first virtual task is in an automatic completion state;
and the first pre-dependent task acquisition module is used for taking the first virtual task as a matched pre-dependent task of the first sub-task.
According to another aspect of the present invention, there is provided a data processing system, the task processing system comprising: the system comprises a task arrangement module, a task processing module, a task scheduling module and a task executing module; the task processing module is respectively in communication connection with the task scheduling module and the task scheduling module, and the task scheduling module is in communication connection with the task execution module; the task processing module is used for executing the task processing method according to any embodiment of the invention.
According to another aspect of the present invention, there is provided an electronic apparatus including:
at least one processor; and
A memory communicatively coupled to the at least one processor; wherein,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the task processing method according to any one of the embodiments of the present invention.
According to another aspect of the present invention, there is provided a computer readable storage medium storing computer instructions for causing a processor to execute a task processing method according to any one of the embodiments of the present invention.
According to the technical scheme, the tasks in the task execution list in the preset processing time are traversed, so that the current task is decoupled into the first sub-task according to the execution period of the current task and the preset processing time, the situation that the processing abnormality of the previous sub-data task affects the execution of the subsequent data task is avoided, and the timeliness of the data task processing is ensured; when the father tasks of the current task are all located outside the task execution list, a first virtual task corresponding to the father task is created according to the execution time of the first sub task, and then the first virtual task is used as a front-end dependent task of the first sub task, so that the father tasks outside the task execution list can be considered to be executed and completed, the front-end dependent condition of the current task which depends on the father task in the task execution list is ensured to be complete, the situation that the follow-up task cannot be executed due to incomplete front-end dependent task is avoided, meanwhile, the resource cost required by task processing is not increased by the first virtual task actually, the task processing time is not increased, and the high-efficiency execution of the task processing is ensured; in addition, the data task processing mode obviously does not need to be called by means of an additional function script, and the development cost of a task processing system is greatly reduced.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the invention or to delineate the scope of the invention. Other features of the present invention will become apparent from the description that follows.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a task processing method according to a first embodiment of the present invention;
FIG. 2 is a flow chart of a task processing method according to a second embodiment of the present invention;
FIG. 3 is a flow chart of a task processing method according to a third embodiment of the present invention;
FIG. 4 is a flow chart of a task processing system for processing data tasks according to a fourth embodiment of the invention;
FIG. 5 is a schematic diagram of a task processing device according to a fifth embodiment of the present invention;
Fig. 6 is a schematic structural diagram of an electronic device implementing a task processing method according to an embodiment of the present invention.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present invention and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example 1
Fig. 1 is a flowchart of a task processing method according to an embodiment of the present invention, where the method may be applied to guiding ordered execution of tasks to be executed by creating virtual tasks in an auto-complete state, and the method may be executed by a task processing device, where the task processing device may be implemented in hardware and/or software, and the task processing device is configured in a task processing system, where the task processing system is configured in an electronic device such as a server. As shown in fig. 1, the method includes:
s101, traversing tasks in a task execution list within a preset processing time, so as to decouple the current task into at least one first sub-task according to the execution period of the current task and the preset processing time.
In order to facilitate management of data tasks, the data processing system may generate in advance an execution plan of each data task in a next time period in the current time period, for example, the time period (i.e. the preset processing time) may be 1 day, and 23 points 59 minutes per day may generate a task execution list of each task to be executed in the next day; each task in the task execution list can determine the execution times in the preset processing time according to the execution period of the task; therefore, when each task in the task execution list is traversed in turn, task decoupling in a time dimension can be performed on each task to be executed.
For example, the current task (i.e., task a) is to update the user credit rating table with an update period (i.e., execution period) of 6 hours; then task a total would update the credit rating table 4 times a day; therefore, according to the execution period of the current task and the preset processing time, the execution times in the preset processing time are obtained, and the execution times are taken as the number of first sub-tasks obtained after decoupling of the current task, namely, the task A is split into 4 first sub-tasks, namely, A11, A12, A13 and A14, and the execution time of each first sub-task is respectively 0 point, 6 point, 12 point and 18 point.
In particular, the start time of each task may be configured and generated in the task execution list, and the start times of the respective tasks may be uniformly set to the same time, for example, the start time of each task is set to 0 point; different starting times can be set for different tasks, and obviously, the execution times of the tasks can be influenced by the different starting times, and at the moment, the execution times in the preset processing time are obtained according to the execution period of the current task, the preset processing time and the starting time.
Compared with the traditional technical scheme, the data processing executed at the next time depends on the data processing result at the previous time, once the data processing at the previous time is delayed, the same delay exists in the subsequent processing, and the accuracy of the subsequent processing result is affected by the abnormality of the result of the previous processing; in the embodiment of the invention, time dependence does not exist among the first sub-tasks, and the first sub-tasks are independent tasks which are decoupled and completed, and even if the previous processing is delayed, the subsequent processing can still be executed at the appointed time, so that the timeliness of the data processing is ensured.
S102, if it is determined that at least one matched father task exists in the current task and the at least one father task is located outside the task execution list, creating at least one first virtual task corresponding to the at least one father task according to the execution time of the first sub task; the first virtual task is in an automatic completion state.
The parent task is a dependent task when the current task is executed, namely, the execution of the current task is executed depending on the execution completion of the parent task; the task execution list records the dependency relationship of each task, including the father task of each task; taking the above technical scheme as an example, task B is to update the account flow information table, and task C is to update the user personal information table; the user credit rating in the task A is related to the account balance of the user and is also related to personal information such as the member rating of the user, the account balance is acquired through the user account running water information table of the task B, the member rating is acquired through the user personal information table of the task C, and the execution of the task A is obviously performed depending on the completion of the execution of the task B and the task C, so that the task B and the task C are father tasks of the task A, namely the task A at the moment is a multi-parent dependency.
The father task of the current task also has own execution period, and if the father task of the current task is located outside the task execution list, the execution period of the father task is larger than the execution period of the current task, at the moment, the father task does not exist in the task execution list within the preset processing time, and at the moment, the problem of long-short period dependence exists between the current task and the father task; for example, if the execution period of task B is 3 days and the execution period of task C is 7 days, it is obvious that the execution periods of task a, task B and task C are different; if the father tasks are not in the current task execution list, first virtual tasks with the same number as the first sub-tasks are respectively created for each father task, so that each father task has first virtual tasks which are respectively matched with the first sub-tasks, and the execution time of the first virtual tasks is the same as the execution time of the matched first sub-tasks.
Taking the above technical solution as an example, the task a includes four first sub-tasks a11, a12, a13 and a14, and execution moments of the respective first sub-tasks are 0 point, 6 point, 12 point and 18 point respectively; in the task execution list, four first virtual tasks corresponding to the task B are also created, namely, first virtual tasks B11, B12, B13 and B14, and the execution time of the four first virtual tasks is 0 point, 6 point, 12 point and 18 point respectively; in the task execution list, four first virtual tasks corresponding to the task C, namely, the first virtual tasks C11, C12, C13 and C14 are also created, and the execution moments of the four first virtual tasks are also 0 point, 6 point, 12 point and 18 point, respectively.
The virtual task is a task which is automatically completed and does not need to be actually executed, and the data processing system does not actually execute the task when executing the virtual task, but directly confirms that the task is executed after directly acquiring the task state of the virtual task; therefore, the setting of the first virtual task enables the father task outside the task execution list to be considered as executed and completed, ensures that the front-end dependent condition of the current task which depends on the father task in the task execution list is complete, avoids the situation that the follow-up task cannot be executed due to incomplete front-end dependent task, and simultaneously, the first virtual task does not increase the resource cost required by task processing, does not increase the task processing time, and ensures the high-efficiency execution of the task processing.
S103, taking the first virtual task as a front-end dependent task of the matched first sub-task.
As described above, the first virtual tasks B11 and C11 are used as the pre-dependent tasks of the first sub-task a11, the first virtual tasks B12 and C12 are used as the pre-dependent tasks of the first sub-task a12, the first virtual tasks B13 and C13 are used as the pre-dependent tasks of the first sub-task a13, and the first virtual tasks B14 and C14 are used as the pre-dependent tasks of the first sub-task a 14; wherein, the pre-dependent task is the task which needs to be executed in advance before being executed.
Based on the current data processing list, the data processing system can directly acquire the pre-dependent conditions when executing the first sub-task A1 at the moment of 0 point, namely, the first virtual tasks B1 and C1 are in the completed state, so that the integrity of the pre-execution conditions is ensured; similarly, when the first subtask A2, the first subtask A3 and the first subtask A4 are respectively executed at 6 points, 12 points and 18 points, the corresponding pre-dependent conditions can be obtained to be finished, and the orderly execution of the data processing tasks is ensured.
Optionally, in an embodiment of the present invention, after decoupling the current task into at least one first sub-task, the method further includes: if the fact that at least one matched subtask exists in the current task and the at least one subtask is located outside the task execution list is determined, at least one seventh virtual task corresponding to the at least one subtask is created according to the execution time of the first subtask; and taking the seventh virtual task as a post-dependent task of the matched first sub-task.
Specifically, the task dependency relationship recorded in the task execution list further comprises subtasks of each task to be executed; the subtasks are tasks which depend on the current task after the current task is executed, namely, the execution of the subtasks depends on the execution of the current task to be executed; if all the subtasks of the current task are not in the task execution list, after the execution time of each first subtask, setting a corresponding seventh virtual task for each subtask respectively, and continuing to execute the seventh virtual task after the execution of the first subtask is completed; the post-dependent task is a task which needs to be continuously executed after being executed; the setting of the seventh virtual task enables the subtasks outside the task execution list to be identified as executed and completed, ensures the complete execution of the task dependency relationship of the current task in the task execution list, and avoids task interruption in the task dependency relationship, thereby causing task management to be abnormal.
According to the technical scheme, the tasks in the task execution list in the preset processing time are traversed, so that the current task is decoupled into the first sub-task according to the execution period of the current task and the preset processing time, the situation that the processing abnormality of the previous sub-data task affects the execution of the subsequent data task is avoided, and the timeliness of the data task processing is ensured; when the father tasks of the current task are all located outside the task execution list, a first virtual task corresponding to the father task is created according to the execution time of the first sub task, and then the first virtual task is used as a front-end dependent task of the first sub task, so that the father tasks outside the task execution list can be considered to be executed and completed, the front-end dependent condition of the current task which depends on the father task in the task execution list is ensured to be complete, the situation that the follow-up task cannot be executed due to incomplete front-end dependent task is avoided, meanwhile, the resource cost required by task processing is not increased by the first virtual task actually, the task processing time is not increased, and the high-efficiency execution of the task processing is ensured; in addition, the data task processing mode obviously does not need to be called by means of an additional function script, and the development cost of a task processing system is greatly reduced.
Example two
Fig. 2 is a flowchart of a task processing method according to a second embodiment of the present invention, in which in the first embodiment, parent tasks corresponding to current tasks are all located outside a task execution list, and in the second embodiment, parent tasks corresponding to current tasks are all located in the task execution list. As shown in fig. 2, the method includes:
s201, traversing tasks in a task execution list within a preset processing time to decouple the current task into at least one first sub-task according to the execution period of the current task and the preset processing time.
S202, if it is determined that at least one matched parent task exists in the current task and the at least one parent task is located in the task execution list, decoupling the at least one parent task into at least one second sub task.
If the father task of the current task is also in the task execution list, decoupling the father task into one or more second sub tasks according to the execution cycle of the father task; in particular, the parent task is located in the task execution list, which indicates that the execution period of the parent task may be greater than or less than or equal to the execution period of the current task. Taking the above technical solution as an example, if the execution period of the task B is 8 hours, the task B is decoupled to obtain three second subtasks, and the execution moments of the second subtasks are respectively 0 point, 8 point and 16 point.
S203, if the first type time exists in the preset processing time, creating at least one second virtual task corresponding to the at least one father task according to the first type time; wherein the first type of time is a time when a first subtask is present and a second subtask is not present in at least one parent task.
According to the technical scheme, as the four first sub-tasks decoupled from the task A are respectively executed at the 0 point, the 6 point, the 12 point and the 18 point are all the first type time, namely, only the first sub-task exists at the time, and at least one father task (namely, the task B) does not exist corresponding second sub-tasks at the time; thus, at the first type of time instant, i.e. at 6, 12 and 18 points, respectively, a second virtual task corresponding to task B, i.e. second virtual tasks B21, B22 and B23, is created.
S204, taking the second virtual task or the second sub task as a front-end dependent task of the matched first sub task.
In the above technical solution, at the moment of 0 point, there is a second sub-task of the task B, and for the first sub-task a11, the second sub-task is the pre-dependent task; and at the moments of 6, 12 and 18, there are second virtual tasks B21, B22 and B23 of task B, respectively, whereby the second virtual task B21 is the pre-dependent task of the first sub-task a 12; the second virtual task B22 is a front-end dependent task of the first sub-task A13; the second virtual task B23 is the pre-dependent task of the first sub-task a 14.
If there are multiple parent tasks in the current task, for example, besides the task B, when the task C is the parent task of the task a, at the execution time of each first sub-task of the task a, the task C also has its own sub-task or creates a completed second virtual task, and the sub-task or the second virtual task is also used as another pre-dependent task of the first sub-task at the corresponding time.
The second virtual task is set so that a father task of the current task exists in the task execution list, but when the execution period of the father task is different from that of the current task, the completeness of the pre-dependent condition of the current task can be ensured, the situation that the follow-up task cannot be executed due to the fact that the pre-dependent task is not completed is avoided, meanwhile, the resource cost required by task processing is not increased by the second virtual task in practice, the task processing time is not increased, and high-efficiency execution of the task processing is ensured.
Optionally, in an embodiment of the present invention, after decoupling the at least one parent task into the at least one second sub task, the method further includes: if the second type time exists in the preset processing time, creating at least one third virtual task corresponding to the current task according to the second type time; the second type time is a time when the first subtask does not exist and the second subtask exists in at least one father task; and taking the first sub task or the third virtual task as a post-dependent task of the matched second sub task.
Specifically, taking the above technical solution as an example, 8 points and 16 points are both the second type time, that is, there is no first subtask at this time, and at least one father task (that is, the task B) has a corresponding second subtask; thereby creating third virtual tasks corresponding to task a, namely third virtual tasks a31 and a32, respectively, at the second type of time, namely at points 8 and 16; among the three execution times 0, 8 and 16 of the second subtask, the 0 point itself has the first subtask, and the second subtask at this time is used as the front-end dependent task of the first subtask, that is, the first subtask is used as the rear-end dependent task of the second subtask.
A third virtual task is created at both the 8 point and the 16 point, so that at the two moments, the second sub-task is used as a pre-dependent task of the third virtual task, namely the third virtual task is used as a post-dependent task of the second sub-task; by setting the third virtual task, when the execution of the father task in the task execution list is completed, the created third virtual task can be continuously executed, so that the complete execution of the task dependency relationship of the father task in the task execution list is ensured, and the task interruption phenomenon in the task dependency relationship is avoided, and the task management is abnormal.
According to the technical scheme provided by the embodiment of the invention, the setting of the second virtual task enables the father task of the current task to exist in the task execution list, but when the execution period of the father task is different from that of the current task, the completeness of the pre-dependent condition of the current task can be ensured, and the situation that the follow-up task cannot be executed due to the incomplete pre-dependent task is avoided; by setting the third virtual task, when the execution of the father task in the task execution list is completed, the created third virtual task can be continuously executed, so that the complete execution of the task dependency relationship of the father task in the task execution list is ensured, and the task interruption phenomenon in the task dependency relationship is avoided, and the task management is abnormal.
Example III
Fig. 3 is a flowchart of a task processing method according to a third embodiment of the present invention, where in the first embodiment, parent tasks corresponding to current tasks are all located outside a task execution list, and in the third embodiment, parent tasks corresponding to current tasks are partially in the task execution list and partially outside the task execution list. As shown in fig. 3, the method includes:
s301, traversing tasks in a task execution list within a preset processing time, so as to decouple the current task into at least one first sub-task according to the execution period of the current task and the preset processing time.
S302, if it is determined that a plurality of matched father tasks exist in the current task, wherein the plurality of father tasks comprise at least one first type father task and at least one second type father task, the at least one first type father task is decoupled into at least one third sub task; the first type parent task is a parent task in a task execution list; the second type of parent task is a parent task that is located outside of the task execution list.
If part of the father tasks of the current task are located in the task execution list and part of the father tasks are located outside the task execution list, decoupling the first type of father tasks into one or more third sub-tasks for the first type of father tasks located in the task execution list. Taking the above technical scheme as an example, task B is a first type father task, its update period is 8 hours, and it is obvious that task B is located in the current task execution list; task C is a second type father task, the update period is 7 days, and task C is located outside the current task execution list; task B is decoupled into third sub-tasks B31, B32 and B33, and execution moments are 0 point, 8 point and 16 point, respectively.
S303, if it is determined that the third type time exists in the preset processing time, creating at least one fourth virtual task corresponding to the at least one first type parent task according to the third type time; wherein the third type of time instant is a time instant when the first subtask is present and the third subtask is absent from the at least one parent task of the first type.
For the third type of time instant, i.e. 6, 12 and 18 points, fourth virtual tasks corresponding to task B, i.e. fourth virtual tasks B41, B42 and B43, respectively, are created.
S304, creating at least one fifth virtual task corresponding to at least one father task of the second type according to the execution time of the first sub task.
Since the second type parent task is not in the task execution list, fifth virtual tasks corresponding to task C, namely fifth virtual tasks C51, C52, C53 and C54, are created at points 0, 6, 12 and 18, respectively.
S305, the fourth virtual task and the fifth virtual task are used as the front-end dependent tasks of the matched first sub-task, or the third sub-task and the fifth virtual task are used as the front-end dependent tasks of the matched first sub-task.
At the moment of 0 point, the third sub-task B31 and the fifth virtual task C51 are used as front dependent tasks of the first sub-task; at the moment of 6 points, the fourth virtual task B41 and the fifth virtual task C52 are used as front dependent tasks of the first sub-task; at 12 points, the fourth virtual task B42 and the fifth virtual task C53 are used as front dependent tasks of the first sub-task; at point 18, the fourth virtual task B43 and the fifth virtual task C54 are pre-dependent tasks of the first sub-task.
The setting of the fourth virtual task and the fifth virtual task ensures that the father task outside the task execution list can be considered to be executed and completed, ensures that the preposed dependent condition is complete when the current task depending on the father task is executed in the task execution list, avoids the situation that the follow-up task cannot be executed due to the incompletion of the preposed dependent task, simultaneously ensures that the father task in the task execution list can ensure the integrity of the preposed dependent condition of the current task when the execution period of the father task is different from that of the current task, and avoids the situation that the follow-up task cannot be executed due to the incompletion of the preposed dependent task.
Optionally, in an embodiment of the present invention, after decoupling the at least one parent task of the first type into the at least one third sub-task, the method further includes: if the fourth type time exists in the preset processing time, creating at least one sixth virtual task corresponding to the current task in the task execution list according to the fourth type time; the fourth type of time is a time when the first sub task does not exist and the third sub task exists in at least one first type of parent task; and taking the sixth virtual task as a post-dependent task of the matched third sub-task.
Specifically, taking the above technical solution as an example, 8 points and 16 points are all the fourth type of time, that is, there is no first subtask at this time, and at least one father task (that is, the task B) has a corresponding second subtask at the time; thereby creating sixth virtual tasks corresponding to task a, namely sixth virtual tasks a61 and a62, respectively, at fourth type moments, namely at 8 points and 16 points; among three execution time points 0, 8 and 16 of the third sub-task, the 0 point has a first sub-task, and the third sub-task at the time point is used as a front dependent task of the first sub-task, namely the first sub-task is a rear dependent task of the second sub-task; a sixth virtual task has been created at both points 8 and 16, so that at both times, the third sub-task is a pre-dependent task of the sixth virtual task, i.e., the sixth virtual task is a post-dependent task of the third sub-task; the setting of the sixth virtual task ensures that the established sixth virtual task can be continuously executed when the execution of the father task in the task execution list is completed, ensures the complete execution of the task dependency relationship of the father task in the task execution list, and avoids the task interruption phenomenon in the task dependency relationship, thereby causing the abnormality of task management.
Optionally, in an embodiment of the present invention, after decoupling the current task into at least one first sub-task, the method further includes: if the fact that the current task has a plurality of matched subtasks is determined, wherein the plurality of subtasks comprise at least one first type subtask and at least one second type subtask, and an eighth virtual task corresponding to the at least one second type subtask is created according to the execution time of the first subtask; the first type subtasks are subtasks in a task execution list; the second type subtasks are subtasks located outside the task execution list; and taking the eighth virtual task as a post-dependent task of the matched first sub-task.
Specifically, after the execution time of each first sub-task, setting a corresponding eighth virtual task for each second type sub-task, and continuing to execute the eighth virtual task after the execution of the first sub-task is completed; the setting of the eighth virtual task enables subtasks outside the task execution list to be considered to be executed and completed, ensures complete execution of the task dependency relationship of the current task in the task execution list, and avoids task interruption in the task dependency relationship, thereby causing task management to be abnormal. In particular, for the first type subtask, since the first type subtask itself exists in the task execution list, and when traversing to the first type subtask, as in the above technical solution, the first type subtask is decoupled into the subtask, and then the virtual task matched with the current task is created, so that the front-end dependency relationship between the virtual task and the subtask of the first type subtask is established, therefore, when traversing to the current task, no virtual task is created for the first type subtask temporarily.
According to the technical scheme, the father task outside the task execution list can be considered to be executed to be completed by setting the fourth virtual task and the fifth virtual task, so that the completeness of the pre-dependency condition when the current task depending on the father task is executed in the task execution list is ensured, the situation that the follow-up task cannot be executed due to the fact that the pre-dependency task is incomplete is avoided, meanwhile, the father task in the task execution list is enabled to ensure the completeness of the pre-dependency condition of the current task when the execution period of the father task is different from that of the current task, and the situation that the follow-up task cannot be executed due to the fact that the pre-dependency task is incomplete is avoided.
Example IV
Fig. 4 is a flowchart of a task processing system for processing a data task according to a fourth embodiment of the present invention, where the task processing system includes: the system comprises a task arrangement module, a task processing module, a task scheduling module and a task executing module; the task processing module is respectively in communication connection with the task scheduling module and the task scheduling module, and the task scheduling module is in communication connection with the task execution module; the task processing module is used for executing the task processing method according to any embodiment of the invention.
As shown in fig. 4, the task orchestration module obtains the task name that the user has finished by definition; the task scheduling module acquires the task type of the task, wherein the task type refers to the mode of acquiring the data required by the task, and specifically can comprise acquiring through Shell script files, acquiring through query log data and acquiring through query SQL (Structured Query Language) database; the task arrangement module acquires the dependency relationship of the task, namely the father task and/or the son task corresponding to the task; the task arrangement module acquires the execution period of the task; the task arrangement module acquires alarm setting information of the task, namely information such as an alarm mode, alarm time and the like when the task fails to be processed.
The task processing module generates a task execution list in the next time period based on the timing generation mechanism; the task processing module can also acquire tasks added manually by a user, such as repeatedly executing tasks, temporarily executing tasks, repairing tasks for repairing system vulnerabilities and the like, and add the tasks into a task execution list; the task processing module traverses each task in the task execution list and executes the task decoupling operation and the virtual task creation operation of the embodiment; the task processing module sets the subtasks to a non-ready-to-complete state (i.e., a "notready" state) and the virtual tasks to an auto-complete state (i.e., an "autosacc" state).
The task scheduling module judges whether the current task (namely, the sub task or the virtual task) accords with the time dependence condition or not through the time scheduler and the task scheduler, namely, judges whether the current task or the task reaches the execution moment or not, and judges whether the current task accords with the task dependence condition or not, namely, judges whether the current task is executed and completed or not; the task scheduling module sets the current task to a ready state (i.e. a ready state) if judging that the current task meets the execution condition; the task scheduling module judges whether the current task accords with the resource dependency condition through a resource scheduler; wherein the resource dependent condition includes the presence of an available thread, an available process, or other data processing resource; the task scheduling module sets the current task to an operation state (namely a running state) if determining that the current task meets the resource dependency condition; the task scheduling module executes preprocessing operations, such as data table partition processing operation, data file processing operation and the like, on the data table where the current task is located through the preprocessor.
The task execution module obtains the execution result of the current task through a task executor; the task execution module judges whether the current task is successfully processed or not by one or more modes, and specifically comprises judging whether a specified text exists in the acquired log data, judging whether a specified return code is acquired or not, and judging whether a specified state file is generated or not; the task execution module sets the current task to a run success state (i.e., a "success" state) if the current task processing is judged to be successful, and sets the current task to a run failure state (i.e., a "fail" state) if the current task processing is judged to be failed.
In addition, the task processing system can also comprise a task monitoring module; the task monitoring module is in communication connection with the task execution module and the task processing module; the task monitoring module displays the operation failure task to the user by monitoring the task in the operation failure state in the task execution module so as to guide the user to enable the user to add the operation failure task to the task execution list in a manual adding mode based on the operation failure task.
According to the technical scheme provided by the embodiment of the invention, the task processing system realizes orderly execution of the data task with multi-parent dependence and long-short period dependence through the task arrangement module, the task processing module, the task scheduling module and the task execution module, and the task processing system has various data processing functions such as data task definition, generation, scheduling processing and execution, and ensures the integrity of data task processing.
Example five
Fig. 5 is a block diagram of a task processing device according to a fifth embodiment of the present invention, where the task processing device specifically includes:
the first sub-task obtaining module 501 is configured to traverse the tasks in the task execution list within a preset processing time, so as to decouple the current task into at least one first sub-task according to the execution cycle of the current task and the preset processing time;
A first virtual task obtaining module 502, configured to create at least one first virtual task corresponding to at least one parent task according to the execution time of the first sub task if it is determined that the current task has at least one matched parent task and the at least one parent task is located outside the task execution list; the first virtual task is in an automatic completion state;
a first pre-dependent task obtaining module 503, configured to take the first virtual task as a matched pre-dependent task of the first sub-task.
According to the technical scheme, the tasks in the task execution list in the preset processing time are traversed, so that the current task is decoupled into the first sub-task according to the execution period of the current task and the preset processing time, the situation that the processing abnormality of the previous sub-data task affects the execution of the subsequent data task is avoided, and the timeliness of the data task processing is ensured; when the father tasks of the current task are all located outside the task execution list, a first virtual task corresponding to the father task is created according to the execution time of the first sub task, and then the first virtual task is used as a front-end dependent task of the first sub task, so that the father tasks outside the task execution list can be considered to be executed and completed, the front-end dependent condition of the current task which depends on the father task in the task execution list is ensured to be complete, the situation that the follow-up task cannot be executed due to incomplete front-end dependent task is avoided, meanwhile, the resource cost required by task processing is not increased by the first virtual task actually, the task processing time is not increased, and the high-efficiency execution of the task processing is ensured; in addition, the data task processing mode obviously does not need to be called by means of an additional function script, and the development cost of a task processing system is greatly reduced.
Optionally, the task processing device further includes a second pre-dependent task acquisition module;
the second pre-dependent task acquisition module is used for decoupling the at least one parent task into at least one second sub task if the fact that the current task has the matched at least one parent task is determined, and the at least one parent task is located in the task execution list; if the first type time exists in the preset processing time, creating at least one second virtual task corresponding to the at least one father task according to the first type time; wherein the first type of time is a time when a first subtask exists and a second subtask does not exist in at least one parent task; and taking the second virtual task or the second sub task as a matched pre-dependent task of the first sub task.
Optionally, the task processing device further includes a first post-dependent task acquisition module;
the first post-dependent task acquisition module is used for creating at least one third virtual task corresponding to the current task according to the second type moment if the second type moment exists in the preset processing time; wherein the second type of time is a time when the first subtask is not present and the second subtask is present in at least one of the parent tasks; and taking the first sub task or the third virtual task as a post-dependent task of the matched second sub task.
Optionally, the task processing device further includes a third pre-dependent task acquisition module;
a third pre-dependent task obtaining module, configured to decouple at least one first type parent task into at least one third sub-task if it is determined that there are multiple matched parent tasks for the current task, where the multiple parent tasks include at least one first type parent task and at least one second type parent task; wherein the first type of parent task is a parent task located in the task execution list; the second type of parent task is a parent task located outside the task execution list; if the third type of time exists in the preset processing time, creating at least one fourth virtual task corresponding to the at least one first type of father task according to the third type of time; the third type of time is a time when the first sub-task exists and the third sub-task does not exist in at least one father task of the first type; creating at least one fifth virtual task corresponding to the at least one second-type parent task according to the execution time of the first sub task; and taking the fourth virtual task and the fifth virtual task as the matched pre-dependent tasks of the first sub-task, or taking the third sub-task and the fifth virtual task as the matched pre-dependent tasks of the first sub-task.
Optionally, the task processing device further includes a second post-dependent task acquisition module;
the second post-dependent task acquisition module is used for creating at least one sixth virtual task corresponding to the current task in the task execution list according to a fourth type moment if the fourth type moment exists in the preset processing time; the fourth type of time is a time when the first sub task does not exist and the third sub task exists in at least one father task of the first type; and taking the sixth virtual task as a post-dependent task of the matched third sub-task.
Optionally, the task processing device further includes a third post-dependent task acquisition module;
a third post-dependent task obtaining module, configured to create at least one seventh virtual task corresponding to at least one sub-task according to the execution time of the first sub-task if it is determined that the current task has at least one matched sub-task and the at least one sub-task is located outside the task execution list; and taking the seventh virtual task as a post-dependent task of the matched first sub-task.
Optionally, the task processing device further includes a fourth post-dependent task acquisition module;
A fourth post-dependent task obtaining module, configured to, if it is determined that there are multiple matched subtasks in the current task, where the multiple subtasks include at least one first type subtask and at least one second type subtask, create an eighth virtual task corresponding to the at least one second type subtask according to an execution time of the first subtask; wherein the first type subtasks are subtasks located in the task execution list; the second type subtasks are subtasks located outside the task execution list; and taking the eighth virtual task as a post-dependent task of the matched first sub-task.
The device can execute the task processing method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method. Technical details not described in detail in this embodiment may refer to the task processing method provided in any embodiment of the present invention.
Example six
Fig. 6 shows a schematic diagram of the structure of an electronic device 10 that may be used to implement an embodiment of the invention. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. Electronic equipment may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 6, the electronic device 10 includes at least one processor 11, and a memory, such as a Read Only Memory (ROM) 12, a Random Access Memory (RAM) 13, etc., communicatively connected to the at least one processor 11, in which the memory stores a computer program executable by the at least one processor, and the processor 11 may perform various appropriate actions and processes according to the computer program stored in the Read Only Memory (ROM) 12 or the computer program loaded from the storage unit 18 into the Random Access Memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 may also be stored. The processor 11, the ROM 12 and the RAM 13 are connected to each other via a bus 14. An input/output (I/O) interface 15 is also connected to bus 14.
Various components in the electronic device 10 are connected to the I/O interface 15, including: an input unit 16 such as a keyboard, a mouse, etc.; an output unit 17 such as various types of displays, speakers, and the like; a storage unit 18 such as a magnetic disk, an optical disk, or the like; and a communication unit 19 such as a network card, modem, wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
The processor 11 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, digital Signal Processors (DSPs), and any suitable processor, controller, microcontroller, etc. The processor 11 performs the respective methods and processes described above, such as a task processing method.
In some embodiments, the task processing method may be implemented as a computer program tangibly embodied on a computer-readable storage medium, such as a storage unit. In some embodiments, part or all of the computer program may be loaded and/or installed onto the heterogeneous hardware accelerator via the ROM and/or the communication unit. One or more of the steps of the task processing method described above may be performed when the computer program is loaded into RAM and executed by a processor. Alternatively, in other embodiments, the processor may be configured to perform the task processing method in any other suitable manner (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for carrying out methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be implemented. The computer program may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a heterogeneous hardware accelerator having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and pointing device (e.g., a mouse or a trackball) through which a user can provide input to the heterogeneous hardware accelerator. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), blockchain networks, and the internet.
The computing system may include clients and servers. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical hosts and VPS service are overcome.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps described in the present invention may be performed in parallel, sequentially, or in a different order, so long as the desired results of the technical solution of the present invention are achieved, and the present invention is not limited herein.
The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.

Claims (10)

1. A method of task processing, comprising:
traversing tasks in a task execution list within preset processing time to decouple the current task into at least one first sub-task according to the execution period of the current task and the preset processing time;
if it is determined that at least one matched parent task exists in the current task and the at least one parent task is located outside the task execution list, at least one first virtual task corresponding to the at least one parent task is created according to the execution time of the first sub task; the first virtual task is in an automatic completion state;
And taking the first virtual task as a matched pre-dependent task of the first sub-task.
2. The method of claim 1, further comprising, after decoupling the current task into at least one first sub-task:
if it is determined that at least one matched parent task exists in the current task and the at least one parent task is located in the task execution list, decoupling the at least one parent task into at least one second sub task;
if the first type time exists in the preset processing time, creating at least one second virtual task corresponding to the at least one father task according to the first type time; wherein the first type of time is a time when a first subtask exists and a second subtask does not exist in at least one parent task;
and taking the second virtual task or the second sub task as a matched pre-dependent task of the first sub task.
3. The method of claim 2, further comprising, after decoupling the at least one parent task into at least one second subtask:
if the second type time exists in the preset processing time, creating at least one third virtual task corresponding to the current task according to the second type time; wherein the second type of time is a time when the first subtask is not present and the second subtask is present in at least one of the parent tasks;
And taking the first sub task or the third virtual task as a post-dependent task of the matched second sub task.
4. The method of claim 1, further comprising, after decoupling the current task into at least one first sub-task:
if it is determined that a plurality of matched father tasks exist in the current task, wherein the plurality of father tasks comprise at least one first-type father task and at least one second-type father task, decoupling the at least one first-type father task into at least one third sub task; wherein the first type of parent task is a parent task located in the task execution list; the second type of parent task is a parent task located outside the task execution list;
if the third type of time exists in the preset processing time, creating at least one fourth virtual task corresponding to the at least one first type of father task according to the third type of time; the third type of time is a time when the first sub-task exists and the third sub-task does not exist in at least one father task of the first type;
creating at least one fifth virtual task corresponding to the at least one second-type parent task according to the execution time of the first sub task;
And taking the fourth virtual task and the fifth virtual task as the matched pre-dependent tasks of the first sub-task, or taking the third sub-task and the fifth virtual task as the matched pre-dependent tasks of the first sub-task.
5. The method of claim 4, further comprising, after decoupling the at least one parent task of the first type into at least one third sub-task:
if the fourth type time exists in the preset processing time, creating at least one sixth virtual task corresponding to the current task in the task execution list according to the fourth type time; the fourth type of time is a time when the first sub task does not exist and the third sub task exists in at least one father task of the first type;
and taking the sixth virtual task as a post-dependent task of the matched third sub-task.
6. The method of claim 1, further comprising, after decoupling the current task into at least one first sub-task:
if at least one matched sub-task exists in the current task and the at least one sub-task is located outside the task execution list, creating at least one seventh virtual task corresponding to the at least one sub-task according to the execution time of the first sub-task;
And taking the seventh virtual task as a post-dependent task of the matched first sub-task.
7. The method of claim 1, further comprising, after decoupling the current task into at least one first sub-task:
if the fact that a plurality of matched subtasks exist in the current task is determined, wherein the plurality of subtasks comprise at least one first type subtask and at least one second type subtask, creating an eighth virtual task corresponding to the at least one second type subtask according to the execution time of the first subtask; wherein the first type subtasks are subtasks located in the task execution list; the second type subtasks are subtasks located outside the task execution list;
and taking the eighth virtual task as a post-dependent task of the matched first sub-task.
8. A task processing device, comprising:
the first sub-task acquisition module is used for traversing tasks in a task execution list within preset processing time so as to decouple the current task into at least one first sub-task according to the execution period of the current task and the preset processing time;
the first virtual task acquisition module is used for creating at least one first virtual task corresponding to at least one father task according to the execution time of the first sub task if the fact that the current task has the matched at least one father task and the at least one father task is located outside the task execution list is determined; the first virtual task is in an automatic completion state;
And the first pre-dependent task acquisition module is used for taking the first virtual task as a matched pre-dependent task of the first sub-task.
9. A task processing system, the task processing system comprising: the system comprises a task arrangement module, a task processing module, a task scheduling module and a task executing module; the task processing module is respectively in communication connection with the task scheduling module and the task scheduling module, and the task scheduling module is in communication connection with the task execution module; the task processing module is configured to execute the task processing method according to any one of claims 1 to 7.
10. A computer readable storage medium storing computer instructions for causing a processor to perform the task processing method of any one of claims 1-7.
CN202311559213.3A 2023-11-22 2023-11-22 Task processing method, device, system and storage medium Active CN117290113B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311559213.3A CN117290113B (en) 2023-11-22 2023-11-22 Task processing method, device, system and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311559213.3A CN117290113B (en) 2023-11-22 2023-11-22 Task processing method, device, system and storage medium

Publications (2)

Publication Number Publication Date
CN117290113A true CN117290113A (en) 2023-12-26
CN117290113B CN117290113B (en) 2024-02-13

Family

ID=89239328

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311559213.3A Active CN117290113B (en) 2023-11-22 2023-11-22 Task processing method, device, system and storage medium

Country Status (1)

Country Link
CN (1) CN117290113B (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010055719A (en) * 2008-08-29 2010-03-11 Toshiba Corp Resistance change memory device
CN102630316A (en) * 2011-12-22 2012-08-08 华为技术有限公司 Processing method and apparatus of concurrent tasks
CN104915251A (en) * 2015-06-05 2015-09-16 北京京东尚科信息技术有限公司 Task scheduling method and device
US20160378554A1 (en) * 2015-06-29 2016-12-29 Vmware, Inc. Parallel and Distributed Computing Using Multiple Virtual Machines
CN108108225A (en) * 2017-12-14 2018-06-01 长春工程学院 A kind of method for scheduling task towards cloud computing platform
US10318347B1 (en) * 2017-03-28 2019-06-11 Amazon Technologies, Inc. Virtualized tasks in an on-demand network code execution system
CN110895484A (en) * 2018-09-12 2020-03-20 北京奇虎科技有限公司 Task scheduling method and device
CN111679899A (en) * 2020-06-09 2020-09-18 微医云(杭州)控股有限公司 Task scheduling method, device, platform equipment and storage medium
WO2021093248A1 (en) * 2019-11-13 2021-05-20 上海商汤智能科技有限公司 Scheduling method and apparatus, electronic device, and storage medium
CN116663853A (en) * 2023-07-24 2023-08-29 太平金融科技服务(上海)有限公司 Task assigning method, device, computer equipment and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8881158B2 (en) * 2008-11-14 2014-11-04 Nec Corporation Schedule decision device, parallel execution device, schedule decision method, and program

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010055719A (en) * 2008-08-29 2010-03-11 Toshiba Corp Resistance change memory device
CN102630316A (en) * 2011-12-22 2012-08-08 华为技术有限公司 Processing method and apparatus of concurrent tasks
CN104915251A (en) * 2015-06-05 2015-09-16 北京京东尚科信息技术有限公司 Task scheduling method and device
US20160378554A1 (en) * 2015-06-29 2016-12-29 Vmware, Inc. Parallel and Distributed Computing Using Multiple Virtual Machines
US10318347B1 (en) * 2017-03-28 2019-06-11 Amazon Technologies, Inc. Virtualized tasks in an on-demand network code execution system
CN108108225A (en) * 2017-12-14 2018-06-01 长春工程学院 A kind of method for scheduling task towards cloud computing platform
CN110895484A (en) * 2018-09-12 2020-03-20 北京奇虎科技有限公司 Task scheduling method and device
WO2021093248A1 (en) * 2019-11-13 2021-05-20 上海商汤智能科技有限公司 Scheduling method and apparatus, electronic device, and storage medium
CN111679899A (en) * 2020-06-09 2020-09-18 微医云(杭州)控股有限公司 Task scheduling method, device, platform equipment and storage medium
CN116663853A (en) * 2023-07-24 2023-08-29 太平金融科技服务(上海)有限公司 Task assigning method, device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN117290113B (en) 2024-02-13

Similar Documents

Publication Publication Date Title
CN106802826B (en) Service processing method and device based on thread pool
CN108804215B (en) Task processing method and device and electronic equipment
EP3893112A2 (en) Method and apparatus for scheduling deep learning reasoning engines, device, and medium
CN109634989B (en) HIVE task execution engine selection method and system
CN112748993A (en) Task execution method and device, storage medium and electronic equipment
CN114428674A (en) Task scheduling method, device, equipment and storage medium
CN116126719A (en) Interface testing method and device, electronic equipment and storage medium
CN117290113B (en) Task processing method, device, system and storage medium
CN113722141B (en) Method and device for determining delay reason of data task, electronic equipment and medium
CN115438056A (en) Data acquisition method, device, equipment and storage medium
CN114064403A (en) Task delay analysis processing method and device
CN113034048A (en) Task processing method, device, server and storage medium
CN114153427A (en) Optimization method and system of continuous integration assembly line
CN110674214A (en) Big data synchronization method and device, computer equipment and storage medium
CN116244324B (en) Task data relation mining method and device, electronic equipment and storage medium
CN117667362B (en) Method, system, equipment and readable medium for scheduling process engine
CN114896075A (en) Image reconstruction method and device, electronic equipment and storage medium
CN117608786A (en) Data processing method, device, equipment and storage medium
CN118193389A (en) Test case generation method, device, equipment, storage medium and product
CN117806795A (en) Task scheduling method and device, electronic equipment and storage medium
CN117541356A (en) Order execution method, system, electronic equipment and storage medium
CN116405543A (en) Method, device, equipment and medium for dynamic scheduling of micro-services
CN114816433A (en) Encoding method, system, device and medium in project based on asynchronous programming
CN116821217A (en) Data distribution conversion method, device, equipment and storage medium
CN117608779A (en) Scheduling period determining method, device, equipment and 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