CN108536551B - Interrupt reentry method and system for batch processing program - Google Patents

Interrupt reentry method and system for batch processing program Download PDF

Info

Publication number
CN108536551B
CN108536551B CN201810229283.5A CN201810229283A CN108536551B CN 108536551 B CN108536551 B CN 108536551B CN 201810229283 A CN201810229283 A CN 201810229283A CN 108536551 B CN108536551 B CN 108536551B
Authority
CN
China
Prior art keywords
input file
file record
input
record
sequence number
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810229283.5A
Other languages
Chinese (zh)
Other versions
CN108536551A (en
Inventor
彭丰华
尹杰
张大伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Bank of China Ltd
Original Assignee
Bank of China Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Bank of China Ltd filed Critical Bank of China Ltd
Priority to CN201810229283.5A priority Critical patent/CN108536551B/en
Publication of CN108536551A publication Critical patent/CN108536551A/en
Application granted granted Critical
Publication of CN108536551B publication Critical patent/CN108536551B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1415Saving, restoring, recovering or retrying at system level
    • G06F11/1438Restarting or rejuvenating

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides an interrupt reentry method and system of a batch processing program, which comprises the steps of acquiring the sequence number of an input file record which is processed and the sequence number of the last output file record which is obtained by all the input file records which are processed after each input file record is processed in the process of batch processing of the input file records in the input file; all output file records are stored in the output files and are numbered sequentially; periodically updating the serial number of the input file record and the serial number of the last output file record into a breakpoint table; and when the batch processing program is interrupted, executing interruption reentry on the input file according to the serial number of the input file record recorded in the breakpoint table and the serial number of the corresponding last output file record. The invention records the reentry of the input file and the output file of the recovery breakpoint according to the stored input file record and the output file, and has the advantages of good universality and high efficiency.

Description

Interrupt reentry method and system for batch processing program
Technical Field
The invention relates to the technical field of reentry of computer application programs, in particular to an interrupt reentry method and system for a batch processing program.
Background
During the running of the batch processing program of the core bank host, the running of the batch processing program is interrupted due to data exception and system exception. Each minute of the time window of the batch processing program is very precious, and the time window is related to key events such as whether the bank can be operated in time. Therefore, after the fault is eliminated, the breakpoint of the batch program is restored, and data reentry is performed on subsequent data of the breakpoint. Breakpoint reentry (or interrupt reentry) refers to the process of batch program breaking into interrupts during operation, and resuming operation from the breakpoint by using reentry mechanism.
The main problem of data reentry in the prior art is reentry of output files. The breakpoint re-entry mechanism is to re-enter input data and output data according to the primary key of the data table of the last COMMIT recorded. However, for the breakpoint reentry of files, because the number of output files is not fixed, and neither the input file nor the output file has a primary key value, the uniqueness of the input file cannot be recorded. If the method of the key value is forced to be carried out, structural reconstruction needs to be carried out on a plurality of different input files again, and the unique primary key value is added artificially. The technical scheme improves the complexity of file reentry, and has no universality and low processing efficiency. The COMMIT refers to issuing a COMMIT command when a batch processing program updates data in a database, the data can only take effect in the database, and the primary key value is information which can uniquely determine an input file record.
Therefore, how to provide a breakpoint reentry technology with good universality and high efficiency for files is a technical problem to be solved urgently.
Disclosure of Invention
In order to solve the defects in the prior art, the invention provides the interrupt reentry method and the interrupt reentry system for the batch processing program, which can restore the file reentry of the breakpoint through the recording of the file and have the technical effects of good universality and high efficiency.
In order to achieve the above object, the present invention provides an interrupt reentry method for a batch program, comprising:
in the process of batch processing of input file records in input files, after each input file record is processed, acquiring the sequence number of the processed input file record and the sequence number of the last output file record obtained by processing all the processed input file records; wherein, all output file records are stored in the output file and are numbered in sequence;
periodically updating the serial number of the input file record and the serial number of the last output file record into a breakpoint table;
and when the batch processing program is interrupted, executing interruption reentry on the input file and the output file according to the sequence number of the input file record and the sequence number of the corresponding last output file record recorded in the breakpoint table.
The invention also provides an interrupt reentry method of the batch processing program, which comprises the following steps:
in the process of batch processing of the input file records of each input file, after the processing of each input file record is completed, acquiring the sequence number of the input file record corresponding to each processed input file and the sequence number of the last output file record obtained by processing all the input file records; all output files in the output files are recorded with serial numbers, and all input files are subjected to batch processing in parallel;
periodically updating the serial number of each input file record and the serial number of the last output file record into a breakpoint table;
and when the batch processing program is interrupted, respectively executing interruption reentry on each input file and each output file according to the serial number of the input file record and the serial number of the last output file record of each input file recorded in the breakpoint table.
The invention also provides an interrupt reentry system of a batch program, which comprises:
an input/output file record obtaining unit, configured to, during batch processing of input file records in an input file, obtain, after processing of each input file record is completed, a sequence number of the processed input file record and a sequence number of a last output file record obtained by processing all input file records; wherein, all output file records are stored in the output file and are numbered in sequence;
a breakpoint table updating unit, configured to periodically update the sequence number of the input file record and the sequence number of the last output file record into a breakpoint table;
and the interruption reentry unit is used for executing interruption reentry on the input file and the output file according to the serial number of the input file record and the serial number of the corresponding last output file record recorded in the breakpoint table when the batch processing program is interrupted.
The invention also provides a computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program:
in the process of batch processing of input file records in input files, after each input file record is processed, acquiring the sequence number of the processed input file record and the sequence number of the last output file record obtained by processing all the processed input file records; wherein, all output file records are stored in the output file and are numbered in sequence;
periodically updating the serial number of the input file record and the serial number of the last output file record into a breakpoint table;
and when the batch processing program is interrupted, executing interruption reentry on the input file and the output file according to the sequence number of the input file record and the sequence number of the corresponding last output file record recorded in the breakpoint table.
The invention also provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of:
in the process of batch processing of input file records in input files, after each input file record is processed, acquiring the sequence number of the processed input file record and the sequence number of the last output file record obtained by processing all the processed input file records; wherein, all output file records are stored in the output file and are numbered in sequence;
periodically updating the serial number of the input file record and the serial number of the last output file record into a breakpoint table;
and when the batch processing program is interrupted, executing interruption reentry on the input file and the output file according to the sequence number of the input file record and the sequence number of the corresponding last output file record recorded in the breakpoint table.
The invention also provides a computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program:
in the process of batch processing of the input file records of each input file, after the processing of each input file record is completed, acquiring the sequence number of the input file record corresponding to each processed input file and the sequence number of the last output file record obtained by processing all the input file records; all output files in the output files are recorded with serial numbers, and all input files are subjected to batch processing in parallel;
periodically updating the serial number of each input file record and the serial number of the last output file record into a breakpoint table;
and when the batch processing program is interrupted, respectively executing interruption reentry on each input file and each output file according to the serial number of the input file record and the serial number of the last output file record of each input file recorded in the breakpoint table.
The invention also provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of:
in the process of batch processing of the input file records of each input file, after the processing of each input file record is completed, acquiring the sequence number of the input file record corresponding to each processed input file and the sequence number of the last output file record obtained by processing all the input file records; all output files in the output files are recorded with serial numbers, and all input files are subjected to batch processing in parallel;
periodically updating the serial number of each input file record and the serial number of the last output file record into a breakpoint table;
and when the batch processing program is interrupted, respectively executing interruption reentry on each input file and each output file according to the serial number of the input file record and the serial number of the last output file record of each input file recorded in the breakpoint table.
The invention has the beneficial effects that: in the invention, in the process of batch processing input file records in input files, after each input file record is processed, the sequence number of the processed input file record and the sequence number of the last output file record obtained by processing all the input file records are obtained; periodically updating the serial number of the input file record and the serial number of the last output file record into a breakpoint table; and when the batch processing program is interrupted, executing interruption reentry on the input file and the output file according to the sequence number of the input file record and the sequence number of the corresponding last output file record recorded in the breakpoint table. According to the batch processing program interrupt reentry method and system, reentry of the input file and the output file of the breakpoint is restored according to the stored input file record and the output file record, and the batch processing program interrupt reentry method and system have the advantages of being good in universality and high in efficiency.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a flow chart of a method for resuming interrupts in a batch process according to the present invention;
FIG. 2 is a flow chart of a method for resuming interrupts in a batch process according to an embodiment of the invention;
FIG. 3 is a flowchart of a method for resuming interrupts in a batch process according to an embodiment of the invention;
FIG. 4 is a diagram illustrating a structure of an output file P according to an embodiment of the present invention;
FIG. 5 is a diagram illustrating a structure of an updated output file P according to an embodiment of the present invention;
FIG. 6 is a diagram illustrating a structure of an input file A according to an embodiment of the present invention;
FIG. 7 is a schematic structural diagram of an output file P after the input file record A04 is successfully processed according to an embodiment of the present invention;
FIG. 8 is a diagram illustrating a mapping between partial input file records and output file records in an embodiment of the present invention;
FIG. 9 is a flow diagram of updating a breakpoint table in an embodiment of the invention;
FIG. 10 is a flowchart of an exemplary method for interrupting reentry of input and output files;
FIG. 11 is a flowchart of another method for resuming interrupts in a batch process according to the present invention;
FIG. 12 is a block diagram of an interrupt reentry system for batch processing programs according to the present invention;
FIG. 13 is a block diagram of a breakpoint table updating unit in an embodiment of the present invention;
FIG. 14 is a block diagram of an interrupt reentry unit in an embodiment of the present invention;
FIG. 15 is a block diagram of a breakpoint table updating unit in another embodiment provided by the present invention;
fig. 16 is a block diagram of an interrupt reentry unit in another embodiment provided by the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
As used herein, the terms "first," "second," … …, etc. do not denote any order or order, nor are they used to limit the invention, but rather are used to distinguish one element from another element or operation described by the same technical terms.
As used herein, "electrically coupled" may mean that two or more elements are in direct physical or electrical contact with each other, or in indirect physical or electrical contact with each other, and "electrically coupled" may mean that two or more elements operate or act in conjunction with each other.
As used herein, the terms "comprising," "including," "having," "containing," and the like are open-ended terms that mean including, but not limited to.
As used herein, "and/or" includes any and all combinations of the described items.
With respect to directional terminology used herein, for example: up, down, left, right, front or rear, etc., are referred to only in the direction of the attached drawings. Therefore, the directional terminology is used for purposes of illustration and is in no way limiting.
In view of the defects in the prior art, the present invention provides a method for resuming interrupts in a batch process, a flowchart of which is shown in fig. 1, and the method includes:
s101: in the process of batch processing of input file records in input files, after each input file record is processed, acquiring the sequence number of the processed input file record and the sequence number of the last output file record obtained by processing all the processed input file records; wherein all output file records are stored in the output file and are sequentially numbered.
S102: and periodically updating the sequence number of the input file record and the sequence number of the last output file record into a breakpoint table.
S103: and when the batch processing program is interrupted, executing interruption reentry on the input file and the output file according to the sequence number of the input file record and the sequence number of the corresponding last output file record recorded in the breakpoint table.
The execution main body of the interrupt reentry method of the batch processing program shown in fig. 1 may be a bank background server, and it is known from the flow shown in fig. 1 that each input file record in an input file is sequentially executed, each input file record generates at least one corresponding output file record after being executed, and sequentially stores the generated output file records into an output file in an additional manner, after the storage is successful, the input record is considered to be processed completely, and then processes the next input file record in the input file until all the input file records are executed completely. And recording all output files in the output file in a sequence number, starting to add the output file record newly stored each time after the last output file record in the output file, and updating the output file. And according to the appointed period, updating the sequence number of the input file record which is successfully processed last and the sequence number of the last output file record corresponding to the input file record into the breakpoint table. And when the batch processing program is interrupted, executing interruption reentry on the input file and the output file according to the sequence number of the input file record and the sequence number of the corresponding last output file record recorded in the breakpoint table. The invention records the reentry of the input file and the output file of the recovery breakpoint according to the stored input file record and the output file, and has the advantages of good universality and high efficiency.
For example, the input file is a, and the sequence numbers of the records of the input files are a01, a02, … …, AN, and N are positive integers. The output file is P, the sequence numbers of the stored output file records are P01, P02, … …, PM and N are positive integers. The number of corresponding output file records generated after each input file record is executed is uncertain, that is, after the input file record of A01 is executed, the corresponding output file records generated are P01-P08; after the input file record of a02 is executed, the generated corresponding output file records are P09 to P10, after the input file record of a03 is executed, the generated corresponding output file records are P11 to P15, after the input file record of a04 is executed, the generated corresponding output file records are P16 to P21, after the input file record of a05 is executed, the generated corresponding output file records are P22 to P25, after the input file record of a06 is executed, the generated corresponding output file records are P26 to P35, and the like, which is not limited by the invention.
In one embodiment, as shown in fig. 2, the step S102 of periodically updating the sequence number of the input file record and the sequence number of the last output file record into the breakpoint table includes the following steps:
s201: and updating the serial number of the input file record and the serial number of the last output file record into the cross section data table in real time.
In the specific implementation of S201, after each input file record is successfully processed, the obtained serial number of the input file record and the serial number of the last output file record in the corresponding output file are recorded as cross-sectional data. And recording the data of the cross section data in real time as a cross section data table.
Table 1 is a cross-sectional data table after the input file record a01 is successfully processed, and as shown in table 1, after the input file record a01 is successfully processed, the corresponding last output file record serial number is P08, and the cross-sectional data a01 of the input file and the cross-sectional data P08 of the output file are updated to the cross-sectional data table in real time.
Table 2 is a cross-sectional data table after the input file record a02 is successfully processed, and as shown in table 2, after the input file record a02 is successfully processed, the corresponding last output file record serial number is P10, and the cross-sectional data a02 of the input file and the cross-sectional data P10 of the output file are updated to the cross-sectional data table in real time. And by analogy, after the current input file record is successfully processed, the sequence number of the current input file record and the sequence number of the corresponding last output file record are updated into the cross section data table in real time.
TABLE 1
Inputting cross section data of file Cross section data of output file
A01 P08
TABLE 2
Inputting cross section data of file Cross section data of output file
A02 P10
S202: and periodically updating the serial number of the input file record and the serial number of the corresponding last output file record in the cross section data table into the breakpoint table.
When the step S202 is implemented specifically, the sequence number of the input file record and the sequence number of the corresponding last output file record recorded in the cross-section data table are updated to the breakpoint table according to the specified period.
The specified period may be that after every K input file records in the input file are processed, the sequence number of the newly acquired input file record and the sequence number of the corresponding last output file record are updated into the breakpoint table.
For example, after each successful processing of the input file a, K equals 3 input file records, the sequence number a03 of the input file record and the sequence number P15 of the corresponding last output file record recorded in the cross-section data table are updated into the breakpoint table.
Data after the data is updated for the first time in the breakpoint table is shown in table 3, and after the input file record a06 of the input file a is successfully processed, the sequence number of the last output file record corresponding to the input file record a06 and the input file record a06 recorded in the cross-section data table is updated to the breakpoint table. And analogizing in turn, updating the data in the breakpoint table once after 3 input file records of the input file A are successfully processed. The specific choice of K is usually a common divisor of the input file records in the input file, and the value of K may be a larger common divisor of the input file records selected above in view of the efficiency and performance of the batch process.
TABLE 3
Entering a sequence number of a file record Sequence number of output file record
A03 P15
It is set that an interruption of the batch program occurred at the time of the processing of the input file record a05, and at this time, since the input file record a05 failed in the processing, only the cross-sectional data at the time of the success of the a04 processing was stored in the cross-sectional data table. While part of the output file record of the input file record a05 has been stored in the output file P. Since K is 3, the data of the breakpoint table is updated only after the processing of the input file record a06 is successful, and thus the data in the breakpoint table is still as shown in table 3 when the processing of the input file record a05 fails.
In one embodiment, as shown in fig. 3, step S103 performs interruption reentry on the input file and the output file according to the sequence number of the input file record and the sequence number of the corresponding last output file record recorded in the breakpoint table, including:
s301: and deleting the output file record after the corresponding output file record in the output file according to the sequence number of the last output file record to obtain an updated output file.
Fig. 4 is a schematic structural diagram of the output file P. In the specific implementation of S301, as shown in fig. 4, it is set that when the batch program is interrupted during the processing of the input file record a05, the sequence number P15 of the stored output file record is obtained from the breakpoint table, and the output file record P16 and all the output file records following the output file record (since the input file record a04 has generated the output file records P16 to P21 and a05 has generated partial output file records), the output file is updated. Fig. 5 shows the structure of the updated output file P, which stores only the output file records P01 to P15, as shown in fig. 5.
S302: and starting processing from the next input file record of the corresponding input file record in the input files according to the serial numbers of the input file records, and adding the corresponding output file record generated after processing to the updated output file.
Fig. 6 is a schematic diagram of the structure of the input file a, and fig. 7 is a structure of the output file P after the input file record a04 is successfully processed. In specific implementation, as shown in fig. 6, when the batch program is interrupted during the processing of the input file record a05 and the re-entry of the input file is executed, at this time, the serial number a03 of the stored input file record is obtained from the breakpoint table, the batch processing is resumed from the input file record a04 next to the input file record a03 in the input file, and the corresponding output file record generated after the processing of the input file record a04 is added to the updated output file P, and the serial number of the corresponding output file record generated after the processing of the input file record a04 is sequentially numbered from P16 and stored in the updated output file P, as shown in fig. 7. The remaining input file records a05, a06, a07, etc. of the input file are then processed in sequence to effect a reentry of the output file.
In one embodiment, the input files are multiple, and all the input files are processed in batch in parallel; wherein, the input file with the largest number of input file records is taken as the main file.
In a specific implementation, the input file is set to A, B, C and the output file is set to P, and the batch process concurrently performs parallel processing on the input file A, B, C. The parallel processing means that after the input file record A01 of the input file A is successfully processed, corresponding output file records generated are P01-P08; then processing the input file record B01 of the input file B, and generating corresponding output file records from P09 to P10; after the input file record B01 is successfully processed, the input file record C01 of the input file C is processed, the generated corresponding output file records are P11 to P13, and then the input file record A02, the input file record B02, the input file record C02, the input file record A03, the input file record B03 and the input file record C03 are sequentially executed, and the input files are processed in parallel in the same way.
The input files are in a parallel processing relation, but the processing process of each input file record is in a serial processing relation, and the corresponding output file record generated by each input file record is additionally generated into the output file. The input file with the largest number of input file records is taken as the main file, the number of the input file records with the input file of A in the application is set to be 9, the number of the input file records with the input file of B is set to be 20, and the number of the input file records with the input file of A is set to be 8, so that the input file of B in the application is taken as the main file, but the sequence for processing the input files can be A, B, C according to the sequence of the input files or can be processed from the largest number to the smallest number of the input file records, and the invention is not limited to the above. The present invention processes the input files in parallel in the order of input file A, B, C.
In one embodiment, step S101 obtains the serial number of the processed input file record and the serial number of the last output file record obtained from all the processed input file records, including;
in the process of batch processing the input file records of each input file, after the processing of each input file record is completed, the sequence number of the input file record corresponding to each processed input file and the sequence number of the last output file record obtained by processing all the input file records are obtained.
In specific implementation, fig. 8 is a diagram of correspondence between partial input file records and output file records, and as shown in fig. 8, after the processing of the input file records a01, B01, and C01 of the input file is completed, the sequence numbers of the last output file record in the output file P corresponding to each input file record are P08, P10, and P13. After the processing of the input file record a02 is completed, the generated output record is added to the output file P from P14, after the processing of the input file record B02 is completed, the generated output record is added to the output file P from the corresponding output file record generated by the input file record a02, after the processing of the input file record C02 is completed, the generated output record is added to the output file P from the corresponding output file record generated by the input file record B02, and so on.
In one embodiment, as shown in fig. 9, step S102 periodically updates the sequence number of the input file record and the sequence number of the last output file record into the breakpoint table, including:
s901: and updating the serial numbers of the input file records corresponding to the input files and the serial number of the last output file record obtained by processing all the input file records into the cross section data table in real time.
In specific implementation, after one input file record of each input file is successfully processed, the obtained serial number of each input file record and the serial number of the last output file record obtained by processing all the input file records are recorded as cross-section data. And recording the data of the cross section data in real time as a cross section data table. Table 4 is a table of cross-sectional data after successful processing of the input file records a01, B01, and C01, as shown in table 4.
TABLE 4
Figure BDA0001602129130000101
S902: and periodically updating the serial numbers of all input file records and the serial number of the last output file record in the cross section data table into a breakpoint table.
In the specific implementation, the input file B is set as the master file because the input file B has the largest number of input file records. And updating the serial numbers of all input file records and the serial number of the last output file record in the cross section data table into the breakpoint table by taking the period set by the main file as the period for updating the data in the breakpoint table.
In one embodiment, step S102 periodically updates the sequence number of the input file record and the sequence number of the last output file record into a breakpoint table, including:
and after the set number of input file records of the main file are processed, updating the sequence number of the input file record of each newly acquired input file and the sequence number of the last output file record into the breakpoint table.
In specific implementation, the period of the main file B is taken as the period for updating the breakpoint table. The period setting of the main file B refers to the specific implementation process of step S202. And setting the set period of the main file B as updating the data in the breakpoint table after the record processing of every 5 input files is completed.
For convenience of illustration and calculation, in this embodiment, the input file record of the input file a is taken as a01-a09, 9 input file records are counted, and the set period is that the data in the breakpoint table is updated after the processing of every 3 input file records is completed. The input file record of the input file B is B01-A20, the total number of the input file records is 20, and the set period is that the data in the breakpoint table is updated after the record processing of every 5 input files is completed. The input file records of the input file C are C01-C08, the number of the input file records is 8, and the set period is that the data in the breakpoint table is updated after the record processing of every 4 input files is completed.
In parallel processing the input file A, B, C, when the processing of the input file records a05, B05, and C05 is completed, the sequence numbers a05, B05, and C05 of the input file records and the last output file record Pk in the output file generated last after the processing of the input file records a05, B05, and C05 is completed are updated to the breakpoint table, as shown in table 5.
TABLE 5
Figure BDA0001602129130000111
After the processing of the input file records a08, B08, and C08 is completed, the input file C is processed, but the breakpoint table is not updated, and the batch processing program is continuously executed until the processing of the input file record B10 is completed, and the sequence numbers a09, B10, and C08 of the input file records and the last output file record (the sequence number of the last output file record corresponding to B10 is set to Pj) in the output file generated last after the processing of the input file records a09, B10, and C08 are completed are updated to the breakpoint table, as shown in table 6.
TABLE 6
Figure BDA0001602129130000112
Because the input file records of the input files a and C are processed completely, until the input file records B20 are processed completely, only the serial number of the input file record and the last output file record in the input and output files corresponding to all the processed input file records are updated to the breakpoint table each time, and the serial numbers of the input file records of the input files a and C are not updated any more.
In one embodiment, as shown in fig. 10, step S103 performs interruption reentry on an input file and an output file according to a sequence number of an input file record and a sequence number of a last output file record recorded in a breakpoint table, including:
s1001: and deleting the output file record after the corresponding output file record in the output file according to the sequence number of the last output file record to obtain an updated output file.
In specific implementation, when the batch program is interrupted during the processing of the input file record B06, the serial number Pk of the stored output file record is obtained from the breakpoint table, and the output file record P (k +1) in the output file and all subsequent output file records are deleted to update the output file.
S1002: and according to the sequence number of the input file record of each input file, starting processing from the next input file record of the input file record corresponding to each input file, and adding the corresponding output file record generated after processing to the updated output file.
In specific implementation, when the batch program is interrupted during the processing of the input file record B06 and the input file is re-entered, the stored input file records a05, B05 and C05 are acquired from the breakpoint table, the batch processing is resumed from the next input file record a06 of the input file record a05 in the input file, the corresponding output file record generated after the processing of the input file record a06 is added to the updated output file P, and the sequence number of the corresponding output file record generated after the processing of the input file record a06 is sequentially numbered from P (k +1) and stored in the updated output file P. And then sequentially processing the next input file record B06 of the input file record B05 of the input file B, processing the next input file record C06 of the input file record C05 of the input file C after the input file record B06 is successfully processed, and performing batch processing on all the input files in parallel, thereby realizing the reentrant of the output file.
The present invention further provides a method for resuming interrupt of a batch processing program, a flowchart of which is shown in fig. 11, the method comprising:
s1101: in the process of batch processing of the input file records of each input file, after the processing of each input file record is completed, acquiring the sequence number of the input file record corresponding to each processed input file and the sequence number of the last output file record obtained by processing all the input file records; all output files in the output files are recorded with serial numbers, and all input files are subjected to batch processing in parallel.
S1102: periodically updating the serial number of each input file record and the serial number of the last output file record into a breakpoint table;
s1103: and when the batch processing program is interrupted, respectively executing interruption reentry on each input file and each output file according to the serial number of the input file record and the serial number of the last output file record of each input file recorded in the breakpoint table.
The execution subject of the interrupt reentry method of the batch program shown in fig. 11 may be a bank backend server. As can be seen from the flow shown in fig. 11, in the process of batch processing the input file records of each input file, after each input file record is processed, the sequence number of the input file record corresponding to each processed input file and the sequence number of the last output file record obtained from all the processed input file records are obtained. And periodically updating the serial number of each input file record and the serial number of the last output file record into a breakpoint table. And when the batch processing program is interrupted, respectively executing interruption reentry on each input file and each output file according to the serial number of the input file record and the serial number of the last output file record of each input file recorded in the breakpoint table. The invention records the reentry of each input file and each output file of the recovery breakpoint according to the stored input file records of a plurality of input files and the output files corresponding to all the processed input file records, and has the advantages of good universality and high efficiency.
The application sets input files A, B and C, an output file P, and a batch processing program simultaneously carries out parallel processing on the input files A, B and C. The parallel processing means that after the input file record A01 of the input file A is successfully processed, corresponding output file records generated are P01-P08; then processing the input file record B01 of the input file B, and generating corresponding output file records from P09 to P10; after the input file record B01 is successfully processed, the input file record C01 of the input file C is processed, the generated corresponding output file records are P11 to P13, and then the input file record A02, the input file record B02, the input file record C02, the input file record A03, the input file record B03 and the input file record C03 are sequentially executed, and the input files are processed in parallel in the same way. The input files are processed in parallel, but the processing of each input file record is processed in series, and the corresponding output file record generated by each input file record is added to the output file.
Fig. 8 is a diagram of correspondence between partial input file records and output file records, and as shown in fig. 8, after the processing of the input file records a01, B01, and C01 of the input file is completed, the sequence numbers of the last output file record in the output file P corresponding to each input file record are P08, P10, and P13. After the processing of the input file record a02 is completed, the generated output record is added to the output file P from P14, after the processing of the input file record B02 is completed, the generated output record is added to the output file P from the corresponding output file record generated by the input file record a02, and after the processing of the input file record C02 is completed, the generated output record is added to the output file P from the corresponding output file record generated by the input file record B02.
In one embodiment, as shown in fig. 9, step S1102 is to periodically update the sequence number of each input file record and the sequence number of the last output file record into a breakpoint table, and includes:
s901: and updating the serial numbers of the input file records corresponding to the input files and the serial number of the last output file record obtained by processing all the input file records into the cross section data table in real time.
The specific implementation process is the same as the implementation process of S901 in the foregoing, and is not described here again.
S902: and periodically updating the serial numbers of all input file records and the serial number of the last output file record in the cross section data table into a breakpoint table.
The specific implementation process is the same as the implementation process of S902 in the foregoing, and is not described herein again.
In one embodiment, step S1102 defines the input file with the largest number of input file records as the master file; the periodically updating the sequence number of each input file record and the sequence number of the last output file record into a breakpoint table includes:
and after the set number of input file records of the main file are processed, updating the sequence number of the input file record of each newly acquired input file and the sequence number of the last output file record into the breakpoint table.
In the specific implementation, the input file with the largest number of input file records is used as the main file, and the input file B in the present application is set as the main file. And taking the period of the main file B as the period for updating the breakpoint table. The period setting of the main file B refers to the specific implementation process of step S202. And setting the set period of the main file B as updating the data in the breakpoint table after the record processing of every 5 input files is completed.
For convenience of illustration and calculation, in this embodiment, the input file record of the input file a is taken as a01-a09, 9 input file records are counted, and the set period is that the data in the breakpoint table is updated after the processing of every 3 input file records is completed. The input file record of the input file B is B01-A20, the total number of the input file records is 20, and the set period is that the data in the breakpoint table is updated after the record processing of every 5 input files is completed. The input file records of the input file C are C01-C08, the number of the input file records is 8, and the set period is that the data in the breakpoint table is updated after the record processing of every 4 input files is completed.
In parallel processing the input file A, B, C, when the processing of the input file records a05, B05, and C05 is completed, the sequence numbers a05, B05, and C05 of the input file records and the last output file record Pk in the output file generated last after the processing of the input file records a05, B05, and C05 is completed are updated to the breakpoint table, as shown in table 5.
After the processing of the input file records a08, B08, and C08 is completed, the input file C is processed, but the breakpoint table is not updated, and the batch processing program is continuously executed until the processing of the input file record B10 is completed, and the sequence numbers a09, B10, and C08 of the input file records and the last output file record (the sequence number of the last output file record corresponding to B10 is set to Pj) in the output file generated last after the processing of the input file records a09, B10, and C08 are completed are updated to the breakpoint table, as shown in table 6.
Because the input file records of the input files a and C are processed completely, until the input file records B20 are processed completely, only the serial number of the input file record and the last output file record in the input and output files corresponding to all the processed input file records are updated to the breakpoint table each time, and the serial numbers of the input file records of the input files a and C are not updated any more.
In one embodiment, as shown in fig. 10, step S1103 performs interrupt reentry on each input file and each output file according to the sequence number of the input file record and the sequence number of the last output file record of each input file recorded in the breakpoint table, respectively, including:
s1001: and deleting the output file record after the corresponding output file record in the output file according to the sequence number of the last output file record to obtain an updated output file.
The specific implementation process is the same as the implementation process of S1001 in the foregoing, and is not described here again.
S1002: and according to the sequence number of the input file record of each input file, starting processing from the next input file record of the input file record corresponding to each input file, and adding the corresponding output file record generated after processing to the updated output file.
The specific implementation process is the same as the implementation process of S1002, and is not described herein again.
Based on the same application concept as the batch program interrupt reentry method, the invention also provides a batch program interrupt reentry system, as described in the following embodiments. Because the principle of solving the problem of the interrupt reentry system of the batch processing program is similar to that of the interrupt reentry method of the batch processing program, the implementation of the interrupt reentry system of the batch processing program can refer to the implementation of the interrupt reentry method of the batch processing program, and repeated parts are not described again.
Fig. 12 is a schematic structural diagram of an interrupt reentry system of a batch program according to an embodiment of the present application, and as shown in fig. 12, the interrupt reentry system of the batch program includes: an input/output file record acquisition unit 1201, a breakpoint table update unit 1202, and an interrupt reentry unit 1203.
An input/output file record obtaining unit 1201, configured to, during batch processing of input file records in an input file, obtain a sequence number of a processed input file record and a sequence number of a last output file record obtained by processing all input file records after processing of each input file record is completed; wherein all output file records are stored in the output file and are sequentially numbered.
A breakpoint table updating unit 1202, configured to periodically update the sequence number of the input file record and the sequence number of the last output file record into a breakpoint table.
An interruption reentry unit 1203, configured to, when the batch processing program is interrupted, perform interruption reentry on the input file and the output file according to the sequence number of the input file record and the sequence number of the corresponding last output file record recorded in the breakpoint table.
In one embodiment, as shown in fig. 13, the breakpoint table update unit 1202 includes: a first cross-section data table update module 1301 and a first breakpoint table update module 1302.
A first cross-section data table updating module 1301, configured to update the sequence number of the input file record and the sequence number of the last output file record in a cross-section data table in real time;
a first breakpoint table updating module 1302, configured to periodically update the sequence number of the input file record in the cross section data table and the sequence number of the corresponding last output file record in the breakpoint table.
In one embodiment, the breakpoint table update unit 1202 is specifically configured to: and after the input file records with the set number of the input files are processed, updating the sequence number of the newly acquired input file record and the sequence number of the corresponding last output file record into the breakpoint table.
In one embodiment, as shown in fig. 14, the interrupt reentry unit 1203 includes: a first output file update module 1401 and a first input file record processing module 1402.
A first output file updating module 1401, configured to delete, according to the sequence number of the last output file record, an output file record after a corresponding output file record in the output file, to obtain an updated output file;
the first input file record processing module 1402 is configured to start processing from a next input file record of the corresponding input file record in the input file according to the serial number of the input file record, and add the corresponding output file record generated after the processing to the updated output file.
In an embodiment, the input/output file record obtaining unit 1201 is specifically configured to: in the process of batch processing of the input file records of each input file, after the processing of each input file record is completed, acquiring the sequence number of the input file record corresponding to each processed input file and the sequence number of the last output file record obtained by processing all the input file records; the input files are in a plurality and are subjected to batch processing in parallel, and the input file with the largest number of input file records is taken as a main file.
In one embodiment, as shown in fig. 15, the breakpoint table update unit 1202 includes: a second cross-section data table update module 1501 and a second breakpoint table update module 1502.
A second cross-section data table updating module 1501, configured to update the serial number of the input file record corresponding to each input file and the serial number of the last output file record obtained by processing all the input file records into the cross-section data table in real time;
a second breakpoint table updating module 1502 is configured to periodically update the sequence number of each input file record and the sequence number of the last output file record in the cross section data table into the breakpoint table.
In one embodiment, the breakpoint table update unit 1202 is specifically configured to: and after the set number of input file records of the main file are processed, updating the sequence number of the input file record of each newly acquired input file and the sequence number of the last output file record into the breakpoint table.
In one embodiment, as shown in fig. 16, the interrupt reentry unit 1203 includes: a second output file update module 1601 and a second input file record processing module 1602.
A second output file updating module 1601, configured to delete an output file record after a corresponding output file record in the output file according to the sequence number of the last output file record, to obtain an updated output file;
a second input file record processing module 1602, configured to start processing from the next input file record of the input file record corresponding to each input file according to the sequence number of the input file record of each input file, and add the corresponding output file record generated after the processing to the updated output file.
Based on the same application concept as the batch program interrupt reentry method, the present application provides a computer device, as described in the following embodiments. Because the principle of solving the problem of the computer device is similar to the interrupt reentry method of the batch processing program, the implementation of the computer device can refer to the implementation of the interrupt reentry method of the batch processing program, and repeated parts are not described again.
In one embodiment, a computer device comprises: a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the following steps when executing the computer program, as shown in fig. 1:
s101: in the process of batch processing of input file records in input files, after each input file record is processed, acquiring the sequence number of the processed input file record and the sequence number of the last output file record obtained by processing all the processed input file records; wherein all output file records are stored in the output file and are sequentially numbered.
S102: and periodically updating the sequence number of the input file record and the sequence number of the last output file record into a breakpoint table.
S103: and when the batch processing program is interrupted, executing interruption reentry on the input file and the output file according to the sequence number of the input file record and the sequence number of the corresponding last output file record recorded in the breakpoint table.
Based on the same application concept as the batch program interrupt reentry method described above, the present application provides a computer-readable storage medium, as described in the following embodiments. Because the principle of solving the problem of the computer-readable storage medium is similar to the interrupt reentry method of the batch processing program, the implementation of the computer-readable storage medium can refer to the implementation of the interrupt reentry method of the batch processing program, and repeated details are not repeated.
In one embodiment, a computer readable storage medium has stored thereon a computer program, as shown in FIG. 1, which when executed by a processor, performs the steps of:
s101: in the process of batch processing of input file records in input files, after each input file record is processed, acquiring the sequence number of the processed input file record and the sequence number of the last output file record obtained by processing all the processed input file records; wherein all output file records are stored in the output file and are sequentially numbered.
S102: and periodically updating the sequence number of the input file record and the sequence number of the last output file record into a breakpoint table.
S103: and when the batch processing program is interrupted, executing interruption reentry on the input file and the output file according to the sequence number of the input file record and the sequence number of the corresponding last output file record recorded in the breakpoint table.
Based on the same application concept as the interrupt reentry method of another batch program, the present application also provides a computer device, as described in the following embodiments. Because the principle of solving the problem of the computer device is similar to that of the interrupt reentry method of another batch processing program, the implementation of the computer device can refer to the implementation of the interrupt reentry method of another batch processing program, and repeated parts are not described again.
In one embodiment, a computer device comprises: a memory, a processor and a computer program stored on the memory and executable on the processor, as shown in fig. 11, the processor implementing the following steps when executing the computer program:
s1101: in the process of batch processing of the input file records of each input file, after the processing of each input file record is completed, acquiring the sequence number of the input file record corresponding to each processed input file and the sequence number of the last output file record obtained by processing all the input file records; all output files in the output files are recorded with serial numbers, and all input files are subjected to batch processing in parallel.
S1102: periodically updating the serial number of each input file record and the serial number of the last output file record into a breakpoint table;
s1103: and when the batch processing program is interrupted, respectively executing interruption reentry on each input file and each output file according to the serial number of the input file record and the serial number of the last output file record of each input file recorded in the breakpoint table.
Based on the same application concept as the interrupt reentry method of another batch program, the present application also provides a computer-readable storage medium, as described in the following embodiments. Since the principle of the computer-readable storage medium for solving the problem is similar to that of the interrupt reentry method of another batch processing program, the implementation of the computer-readable storage medium can refer to the implementation of the interrupt reentry method of another batch processing program, and repeated details are not repeated.
In one embodiment, a computer readable storage medium has stored thereon a computer program, as shown in fig. 11, which when executed by a processor, performs the steps of:
s1101: in the process of batch processing of the input file records of each input file, after the processing of each input file record is completed, acquiring the sequence number of the input file record corresponding to each processed input file and the sequence number of the last output file record obtained by processing all the input file records; all output files in the output files are recorded with serial numbers, and all input files are subjected to batch processing in parallel.
S1102: periodically updating the serial number of each input file record and the serial number of the last output file record into a breakpoint table;
s1103: and when the batch processing program is interrupted, respectively executing interruption reentry on each input file and each output file according to the serial number of the input file record and the serial number of the last output file record of each input file recorded in the breakpoint table.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The principle and the implementation mode of the invention are explained by applying specific embodiments in the invention, and the description of the embodiments is only used for helping to understand the method and the core idea of the invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (22)

1. An interrupt reentrant method for a batch process, comprising:
in the process of batch processing of input file records in input files, after each input file record is processed, acquiring the sequence number of the processed input file record and the sequence number of the last output file record obtained by processing all the processed input file records; wherein, all output file records are stored in the output file and are numbered in sequence;
periodically updating the serial number of the input file record and the serial number of the last output file record into a breakpoint table;
when the batch processing program is interrupted, executing interruption reentry on the input file and the output file according to the serial number of the input file record and the serial number of the corresponding last output file record recorded in the breakpoint table;
wherein, periodically updating the sequence number of the input file record and the sequence number of the last output file record into a breakpoint table includes:
updating the serial number of the input file record and the serial number of the last output file record into a cross section data table in real time; recording the sequence number of the obtained input file record and the sequence number of the last output file record in the corresponding output files as cross section data after each input file record is successfully processed, and recording a data table for recording the cross section data in real time as a cross section data table;
and periodically updating the sequence number of the input file record and the sequence number of the corresponding last output file record in the cross section data table into a breakpoint table.
2. The batch program interrupt reentry method of claim 1, wherein periodically updating the sequence number of the input file record and the sequence number of the last output file record into a breakpoint table comprises:
and after the input file records with the set number of the input files are processed, updating the sequence number of the newly acquired input file record and the sequence number of the corresponding last output file record into the breakpoint table.
3. The batch processing program interrupt reentry method according to claim 1, wherein the performing interrupt reentry on the input file and the output file according to the sequence number of the input file record and the sequence number of the corresponding last output file record recorded in the breakpoint table comprises:
according to the sequence number of the last output file record, deleting the output file record after the corresponding output file record in the output file to obtain an updated output file;
and starting processing from the next input file record of the corresponding input file record in the input files according to the serial numbers of the input file records, and adding the corresponding output file record generated after processing to the updated output file.
4. The batch program interrupt reentry method according to claim 1, wherein the input file is plural, and each input file is batch-processed in parallel; wherein, the input file with the largest number of input file records is taken as the main file.
5. The batch program interrupt reentry method of claim 4, wherein the obtaining of the sequence number of the processed input file record and the sequence number of the last output file record obtained from all the processed input file records comprises;
in the process of batch processing the input file records of each input file, after the processing of each input file record is completed, the sequence number of the input file record corresponding to each processed input file and the sequence number of the last output file record obtained by processing all the input file records are obtained.
6. The batch processing program interrupt reentry method of claim 5, wherein the periodically updating the sequence number of the input file record and the sequence number of the last output file record into a breakpoint table comprises:
updating the serial numbers of the input file records corresponding to the input files and the serial number of the last output file record obtained by processing all the input file records into a cross section data table in real time;
and periodically updating the serial numbers of all input file records and the serial number of the last output file record in the cross section data table into a breakpoint table.
7. The batch program interrupt reentry method according to claim 5 or 6, wherein the periodically updating the sequence number of the input file record and the sequence number of the last output file record into the breakpoint table comprises:
and after the set number of input file records of the main file are processed, updating the sequence number of the input file record of each newly acquired input file and the sequence number of the last output file record into the breakpoint table.
8. The batch processing program interrupt reentry method according to claim 4, wherein the performing interrupt reentry on the input file and the output file according to the sequence number of the input file record and the sequence number of the corresponding last output file record recorded in the breakpoint table comprises:
according to the sequence number of the last output file record, deleting the output file record after the corresponding output file record in the output file to obtain an updated output file;
and according to the sequence number of the input file record of each input file, starting processing from the next input file record of the input file record corresponding to each input file, and adding the corresponding output file record generated after processing to the updated output file.
9. An interrupt reentrant method for a batch process, comprising:
in the process of batch processing of the input file records of each input file, after the processing of each input file record is completed, acquiring the sequence number of the input file record corresponding to each processed input file and the sequence number of the last output file record obtained by processing all the input file records; all output files in the output files are recorded with serial numbers, and all input files are subjected to batch processing in parallel;
periodically updating the serial number of each input file record and the serial number of the last output file record into a breakpoint table;
when the batch processing program is interrupted, respectively executing interruption reentry on each input file and each output file according to the serial number of the input file record and the serial number of the last output file record of each input file recorded in the breakpoint table;
wherein, periodically updating the sequence number of each input file record and the sequence number of the last output file record into a breakpoint table includes:
updating the serial numbers of the input file records corresponding to the input files and the serial number of the last output file record obtained by processing all the input file records into a cross section data table in real time; recording the sequence number of the obtained input file record and the sequence number of the last output file record in the corresponding output files as cross section data after each input file record is successfully processed, and recording a data table for recording the cross section data in real time as a cross section data table;
and periodically updating the serial numbers of all input file records and the serial number of the last output file record in the cross section data table into a breakpoint table.
10. The batch program interrupt reentry method of claim 9, wherein an input file having the largest number of input file records is defined as a master file; the periodically updating the sequence number of each input file record and the sequence number of the last output file record into a breakpoint table includes:
and after the set number of input file records of the main file are processed, updating the sequence number of the input file record of each newly acquired input file and the sequence number of the last output file record into the breakpoint table.
11. The batch processing program interrupt reentry method according to claim 9, wherein the performing interrupt reentry on each input file and the output file according to the sequence number of the input file record and the sequence number of the last output file record of each input file recorded in the breakpoint table respectively comprises:
according to the sequence number of the last output file record, deleting the output file record after the corresponding output file record in the output file to obtain an updated output file;
and according to the sequence number of the input file record of each input file, starting processing from the next input file record of the input file record corresponding to each input file, and adding the corresponding output file record generated after processing to the updated output file.
12. An interrupt reentry system for a batch process, comprising:
an input/output file record obtaining unit, configured to, during batch processing of input file records in an input file, obtain, after processing of each input file record is completed, a sequence number of the processed input file record and a sequence number of a last output file record obtained by processing all input file records; wherein, all output file records are stored in the output file and are numbered in sequence;
a breakpoint table updating unit, configured to periodically update the sequence number of the input file record and the sequence number of the last output file record into a breakpoint table;
the interruption reentry unit is used for executing interruption reentry on the input file and the output file according to the serial number of the input file record and the serial number of the corresponding last output file record recorded in the breakpoint table when the batch processing program is interrupted;
wherein the breakpoint table updating unit includes:
the first cross section data table updating module is used for updating the serial number of the input file record and the serial number of the last output file record into a cross section data table in real time; recording the sequence number of the obtained input file record and the sequence number of the last output file record in the corresponding output files as cross section data after each input file record is successfully processed, and recording a data table for recording the cross section data in real time as a cross section data table;
and the first breakpoint table updating module is used for periodically updating the sequence number of the input file record in the cross section data table and the sequence number of the corresponding last output file record into the breakpoint table.
13. The batch processing program interrupt reentry system of claim 12, wherein the breakpoint table updating unit is specifically configured to: and after the input file records with the set number of the input files are processed, updating the sequence number of the newly acquired input file record and the sequence number of the corresponding last output file record into the breakpoint table.
14. The batch process interrupt reentry system of claim 12, wherein the interrupt reentry unit comprises:
the first output file updating module is used for deleting the output file records after the corresponding output file records in the output files according to the sequence number of the last output file record to obtain updated output files;
and the first input file record processing module is used for starting processing from the next input file record of the corresponding input file record in the input file according to the serial number of the input file record and adding the corresponding output file record generated after processing to the updated output file.
15. The batch program interrupt reentry system of claim 12, wherein the input/output file record acquisition unit is specifically configured to: in the process of batch processing of the input file records of each input file, after the processing of each input file record is completed, acquiring the sequence number of the input file record corresponding to each processed input file and the sequence number of the last output file record obtained by processing all the input file records; the input files are in a plurality and are subjected to batch processing in parallel, and the input file with the largest number of input file records is taken as a main file.
16. The batch processing program interrupt reentry system of claim 15, wherein the breakpoint table updating unit comprises:
the second cross section data table updating module is used for updating the serial numbers of the input file records corresponding to the input files and the serial number of the last output file record obtained by processing all the input file records into the cross section data table in real time;
and the second breakpoint table updating module is used for periodically updating the serial numbers of all input file records and the serial number of the last output file record in the cross section data table into the breakpoint table.
17. The batch program interrupt reentry system of claim 15 or 16, wherein the breakpoint table updating unit is specifically configured to: and after the set number of input file records of the main file are processed, updating the sequence number of the input file record of each newly acquired input file and the sequence number of the last output file record into the breakpoint table.
18. The batch process interrupt reentry system of claim 15, wherein the interrupt reentry unit comprises:
the second output file updating module is used for deleting the output file records after the corresponding output file records in the output files according to the sequence number of the last output file record to obtain updated output files;
and the second input file record processing module is used for respectively starting processing from the next input file record of the input file record corresponding to each input file according to the serial number of the input file record of each input file, and adding the corresponding output file record generated after processing to the updated output file.
19. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor when executing the computer program implements the steps of:
in the process of batch processing of input file records in input files, after each input file record is processed, acquiring the sequence number of the processed input file record and the sequence number of the last output file record obtained by processing all the processed input file records; wherein, all output file records are stored in the output file and are numbered in sequence;
periodically updating the serial number of the input file record and the serial number of the last output file record into a breakpoint table;
when the batch processing program is interrupted, executing interruption reentry on the input file and the output file according to the serial number of the input file record and the serial number of the corresponding last output file record recorded in the breakpoint table;
wherein, periodically updating the sequence number of the input file record and the sequence number of the last output file record into a breakpoint table includes:
updating the serial number of the input file record and the serial number of the last output file record into a cross section data table in real time; recording the sequence number of the obtained input file record and the sequence number of the last output file record in the corresponding output files as cross section data after each input file record is successfully processed, and recording a data table for recording the cross section data in real time as a cross section data table;
and periodically updating the sequence number of the input file record and the sequence number of the corresponding last output file record in the cross section data table into a breakpoint table.
20. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of:
in the process of batch processing of input file records in input files, after each input file record is processed, acquiring the sequence number of the processed input file record and the sequence number of the last output file record obtained by processing all the processed input file records; wherein, all output file records are stored in the output file and are numbered in sequence;
periodically updating the serial number of the input file record and the serial number of the last output file record into a breakpoint table;
when the batch processing program is interrupted, executing interruption reentry on the input file and the output file according to the serial number of the input file record and the serial number of the corresponding last output file record recorded in the breakpoint table;
wherein, periodically updating the sequence number of the input file record and the sequence number of the last output file record into a breakpoint table includes:
updating the serial number of the input file record and the serial number of the last output file record into a cross section data table in real time; recording the sequence number of the obtained input file record and the sequence number of the last output file record in the corresponding output files as cross section data after each input file record is successfully processed, and recording a data table for recording the cross section data in real time as a cross section data table;
and periodically updating the sequence number of the input file record and the sequence number of the corresponding last output file record in the cross section data table into a breakpoint table.
21. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor when executing the computer program implements the steps of:
in the process of batch processing of the input file records of each input file, after the processing of each input file record is completed, acquiring the sequence number of the input file record corresponding to each processed input file and the sequence number of the last output file record obtained by processing all the input file records; all output files in the output files are recorded with serial numbers, and all input files are subjected to batch processing in parallel;
periodically updating the serial number of each input file record and the serial number of the last output file record into a breakpoint table;
when the batch processing program is interrupted, respectively executing interruption reentry on each input file and each output file according to the serial number of the input file record and the serial number of the last output file record of each input file recorded in the breakpoint table;
wherein, periodically updating the sequence number of each input file record and the sequence number of the last output file record into a breakpoint table includes:
updating the serial number of the input file record and the serial number of the last output file record into a cross section data table in real time; recording the sequence number of the obtained input file record and the sequence number of the last output file record in the corresponding output files as cross section data after each input file record is successfully processed, and recording a data table for recording the cross section data in real time as a cross section data table;
and periodically updating the sequence number of the input file record and the sequence number of the corresponding last output file record in the cross section data table into a breakpoint table.
22. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of:
in the process of batch processing of the input file records of each input file, after the processing of each input file record is completed, acquiring the sequence number of the input file record corresponding to each processed input file and the sequence number of the last output file record obtained by processing all the input file records; all output files in the output files are recorded with serial numbers, and all input files are subjected to batch processing in parallel;
periodically updating the serial number of each input file record and the serial number of the last output file record into a breakpoint table;
when the batch processing program is interrupted, respectively executing interruption reentry on each input file and each output file according to the serial number of the input file record and the serial number of the last output file record of each input file recorded in the breakpoint table;
wherein, periodically updating the sequence number of each input file record and the sequence number of the last output file record into a breakpoint table includes:
updating the serial number of the input file record and the serial number of the last output file record into a cross section data table in real time; recording the sequence number of the obtained input file record and the sequence number of the last output file record in the corresponding output files as cross section data after each input file record is successfully processed, and recording a data table for recording the cross section data in real time as a cross section data table;
and periodically updating the sequence number of the input file record and the sequence number of the corresponding last output file record in the cross section data table into a breakpoint table.
CN201810229283.5A 2018-03-20 2018-03-20 Interrupt reentry method and system for batch processing program Active CN108536551B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810229283.5A CN108536551B (en) 2018-03-20 2018-03-20 Interrupt reentry method and system for batch processing program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810229283.5A CN108536551B (en) 2018-03-20 2018-03-20 Interrupt reentry method and system for batch processing program

Publications (2)

Publication Number Publication Date
CN108536551A CN108536551A (en) 2018-09-14
CN108536551B true CN108536551B (en) 2022-04-15

Family

ID=63484921

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810229283.5A Active CN108536551B (en) 2018-03-20 2018-03-20 Interrupt reentry method and system for batch processing program

Country Status (1)

Country Link
CN (1) CN108536551B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109783509A (en) * 2019-01-04 2019-05-21 中国银行股份有限公司 SQL scenario generation method and device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104021043A (en) * 2014-06-23 2014-09-03 中国银行股份有限公司 Interruption reentry method and system of batch applications
CN104317960A (en) * 2014-11-14 2015-01-28 中国建设银行股份有限公司 Method and device for processing batch job
CN107273449A (en) * 2017-05-27 2017-10-20 北京思特奇信息技术股份有限公司 A kind of breakpoint processing method and system based on memory database

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10289140A (en) * 1997-04-14 1998-10-27 Hitachi Ltd Restoration system for batch processing fault
US7895474B2 (en) * 2007-05-03 2011-02-22 International Business Machines Corporation Recovery and restart of a batch application

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104021043A (en) * 2014-06-23 2014-09-03 中国银行股份有限公司 Interruption reentry method and system of batch applications
CN104317960A (en) * 2014-11-14 2015-01-28 中国建设银行股份有限公司 Method and device for processing batch job
CN107273449A (en) * 2017-05-27 2017-10-20 北京思特奇信息技术股份有限公司 A kind of breakpoint processing method and system based on memory database

Also Published As

Publication number Publication date
CN108536551A (en) 2018-09-14

Similar Documents

Publication Publication Date Title
CN108681565B (en) Block chain data parallel processing method, device, equipment and storage medium
CN107832406B (en) Method, device, equipment and storage medium for removing duplicate entries of mass log data
US11269902B2 (en) Time series data management method, device, and apparatus
EP3113020A1 (en) Data processing device and method for processing serial tasks
CN110795399B (en) Method, device and system for generating machine ID for application
US20190317872A1 (en) Database cluster architecture based on dual port solid state disk
US20190324875A1 (en) Method and apparatus for failure recovery of storage device
EP3474143B1 (en) Method and apparatus for incremental recovery of data
CN109408711B (en) Data filtering method and device, electronic equipment and storage medium
EP3557445A1 (en) Transaction processing method and apparatus
CN108536551B (en) Interrupt reentry method and system for batch processing program
JP2019508774A (en) Database system optimization method, system, electronic device and storage medium
CN117349291A (en) Database primary key short ID generation method, electronic equipment and medium
US20160224597A1 (en) Managing data sets of a storage system
CN110569231B (en) Data migration method, device, equipment and medium
CN110083438B (en) Transaction distribution method, device, equipment and storage medium
CN113254271B (en) Data sequence recovery method, device, equipment and storage medium
CN109740027B (en) Data exchange method, device, server and storage medium
CN109165208B (en) Method and system for loading data into database
CN107341136B (en) Method and device for generating sequence index number and storage medium
CN115237680B (en) Distributed data recovery system and method
CN112187966A (en) Acceleration card, MAC address generation method and device thereof, and storage medium
CN111985187B (en) Distributed ID acquisition method, device, electronic equipment and storage medium
CN104572350A (en) Method and device for processing metadata
KR101477017B1 (en) Method and Apparatus for managing index in a shared memory

Legal Events

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