Batch job processing method and device, equipment, storage medium and program product

By calculating the latest start time for each job and taking emergency measures, the problem of batch job delays caused by unfinished previous jobs is solved, and the processing efficiency of batch jobs and the stability of the system are improved.

CN120762892APending Publication Date: 2025-10-10INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510872527.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-26
Publication Date
2025-10-10

AI Technical Summary

Technical Problem

In banking software systems, the subsequent operations are forced to wait passively because the previous operations are not completed, resulting in low efficiency in batch processing and seriously affecting overall timeliness.

Method used

By obtaining the job information and dependencies of batch jobs, the latest start time of each job is calculated, and emergency measures are taken when the job execution status times out, including generating alarm information and executing emergency procedures or manual takeover, to ensure that the job starts on time.

Benefits of technology

It improves the processing efficiency and stability of batch jobs, avoids delays caused by waiting, and ensures that the system completes the job within the specified time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120762892A_ABST
    Figure CN120762892A_ABST
Patent Text Reader

Abstract

The invention provides a batch job processing method and device, equipment, a storage medium and a program product, and relates to the technical field of automatic job processing. Comprising the steps of obtaining job information of each job in batch jobs to be processed; determining the latest starting time of each job according to the job basic information and the dependency relationship among the jobs; acquiring a job execution state; according to the operation execution state and the latest start time, whether the operation is emergency disposal operation is judged; and if the operation is the emergency disposal operation, performing emergency disposal on the operation. According to the method and the device, the problem that the processing efficiency of batch jobs is relatively low due to the fact that the subsequent jobs often fall into passive waiting due to the fact that the previous jobs are not completed and the overall timeliness is seriously influenced in the prior art is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of automated processing operations, and in particular to a batch operation processing method, apparatus, device, storage medium, and program product. Background Art

[0002] In banking software systems, the timeliness of batch jobs is crucial, as their execution efficiency directly impacts overall system performance and user experience. To ensure efficient operation, batch job execution times must be strictly controlled to avoid chain reactions caused by job delays.

[0003] In existing technologies, in inter-application job scenarios with dependencies, such as file read / write jobs, subsequent jobs often wait for their predecessors to complete, preventing them from starting in a timely manner. This severely impacts overall timeliness.

[0004] Among them, the latter task is often stuck in a passive waiting state due to the incompleteness of the previous task, which seriously affects the overall timeliness and leads to low efficiency in batch processing. Summary of the Invention

[0005] The present application provides a batch job processing method, apparatus, device, storage medium, and program product to address the problem that, in the existing batch job processing, subsequent jobs are often forced to wait passively due to the incompleteness of previous jobs, seriously affecting the overall timeliness and thus resulting in low efficiency in batch job processing.

[0006] In a first aspect, the present application provides a batch job processing method, comprising:

[0007] Obtain job information for each job in the batch job to be processed; the job information includes basic job information and dependencies between jobs;

[0008] Determine the latest start time for each job based on basic job information and inter-job dependencies;

[0009] Get the job execution status;

[0010] Determine whether the operation is an emergency response operation based on the operation execution status and the latest start time;

[0011] If the operation is an emergency response operation, emergency response shall be carried out on the operation.

[0012] In a possible design, the latest start time of each job is determined based on basic job information and inter-job dependencies, including:

[0013] Build a dependency graph based on basic job information and dependencies between jobs;

[0014] Determine the execution time of each job;

[0015] Based on the dependency graph and execution time, determine the latest start time for each job.

[0016] In one possible design, the latest start time of each job is determined based on the dependency graph and execution time, including:

[0017] Get the latest completion time of pending batch jobs;

[0018] The latest start time of the activity is calculated based on the critical path algorithm according to the latest finish time, dependency graph and execution time.

[0019] In one possible design, determining the execution time of each job includes:

[0020] Get historical execution data of the job;

[0021] Determine multiple historical execution times corresponding to the job based on historical execution data;

[0022] Determine the job execution time based on the average of multiple historical execution times.

[0023] In one possible design, emergency response to operations includes:

[0024] Generate alarm information for operations and issue emergency alarms based on the alarm information;

[0025] Carry out emergency dispatch and processing for operations.

[0026] In one possible design, emergency dispatch processing is performed for the operation, including:

[0027] Get the job type of the job;

