A job processing method, apparatus, and computer readable medium
By splitting jobs into tasks and reactivating their state when a failed task is detected, the problem of low job processing efficiency in batch scheduling systems is solved, achieving more efficient task processing.
Patent Information
- Application Number
- CN202310165417.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-24
- Publication Date
- 2025-12-19
- Estimated Expiration
- 2043-02-24
AI Technical Summary
Batch scheduling systems are inefficient in job processing, mainly because the job data is large and highly overlapping. After a processing failure, the entire job needs to be restarted, and failed business cannot be processed individually.
The job is broken down into tasks, processed according to business logic, and a failed task is reactivated as an executable task to avoid duplicate processing.
It improves the efficiency of task processing, reduces the waste of human resources, and ensures the accuracy of task status monitoring.
Smart Images

Figure CN116107720B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the technical field of data processing, and particularly relates to a job processing method and device and a computer readable medium. BACKGROUND
[0002] A batch scheduling system is a scheduling system responsible for batch program scheduling and the whole batch scheduling life cycle management, including unified management, scheduling and monitoring of jobs. In the process of providing unified management, scheduling and monitoring for job processing, due to a large amount of job data, a long processing time is required, resulting in low efficiency of job processing. SUMMARY
[0003] Therefore, the present application provides a job processing method, device and computer readable medium to solve the problem of low efficiency of the batch scheduling system in the process of job processing.
[0004] To solve the above problem, the present application provides the following solutions:
[0005] A job processing method comprises:
[0006] In response to detecting that a to-be-executed task in a current job is in an executable state in a scheduling system, processing the to-be-executed task in the current job according to a business processing logic of a previous job of the current job, the to-be-executed task being created by the previous job according to the business processing logic corresponding to the previous job; in the case that there is a failed task in the previous job, the to-be-processed task comprises a task created according to a failed task processing sub-logic of the previous job;
[0007] Obtaining a task processing result of the to-be-executed task in the current job;
[0008] Determining whether there is a failed task that fails to be processed in the to-be-executed task according to the obtained task processing result;
[0009] In response to the existence of the failed task, determining the failed task in the current job to be in an executable state, so as to re-perform task processing on the failed task in the current job in a next job of the current job.
[0010] Optionally, the processing of the to-be-executed task in the current job according to the business processing logic of the previous job of the current job in response to detecting that the to-be-executed task in the current job is in an executable state in the scheduling system comprises:
[0011] In response to detecting that a to-be-executed task in a current job is in an executable state in a scheduling system, processing the to-be-executed tasks created in the previous jobs in the current job according to a merging processing sub-logic according to the to-be-executed tasks created in the previous jobs in the current job.
[0012] The functionally identical tasks to be executed include the tasks created by the respective corresponding merging processing sub-logic according to the respective previous jobs and / or the tasks that have failed in the respective previous jobs and are re-determined as executable.
[0013] Optionally, the processing of the corresponding task in the current job according to the business processing logic of the previous job of the current job in response to the detection of the task to be executed in the current job being executable in the scheduling system comprises:
[0014] The processing of the respective tasks created according to the preset classification mode in the previous job and / or the tasks that have failed in the previous job and are re-determined as executable according to the sharding processing sub-logic in response to the detection of the task to be executed in the current job being executable in the scheduling system.
[0015] Optionally, the processing of the respective tasks created according to the preset classification mode in the previous job and / or the tasks that have failed in the previous job and are re-determined as executable according to the sharding processing sub-logic comprises:
[0016] The respective tasks created according to the preset classification mode and the respective tasks that have failed in the previous job and are re-determined as executable are processed in the threads corresponding to the respective tasks, and the threads correspond to the tasks one by one.
[0017] Optionally, the determination of the failed task in the current task as executable comprises:
[0018] The failed task is reactivated as executable in the current job according to the failed task processing sub-logic.
[0019] Optionally, the determination of the failed task in the current task as executable comprises:
[0020] In the case that all data processing of the failed task fails, the state of the failed task is set as executable.
[0021] In the case that part of data processing of the failed task fails, the failed part of data is newly created as a task in an executable state.
[0022] Optionally, the determination of the failed task in the current task as executable comprises:
[0023] In the manual processing case, if all data processing in the failed task fails, manually set the state of the failed task to an executable state; if part of the data processing in the failed task fails, newly create the failed part of the data as a task in an executable state for processing;
[0024] In the automatic processing case, adjust the failed state of the failed task to an executable state and wait for processing in the next job.
[0025] A job processing apparatus, comprising:
[0026] A processing unit, configured to, in response to detecting that a to-be-executed task in a current job is in an executable state in a scheduling system, process the corresponding to-be-executed task according to a business processing logic of a previous job of the current job in the current job, the to-be-executed task being created by the previous job according to the business processing logic corresponding to the previous job; in the case where there is a failed task in the previous job, the to-be-processed task includes a task created according to a failed task processing sub-logic corresponding to the previous job;
[0027] An obtaining unit, configured to obtain a task processing result of the to-be-executed task in the current job;
[0028] A first determining unit, configured to determine whether there is a failed task with processing failure in the to-be-executed task according to the obtained task processing result;
[0029] A second determining unit, configured to, in response to the existence of the failed task, determine the failed task in the current job to be in an executable state, so as to re-perform task processing on the failed task in the current job in a next job of the current job.
[0030] Optionally, the processing unit is specifically configured to:
[0031] In response to detecting that a to-be-executed task in a current job is in an executable state in a scheduling system, process, according to a merging processing sub-logic, to-be-executed tasks with the same function created in each of the previous jobs in the current job;
[0032] In the to-be-executed tasks with the same function, there are tasks created by each of the previous jobs according to a respective merging processing sub-logic and / or tasks that have failed in each of the previous jobs and have been determined to be in an executable state again.
[0033] A computer readable medium having a computer program stored thereon, the computer program being executable by a processor to implement the job processing method according to any one of the preceding embodiments.
[0034] From the above scheme, the job processing method, device and computer readable medium disclosed by the application can be known. In response to detecting that the to-be-executed task in the current job is in an executable state in the scheduling system, the corresponding to-be-executed task in the current job is processed according to the business processing logic of the previous job of the current job. The to-be-executed task is created by the previous job according to the business processing logic corresponding to the previous job. In the case that there is a failed task in the previous job, the to-be-processed task includes a task created according to the failed task processing sub-logic corresponding to the previous job. The task processing result of the to-be-executed task is obtained in the current job. It is determined whether there is a failed task in the to-be-executed task according to the obtained task processing result. In response to the existence of a failed task, the failed task in the current job is determined to be in an executable state, so as to re-perform task processing on the failed task in the current job in the next job of the current job. The application creates different tasks for processing according to the business processing logic, and sets the failed task to be executable for reprocessing, thereby improving the efficiency of job processing. BRIEF DESCRIPTION OF DRAWINGS
[0035] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed to be used in the embodiments or prior art description will be briefly introduced. Obviously, the drawings in the following description are only embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor on the basis of the provided drawings.
[0036] Figure 1 is a flow diagram of the job processing method provided by the present application;
[0037] Figure 2 is an example diagram of a job scheduling process of the job processing method provided by the present application;
[0038] Figure 3 is an example diagram of task state flow of the job processing method provided by the present application;
[0039] Figure 4 is an example diagram of job merging of the job processing method provided by the present application;
[0040] Figure 5 is an example diagram of job splitting of the job processing method provided by the present application;
[0041] Figure 6 is an example diagram of failed task processing of the job processing method provided by the present application;
[0042] Figure 7 is an example diagram of job execution process of the job processing method provided by the present application;
[0043] Figure 8 is a constituent structure diagram of the job processing device provided by the present application. DETAILED DESCRIPTION
[0044] 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. Obviously, the described embodiments are only some of the embodiments of the present application, but not all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work fall within the scope of protection of the present application.
[0045] The term "comprising" and variations thereof as used herein are open-ended, that is "including but not limited to". The term "based on" is "based, at least in part, on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Related definitions are given throughout the description.
[0046] It should be noted that the "first", "second", and the like concepts mentioned in the present application are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0047] It should be noted that the modification of "one" or "multiple" in the present application is illustrative and not restrictive, and those skilled in the art should understand that unless otherwise explicitly indicated in the context, it should be understood as "one or more".
[0048] The batch scheduling system provides unified management, scheduling and monitoring for the processing of jobs. In the known art, when processing jobs according to the business processing logic of the jobs, due to the large amount of data of the jobs and the high coincidence degree, and after the job processing fails, the entire job is re-launched to re-process, the failed business in the job cannot be individually launched for processing, resulting in low efficiency of job processing.
[0049] To solve the above problems, the present application discloses a job processing method, device and computer readable medium, which improves the efficiency of job processing in the batch scheduling system by hosting the job in the form of a task for processing.
[0050] Referring to Figure 1 the flowchart of the job processing method, the job processing method provided by the present application includes the following processing flow:
[0051] Step 101, in response to detecting that a to-be-executed task in a current job is an executable state, processing a corresponding to-be-executed task in the current job according to a business processing logic of a previous job of the current job, the to-be-executed task being created by the previous job according to the business processing logic corresponding to the previous job; in the case that there is a failed task in the previous job, the to-be-processed task includes a task created according to a failed task processing sub-logic of the previous job.
[0052] The scheduling system can be a batch scheduling system, which can provide unified management, scheduling and monitoring for batch processing of jobs, support end-of-day batch jobs, online batch jobs, and timed cyclic batch jobs. It should be noted that the application scenarios of the present application include but are not limited to end-of-day batch jobs and timed cyclic batch jobs of the batch scheduling system. The end-of-day batch job is a batch job that is run once a day by the batch scheduling system, and the timed cyclic batch job is a batch job that is executed multiple times a day by the batch scheduling system.
[0053] The present application divides the jobs scheduled in the batch scheduling system into tasks according to different business processing logics, which is equivalent to hosting the jobs in the form of tasks, and new tasks with small data volume are created from jobs with large data volume, thereby improving the processing efficiency of the jobs.
[0054] Specifically, based on the batch scheduling system, after introducing the task mechanism, the scheduling process of the job is as shown in Figure 2 The batch scheduling system still manages the jobs. It should be noted that the difference between the present application and the known technology is that the functions of the jobs are mainly divided into three types. The first type is to complete the specified business logic processing. The second type is to create a new task, which is created according to the business processing logic of the current job. The creation of the task is divided into internal creation and external creation. The internal creation means that the task is directly created by the job that creates the task, and the external creation means that the task is created in a business outside the batch environment. For example, a user triggers some operation, which is time-consuming and does not need to return the result in real time, and a new task can be created to wait for the batch scheduling system to execute the corresponding job to perform the corresponding task. For the creation of the task, the content of the task mainly includes the type of the task, the object of the task job, the execution date of the task, the ID of the task corresponding event, the invalidation time of the task, the end time of the task, the processing state of the task, the information of the creator, and other detailed information of the task, so as to facilitate the monitoring and management of the batch scheduling system for the task.
[0055] With the processing of the task, the task will also be in different states. An example of task state transition and transition condition is shown in Figure 3As shown, the entire life cycle of a task is divided into four states: new, processing, processing success, and processing failure. In known technologies, for job processing, a job can be restarted manually after processing failure. For the task in the present application, not only can the task state be manually modified, but a new timed cycle job can also be created to reposition the failed task to the new state, saving manpower and ensuring the accuracy of task state monitoring. Figure 3 As shown in the middle, tasks in the failure state, processing state, or success state can all be adjusted to the new state. When a task is in the new state, it will be in the processing state after execution. After task execution, if the task is successfully processed, it will be in the success state. If the task processing fails or data is abnormal, it will be in the failure state.
[0056] The executable state in this step is the new state, that is, once a task is in the new state, the task is by default in the executable state. In a batch scheduling system, jobs create tasks according to business processing logic. There are three main cases for creating executable tasks.
[0057] The first case is in the application scenario of job merging, in which multiple jobs with the same function and different call frequencies are merged by creating tasks. Each previous job creates a task with the corresponding function, and the current job executes the tasks created by each previous job with the same function. Referring to the job merging example shown in Figure 4 In known technologies, job 1 is executed and then job 3-1 is invoked to process the data passed by job 1. Job 2 is executed and then job 3-2 is invoked to process the data passed by job 2. Job 3-1 and job 3-2 only differ in the input data to be processed, but the effect of processing the data is the same. After introducing tasks, the data generated after the execution of the previous job exists in the form of a task, and the task defines the type of data generated after the execution of the previous job and the function of data processing implementation, as shown in Figure 4 As shown, task 1 is created after the execution of job 1, and task 1 is equivalent to job 3-1 in the form of a task. Task 2 is created after the execution of job 2, and task 2 is equivalent to job 3-2 in the form of a task. Then, job 3 is invoked to merge and process tasks 1 and 2 with the same function. This not only reduces the creation of job nodes, but also reduces the management difficulty of the batch scheduling system for jobs.
[0058] The second case is in the application scenario of job splitting, in which the data in the previous job is divided into different tasks according to a predetermined classification method, and the current job responsible for the corresponding business processing reads the tasks and processes the tasks according to the corresponding data. This achieves the splitting and processing of jobs in the form of tasks, as shown inFigure 5 As shown, the application provides a job fragmentation example diagram. Job 1 is divided into n tasks (task 1 to task n) according to a preset classification manner. Specifically, for the preset classification manner, there can be three kinds, but not limited to. The first kind is to divide according to the processing personnel. For example, when processing the personnel of an organization, the tasks can be divided according to the organization, and each task processes the data generated by the corresponding organization. The second kind is to divide according to time. For example, the data generated in a period of time can be divided according to days or hours, and each task processes the data of a time period. The third kind is to divide according to data type. For example, the data of a region is identified in the task type, and each task processes the data of the corresponding region. It should be noted that for the case where multiple tasks in the job fragmentation scenario are executed together, more external interfaces need to be called at the same time. Correspondingly, a large amount of time in the job processing process is used for interface request and response. At this time, the multi-threaded mode can be used for processing. The original single-threaded processing logic is realized by the multi-threaded mode. The fragmented tasks are distributed to the corresponding threads of the current job for processing. For example, the pseudo code for thread processing can be used:
[0059]
[0060]
[0061] This processing method of using tasks to fragment business data can fundamentally avoid repeated processing of data and facilitate multi-threaded processing.
[0062] The third case is that after each of the executable state to-be-executed tasks is executed in the corresponding job, a failed task appears. The failed task is newly created as a to-be-executed task in an executable state in the job where the failed task is executed.
[0063] Each of the to-be-executed tasks in the executable state is created according to the business processing logic of the previous job of the current job in the previous job of the current job. The specific business processing logic can be, but is not limited to, the merging processing sub-logic, the sharding processing sub-logic, and the failed task processing sub-logic corresponding to the three cases. It should be noted that for the execution scenarios of the three to-be-processed tasks, the to-be-processed tasks newly created in the job merging scenario and the failure processing scenario can be processed in the same job, that is, the tasks newly created after the failure of the previous job can be processed in the current job together with the tasks of the same function newly created according to the merging processing sub-logic of the previous job. The to-be-processed tasks newly created in the job sharding scenario and the failure processing scenario can be processed in the same job, that is, the tasks newly created after the failure of the previous job can be processed in the current job together with the tasks newly created according to the sharding processing sub-logic of the previous job.
[0064] Step 102, obtaining the task processing result of the to-be-executed task in the current job.
[0065] After the to-be-executed task is processed in the current job, the corresponding task processing result is obtained. The task processing result includes two cases, one is task success, and the other is task failure. It can be understood that after normal processing of the task, the task is marked as a success state. After abnormal failure, the processed data information, task information, and failure information are recorded in the failure log, and the state of the task is marked as a failure state.
[0066] Step 103, determining whether there is a failed task in the to-be-executed task according to the obtained task processing result.
[0067] After obtaining the task processing result, it is determined whether there is a failed task after the to-be-executed task is executed.
[0068] Step 104, in response to the existence of the failed task, determining the failed task as an executable state, so as to re-process the task in the next job of the current job.
[0069] In the batch scheduling system, three problems may occur, such as failure of calling an external interface, database exception, program error, and application defect. These problems may need to re-schedule the failed job for processing. However, in the present application, after detecting the existence of the failed task, the failed task is reactivated as an executable state according to the corresponding failed task processing sub-logic in the current job, and waits to be reprocessed in the next job. It is not necessary to re-schedule the entire job for processing. See Figure 6The failure task processing example diagram provided by the application only reprocesses the failure task activation, avoids the need to start the entire job in the prior art, processes a large amount of repeated data, and improves the efficiency of task processing.
[0070] Specifically, in the case of task failure, one of the manual and automatic processing methods can be used to process the failure task.
[0071] When all data processing in the failure task fails, whether it is a manual processing method or an automatic processing method, the state of the failure task is directly set to an executable state.
[0072] When part of the data processing in the failure task fails, in one embodiment, whether it is manual or automatic, only the part of the data that fails can be newly created as a new task in an executable state, and the part of the data that does not fail is not executed again. For manual processing, optionally, not only can the part of the data that fails be newly created as a new task in an executable state, but also the abnormal data that causes the failure can be specifically prompted to the user, so that the user can intuitively understand the reason for the failure task.
[0073] When part of the data processing in the failure task fails, in another embodiment, only in the manual processing method, the part of the data that fails is newly created as a new task in an executable state, and in the automatic method, once the failure task is detected, the failure task is directly adjusted to an executable state and waits for processing in the next job.
[0074] In summary, the job processing method disclosed in the application responds to the detection of a to-be-executed task in a current job being in an executable state in a scheduling system, processes the corresponding to-be-executed task according to the business processing logic of a previous job of the current job in the current job, and the to-be-executed task is created by the previous job according to the business processing logic corresponding to the previous job. In the case where there is a failure task in the previous job, the to-be-processed task includes a task created according to a failure task processing sub-logic corresponding to the previous job, the task processing result of the to-be-executed task is obtained in the current job, it is determined whether there is a failure task that fails to process in the to-be-executed task according to the obtained task processing result, the failure task in the current job is determined to be in an executable state in response to the existence of the failure task, so as to reprocess the failure task in the current job in the next job of the current job. The application creates different tasks according to the business processing logic, and sets the failure task to be in an executable state for reprocessing, thereby improving the efficiency of job processing.
[0075] Optionally, referring to Figure 7 , a job execution flow example diagram of the job processing method is further provided.
[0076] Specifically, the job starts to execute, and at the start, it is first determined whether the corresponding task is in a new state. If it is not in the new state, it is directly ended. If it is in the new state, the task processing state is marked as being processed, and the corresponding business processing is performed. After the processing is normally ended, the task is marked as a success state. After an abnormal failure, the task is marked as a failure state. For the failed task, the processing state of the task can be manually modified to the new state, and the failed task can be re-run when the job is started again.
[0077] For the above job processing method, the application further provides a job processing device. The device is composed of Figure 8 as shown in the figure, comprising:
[0078] The processing unit 10 is configured to, in response to detecting that a to-be-executed task in a current job is in an executable state, process the corresponding to-be-executed task in the current job according to a business processing logic of a previous job of the current job, the to-be-executed task being created by the previous job according to a corresponding business processing logic of the previous job; in the case where there is a failed task in the previous job, the to-be-processed task includes a task created according to a failed task processing sub-logic of the previous job;
[0079] The acquisition unit 20 is configured to acquire a task processing result of the to-be-executed task in the current job;
[0080] The first determination unit 30 is configured to determine whether there is a failed task that fails to be processed in the to-be-executed task according to the acquired task processing result;
[0081] The second determination unit 40 is configured to, in response to the existence of the failed task, determine the failed task in the current job to be in an executable state, so as to re-perform task processing on the failed task in the current job in a next job of the current job.
[0082] In an embodiment, the processing unit 10 is specifically configured to:
[0083] In response to detecting that a to-be-executed task in a current job is in an executable state, process the to-be-executed tasks created in each of the previous jobs in the current job according to a merged processing sub-logic, the to-be-executed tasks being the same in function.
[0084] Among the to-be-executed tasks that are the same in function, there are tasks created by each of the previous jobs according to a corresponding merged processing sub-logic and / or tasks that fail to be executed in each of the previous jobs and are re-determined to be in an executable state.
[0085] In an embodiment, the processing unit 10 is specifically configured to:
[0086] In response to detecting that the to-be-executed task in the current job is in an executable state, each task created in the previous job according to a preset classification manner and / or a task that fails to execute in the previous job and is re-determined to be in an executable state is processed according to a sharding processing sub-logic.
[0087] In an embodiment, the processing unit 10 is specifically configured to:
[0088] process the each task created in the previous job according to a preset classification manner and the each task that fails to execute in the previous job and is re-determined to be in an executable state in a thread corresponding to the each task, the thread corresponding to the task in one-to-one manner.
[0089] In an embodiment, the second determining unit 40 is specifically configured to:
[0090] reactivate the failed task to be in an executable state according to a failed task processing sub-logic in the current job.
[0091] In an embodiment, the second determining unit 40 is specifically configured to:
[0092] in a case where all data processing in the failed task fails, set the state of the failed task to be in an executable state;
[0093] in a case where part of data processing in the failed task fails, newly create the part of data that fails to process into a task in an executable state.
[0094] In an embodiment, the second determining unit 40 is specifically configured to:
[0095] in a case of manual processing, if all data processing in the failed task fails, manually set the failed state of the failed task to be in an executable state; if part of data processing in the failed task fails, newly create the part of data that fails to process into a task in an executable state;
[0096] in a case of automatic processing, adjust the failed state of the failed task to be in an executable state and wait for processing in a next job.
[0097] In addition, the embodiment of the present application further provides a computer readable medium, which stores a computer program, and the computer program is executed by a processor to implement each processing step of the job processing method.
[0098] It should be noted that each embodiment in the present specification is described in a progressive manner, and each embodiment focuses on the difference from other embodiments, and the same and similar parts of each embodiment can be referred to each other.
[0099] For ease of description, the above system or apparatus is described in various modules or units respectively in terms of functions. Of course, the functions of each unit can be implemented in one or more software and / or hardware in implementing the present application.
[0100] From the above description of the embodiments, those skilled in the art can clearly understand that the present application can be implemented by means of software plus necessary universal hardware platforms. Based on such an understanding, the technical solutions of the present application can be embodied in the form of a software product, and the computer software product can be stored in a storage medium, such as a ROM / RAM, a magnetic disk, an optical disk, and the like, and includes a plurality of instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) execute the methods described in various embodiments or some parts of the embodiments of the present application.
[0101] Finally, it should be noted that in this document, relational terms such as first and second and third and fourth, and the like can merely be used to distinguish one entity or action from another, without necessarily requiring or implying any actual such relationship or order between or among the entities or actions. Moreover, the terms "comprises", "comprising", or any other variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element preceded by "comprises a" does not, without more constraints, foreclose the existence of additional identical elements in the process, method, article, or apparatus that comprises the recited element.
[0102] The above only describes the preferred embodiments of the present application, and it should be noted that for those skilled in the art, without departing from the principles of the present application, a number of improvements and refinements can be made, and these improvements and refinements should also be considered as the protection scope of the present application.
Claims
1. A job processing method characterized by comprising: The application relates to a method for processing tasks in a scheduling system. In response to detecting that a to-be-executed task in a current job is in an executable state, a corresponding to-be-executed task is processed in the current job according to a business processing logic of a previous job of the current job, and the to-be-executed task is created by the previous job according to the business processing logic corresponding to the previous job. In the case that there is a failed task in the previous job, the to-be-processed task comprises a task created according to a failed task processing sublogic corresponding to the previous job. A task processing result of the to-be-executed task is obtained in the current job. It is determined whether there is a failed task in the to-be-executed task according to the obtained task processing result. In response to the existence of the failed task, the failed task in the current job is determined to be in an executable state, so that the failed task in the current job is reprocessed in a next job of the current job.
2. The method of claim 1, wherein, The method comprises the following steps. In response to detecting that a to-be-executed task in a current job is in an executable state, functionally identical to-be-executed tasks created in each of the previous jobs are processed in the current job according to a merging processing sublogic. The functionally identical to-be-executed tasks comprise tasks created by each of the previous jobs according to a corresponding merging processing sublogic and / or tasks that are executed in each of the previous jobs and are re-determined to be in an executable state.
3. The method of claim 1, wherein, The method comprises the following steps. In response to detecting that a to-be-executed task in a current job is in an executable state, tasks created in the previous jobs according to a preset classification mode and / or tasks that are executed in the previous jobs and are re-determined to be in an executable state are processed according to a sharding processing sublogic.
4. The method of claim 3, wherein, The tasks created in the previous jobs according to the preset classification mode and / or the tasks that are executed in the previous jobs and are re-determined to be in an executable state are processed in threads corresponding to the tasks. The method comprises the following steps.
5. The method of claim 1, wherein, The failed task in the current job is reactivated to be in an executable state according to a failed task processing sublogic in the current job. The method comprises the following steps.
6. The method of claim 1, wherein, In the case that all data processing of the failed task fails, the state of the failed task is set to be in an executable state. In the case that part of data processing of the failed task fails, the part of data processing that fails is newly created as a task in an executable state. 7. The method of claim 1, wherein, The failure task in the current job is determined as an executable state, comprising: In the case of manual processing, if all data processing in the failure task fails, manually set the state of the failure task as an executable state; if part of the data processing in the failure task fails, the failed part of the data is newly created as a task in an executable state; In the case of automatic processing, the failure state of the failure task is adjusted to an executable state waiting for processing in the next job.
8. A job processing apparatus characterized by comprising: Comprise: The processing unit is configured to, in response to detecting that a to-be-executed task in a current job is in an executable state, process the corresponding to-be-executed task in the current job according to a business processing logic of a previous job of the current job, the to-be-executed task being created by the previous job according to the business processing logic corresponding to the previous job; In the case that there is a failure task in the previous job, the to-be-processed task comprises a task created according to a failure task processing sub-logic corresponding to the previous job; The obtaining unit is configured to obtain a task processing result of the to-be-executed task in the current job; The first determining unit is configured to determine whether there is a failure task in the to-be-executed task according to the obtained task processing result; The second determining unit is configured to, in response to the existence of the failure task, determine the failure task in the current job as an executable state, so as to re-process the task in the failure task in the current job in the next job of the current job.
9. The apparatus of claim 8, wherein, The processing unit is specifically configured to: In response to detecting that a to-be-executed task in a current job is in an executable state, process the to-be-executed tasks created in each of the previous jobs in the current job according to a merging processing sub-logic, the to-be-executed tasks being the same in function; Wherein, the to-be-executed tasks that are the same in function comprise tasks created by each of the previous jobs according to a respective merging processing sub-logic and / or tasks that have failed in execution in each of the previous jobs and have been determined as executable states again.
10. A computer readable medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the job processing method of any one of claims 1-7.
Citation Information
Patent Citations
Job task processing method and device of computing system, storage medium and processor
CN112486646A
Batch job processing method and system, computer equipment and readable storage medium
CN112559155A