Database batch program parallel data processing anomaly detection method and device
By detecting the partition information of the data table in the database and the batch information of the batch program, the deadlock problem caused by conflicts between the data table partitioning and batch settings during parallel data processing of batch programs is solved, and a more stable data processing process is achieved.
Patent Information
- Application Number
- CN202110394104.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-04-13
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2041-04-13
AI Technical Summary
In the database, when batch programs process data in parallel, due to the conflict between data table partition and batch settings, deadlocks and interrupts are easily caused, and the amount of data in the test environment is insufficient, making it difficult to detect these abnormal situations.
By determining the partition information and batch information of the data table based on the database partitioning rule table and the batch number control table of the batch program, it detects whether there are any exceptions in the data table when the batch program is processed in parallel. If there is an exception, adjust the partition information of the data table or the batch number control table of the batch program to avoid abnormal situations.
It effectively avoids batch program interrupts caused by data table partition errors or batch errors of batch programs, improves the coverage of program testing, and improves the stability of data processing.
Smart Images

Figure CN113094185B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of database technology, in particular to the field of artificial intelligence technology, and more particularly to a method and device for detecting anomalies in parallel data processing of a batch program in a database. Background Art
[0002] In order to improve the efficiency of data processing such as query, the host data table in the current database is usually divided into multiple partitions. When batch programs process data in parallel in different batches, if different batches process data on the same data table partition at the same time, multiple programs will lock a data table partition at the same time, which may cause the batch program to deadlock and interrupt. At present, due to insufficient data in the test environment and large differences in host resources and production environment resources, it is difficult for the test environment to test the abnormal situations that may occur during the parallel processing of batch programs due to conflicts between data table partitions and batch settings. Summary of the invention
[0003] One object of the present invention is to provide a method for detecting anomalies in parallel data processing of a batch program in a database, which checks the partitioning of a data table and the batch setting of a batch program to avoid anomalies in the data table during parallel data processing of a batch program. Another object of the present invention is to provide an apparatus for detecting anomalies in parallel data processing of a batch program in a database. Another object of the present invention is to provide a computer device. Still another object of the present invention is to provide a readable medium.
[0004] In order to achieve the above objectives, the present invention discloses, on one hand, a method for detecting anomalies in parallel data processing of a batch program in a database, comprising:
[0005] Determine the partition information of the data table according to the database partition rule table;
[0006] Determine batch information based on the batch number control table of the batch procedure;
[0007] It is determined whether there is an abnormality in the data table during parallel data processing of a batch program according to the partition information and the batch information.
[0008] Preferably, determining the partition information of the data table according to the database partition rule table specifically includes:
[0009] Scan the database partition rules table;
[0010] Determine the partition number, partition condition and partition range of each data table in the database according to the partition rule table;
[0011] All partitions of the data table and partition information corresponding to each partition are determined according to the partition rule.
[0012] Preferably, the determining of the batch information according to the batch number control table of the batch program specifically includes:
[0013] Scan the batch number control table for batch procedures;
[0014] The batch number and the corresponding area code range of each batch of the batch program are determined according to the number control table to obtain batch information.
[0015] Preferably, determining whether there is an abnormality in the batch program parallel data processing according to the partition information and the batch information specifically includes:
[0016] It is determined whether there are partitions corresponding to multiple batches in a data table according to the partition information and batch information of the data table. If so, it is determined that there is an abnormality in the parallel data processing of the batch program.
[0017] Preferably, determining whether there are partitions corresponding to multiple batches in a data table according to the partition information and batch information of a data table specifically includes:
[0018] Determine the area code range corresponding to each partition of the data table according to the partition information;
[0019] According to the area code ranges corresponding to the partitions of the data table and the area code ranges corresponding to each batch, it is determined whether the area code range of a partition of the data table is within the area code ranges of multiple batches.
[0020] Preferably, determining the area code range corresponding to each partition of the data table according to the partition information specifically includes:
[0021] Determine the account range corresponding to each partition of the data table according to the partition information;
[0022] The account number range is converted into an area code range to obtain the area code range corresponding to each partition.
[0023] Preferably, further comprising:
[0024] If there is an abnormality;
[0025] Modify the partition information of the data table in the database partition rule table so that each partition of the data table corresponds to a batch of the batch program.
[0026] The present invention also discloses a database batch program parallel data processing anomaly detection device, comprising:
[0027] A partition analysis module is used to determine the partition information of the data table according to the database partition rule table;
[0028] Batch analysis module, used to determine batch information based on the batch number control table of the batch program;
[0029] The anomaly detection module is used to determine whether there is an anomaly in the data table during parallel data processing in a batch program according to the partition information and the batch information.
[0030] The present invention also discloses a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor.
[0031] When the processor executes the program, the method described above is implemented.
[0032] The present invention also discloses a computer readable medium having a computer program stored thereon.
[0033] When the program is executed by a processor, the method described above is implemented.
[0034] The present invention determines the partition information of a data table in a database according to a database partition rule table, and determines the batch information of a batch corresponding to a parallel program according to a batch number control table of a batch program. It is determined according to the batch information of the batch program and the partition information of the data table whether there are multiple programs in the batch program that process data of a partition of the data table at the same time when multiple programs process the data table in parallel, resulting in an abnormal situation during the parallel data processing of the batch program. Further, the partition information of the data table or the batch information of the batch program can be adjusted according to the abnormality detection result to avoid abnormality of the data table during the parallel data processing of the batch program. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0036] Figure 1 A flowchart showing a specific embodiment of the method for detecting abnormalities in parallel data processing of a batch program in a database according to the present invention;
[0037] Figure 2 A flowchart showing a specific embodiment S100 of the method for detecting abnormality in parallel data processing of a batch program in a database according to the present invention;
[0038] Figure 3 A flowchart showing a specific embodiment S200 of the method for detecting abnormality in parallel data processing of a batch program in a database according to the present invention;
[0039] Figure 4A flowchart showing a specific embodiment S310 of the method for detecting abnormality in parallel data processing of a batch program in a database according to the present invention;
[0040] Figure 5 A flowchart showing a specific embodiment S311 of the method for detecting abnormality in parallel data processing of a batch program in a database according to the present invention;
[0041] Figure 6 A flowchart showing a specific embodiment S400 of the method for detecting abnormality in parallel data processing of a batch program in a database according to the present invention;
[0042] Figure 7 A structural diagram showing a specific embodiment of the device for detecting abnormality in parallel data processing of a batch program in a database according to the present invention;
[0043] Figure 8 A structural diagram showing a specific embodiment of the database batch program parallel data processing anomaly detection device of the present invention, including an anomaly correction module;
[0044] Fig. 9 A schematic diagram showing the structure of a computer device suitable for implementing an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0045] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0046] It should be noted that the method and device for detecting anomalies in parallel data processing of batch programs in a database disclosed in the present application can be used in the field of artificial intelligence technology, and can also be used in any field outside the field of artificial intelligence technology. The application field of the method and device for detecting anomalies in parallel data processing of batch programs in a database disclosed in the present application is not limited.
[0047] Aiming at the problem that the current partition setting of the data table of the host database conflicts with the batch setting of each program of the batch program, which may cause deadlock and subsequent interruption during the parallel data processing of the batch program, the present invention checks the partition setting of the data table in the database and the batch setting of the batch program, avoids the phenomenon of batch program operation interruption caused by data table partition error or batch program batch error, and improves the coverage of program testing.
[0048] According to one aspect of the present invention, this embodiment discloses a method for detecting anomalies in parallel data processing of a database batch program. Figure 1As shown, in this embodiment, the method includes:
[0049] S100: Determine partition information of a data table according to a database partition rule table.
[0050] S200: Determine batch information according to the batch number control table of the batch program.
[0051] S300: Determine whether there is an exception in the data table during parallel data processing in a batch program according to the partition information and the batch information.
[0052] The present invention determines the partition information of a data table in a database according to a database partition rule table, and determines the batch information of a batch corresponding to a parallel program according to a batch number control table of a batch program. It is determined according to the batch information of the batch program and the partition information of the data table whether there are multiple programs in the batch program that process data of a partition of the data table at the same time when multiple programs process the data table in parallel, resulting in an abnormal situation during the parallel data processing of the batch program. Further, the partition information of the data table or the batch information of the batch program can be adjusted according to the abnormality detection result to avoid abnormality of the data table during the parallel data processing of the batch program.
[0053] In a preferred embodiment, Figure 2 As shown, the step S100 of determining the partition information of the data table according to the database partition rule table specifically includes:
[0054] S110: Scan the database partition rule table.
[0055] S120: Determine the partition number, partition condition and partition range of each data table in the database according to the partition rule table.
[0056] S130: Determine all partitions of the data table and partition information corresponding to each partition according to the partition rule.
[0057] Specifically, the partitioning rules of each data table in the database are stored in the partitioning rule table of the database. Thus, obtaining the partitioning rule table of the database can determine all data tables with a partition number greater than 0, that is, data tables with multiple partitions. Among them, the partitioning rules may include partitioning rules such as the number of partitions, partitioning conditions and partition ranges of the data table, and the partitioning information of each partition of each data table with multiple partitions can be determined according to the partitioning rules. For example, in a specific example, for the relational database DB2, the partitioning rule table MTBDTPRT in DB2 can be obtained, and a list of data tables with a partition (PART) greater than 0 in the MTBDTPRT table can be obtained by analysis. For each data table in the data table list, the partition number and data range of each partition in the data table are determined according to its corresponding partitioning rule. Among them, the area code range is characterized by the starting area code and the ending area code. It can be understood that the data range can be an area code range, or it can be a range of fields such as an account range. Table 1 shows the partition information of different data tables in this specific example.
[0058] Table 1
[0059]
[0060]
[0061] Preferably, the data in the data table may be filtered according to the partitioning rules of the data table, that is, the data in the data table may be screened, and the data in the fields in the data table corresponding to the partitioning rules may be retained to facilitate subsequent anomaly detection.
[0062] In a preferred embodiment, Figure 3 As shown, the step S200 determines the batch information according to the batch number control table of the batch program, specifically including:
[0063] S210: Scan the batch number control table of the batch program.
[0064] S220: Determine the batch number and the corresponding area code range of each batch of the batch program according to the number control table to obtain batch information.
[0065] Specifically, scanning the preset batch number control table in the batch program can determine the batch accessed by each program in the batch program, thereby obtaining the batch information of the batch program. Specifically, the batch number and the corresponding area code range of each batch in the batch program can be screened out from the batch number control table to obtain the batch information. For example, in a specific example, the batch number control table NTHPABZN of the batch program is scanned, and the NTHPABZN table is analyzed to obtain the batch number and the corresponding area code range of each batch. Among them, the area code range is characterized by the starting area code and the ending area code. Table 2 shows the batch information of the batch program in this specific example.
[0066] Table 2
[0067]
[0068]
[0069] In a preferred embodiment, the step S300 of determining whether there is an abnormality in the batch program parallel data processing according to the partition information and the batch information specifically includes:
[0070] S310: Determine whether there are partitions corresponding to multiple batches in a data table according to the partition information and batch information of the data table, and if so, determine that there is an abnormality in the parallel data processing of the batch program.
[0071] Specifically, there is a corresponding relationship between the partition information of the data table and the batch information of the batch program. If a partition in the data table corresponds to multiple batches, it means that when the batch program is running, multiple programs may access a partition of the data table at the same time. This will cause multiple programs to lock a data table partition at the same time, and the data processing of the data table partition will cause an exception, resulting in the interruption of the batch program. Therefore, in this preferred embodiment, by determining the number of batches corresponding to the data table partition, it can be determined whether the data table partition has a risk of being processed by multiple programs and causing an exception when the batch program is running.
[0072] In a preferred embodiment, Figure 4 As shown, the step S310 of determining whether there are partitions corresponding to multiple batches in a data table according to the partition information and batch information of the data table specifically includes:
[0073] S311: Determine the area code range corresponding to each partition of the data table according to the partition information.
[0074] S312: Determine whether the area code range of a partition of the data table is within the area code ranges of multiple batches according to the area code ranges corresponding to each partition of the data table and the area code ranges corresponding to each batch.
[0075] Specifically, the partition information of the data table may include the partition number of each partition of the data table and the corresponding area code range. The batch information of the batch program may include the batch number and the corresponding area code range. Therefore, the area code range of each partition can be compared with the area code range of each batch. If the starting area code or the ending area code of the area code range of a partition falls into the area code range of at least two batches, it means that a partition of the data table corresponds to at least two batches of the batch program. For example, for the partition information and batch information of Table 1 and Table 2, by comparing the area code range of each partition of each table in Table 1 and the area code range of each batch in Table 2, it can be determined whether there is a partition corresponding to multiple batches. Table 3 shows the comparison results of the area code ranges of Table 1 and Table 2.
[0076] Table 3
[0077]
[0078]
[0079] As can be seen from Table 3, the area codes in the area code range of the partition with partition number 9 in the BTBRSFXH table fall into batches 02 and 04. Therefore, when the data of partition 9 in the BTBRSFXH table is processed in parallel by batches 02 and 04, an abnormal situation of occupation conflict will occur. Similarly, the area code ranges of the partition with partition number 9 in the BTHCRDTP table, the partition with partition number 9 in the BTHRSKFQ table, the partition with partition number 1 in the BTHRSMUP table, and the partition with partition number 50 in the CTHRSCFM table all fall into multiple batches.
[0080] In a preferred embodiment, Figure 5 As shown, the step S311 determines the area code range corresponding to each partition of the data table according to the partition information, specifically including:
[0081] S3111: Determine the account range corresponding to each partition of the data table according to the partition information.
[0082] S3112: Convert the account range into an area code range to obtain the area code range corresponding to each partition.
[0083] Specifically, it can be understood that the partition information of the data table can also include the partition number and the corresponding account range. Then the account range needs to be converted into the area code range by data conversion. In order to obtain the area code range corresponding to each partition, the partition information and the partition and batch division standards of the batch information are the same, so that it is possible to analyze whether there is a range conflict between each partition and each batch. In a specific example, when presetting the partition, the account range corresponding to each partition is set to form the partition information, and the correspondence between the account range and the area code range is preset. After the account range corresponding to each partition is determined according to the partition information, the area code range corresponding to each partition can be further determined according to the correspondence between the account range and the area code range.
[0084] In a preferred embodiment, Figure 6 As shown, the method further includes S400:
[0085] S410: If there is an abnormality.
[0086] S420: Modify the partition rule table of the database or the batch number control table of the batch program so that each partition of the data table corresponds to a batch of the batch program.
[0087] Specifically, if there is an exception in the data table during parallel data processing of the batch program due to data partitioning or batch program batching errors. It is necessary to adjust the partition information of the data table or the batch information of the batch program so that one partition in the data table corresponds to only one batch, avoiding conflicts when one partition is called by multiple batches for data processing. Specifically, in actual operation, it is necessary to modify the partition rule table of the database to adjust the partition information of the data table, or modify the batch number control table of the batch program to adjust the batch information of the batch program. For example, for the partition number 9 of the BTBRSFXH table in Table 3, partition 9 can be split into two partitions, one of which has an area code range of 201-299, corresponding to batch 02; the other partition has an area code range of 300-302, corresponding to batch 04. Then the two partitions after the partition 9 is split only correspond to one batch, thereby avoiding abnormal phenomena during parallel data processing of the batch program.
[0088] The present invention determines the partition information of a data table in a database according to a database partition rule table, and determines the batch information of a batch corresponding to a parallel program according to a batch number control table of a batch program. It is determined according to the batch information of the batch program and the partition information of the data table whether there are multiple programs in the batch program that process data of a partition of the data table at the same time when multiple programs process the data table in parallel, resulting in an abnormal situation during the parallel data processing of the batch program. Further, the partition information of the data table or the batch information of the batch program can be adjusted according to the abnormality detection result to avoid abnormality of the data table during the parallel data processing of the batch program.
[0089] Based on the same principle, this embodiment also discloses a database batch program parallel data processing anomaly detection device. Figure 7 As shown, in this embodiment, the device includes a partition analysis module 11, a batch analysis module 12 and an anomaly detection module 13.
[0090] The partition analysis module 11 is used to determine the partition information of the data table according to the database partition rule table.
[0091] The batch analysis module 12 is used to determine the batch information according to the batch number control table of the batch program.
[0092] The anomaly detection module 13 is used to determine whether there is an anomaly in the data table during parallel data processing in a batch program according to the partition information and the batch information.
[0093] The present invention determines the partition information of a data table in a database according to a database partition rule table, and determines the batch information of a batch corresponding to a parallel program according to a batch number control table of a batch program. It is determined according to the batch information of the batch program and the partition information of the data table whether there are multiple programs in the batch program that process data of a partition of the data table at the same time when multiple programs process the data table in parallel, resulting in an abnormal situation during the parallel data processing of the batch program. Further, the partition information of the data table or the batch information of the batch program can be adjusted according to the abnormality detection result to avoid abnormality of the data table during the parallel data processing of the batch program.
[0094] In a preferred embodiment, the partition analysis module 11 is specifically used to scan the database partition rule table. According to the partition rule table, the partition number, partition condition and partition range of each data table in the database are determined. According to the partition rule, all partitions of the data table and the partition information corresponding to each partition are determined.
[0095] Specifically, the partitioning rules of each data table in the database are stored in the partitioning rule table of the database. Thus, obtaining the partitioning rule table of the database can determine all data tables with a partition number greater than 0, that is, data tables with multiple partitions. Among them, the partitioning rules may include partitioning rules such as the number of partitions, partitioning conditions and partition ranges of the data table, and the partitioning information of each partition of each data table with multiple partitions can be determined according to the partitioning rules. For example, in a specific example, for the relational database DB2, the partitioning rule table MTBDTPRT in DB2 can be obtained, and a list of data tables with a partition (PART) greater than 0 in the MTBDTPRT table can be obtained by analysis. For each data table in the data table list, the partition number and data range of each partition in the data table are determined according to its corresponding partitioning rule. Among them, the area code range is characterized by the starting area code and the ending area code. It can be understood that the data range can be an area code range, or it can be a range of fields such as an account range. Table 1 shows the partition information of different data tables in this specific example.
[0096] Preferably, the data in the data table may be filtered according to the partitioning rules of the data table, that is, the data in the data table may be screened, and the data in the fields in the data table corresponding to the partitioning rules may be retained to facilitate subsequent anomaly detection.
[0097] In a preferred embodiment, the batch analysis module is specifically used to scan the batch number control table of the batch program, determine the batch number and the corresponding area code range of each batch of the batch program according to the number control table, and obtain batch information.
[0098] Specifically, scanning the preset batch number control table in the batch program can determine the batch accessed by each program in the batch program, thereby obtaining the batch information of the batch program. Specifically, the batch number and the corresponding area code range of each batch in the batch program can be screened out from the batch number control table to obtain the batch information. For example, in a specific example, the batch number control table NTHPABZN of the batch program is scanned, and the NTHPABZN table is analyzed to obtain the batch number and the corresponding area code range of each batch. Among them, the area code range is characterized by the starting area code and the ending area code. Table 2 shows the batch information of the batch program in this specific example.
[0099] In a preferred embodiment, the anomaly detection module 13 is specifically used to determine whether there are partitions corresponding to multiple batches in a data table according to the partition information and batch information of the data table, and if so, determine that there is an anomaly in the batch program parallel data processing.
[0100] Specifically, there is a corresponding relationship between the partition information of the data table and the batch information of the batch program. If a partition in the data table corresponds to multiple batches, it means that when the batch program is running, multiple programs may access a partition of the data table at the same time. This will cause multiple programs to lock a data table partition at the same time, and the data processing of the data table partition will cause an exception, resulting in the interruption of the batch program. Therefore, in this preferred embodiment, by determining the number of batches corresponding to the data table partition, it can be determined whether the data table partition has a risk of being processed by multiple programs and causing an exception when the batch program is running.
[0101] In a preferred embodiment, the anomaly detection module 13 is further used to determine the area code range corresponding to each partition of the data table according to the partition information. According to the area code range corresponding to each partition of the data table and the area code range corresponding to each batch, it is determined whether the area code range of a partition of the data table is within the area code ranges of multiple batches.
[0102] Specifically, the partition information of the data table may include the partition number of each partition of the data table and the corresponding area code range. The batch information of the batch program may include the batch number and the corresponding area code range. Therefore, the area code range of each partition can be compared with the area code range of each batch. If the starting area code or the ending area code of the area code range of a partition falls into the area code range of at least two batches, it means that a partition of the data table corresponds to at least two batches of the batch program. For example, for the partition information and batch information of Table 1 and Table 2, by comparing the area code range of each partition of each table in Table 1 and the area code range of each batch in Table 2, it can be determined whether there is a partition corresponding to multiple batches. Table 3 shows the comparison results of the area code ranges of Table 1 and Table 2.
[0103] As can be seen from Table 3, the area codes in the area code range of the partition with partition number 9 in the BTBRSFXH table fall into batches 02 and 04. Therefore, when the data of partition 9 in the BTBRSFXH table is processed in parallel by batches 02 and 04, an abnormal situation of occupation conflict will occur. Similarly, the area code ranges of the partition with partition number 9 in the BTHCRDTP table, the partition with partition number 9 in the BTHRSKFQ table, the partition with partition number 1 in the BTHRSMUP table, and the partition with partition number 50 in the CTHRSCFM table all fall into multiple batches.
[0104] In a preferred embodiment, the anomaly detection module 13 is further used to determine the account range corresponding to each partition of the data table according to the partition information, and convert the account range into an area code range to obtain the area code range corresponding to each partition.
[0105] Specifically, it can be understood that the partition information of the data table can also include the partition number and the corresponding account range. Then the account range needs to be converted into the area code range by data conversion. In order to obtain the area code range corresponding to each partition, the partition information and the partition and batch division standards of the batch information are the same, so that it is possible to analyze whether there is a range conflict between each partition and each batch. In a specific example, when presetting the partition, the account range corresponding to each partition is set to form the partition information, and the correspondence between the account range and the area code range is preset. After the account range corresponding to each partition is determined according to the partition information, the area code range corresponding to each partition can be further determined according to the correspondence between the account range and the area code range.
[0106] In a preferred embodiment, Figure 8 As shown, the device further comprises an abnormality correction module 14. The abnormality correction module 14 is used to modify the partition rule table of the database or the batch number control table of the batch program if an abnormality exists so that each partition of the data table corresponds to a batch of the batch program.
[0107] Specifically, if there is an exception in the data table during parallel data processing of the batch program due to data partitioning or batch program batching errors. It is necessary to adjust the partition information of the data table or the batch information of the batch program so that one partition in the data table corresponds to only one batch, avoiding conflicts when one partition is called by multiple batches for data processing. Specifically, in actual operation, it is necessary to modify the partition rule table of the database to adjust the partition information of the data table, or modify the batch number control table of the batch program to adjust the batch information of the batch program. For example, for the partition number 9 of the BTBRSFXH table in Table 3, partition 9 can be split into two partitions, one of which has an area code range of 201-299, corresponding to batch 02; the other partition has an area code range of 300-302, corresponding to batch 04. Then the two partitions after the partition 9 is split only correspond to one batch, thereby avoiding abnormal phenomena during parallel data processing of the batch program.
[0108] The present invention determines the partition information of a data table in a database according to a database partition rule table, and determines the batch information of a batch corresponding to a parallel program according to a batch number control table of a batch program. It is determined according to the batch information of the batch program and the partition information of the data table whether there are multiple programs in the batch program that process data of a partition of the data table at the same time when multiple programs process the data table in parallel, resulting in an abnormal situation during the parallel data processing of the batch program. Further, the partition information of the data table or the batch information of the batch program can be adjusted according to the abnormality detection result to avoid abnormality of the data table during the parallel data processing of the batch program.
[0109] Since the principle of solving the problem by the device is similar to that of the above method, the implementation of the device can refer to the implementation of the method and will not be repeated here.
[0110] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer device, and specifically, the computer device may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0111] In a typical example, the computer device specifically includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the method executed by the client as described above is implemented; or, when the processor executes the program, the method executed by the server as described above is implemented.
[0112] Reference below Fig. 9 , which shows a schematic diagram of the structure of a computer device 600 suitable for implementing an embodiment of the present application.
[0113] like Fig. 9 As shown, the computer device 600 includes a central processing unit (CPU) 601, which can perform various appropriate operations and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage part 608 to a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the system 600 are also stored. The CPU 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0114] The following components are connected to the I / O interface 605: an input section 606 including a keyboard, a mouse, etc.; an output section 607 including a cathode ray tube (CRT), a liquid crystal feedback device (LCD), etc., and a speaker, etc.; a storage section 608 including a hard disk, etc.; and a communication section 609 including a network interface card such as a LAN card, a modem, etc. The communication section 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to the I / O interface 605 as needed. A removable medium 611, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 610 as needed, so that a computer program read therefrom is installed as needed as the storage section 608.
[0115] In particular, according to an embodiment of the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present invention includes a computer program product, which includes a computer program tangibly contained on a machine-readable medium, and the computer program includes program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through the communication part 609, and / or installed from the removable medium 611.
[0116] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0117] For the convenience of description, the above device is described in various units according to their functions. Of course, when implementing the present application, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0118] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0119] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0120] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0121] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0122] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0123] The present application may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.
[0124] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0125] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.
Claims
1. A method for detecting anomalies in parallel data processing of a database batch program, characterized in that: include: Determine the partition information of the data table according to the database partition rule table; Determine batch information based on the batch number control table of the batch procedure; Determine whether there is an abnormality in the data table during parallel data processing of a batch program according to the partition information and the batch information; The determining whether there is an abnormality in the batch program parallel data processing according to the partition information and the batch information specifically includes: Determine whether there are partitions corresponding to multiple batches in a data table according to partition information and batch information of the data table, and if so, determine that there is an abnormality in the parallel data processing of the batch program; The determining whether there are partitions corresponding to multiple batches in a data table according to the partition information and batch information of a data table specifically includes: Determine the area code range corresponding to each partition of the data table according to the partition information; Determining whether the area code range of a partition of the data table is within the area code ranges of multiple batches according to the area code ranges corresponding to each partition of the data table and the area code ranges corresponding to each batch; The partition information of the data table includes the partition number of each partition of the data table and the corresponding area code range. The batch information of the batch program includes the batch number and the corresponding area code range. The area code range of each partition is compared with the area code range of each batch. If the starting area code or the ending area code of the area code range of a partition falls into the area code range of at least two batches, it means that one partition of the data table corresponds to at least two batches of the batch program. Determining the area code range corresponding to each partition of the data table according to the partition information specifically includes: determining the account number range corresponding to each partition of the data table according to the partition information; converting the account number range into an area code range to obtain an area code range corresponding to each partition; The method further comprises: If there is an exception, modify the partition information of the data table in the database partition rule table so that each partition of the data table corresponds to a batch of the batch program.
2. The method for detecting anomalies in parallel data processing of a database batch program according to claim 1, characterized in that: Determining the partition information of the data table according to the database partition rule table specifically includes: Scan the database partition rules table; Determine the partition number, partition condition and partition range of each data table in the database according to the partition rule table; All partitions of the data table and partition information corresponding to each partition are determined according to the partition rule.
3. The method for detecting anomalies in parallel data processing of a database batch program according to claim 1, characterized in that: Determining the batch information according to the batch number control table of the batch program specifically includes: Scan the batch number control table for batch procedures; The batch number and the corresponding area code range of each batch of the batch program are determined according to the number control table to obtain batch information.
4. A database batch program parallel data processing anomaly detection device, characterized in that: include: A partition analysis module is used to determine the partition information of the data table according to the database partition rule table; Batch analysis module, used to determine batch information based on the batch number control table of the batch program; An anomaly detection module, used to determine whether there is an anomaly in the data table during parallel data processing of a batch program according to the partition information and the batch information; The anomaly detection module is specifically used to determine whether there are partitions corresponding to multiple batches in a data table according to the partition information and batch information of a data table, and if so, determine that there is an anomaly in the parallel data processing of the batch program; The anomaly detection module is specifically used to determine the area code range corresponding to each partition of the data table according to the partition information; determine whether the area code range of a partition of the data table is within the area code ranges of multiple batches according to the area code ranges corresponding to each partition of the data table and the area code ranges corresponding to each batch; The partition information of the data table includes the partition number of each partition of the data table and the corresponding area code range, and the batch information of the batch program includes the batch number and the corresponding area code range. The abnormality detection module is specifically used to compare the area code range of each partition with the area code range of each batch. If the starting area code or the ending area code of the area code range of a partition falls into the area code range of at least two batches, it means that a partition of the data table corresponds to at least two batches of the batch program; The anomaly detection module is specifically used to determine the account range corresponding to each partition of the data table according to the partition information; convert the account range into an area code range to obtain the area code range corresponding to each partition; If there is an abnormality; The database batch program parallel data processing anomaly detection device is used to modify the partition information of the data table in the database partition rule table so that each partition of the data table corresponds to a batch of the batch program.
5. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the method according to any one of claims 1 to 3 is implemented.
6. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 3 is implemented.
Citation Information
Patent Citations
Parallel batch processing method
CN1794285A