[0028] Perform emergency dispatch processing on the job based on the job type.

[0029] In a possible design, the job type includes a file receiving job type and a file non-receiving job type;

[0030] Accordingly, emergency dispatch processing is performed on the job according to the job type, including:

[0031] If the job type is a receive file job type, the emergency procedure is started to write a preset empty file into the job;

[0032] If the job type is not a file receiving job type, the manual takeover procedure is started.

[0033] In a possible design, if the job type is a file receiving job type, then after initiating an emergency procedure to write a preset empty file into the job, the following steps are further included:

[0034] Store the file information corresponding to the job in a preset database;

[0035] Perform data compensation on the job based on the file information in the preset database.

[0036] In a second aspect, the present application provides a batch job processing device, comprising:

[0037] A first acquisition module is used to acquire job information of each job in the batch job to be processed; wherein the job information includes basic job information and dependencies between jobs;

[0038] The first determination module is used to determine the latest start time of each job based on basic job information and dependencies between jobs;

[0039] The second acquisition module is used to obtain the job execution status;

[0040] A judgment module is used to determine whether a job is an emergency response job based on the job execution status and the latest start time;

[0041] The processing module is used to perform emergency disposal on the operation if the operation is an emergency disposal operation.

[0042] In a third aspect, the present application provides an electronic device, comprising: a processor, and a memory communicatively connected to the processor;

[0043] Memory stores computer-executable instructions;

[0044] The processor executes the computer-executable instructions stored in the memory to implement a batch job processing method as described in the first aspect of the invention.

[0045] In a fourth aspect, the present application provides a computer-readable storage medium storing computer-executable instructions. When the computer-executable instructions are executed by a processor, they are used to implement a batch job processing method as described in the first aspect of the invention.

[0046] In a fifth aspect, the present application provides a computer program product, including a computer program, which, when executed by a processor, implements a batch job processing method according to the first aspect of the invention.

[0047] The present application provides a method, apparatus, device, storage medium and program product for processing batch jobs, including: obtaining the job information of each job in the batch jobs to be processed; determining the latest start time of each job based on the basic information of the job and the dependency relationship between jobs; obtaining the job execution status; judging whether the job is an emergency disposal job based on the job execution status and the latest start time; if the job is an emergency disposal job, performing emergency disposal on the job. Compared with the existing technology, the latter job often falls into passive waiting due to the incompleteness of the former job, which seriously affects the overall timeliness, resulting in low processing efficiency of batch jobs. The present application calculates the latest start time of each job based on the dependency relationship between jobs, and implements emergency disposal of the job based on the latest start time, thereby improving the stability of the job and thus improving the processing efficiency of batch jobs. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following is a brief introduction to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0049] Figure 1 A schematic diagram of the system architecture of a batch job processing method provided in an embodiment of the present application Figure 1 ;

[0050] Figure 2 A schematic diagram of a batch job processing method provided in an embodiment of the present application Figure 1 ;

[0051] Figure 3 A schematic diagram of a batch job processing method provided in an embodiment of the present application Figure 2 ;

[0052] Figure 4 A schematic diagram of a batch job processing method provided in an embodiment of the present application Figure 3 ;

[0053] Figure 5 A schematic diagram of a batch job processing method provided in an embodiment of the present application Figure 4 ;

[0054] Figure 6 A schematic diagram of the structure of a batch job processing device provided in an embodiment of the present application;

[0055] Figure 7 A schematic structural diagram of an electronic device provided in an embodiment of the present application;

[0056] Figure 8 A schematic diagram of the system architecture of a batch job processing method provided in an embodiment of the present application Figure 2 ;

[0057] Figure 9 A diagram of job dependencies provided in an embodiment of the present application;

[0058] Figure 10 This is an emergency flow chart for receiving file operations provided in an embodiment of the present application. DETAILED DESCRIPTION

[0059] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, identical numerals in different figures represent identical or similar elements, unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.

[0060] In the embodiments of the present application, words such as "first" and "second" are used to distinguish between identical or similar items with substantially the same functions and effects. Those skilled in the art will understand that words such as "first" and "second" do not limit the quantity and execution order, and words such as "first" and "second" do not necessarily limit differences. It should be noted that in the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described in this application as "exemplary" or "for example" should not be interpreted as being more preferred or advantageous than other embodiments or design schemes. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a concrete way. In the embodiments of the present application, "at least one" refers to one or more, and "more" refers to two or more.

