Index checking method and device, equipment and computer readable storage medium
By acquiring and analyzing the parameter information of batch processing tasks, the system can autonomously execute indicator verification tasks, solving the problem of time-consuming manual verification using Excel in existing technologies and achieving efficient indicator verification.
Patent Information
- Application Number
- CN202210298893.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-25
- Publication Date
- 2025-12-23
- Estimated Expiration
- 2042-03-25
AI Technical Summary
In existing technologies, when using Excel to verify indicators of multiple reports, it is necessary to manually collect and organize reports from different batches and sources in Excel, resulting in a large workload, long time consumption, and slow verification speed.
By acquiring the batch processing parameters of the batch processing task, including the batch processing cycle and status information, the system can autonomously determine whether to execute the batch processing task and execute the batch processing task according to the indicator verification configuration information to achieve indicator verification for different batches.
It improved the efficiency of indicator verification, reduced manual operations, and increased the verification speed and reliability.
Smart Images

Figure CN114647496B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the technical field of data processing, and particularly relates to an index checking method and device, equipment and a computer readable storage medium. BACKGROUND
[0002] For the management department, whether it is daily business management or response to supervision reporting, many reports need to be used for support, and there may be a certain hooking relationship between multiple indexes of these reports. When using these reports, business personnel needs to check and check the index data between different reports to ensure the data consistency and accuracy between the final complete set of reports.
[0003] In the prior art, EXCEL is used for index checking of multiple reports. In this way, different batches of reports from different sources need to be manually collected and sorted in EXCEL, and the comparison formula of different EXCEL column items needs to be defined, which is time-consuming and laborious. Therefore, the existing index checking rate is slow. SUMMARY
[0004] The embodiments of the present application provide an index checking method, device, equipment and computer readable storage medium, which can solve the problem of slow existing index checking rate.
[0005] In a first aspect, the embodiments of the present application provide an index checking method, which comprises:
[0006] Obtaining running batch parameter information corresponding to N running batch tasks of a first checking business, wherein the running batch parameter information comprises running batch cycle information and running batch state information, wherein the first checking business is a checking business of Q indexes from P databases, and the N running batch tasks are respectively used for checking data of the Q indexes in different running batch cycles, N and P are positive integers, and Q is an integer greater than 1;
[0007] According to the running batch parameter information corresponding to the first running batch task, it is determined whether to execute the first running batch task, wherein the first running batch task is any one of the N running batch tasks;
[0008] In the case of determining to execute the first running batch task, according to the index checking configuration information corresponding to the first checking business and the first running batch cycle corresponding to the first running batch task, the first running batch task is executed to obtain a first checking result corresponding to the first running batch task.
[0009] In a second aspect, the embodiments of the present application provide an index checking device, which comprises:
[0010] The acquisition module is configured to acquire run batch parameter information corresponding to N run batch tasks of a first check service, wherein the run batch parameter information comprises run batch period information and run batch state information, the first check service is a check service derived from Q indexes in P databases, the N run batch tasks are respectively used for checking data of the Q indexes in different run batch periods, N and P are positive integers, and Q is an integer greater than 1.
[0011] The determination module is configured to determine whether to execute a first run batch task according to the run batch parameter information corresponding to the first run batch task, the first run batch task being any one of the N run batch tasks.
[0012] The execution module is configured to execute the first run batch task according to index check configuration information corresponding to the first check service and a first run batch period corresponding to the first run batch task, to obtain a first check result corresponding to the first run batch task, in a case where it is determined to execute the first run batch task.
[0013] In a third aspect, an index check device is provided, and the device comprises a processor and a memory storing computer program instructions; the processor implements the index check method in the first aspect when executing the computer program instructions.
[0014] In a fourth aspect, a computer readable storage medium is provided, and the computer readable storage medium stores computer program instructions; the computer program instructions are executed by a processor to implement the index check method in the first aspect.
[0015] In a fifth aspect, a computer program product is provided, and instructions in the computer program product are executed by a processor of an electronic device to enable the electronic device to perform the index check method in the first aspect.
[0016] In the embodiments of the present application, for any check service, the index check device can autonomously determine whether to execute each run batch task of the check service according to run batch period information and run batch state information corresponding to the run batch task. In a case where it is determined to execute the run batch task, the run batch task can be executed according to index check configuration information corresponding to the check service, to implement the index check task of the check service in this batch. It can be seen that the embodiments of the present application can autonomously implement the index check task of different batches of the check service, thereby improving the efficiency of index check. BRIEF DESCRIPTION OF DRAWINGS
[0017] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the embodiments of the present application will be briefly introduced. Those drawings can help the ordinary skilled in the art to obtain other drawings without any creative effort.
[0018] Figure 1 is one of the flowcharts of the index checking method provided by the embodiments of the present application;
[0019] Figure 2 is a schematic diagram of the index checking provided by the embodiments of the present application;
[0020] Figure 3 is the second flowchart of the index checking method provided by the embodiments of the present application;
[0021] Figure 4 is a structural schematic diagram of the index checking device provided by the embodiments of the present application;
[0022] Figure 5 is a structural schematic diagram of the index checking device provided by the embodiments of the present application. DETAILED DESCRIPTION
[0023] The features and exemplary embodiments of various aspects of the present application will be described in detail below, in order to make the purposes, technical solutions and advantages of the present application more clear and apparent, the present application will be further described in detail below in combination with the drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain the present application, but not to limit the present application. The present application can be implemented without some of these specific details by those skilled in the art. The following description of the embodiments is only to provide a better understanding of the present application by showing examples of the present application.
[0024] It should be noted that, in this paper, relationship terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between the entities or operations. Moreover, the terms "include", "contain" or any other variants thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such process, method, article or device. Without more limitation, the elements defined by the statement "include" do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0025] For the convenience of understanding, some contents related to the embodiments of the present application will be described as follows:
[0026] The reconciliation service can be a data reconciliation service between at least two indicators. In actual applications, the at least two indicators can be derived from at least one data table, and further, the at least one data table can be derived from at least one database. For indicators derived from different databases, the data processing manner can be different. The at least one database can include at least one of the following: an Oracle (ORA) database, an Analytical Massively Parallel Processing (MPP) database, a MySQL database, a GreenPlum (GP) database, an EXCEL file, a text file, a TeraData (TD) database, and the like.
[0027] In the embodiments of the present application, an indicator reconciliation task of a reconciliation service can be run in batches according to a certain period. The running in batches can also be referred to as batch processing, batch processing, and the like.
[0028] The indicator reconciliation task run in batches is referred to as a batch task.
[0029] The period of running in batches (hereinafter referred to as a batch period) can be one hour, one day, one month, one quarter, or one year, and the like. The specific batch period can be set according to actual needs, and the embodiments of the present application do not limit the batch period.
[0030] One batch task can correspond to one batch period, and the batch task is used to reconcile the data of the indicators to be reconciled in the batch period.
[0031] In actual applications, one reconciliation service can include at least one batch task. In the case where one reconciliation service includes two or more batch tasks, it can be understood that the indicators reconciled by different batch tasks of the reconciliation service are the same, but the data of the same indicators in different batch periods is reconciled. For example, the i th batch task is used to reconcile the data of the indicators to be reconciled in the i th batch period, and the i+1 th batch task is used to reconcile the data of the indicators to be reconciled in the i+1 th batch period.
[0032] The indicator reconciliation method provided by the embodiments of the present application will be described in detail in combination with the drawings, some embodiments, and application scenarios.
[0033] Referring to Figure 1 , Figure 1 is one of the schematic diagrams of the indicator reconciliation method provided by the embodiments of the present application.
[0034] As Figure 1 indicated, the indicator reconciliation method provided by the embodiments of the present application can include the following steps:
[0035] In step 101, the index checking device acquires N batch running parameter information corresponding to N batch running tasks of a first checking service, wherein the batch running parameter information comprises batch running period information and batch running state information, the first checking service is a checking service of Q indexes from P databases, the N batch running tasks are used for checking data of the Q indexes in different batch running periods, N and P are positive integers, and Q is an integer greater than 1.
[0036] The first checking service can be any checking service. The first checking service is used for checking data of the Q indexes, and the Q indexes can be from at least one data table, which is from the P databases.
[0037] The batch running period information corresponding to the batch running task can be used at least for determining a batch running start time corresponding to the batch running task. In an implementation, the batch running period information corresponding to the batch running task can comprise a sequence number of a batch running period corresponding to the batch running task and a start time of a first batch running period of a checking service to which the batch running task belongs. In another implementation, the batch running period information corresponding to the batch running task can comprise a batch running start time of the batch running task, and further comprise at least one of a batch running period length of the batch running task and a batch running end time of the batch running task.
[0038] The batch running state information corresponding to the batch running task can be used for representing a completion condition of the batch running task. The batch running state information can comprise at least one of the following:
[0039] First state information representing that the first batch running task is not executed;
[0040] Second state information representing that the first batch running task is being executed;
[0041] Third state information representing that the first batch running task is abandoned;
[0042] Fourth state information representing that the first batch running task is executed successfully.
[0043] In step 102, the index checking device determines whether to execute the first batch running task according to the batch running parameter information corresponding to the first batch running task, wherein the first batch running task is any batch running task of the N batch running tasks.
[0044] In a specific implementation, for each batch running task, the index checking device can determine whether to execute the batch running task according to the batch running parameter information corresponding to the batch running task.
[0045] For the convenience of understanding, the first batch running task is taken as an example for illustration.
[0046] In a specific implementation, the index checking device can determine, according to the batch running period information corresponding to the first batch running task, a batch running start time corresponding to the first batch running task; and determine an execution state of the first batch running task according to the batch running state information corresponding to the first batch running task. Then, the index checking device can determine whether to execute the first batch running task according to the batch running start time corresponding to the first batch running task and the execution state of the first batch running task.
[0047] For example, the index checking device can determine to execute the first batch running task in a case where the first batch running task is not executed and the batch running start time of the first batch running task is reached, and otherwise, the index checking device can determine not to execute the first batch running task.
[0048] In a case where it is determined to execute the first batch running task, the index checking of the first checking service can be implemented by performing step 103. In a case where it is determined not to execute the first batch running task, other batch running tasks included in the first checking service can be sequentially traversed in a similar manner to step 102 to determine whether to execute the batch running tasks, until it is determined to execute a batch running task, or all batch running tasks are traversed and it is determined not to execute all batch running tasks.
[0049] Step 103: In a case where it is determined to execute the first batch running task, the first batch running task is executed according to the index checking configuration information corresponding to the first checking service and the first batch running period corresponding to the first batch running task, to obtain a first checking result corresponding to the first batch running task.
[0050] In an embodiment of the present application, the index checking configuration information corresponding to the checking service can include checking indexes corresponding to the checking service and their sources (including data table sources and database sources), index checking rules (or checking manners) corresponding to the checking service, and the like.
[0051] In a specific implementation, the checking index device can first locate, according to the checking indexes corresponding to the first checking service and their sources, the checking indexes of the first checking service, i.e., the Q indexes, in the P databases. Then, the data of the Q indexes in the first batch running period is acquired according to the first batch running period corresponding to the first batch running task, i.e., the first batch running period. Then, the acquired data can be checked according to the index checking rules corresponding to the first checking service, to obtain a checking result corresponding to the first batch running task, i.e., the first checking result.
[0052] In an embodiment of the present application, the information corresponding to each checking service can be pre-configured. For ease of understanding, the first checking service is taken as an example for description below.
[0053] In an example, the information corresponding to the checking service can be configured through a configuration interface.
[0054] As shown in Figure 2 The configuration interface can include a data source configuration control, an index checking rule configuration control, and a timing batch configuration control.
[0055] Upon receiving an input for the data source configuration control, the index checking device can display a data source configuration page in response to the input. In the data source configuration page, for the first checking service, the user can input the following information according to the user's own needs: the Q indexes, the identifier (such as the name) of the data table corresponding to each index in the Q indexes, and the identifier (such as the name) of the database corresponding to each data table, thereby realizing the configuration of the checking indexes and their sources corresponding to the first checking service. Upon receiving an input for the index checking rule configuration control, the index checking device can display an index checking rule configuration page in response to the input. In the index checking rule configuration page, for the first checking service, the user can input the checking rules between the Q indexes according to the user's own needs, thereby realizing the configuration of the index checking rules corresponding to the first checking service.
[0056] The index checking device can generate the index checking configuration information corresponding to the first checking service according to the information input by the user for the first checking service in the data source configuration page and the index checking configuration page.
[0057] Upon receiving an input for the timing batch configuration control, the index checking device can display a timing batch configuration page in response to the input. In the timing batch configuration page, for the first checking service, the user can input the batch start time, the batch end time, and the batch cycle length of the first checking service according to the user's own needs. In this way, after obtaining these pieces of information, the index checking device can determine the batch cycle number and the batch task number of the first checking service according to the batch start time, the batch end time, and the batch cycle length of the first checking service, thereby realizing the configuration of the batch tasks of the first checking service. It can be understood that the batch cycle number of the first checking service is equal to the batch task number of the first checking service, and the batch cycle number and the batch task number of the first checking service are the N value.
[0058] The index checking device can generate the batch cycle information corresponding to each batch task in the N batch tasks according to the input batch start time, batch end time, and batch cycle length of the first checking service.
[0059] In addition, in the embodiments of the present application, as Figure 2As shown, the information input in the data source configuration page can be stored in the data source information table. The information input in the index check rule configuration page can be stored in the index check configuration table. The batch running tasks included in the check service and the batch running state information corresponding to the batch running tasks can be stored in the batch running state table.
[0060] The index check method of the present application can determine whether to execute each batch running task of a check service according to the batch running period information and the batch running state information corresponding to the batch running task. When it is determined to execute the batch running task, the batch running task can be executed according to the index check configuration information corresponding to the check service, so as to implement the index check task of the batch of the check service. It can be seen that the embodiments of the present application can autonomously implement the index check tasks of different batches of the check service, thereby improving the efficiency of index check.
[0061] The specific implementation of step 102 is exemplarily described below.
[0062] In one example, determining whether to execute the first batch running task according to the batch running parameter information corresponding to the first batch running task can include:
[0063] determining whether the batch running state information corresponding to the first batch running task is first state information, the first state information representing that the first batch running task is not executed;
[0064] in a case where the batch running state information corresponding to the first batch running task is the first state information, determining whether the batch running start time corresponding to the first batch running task is reached according to the batch running period information corresponding to the first batch running task;
[0065] in a case where the batch running start time corresponding to the first batch running task is reached, determining to execute the first batch running task.
[0066] In this example, the index check device can first filter out the batch running tasks that are not executed, and then compare the batch running start time corresponding to each batch running task that is not executed with the current time to determine the batch running task that is about to be executed. Finally, the batch running task that is not executed and reaches the batch running start time is determined as the batch running task that is about to be executed.
[0067] Taking the first batch running task as an example: if it is not executed and reaches the batch running start time corresponding thereto, it can be determined to execute the first batch running task; if it is not executed or does not reach the batch running start time corresponding thereto, it can be determined not to execute the first batch running task. That is, the condition that the first batch running task needs to meet is that the first batch running task is not executed and reaches the batch running start time corresponding to the first batch running task.
[0068] In this way, the batch task of the business checking can be executed according to the preset setting, so that the reliability of the business index checking execution can be improved.
[0069] It can be understood that, in other examples, the index checking device can first filter out the batch tasks that do not reach the batch start time, and then determine the batch task to be executed according to the execution state of each batch task filtered out. Finally, the batch task that does not reach the batch start time is determined as the batch task to be executed.
[0070] The following is an example description of the specific implementation of step 103 of the embodiment of the application.
[0071] In one example, in a case where it is determined to execute the first batch task, the first batch task is executed according to the index checking configuration information corresponding to the first checking business and the first batch period corresponding to the first batch task, to obtain a first checking result corresponding to the first batch task.
[0072] In a case where it is determined to execute the first batch task, it is determined whether there is to-be-checked data corresponding to the first batch task according to the index checking configuration information corresponding to the first checking business.
[0073] In a case where there is to-be-checked data corresponding to the first batch task, the first batch task is executed according to the index checking configuration information corresponding to the first checking business and the first batch period corresponding to the first batch task, to obtain a first checking result corresponding to the first batch task.
[0074] In this example, after the index checking device makes a decision to execute a batch task, the index checking device can further determine whether to actually execute the batch task in combination with the index checking configuration information corresponding to the checking business to which the batch task belongs, to further improve the reliability of the business index checking execution.
[0075] The to-be-checked data corresponding to the first batch task can be understood as data of the Q indexes in the batch period corresponding to the first batch task.
[0076] In a specific implementation, the index checking device can determine the checking index and its source of the first checking business from the index checking configuration information corresponding to the first checking business. Then, the index checking device can interact with the corresponding database to determine whether there is data corresponding to the first batch period in the data of the Q indexes stored in the database.
[0077] If the to-be-checked data corresponding to the first batch task exists, the index checking device can perform the first batch task to check the to-be-checked data corresponding to the first batch task. If the to-be-checked data corresponding to the first batch task does not exist, it means that there is no data corresponding to the first batch task to check, and the first batch task can be abandoned to reduce the running burden of the index checking device.
[0078] Therefore, in the example, the condition that needs to be met for performing the first batch task can include that the first batch task is not performed, the batch start time corresponding to the first batch task is reached, and the to-be-checked data corresponding to the first batch task exists. In this way, the reliability of the business index checking execution can be further improved.
[0079] In the above example, further, before the determining whether the to-be-checked data corresponding to the first batch task exists according to the index checking configuration information corresponding to the first checking business, the method can further include:
[0080] In the case of determining to perform the first batch task, the batch state information corresponding to the first batch task is updated to second state information, and the second state information represents that the first batch task is being performed.
[0081] After the determining whether the to-be-checked data corresponding to the first batch task exists according to the index checking configuration information corresponding to the first checking business, the method further includes:
[0082] In the case of not existing the to-be-checked data corresponding to the first batch task, the batch state information corresponding to the first batch task is updated to third state information, and the third state information represents that the first batch task is abandoned.
[0083] In the embodiments of the present application, when the state of the first batch task changes, the batch state information of the first batch task needs to be updated in time.
[0084] For example, in the case of determining to perform the first batch task, the execution state of the first batch task can be written, and the batch state information thereof is updated to being performed. In the case of determining to abandon the first batch task, the batch state information thereof can be updated to being abandoned.
[0085] In this way, the batch state information of the first batch task can be consistent with the actual state, and the reliability of the business index checking execution can be further improved.
[0086] The specific execution of the batch task in the embodiments of the present application is described below:
[0087] In a specific implementation, when the first batch task is executed, i.e., the data of the Q indicators in the first batch period is checked, the indicator checking device can first extract the data of the Q indicators in the first batch period from the corresponding data tables in the P databases. Then, the checking between the extracted data can be completed according to the indicator checking rules of the Q indicators.
[0088] In one example, the execution of the first batch task according to the indicator checking configuration information corresponding to the first checking service can include:
[0089] The P data processing units corresponding to the P databases are called to perform the first operation, and Q indicator processing results corresponding to the Q indicators are obtained, wherein the first operation performed by a first data processing unit in the P data processing units includes: obtaining target data of a target indicator in the first batch period from a first database corresponding to the first data processing unit; and processing the target data to obtain an indicator processing result corresponding to the target indicator, the target indicator including at least one indicator in the Q indicators.
[0090] The Q indicator processing results are checked according to the indicator checking configuration information corresponding to the first checking service, and a first checking result corresponding to the first batch task is obtained.
[0091] The target indicator is an indicator in the Q indicators that originates from the first database.
[0092] After the indicator checking device determines to execute the first batch task, the data processing units corresponding to the P databases, i.e., the P data processing units, can be determined. Then, the P data processing units can be called to perform the first operation respectively.
[0093] Taking a first data processing unit as an example, the first data processing unit can first determine a target indicator in the first database, and then extract data of the target indicator in a batch period corresponding to the first batch task from the first database, i.e., the target data. Then, the target data is processed by using a data processing method corresponding to the first database, and an indicator processing result corresponding to the target indicator is obtained.
[0094] By analogy, the index checking device can obtain Q index processing results corresponding to the Q indexes. Then, the index checking device can obtain index checking rules of the Q indexes from the index checking configuration information corresponding to the first checking service, and check the Q index processing results by using the index checking rules, so as to realize checking of the Q indexes in the first checking period, that is, complete execution of the first batch task.
[0095] In this example, considering that different databases have different data processing manners, different data processing units can be used to process data in different databases, so as to improve the reliability of data processing, and further improve the reliability of business index checking.
[0096] Further, after the first batch task is executed to obtain the first checking result corresponding to the first batch task, the method can further include:
[0097] updating the batch state information corresponding to the first batch task to fourth state information, the fourth state information representing that the first batch task is executed successfully;
[0098] receiving a first input, the first input being used to query a checking result of a checking service;
[0099] in response to the first input, displaying a first page, the first page including the first checking result.
[0100] After the index checking device obtains the first checking result, it can determine that the first batch task is executed, so that the batch state information of the first batch task can be updated to the fourth state information. In this way, the batch state information of the first batch task can be consistent with its actual state, and the reliability of business index checking execution can be improved.
[0101] In addition, the index checking device can store the obtained first checking result, such as in an index checking result table, for user query.
[0102] To facilitate user query of the checking result of the business, as shown in Figure 2 The index checking result query control can be set in the configuration interface. When an input for the index checking result query control is received, the index checking device can display an index checking result display page in response to the input. In the display page, the checking result corresponding to each batch task executed successfully by each checking service can be displayed.
[0103] Further, a query time control can be added in the index checking result display page to select a time period for query. In this way, only the index checking results corresponding to the time period for query can be displayed in the display page, thereby improving the flexibility of index checking result query.
[0104] It should be noted that the various optional embodiments introduced in the embodiments of the present application can be implemented in combination with each other without conflict, or can be implemented alone, and the embodiments of the present application do not limit this.
[0105] For the convenience of understanding, the embodiments of the present application are described in combination with Figure 2 and Figure 3 The example is described as follows:
[0106] In the present example, the index checking method can be implemented through a configuration interface and an index checking program, and the configuration interface and the index checking program can be implemented through Python code and SQL language.
[0107] The configuration interface can be used to implement the basic configuration and result query of index checking. As shown in Figure 2 , it can include a data source configuration control, an index checking rule configuration control, an index checking batch running configuration control, and an index checking result query control. The related configuration result data can be saved to the index checking data storage to provide corresponding information for the execution of the index checking program.
[0108] The index checking program can include a batch running master unit, a data source analysis unit, and data processing units corresponding to different databases. By interacting with the index checking data storage, the source data required for index checking is obtained from the index source data storage, and the final checking result is also stored in the index checking result table of the index checking data storage. The batch running master unit can use the resident process developed by Python, and can scan the task state of each batch running task in the batch running state table in the index checking data storage at regular intervals, and execute the corresponding batch running task when the condition is met.
[0109] The index checking program automatically analyzes the checking rules, interacts with the databases in the index source data storage, obtains different index data, compares the index result data, and finally loads the comparison result into the index checking result table of the index checking data storage.
[0110] As shown in Figure 3 , the index checking method can include the following steps:
[0111] Step 301, obtaining batch running parameters.
[0112] In specific implementation, the batch running parameter information corresponding to each batch running task is obtained.
[0113] Step 302, determining whether batch running is needed.
[0114] determines whether the corresponding batch task needs to be executed.
[0115] If the answer is yes, step 303 can be executed. If the answer is no, the process can be ended.
[0116] Step 303, insert the batch state.
[0117] In the implementation, the batch task determined to be executed is written in the batch state table, and the batch state of the batch task is updated to be in execution.
[0118] Step 304, obtain the index check configuration information from the index check configuration table.
[0119] Step 305, determine whether the batch task has data to be checked.
[0120] If the answer is yes, step 306 is executed. If the answer is no, step 310 is executed, and step 302 is re-executed.
[0121] Step 306, obtain the data source information from the data source information table.
[0122] Step 307, parse the data source.
[0123] Step 308, process different types of data respectively, and perform data checking to obtain a checking result.
[0124] Step 309, store the checking result in the index checking result.
[0125] In the implementation, when each checking rule is executed in the case that the index needs to be checked, the index checking configuration information can be obtained, the detailed data source connection information can be obtained by parsing the data source in the rule and the data source configuration table, the connection with the index source database can be realized through the data processing unit, the index result data can be obtained according to the index checking configuration rule, and the result data can be loaded into the index checking result table.
[0126] After all the index checking rules are executed, the batch state is updated, and the process returns to the batch task judgment. If there is no task to be executed, the program exits.
[0127] Step 310, update the batch state.
[0128] The present application can support automatic calculation of different batches of different source data tables through a configuration interface, has a high speed, and can conveniently view the comparison result set.
[0129] In addition, the application can use python to combine databases for multi-data source data checking. The general Python and relational database are used for implementation, and there is no special requirement for the operating system and hardware configuration, and the program can be conveniently transplanted. The core processing logic of the program is implemented by Python code, and the product installation package formed is convenient for product output. The application has the advantages of convenient transplantation and deployment, and can process different types of databases.
[0130] Based on the index checking method provided in the above embodiments, the application also provides a specific implementation manner of an index checking device. As shown in Figure 4 The index checking device provided by the embodiments of the application can include:
[0131] The acquisition module 401 is configured to acquire run batch parameter information corresponding to N run batch tasks of a first checking service, wherein the run batch parameter information includes run batch period information and run batch state information, the first checking service is a checking service of Q indexes from P databases, the N run batch tasks are respectively used for checking data of the Q indexes in different run batch periods, N and P are positive integers, and Q is an integer greater than 1;
[0132] The determination module 402 is configured to determine whether to execute a first run batch task according to the run batch parameter information corresponding to the first run batch task, wherein the first run batch task is any one of the N run batch tasks;
[0133] The execution module 403 is configured to execute the first run batch task according to index checking configuration information corresponding to the first checking service and a first run batch period corresponding to the first run batch task to obtain a first checking result corresponding to the first run batch task, in a case where it is determined to execute the first run batch task.
[0134] The index checking device of the embodiments of the application can independently determine whether to execute any checking service according to run batch period information and run batch state information corresponding to each run batch task of the checking service. In a case where it is determined to execute the run batch task, the run batch task can be executed according to index checking configuration information corresponding to the checking service, to implement the index checking task of the batch of the checking service. It can be seen that the index checking device of the embodiments of the application can independently implement the index checking task of different batches of the checking service, thereby improving the efficiency of index checking.
[0135] In one example, the determination module includes:
[0136] The first determination unit is configured to determine whether the run batch state information corresponding to the first run batch task is first state information, wherein the first state information represents that the first run batch task is not executed.
[0137] a second determining unit, configured to determine whether a run-batch start time corresponding to the first run-batch task is reached according to run-batch period information corresponding to the first run-batch task, in a case where the run-batch state information corresponding to the first run-batch task is the first state information;
[0138] a third determining unit, configured to determine to execute the first run-batch task in a case where the run-batch start time corresponding to the first run-batch task is reached.
[0139] In one example, the execution module comprises:
[0140] a fourth determining unit, configured to determine whether there is to-be-checked data corresponding to the first run-batch task according to index checking configuration information corresponding to the first checking service, in a case where it is determined to execute the first run-batch task.
[0141] a first execution unit, configured to execute the first run-batch task according to the index checking configuration information corresponding to the first checking service and a first run-batch period corresponding to the first run-batch task, to obtain a first checking result corresponding to the first run-batch task, in a case where there is to-be-checked data corresponding to the first run-batch task.
[0142] In one example, the apparatus further comprises:
[0143] a first updating module, configured to update run-batch state information corresponding to the first run-batch task to second state information in a case where it is determined to execute the first run-batch task, the second state information indicating that the first run-batch task is being executed.
[0144] a second updating module, configured to update the run-batch state information corresponding to the first run-batch task to third state information in a case where there is no to-be-checked data corresponding to the first run-batch task, the third state information indicating that the first run-batch task is abandoned.
[0145] In one example, the execution module comprises:
[0146] a second execution unit, configured to invoke P data processing units corresponding to the P databases to execute a first operation, to obtain Q index processing results corresponding to the Q indexes, wherein the first operation executed by a first data processing unit of the P data processing units comprises: obtaining target data of a target index in the first run-batch period from a first database corresponding to the first data processing unit; and processing the target data to obtain an index processing result corresponding to the target index, the target index comprising at least one index of the Q indexes.
[0147] The collation unit is configured to collate the Q index processing results according to the index collation configuration information corresponding to the first collation service, to obtain a first collation result corresponding to the first batch task.
[0148] In one example, the apparatus further includes:
[0149] The third updating module is configured to update the batch state information corresponding to the first batch task to fourth state information, the fourth state information representing that the first batch task is executed successfully.
[0150] The receiving module is configured to receive a first input, the first input being used to query a collation result of a collation service.
[0151] The response module is configured to display a first page in response to the first input, the first page including the first collation result.
[0152] Figure 5 A hardware structure diagram of index collation provided by an embodiment of the present application is shown.
[0153] The index collation device can include a processor 501 and a memory 502 having computer program instructions stored therein.
[0154] Specifically, the processor 501 can include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or can be configured to implement one or more integrated circuits of the embodiments of the present application.
[0155] The memory 502 can include a mass storage for data or instructions. By way of example and not limitation, the memory 502 can include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive or a combination of two or more of these. Where appropriate, the memory 502 can include removable or non-removable (or fixed) media. Where appropriate, the memory 502 can be internal or external to the integrated gateway disaster recovery device. In a particular embodiment, the memory 502 is a non-volatile solid-state memory.
[0156] The memory can include read-only memory (ROM), random access memory (RAM), magnetic disk storage mediums devices, optical storage mediums devices, flash memory devices, electrical, optical, or other physical / tangible memory storage devices. Thus, generally, the memory includes one or more tangible (non-transitory) computer-readable storage mediums (e.g., memory devices) encoded with software including computer-executable instructions that, when executed (e.g., by one or more processors), are operable to perform the operations described with reference to the methods according to an aspect of the present disclosure.
[0157] The processor 501 implements any one of the index checking methods in the above embodiments by reading and executing computer program instructions stored in the memory 502.
[0158] In one example, the index checking device can further include a communication interface 503 and a bus 510. Wherein, as shown in the figure, the processor 501, the memory 502, the communication interface 503 are connected through the bus 510 and complete the communication between each other. Figure 5
[0159] The communication interface 503 is mainly used to realize the communication between each module, device, unit and / or equipment in the embodiments of the present application.
[0160] The bus 510 includes hardware, software or both to couple components of the online data traffic billing device to each other. By way of example, and not limitation, the bus can include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a HyperTransport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an InfiniBand (IB) interconnect, a Low Pin Count (LPC) bus, a memory bus, a Micro Channel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association local (VLB) bus, or another suitable bus or a combination of two or more of these. Where suitable, the bus 510 can include one or more buses. Although specific buses are described and illustrated in the embodiments of the present application, the present application contemplates any suitable bus or interconnect.
[0161] In addition, in combination with the index checking method in the above embodiments, the embodiments of the present application can provide a computer readable storage medium to realize. The computer readable storage medium has computer program instructions stored thereon; the computer program instructions are executed by the processor to implement any one of the index checking methods in the above embodiments.
[0162] It is to be understood that the application is not limited to particular configurations and processes described herein and shown in the drawings. The detailed description is not to be taken in a limiting sense, and the scope of the present application is defined by the appended claims. In the above embodiments, several specific steps are described and illustrated in order to provide a thorough disclosure of the application. However, it can be appreciated that the method process of the present application is not limited to the specifically enumerated steps, and that various changes, modifications and additions can be made thereto by those skilled in the art without departing from the scope of the present application. Further, the scope of the present application is not intended to be limited to particular configurations and process steps described herein and shown in the drawings.
[0163] The functions shown in the block diagram of the above described structure can be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, or the like. When implemented in software, the elements of the present application are program or code segments that are used to perform the required tasks. The program or code segments can be stored in a machine-readable medium, or transmitted through a data signal carried in a carrier wave over a transmission medium or communication link. The "machine-readable medium" can include any medium that can store or transfer information. Examples of the machine-readable medium include an electronic circuit, a semiconductor memory device, a ROM, a flash memory, an erasable ROM (EROM), a floppy diskette, a CD-ROM, an optical disk, a hard disk, a fiber optic medium, a radio frequency (RF) link, and the like. The code segments can be downloaded via computer networks such as the Internet, an intranet, and the like.
[0164] It is also to be understood that the example embodiments described herein are based on a series of steps or apparatuses to describe some methods or systems. However, the present application is not limited to the order of the steps described above, that is, the steps can be performed in the order mentioned in the embodiments, or in an order different from the embodiments, or several steps can be performed simultaneously.
[0165] The computer program instructions can also be loaded onto a computer, other programmable data processing apparatus, or other processing devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other processing devices to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide processes for implementing the functions / acts specified in the flowchart and / or block diagram block or blocks. Alternatively, computer program instructions can be loaded onto a computer, other programmable data processing apparatus, or other processing devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other processing devices to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide processes for implementing the functions / acts specified in the flowchart and / or block diagram block or blocks.
[0166] The above merely describes a specific implementation of the present application. Those skilled in the art can clearly understand the specific working processes of the system, modules and units described above for the convenience and brevity of description, and the corresponding processes in the foregoing method embodiments can be referred to, which will not be described herein again. It should be understood that the protection scope of the present application is not limited in this way, and any person skilled in the art can easily think of various equivalent modifications or replacements within the technical range disclosed in the present application, and these modifications or replacements should be covered in the protection scope of the present application.
Claims
1. An index collation method, characterized by, The method comprises: obtaining run batch parameter information corresponding to N run batch tasks of a first checking service, the run batch parameter information comprising run batch period information and run batch state information, wherein the first checking service is a checking service derived from Q indexes in P databases, the N run batch tasks are respectively used for checking data of the Q indexes in different run batch periods, N and P are positive integers, Q is an integer greater than 1, and the first checking service is used for checking a checking relationship between the Q indexes in the P databases; determining whether to execute a first run batch task according to the run batch parameter information corresponding to the first run batch task, the first run batch task being any one of the N run batch tasks; in a case where it is determined to execute the first run batch task, calling P data processing units corresponding to the P databases to perform a first operation to obtain Q index processing results corresponding to the Q indexes, wherein the first operation performed by a first data processing unit of the P data processing units comprises: obtaining target data of a target index in a first run batch period from a first database corresponding to the first data processing unit; and processing the target data to obtain an index processing result corresponding to the target index, the target index comprising at least one of the Q indexes; checking the Q index processing results according to index checking configuration information corresponding to the first checking service to obtain a first checking result corresponding to the first run batch task.
2. The method of claim 1, wherein, The method further comprises: determining whether run batch state information corresponding to the first run batch task is first state information, the first state information indicating that the first run batch task has not been executed; in a case where the run batch state information corresponding to the first run batch task is the first state information, determining whether a run batch start time corresponding to the first run batch task has been reached according to run batch period information corresponding to the first run batch task; in a case where the run batch start time corresponding to the first run batch task has been reached, determining to execute the first run batch task.
3. The method of claim 1, wherein, The method further comprises: in a case where it is determined to execute the first run batch task, determining whether there is to-be-checked data corresponding to the first run batch task according to the index checking configuration information corresponding to the first checking service; and in a case where it is determined that there is to-be-checked data corresponding to the first run batch task, checking the to-be-checked data corresponding to the first run batch task according to the index checking configuration information corresponding to the first checking service to obtain the first checking result corresponding to the first run batch task. In a case where there is to-be-checked data corresponding to the first batch task, a first operation is performed by P data processing units corresponding to the P databases to obtain Q index processing results corresponding to the Q indexes, and the Q index processing results are checked according to index checking configuration information corresponding to the first checking service to obtain a first checking result corresponding to the first batch task.
4. The method of claim 3, wherein, Before the determining whether there is to-be-checked data corresponding to the first batch task according to the index checking configuration information corresponding to the first checking service, the method further includes: In a case where it is determined that the first batch task is to be executed, batch state information corresponding to the first batch task is updated to second state information, and the second state information indicates that the first batch task is being executed; After the determining whether there is to-be-checked data corresponding to the first batch task according to the index checking configuration information corresponding to the first checking service, the method further includes: In a case where there is no to-be-checked data corresponding to the first batch task, batch state information corresponding to the first batch task is updated to third state information, and the third state information indicates that the first batch task is abandoned.
5. The method of claim 1, wherein, After the checking the Q index processing results according to the index checking configuration information corresponding to the first checking service to obtain the first checking result corresponding to the first batch task, the method further includes: Batch state information corresponding to the first batch task is updated to fourth state information, and the fourth state information indicates that the first batch task is executed successfully. A first input is received, and the first input is used to query a checking result of a checking service. In response to the first input, a first page is displayed, and the first page includes the first checking result.
6. An index collating device, characterized by The apparatus includes: An obtaining module is configured to obtain batch parameter information corresponding to N batch tasks of a first checking service, the batch parameter information including batch cycle information and batch state information, wherein the first checking service is a checking service of Q indexes from P databases, the N batch tasks are respectively used to check data of the Q indexes in different batch cycles, N and P are positive integers, Q is an integer greater than 1, and the first checking service is used to check a correlation between the Q indexes in the P databases; A determining module is configured to determine whether to execute a first batch task according to the batch parameter information corresponding to the first batch task, the first batch task being any one of the N batch tasks. The second execution unit is configured to, in a case where it is determined to execute the first batch task, invoke P data processing units corresponding to the P databases to execute a first operation, to obtain Q index processing results corresponding to the Q indexes, wherein the first operation executed by a first data processing unit of the P data processing units comprises: obtaining target data of a target index in a first batch cycle from a first database corresponding to the first data processing unit; and processing the target data to obtain an index processing result corresponding to the target index, the target index comprising at least one of the Q indexes. The checking unit is configured to check the Q index processing results according to index checking configuration information corresponding to the first checking service, to obtain a first checking result corresponding to the first batch task.
7. An index collating apparatus characterized by comprising: The device comprises a processor and a memory storing computer program instructions; and the processor executes the computer program instructions to implement the index checking method in any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer program instructions, and the computer program instructions are executed by the processor to implement the index checking method in any one of claims 1 to 5.
9. A computer program product, characterised in that, The instructions in the computer program product are executed by the processor of the electronic device, so that the electronic device executes the index checking method in any one of claims 1 to 5.
Citation Information
Patent Citations
Method and device for verifying user data in telecommunication system
CN102098699A