[0061] It should be noted that the phrase "at the time of..." in the embodiments of this application can refer to the instant a certain event occurs, or a period of time after the event occurs, and this is not specifically limited in this embodiment of the application. Furthermore, the batch job processing method provided in the embodiments of this application is merely an example, and the batch job processing method may include more or less content.

[0062] Loan supervision refers to the control and management process of supervising and managing the implementation of pre-loan conditions in the credit approval document and the payment of credit funds after the credit business is approved, and deciding whether to issue and pay credit funds.

[0063] In a bank software system, the timeliness of batch jobs is crucial, and the execution efficiency directly affects the overall performance of the system and user experience. To ensure efficient operation, the execution time of batch jobs needs to be strictly controlled to avoid chain reactions caused by job delays.

[0064] However, at present, for jobs such as file reading and writing jobs between sub-applications with dependency relationships, the receiving file job of the latter application often remains in waiting due to the uncompleted sending file job of the former application, resulting in the inability of the latter job to start in time.

[0065] Based on this, the embodiments of the present application provide a batch job processing method, device, equipment, storage medium and program product, which can be used in the field of automatic job processing, and aim to solve the above technical problems of the prior art.

[0066] The application concept of the present application is that, to solve the above problems, the inventors found that the latter job often remains in passive waiting due to the uncompleted former job, resulting in the inability of the latter job to start in time, thereby seriously affecting the overall timeliness. Based on this, the inventors calculate the latest start time of each job based on the dependency relationship between jobs, and realize emergency disposal of the job based on the latest start time. Based on this, the present application provides a batch job processing method to further improve the efficiency of batch job processing.

[0067] The technical solutions of the present application and how the technical solutions of the present application solve the above technical problems will be described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of the present application will be described below with reference to the accompanying drawings.

[0068] Figure 1 A system architecture diagram of a batch job processing method provided by the embodiments of the present application is shown in the figure. Figure 1 In the above architecture, the above architecture includes at least one of a data acquisition device 101, a processing device 102 and a display device 103.

[0069] It can be understood that the structure shown in the embodiments of the present application does not constitute a specific limitation on the system architecture of the batch job processing. In other feasible embodiments of the present application, the above architecture can include more or fewer components than the figure, or combine certain components, or split certain components, or different component arrangement, which can be determined according to actual application scenarios, and is not limited here. Figure 1 The components shown can be realized by hardware, software, or a combination of software and hardware.

[0070] In the implementation process, the data acquisition device 101 can include an input / output interface and can also include a communication interface. The data acquisition device 101 can be connected to the processing device through the input / output interface or the communication interface to obtain a plurality of data related to the batch job to be processed.

[0071] The processing device 102 can process the data according to the collected data according to the processing method of the batch job.

[0072] The display device 103 can also be a touch display screen or a screen of a terminal device, and is used to display the above-mentioned content to realize the interaction with the user.

[0073] It should be understood that the above-mentioned processing device can be realized by reading the instructions in the memory by the processor and executing the instructions, or can be realized by a chip circuit.

[0074] Figure 8 A system architecture of a batch job processing method provided by the embodiment of the application Figure 2 In the embodiment, the above-mentioned architecture includes at least one of a batch controller 801, a batch executor 802, and a batch database group 803. Figure 8 In the embodiment, the above-mentioned architecture includes at least one of a batch controller 801, a batch executor 802, and a batch database group 803.

[0075] Optionally, the batch controller 801 is responsible for job scheduling and job execution process control, and is the core of the whole system. The specific responsibilities of the batch controller 801 are as follows: calculating the latest start time of each job before job execution, generating a job instance and scheduling the job to run, monitoring the job running in real time during the job execution, and making emergency disposal according to the emergency plan after the job sends an alarm.

[0076] Optionally, the batch executor 802 is responsible for receiving the job scheduling instruction initiated by the controller and is the receiver of the batch job. The batch executor 802 can run the program of the batch job and the emergency disposal program of the job. After receiving the instruction of the batch controller 801, the batch executor 802 interprets the instruction and executes the corresponding job program or emergency disposal program.

[0077] Optionally, the batch database group 803 is used to store job definitions and various information, which includes the dependency relationship between jobs in the sub-application, the job dependency between sub-applications, the latest start time of the job, and the like.

[0078] Specifically, before execution, the batch controller 801 calculates the latest start time of each job through a critical path algorithm.

[0079] Specifically, in the job execution, the batch controller 801 automatically determines whether the job start time exceeds the threshold by periodically communicating with each batch executor 802 to obtain the job execution status, and automatically issues an alarm and automatically takes the emergency measures previously entered when the latest start time is exceeded.

[0080] Specifically, after execution, the batch controller 801 reissues the file for the job of the received file type that has executed the emergency measures through the data compensation mechanism.

[0081] In addition, the network architecture and business scenarios described in the embodiments of the present application are used to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided by the embodiments of the present application. Those skilled in the art can know that, with the evolution of network architecture and the appearance of new business scenarios, the technical solutions provided by the embodiments of the present application are also applicable to similar technical problems.

[0082] It should be noted that the user information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or authorized by all parties, and the collection, use and processing of related data need to comply with relevant laws, regulations and standards, and provide corresponding operation portal for user to choose authorization or refusal.

[0083] The technical solutions of the present application will be described in detail below in conjunction with specific embodiments:

[0084] Figure 2 A batch job processing method flow provided by the embodiments of the present application Figure 1 As shown in the method, the method comprises: Figure 2

[0085] S201, obtaining job information of each job in a batch job to be processed; wherein the job information comprises job basic information and inter-job dependency relationship.

[0086] S202, determining the latest start time of each job according to the job basic information and the inter-job dependency relationship.

[0087] In the present embodiment, before the job execution, the latest start time of each job is calculated according to the job basic information and the inter-job dependency relationship.

[0088] S203, obtaining a job execution state.

[0089] S204, judging whether the job is an emergency disposal job according to the job execution state and the latest start time.

[0090] ​S205: If the operation is an emergency response operation, perform emergency response on the operation.

[0091] This embodiment provides a method for processing batch jobs, including: obtaining job information of each job in the batch jobs to be processed; determining the latest start time of each job based on the basic job information and the dependency relationship between jobs; obtaining the job execution status; judging whether the job is an emergency disposal job based on the job execution status and the latest start time; if the job is an emergency disposal job, performing emergency disposal on the job. Compared with the prior art, the latter job often falls into passive waiting due to the incompleteness of the former job, which seriously affects the overall timeliness, resulting in low processing efficiency of batch jobs. This application calculates the latest start time of each job based on the dependency relationship between jobs, and implements emergency disposal of jobs based on the latest start time, thereby improving the stability of the job and thus improving the processing efficiency of batch jobs.

[0092] Figure 3 A schematic diagram of a batch job processing method provided in an embodiment of the present application Figure 2 ,like Figure 2 As shown, the specific implementation steps of the above S202 include:

[0093] S301: Construct a dependency graph based on basic job information and dependencies between jobs.

[0094] In this embodiment, dependencies between jobs are sorted out, a dependency graph is constructed, and node information and edge information of the dependency graph are written into a batch database.

[0095] Nodes represent the basic units in the dependency graph, usually corresponding to specific jobs or tasks. Each node contains key attributes that describe the job.

[0096] For example, a node may include basic identification information: job ID, job name, and job type.

[0097] For example, a node may include business attributes: description, input / output, and execution logic.

[0098] For example, a node can include scheduling properties: timeout, retry policy, priority.

[0099] For example, a node may include state information: current state, execution time, system.

[0100] Edges represent dependencies between jobs, meaning that the execution of one job depends on the results of another. Edges typically point from the predecessor job (parent node) to the successor job (child node), indicating that the child node depends on the parent node.

[0101] For example, the edge can include: edge id, source node id, target node id, strong dependency, weak dependency, data dependency, and trigger condition.

[0102] For example, the trigger condition can include: state condition and data condition.

[0103] In a possible embodiment, Figure 9 The job dependency relationship diagram provided by the embodiment of the application is shown in FIG. 1. Figure 9 As shown in the figure, the interaction among the four applications A, B, C and D is realized through the dependency relationship among jobs, forming a chain of file transmission and processing.

[0104] Specifically, the sub-application A and the sub-application B serve as data sources, and respectively execute respective jobs (job_A1 and job_B1) to send files to the sub-application C. The two jobs (job_A1 and job_B1) can be regarded as pre-jobs of a job (job_C1) of the sub-application C receiving files, meaning that the execution of job_C1 depends on the successful completion of job_A1 and job_B1. Only when the sub-application A and the sub-application B both successfully send files to the sub-application C, can job_C1 start the operation of receiving files.

[0105] Specifically, the sub-application C serves as a data processing center, and the internal job flow is in turn job_C1 receiving files, job_C2 processing files, and job_C3 sending files. There is also a strict dependency relationship among the three jobs. Job_C1 must first complete the reception of files, and then job_C2 can start processing the files; and after job_C2 processes the files, job_C3 can send the processed files. Finally, job_C3 sends the processed files to job_D1 of the sub-application D, completing the entire file transmission and processing flow.

[0106] Specifically, the sub-application D serves as a final data receiver, and receives the processed files sent by the sub-application C by executing job_D1.

[0107] It should be noted that by analyzing the dependency relationship among jobs and constructing a dependency relationship diagram, the execution order of each job can be clearly determined, and it is ensured that when a job is executed, the subsequent job will not wait because the pre-job is not completed, thereby improving the execution efficiency of the entire batch job. The node information (job information) of the dependency relationship diagram and the information (dependency relationship) of the edge are written into a batch database, providing a necessary data basis for subsequent calculation of the latest start time of each job based on a critical path algorithm. This helps to accurately control the execution time of the job and avoid timeout.

[0108] It's also important to note that storing dependency information in the database facilitates subsequent data traceability and auditing. When problems arise, you can query the database to understand the dependencies and execution status of jobs, providing powerful support for troubleshooting and resolution.

[0109] S302: Determine the execution time of each job.

[0110] S303: Determine the latest start time of each job based on the dependency graph and execution time.

[0111] Specifically, get the latest completion time of the pending batch jobs.

[0112] Furthermore, the latest start time of the job is calculated based on the critical path algorithm according to the latest completion time, the dependency graph and the execution time.

[0113] In this embodiment, the latest start time of each job is calculated based on the dependency graph and the execution time using a critical path algorithm, and the latest start time of each job is written into a database.

[0114] The specific algorithm steps are as follows:

[0115] Step 1: Obtain the job dependency order through topological sorting.

[0116] It's important to note that topological sorting is the basis for calculating the latest start time. It sorts the job dependency graph to ensure that jobs are executed in an orderly manner according to their dependencies. This avoids execution errors and unnecessary waiting caused by disorganized dependencies, significantly improving the overall timeliness of the system.

[0117] For example, the code is as follows:

[0118]

[0119]

[0120] Step 2: Calculate the latest start time of each job.

[0121] For example, the code is as follows:

[0122]

[0123] For example, to avoid affecting the next day's business, all batch operations must be completed before 7:00 AM. After steps 1 and 2, the results obtained by the critical path algorithm are shown in Table 3:

[0124]

[0125] Table 3

[0126] It should be noted that to prevent the chain triggering of warnings for subsequent dependent jobs, an estimated execution time of five minutes needs to be reserved for the emergency procedure.

[0127] Among them, it provides a basis for emergency response to minimize the impact of operation delays on the overall operation of the system.

[0128] In this embodiment, a dependency graph is constructed based on basic job information and inter-job dependencies. Then, based on the latest completion time, the dependency graph, and execution time, a critical path algorithm is used to calculate the latest job start time. This clearly determines the execution order of each job, ensuring that subsequent jobs are not forced to wait due to incomplete predecessor jobs. By estimating when each job must begin, the entire batch job is ensured to complete within the specified timeframe. This enables real-time monitoring of job execution, promptly identifying and addressing potential delays, ensuring system timeliness, and ultimately improving batch job processing efficiency.

[0129] Figure 4 A schematic diagram of a batch job processing method provided in an embodiment of the present application Figure 3 ,exist Figure 3 On the basis of Figure 4 As shown, the specific implementation steps of the above S302 include:

[0130] S401: Construct a dependency graph based on basic job information and dependencies between jobs.

[0131] S402: Obtain historical execution data of the job.

[0132] S403: Determine multiple historical execution times corresponding to the job based on the historical execution data.

[0133] In this embodiment, the historical execution time of each job having a dependency relationship is estimated based on the historical execution data.

[0134] S404: Determine the execution time of the job according to the average value of multiple historical execution times.

[0135] In this embodiment, based on the dependency graph and historical execution time, the average value of the historical execution time in the past period is taken as the historical execution time of the job, and the historical execution time is recorded after each execution of the job to recalculate the average value.

[0136] For example, based on Figure 9 The provided job dependency diagram and the average execution time over the past 30 days are written into the database as shown in Tables 1 and 2:

[0137]

[0138] Table 1

[0139]

[0140] Table 2

[0141] S405: Determine the latest start time of each job based on the dependency graph and execution time.

[0142] In this embodiment, the job execution time can be determined based on the average of multiple historical execution times. This effectively smooths out the impact of individual extreme values ​​on the estimated results. This makes the estimated results more stable and reliable, better reflects the overall execution status of the job, and improves the processing efficiency of batch jobs.

[0143] Figure 5 A schematic diagram of a batch job processing method provided in an embodiment of the present application Figure 4 ,like Figure 5 As shown, the specific implementation steps of the above S205 include:

[0144] S501. Generate alarm information for the operation and issue an emergency alarm based on the alarm information.

[0145] S502: Get the job type of the job.

[0146] The job types include a file receiving job type and a file non-receiving job type.

[0147] S503: If the job type is a file receiving job type, start an emergency procedure to write a preset empty file into the job.

[0148] S504: Store the file information corresponding to the job into a preset database.

[0149] For example, when the controller finds through monitoring that the execution status of job_C1 has been waiting for file and is later than 5:50:00, and determines that job_C1 is a file receiving job, it controls the executor to execute the entered emergency procedure, usually writing the waiting file using a pre-prepared empty file, marking the file as an emergency file, and recording it in the database.

[0150] S505: Perform data compensation on the job according to the file information in the preset database.

[0151] Specifically, for jobs that receive file types and have implemented an emergency plan to write an empty file, a data compensation mechanism is required to complete the file data. The compensation file is compared with the emergency file recorded in the database. If the compensation file has a corresponding emergency file, the data in that file is used for data compensation, triggering dependent jobs to perform data compensation in sequence.

[0152] It's important to note that for file-receiving jobs, if a wait timeout occurs, the system automatically uses a pre-prepared empty file for writing. This prevents jobs from stalling due to lengthy wait times for files, ensuring that subsequent jobs can continue executing, reducing system downtime and improving fault tolerance. After emergency response, the system can compensate for job data based on the file information recorded in the database. This ensures the integrity and accuracy of job data, helps restore normal job execution, reduces data loss caused by emergency response, and ensures the reliability of batch processing results.

[0153] In one possible embodiment, Figure 10 The emergency flow chart of receiving file operation provided by the embodiment of this application is as follows: Figure 10 As shown in the figure, when the execution status of the receive file job is "waiting for file" or "not executed", the system will further determine whether the job is later than the preset latest start time and all files have not been received. If these two conditions are met, the emergency procedure will be executed immediately, such as writing an empty file to replace the missing file to ensure that the process continues. At the same time, the job status after the emergency is written into the database for record, and finally the subsequent operations will be continued to ensure the stability and fault tolerance of the entire batch processing system.

[0154] S506: If the job type is not a file receiving job type, start a manual takeover procedure.

[0155] In this embodiment, different emergency response methods are adopted for different job types. For file receiving jobs, the emergency measure is to use a pre-prepared empty file for writing; for other job types, the emergency measure is manual takeover. For file receiving type jobs that have adopted the emergency plan to write an empty file, a data compensation mechanism is required to complete the file data later. An efficient and flexible emergency processing mechanism has been established. Through measures such as automatic monitoring, intelligent identification, flexible response and subsequent compensation, this mechanism effectively improves the timeliness of batch jobs and the stability of the system, reduces the impact of job delays and system failures on the business, and thus improves the processing efficiency of batch jobs.

[0156] Figure 6 A schematic diagram of a batch job processing device provided in an embodiment of the present application is shown in FIG. Figure 6As shown, the device includes: a first acquisition module 61 , a first determination module 62 , a second acquisition module 63 , a judgment module 64 and a processing module 65 .

[0157] The first acquisition module 61 is used to obtain job information of each job in the batch job to be processed; wherein the job information includes basic job information and dependencies between jobs;

[0158] A first determining module 62 is configured to determine the latest start time of each job based on basic job information and dependencies between jobs;

[0159] The second acquisition module 63 is used to obtain the job execution status;

[0160] A judgment module 64 is used to judge whether the operation is an emergency response operation based on the operation execution status and the latest start time;

[0161] The processing module 65 is used to perform emergency handling on the operation if the operation is an emergency handling operation.

[0162] In a possible design, the latest start time of each job is determined based on basic job information and inter-job dependencies, including:

[0163] The first determining module 62 is further configured to construct a dependency graph based on the basic information of the jobs and the dependencies between the jobs;

[0164] Determine the execution time of each job;

[0165] Based on the dependency graph and execution time, determine the latest start time for each job.

[0166] In one possible design, the latest start time of each job is determined based on the dependency graph and execution time, including:

[0167] The first determining module 62 is further configured to obtain the latest completion time of the batch job to be processed;

[0168] The latest start time of the activity is calculated based on the critical path algorithm according to the latest finish time, dependency graph and execution time.

[0169] In one possible design, determining the execution time of each job includes:

[0170] The first determination module 62 is further configured to obtain historical execution data of the job;

[0171] Determine multiple historical execution times corresponding to the job based on historical execution data;

[0172] Determine the job execution time based on the average of multiple historical execution times.

[0173] In one possible design, emergency response to operations includes:

[0174] The processing module 65 is further used to generate alarm information for the operation and issue an emergency alarm based on the alarm information;

[0175] Carry out emergency dispatch and processing for operations.

[0176] In one possible design, emergency dispatch processing is performed for the operation, including:

[0177] The processing module 65 is further used to obtain the job type of the job;

[0178] Perform emergency dispatch processing on the job based on the job type.

[0179] In a possible design, the job type includes a file receiving job type and a file non-receiving job type;

[0180] Accordingly, emergency dispatch processing is performed on the job according to the job type, including:

[0181] The processing module 65 is further configured to start an emergency procedure to write a preset empty file into the job if the job type is a receive file job type;

[0182] If the job type is not a file receiving job type, the manual takeover procedure is started.

[0183] In a possible design, if the job type is a file receiving job type, then after initiating an emergency procedure to write a preset empty file into the job, the following steps are further included:

[0184] The processing module 65 is further used to store the file information corresponding to the job in a preset database;

[0185] Perform data compensation on the job based on the file information in the preset database.

[0186] This embodiment provides a batch job processing device that can execute a batch job processing method of the above embodiment. Its implementation principle and technical effects are similar and will not be described in detail in this embodiment.

[0187] In a specific implementation of the aforementioned batch job processing method, each module may be implemented as a processor, and the processor may execute computer-executable instructions stored in a memory, so that the processor performs the aforementioned batch job processing method.

[0188] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 7As shown, the electronic device 70 includes: at least one processor 71 and a memory 72. The electronic device 70 also includes a communication component 73. 71, the memory 72 and the communication component 73 are connected via a second bus 74.

[0189] In a specific implementation process, at least one processor 71 executes the computer execution instructions stored in the memory 72, so that the at least one processor 71 executes a batch job processing method executed by the electronic device side as described above.

[0190] The specific implementation process of the processor 71 can be found in the above-mentioned method embodiment. Its implementation principle and technical effects are similar, and will not be repeated here in this embodiment.

[0191] In the above embodiments, it should be understood that the processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. A general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the present invention may be directly implemented by a hardware processor or implemented by a combination of hardware and software modules in the processor.

[0192] The memory may include a high-speed RAM memory, and may also include a non-volatile storage NVM, such as at least one disk storage.

[0193] The second bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus. Buses can be classified as address buses, data buses, control buses, etc. For ease of illustration, the buses in the drawings of this application are not limited to just one bus or just one type of bus.

[0194] The above-mentioned functions implemented by the electronic device and the main control device have introduced the solutions provided by the embodiments of the present invention. It can be understood that in order to implement the above-mentioned functions, the electronic device or the main control device includes hardware structures and / or software modules corresponding to the execution of each function. In combination with the units and algorithm steps of the various examples described in the embodiments disclosed in the embodiments of the present invention, the embodiments of the present invention can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the technical solution of the embodiments of the present invention.

[0195] The present application also provides a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the computer-readable storage medium is used to implement the above-mentioned batch job processing method.

[0196] The above-mentioned readable storage medium can be implemented by any type of volatile or non-volatile memory device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The readable storage medium can be any available medium that can be accessed by a general-purpose or special-purpose computer.

[0197] An exemplary readable storage medium is coupled to a processor so that the processor can read information from the readable storage medium and write information to the readable storage medium. Of course, the readable storage medium can also be an integral part of the processor. The processor and the readable storage medium can be located in an application specific integrated circuit (ASIC). Of course, the processor and the readable storage medium can also exist as discrete components in an electronic device or a main control device.

[0198] The present application also provides a computer program product, which includes: a computer program, which is stored in a readable storage medium. At least one processor of an electronic device can read the computer program from the readable storage medium, and at least one processor executes the computer program so that the electronic device executes the solution provided by any of the above embodiments.

[0199] Those skilled in the art will appreciate that all or part of the steps in the above-described method embodiments can be implemented using hardware associated with program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.

[0200] So far, the technical solution of the present application has been described in conjunction with the preferred embodiments shown in the accompanying drawings. However, it is easy for those skilled in the art to understand that the scope of protection of the present application is obviously not limited to these specific embodiments. The above embodiments are only used to illustrate the technical solution of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, ordinary technicians in this field should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some or all of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solution to deviate from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A batch job processing method, characterized in that: include: Obtaining job information for each job in the batch job to be processed; wherein the job information includes basic job information and dependencies between jobs; Determine the latest start time of each job based on the basic information of the job and the dependencies between the jobs; Get the job execution status; Determining whether the operation is an emergency response operation based on the operation execution status and the latest start time; If the operation is an emergency response operation, emergency response is performed on the operation.

2. The method according to claim 1, characterized in that The determining the latest start time of each job according to the basic information of the job and the dependencies between the jobs includes: Constructing a dependency graph based on the basic information of the jobs and the dependencies between the jobs; Determine the execution time of each job; The latest start time of each job is determined according to the dependency graph and the execution time.

3. The method according to claim 2, characterized in that Determining the latest start time of each job according to the dependency graph and the execution time includes: Obtain the latest completion time of the pending batch job; The latest start time of the job is calculated based on a critical path algorithm according to the latest completion time, the dependency graph and the execution time.

4. The method according to claim 3, characterized in that Determining the execution time of each job includes: Obtaining historical execution data of the job; Determining, based on the historical execution data, a plurality of historical execution times corresponding to the job; The execution time of the job is determined according to an average value of the multiple historical execution times.

5. The method according to any one of claims 1 to 4, characterized in that The emergency handling of the operation includes: generating alarm information for the operation and issuing an emergency alarm based on the alarm information; Carry out emergency dispatch processing for the operation.

6. The method according to claim 5, characterized in that The emergency dispatch process for the operation includes: Get the job type of the job; According to the operation type, emergency dispatch processing is performed on the operation.

7. The method according to claim 6, characterized in that The job type includes a file receiving job type and a file non-receiving job type; Accordingly, performing emergency dispatch processing on the job according to the job type includes: If the operation type is a file receiving operation type, an emergency procedure is initiated to write a preset empty file into the operation; If the operation type is a non-file receiving operation type, a manual takeover procedure is started.

8. The method according to claim 7, characterized in that If the operation type is a file receiving operation type, then starting an emergency procedure to write a preset empty file into the operation, further comprising: Storing the file information corresponding to the job in a preset database; Data compensation is performed on the job according to the file information in the preset database.

9. A batch job processing device, characterized in that: include: A first acquisition module is used to acquire job information of each job in the batch job to be processed; wherein the job information includes basic job information and dependencies between jobs; A first determining module is used to determine the latest start time of each job based on the basic information of the job and the dependency relationship between the jobs; The second acquisition module is used to obtain the job execution status; a judgment module, configured to judge whether the operation is an emergency response operation based on the operation execution status and the latest start time; The processing module is used to perform emergency disposal on the operation if the operation is an emergency disposal operation.

10. An electronic device, characterized in that: include: a processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the method according to any one of claims 1 to 8.

11. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 8 when executed by a processor.

12. A computer program product, characterized in that The invention comprises a computer program, which implements the method according to any one of claims 1 to 8 when the computer program is executed by a processor.