CN114647496A - Index checking method, device, equipment and computer readable storage medium - Google Patents

Index checking method, device, equipment and computer readable storage medium Download PDF

Info

Publication number
CN114647496A
CN114647496A CN202210298893.7A CN202210298893A CN114647496A CN 114647496 A CN114647496 A CN 114647496A CN 202210298893 A CN202210298893 A CN 202210298893A CN 114647496 A CN114647496 A CN 114647496A
Authority
CN
China
Prior art keywords
batch
task
checking
index
batching
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210298893.7A
Other languages
Chinese (zh)
Inventor
陈细平
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Construction Bank Corp
Original Assignee
China Construction Bank Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Construction Bank Corp filed Critical China Construction Bank Corp
Priority to CN202210298893.7A priority Critical patent/CN114647496A/en
Publication of CN114647496A publication Critical patent/CN114647496A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues

Landscapes

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

Abstract

The application discloses an index checking method, an index checking device, index checking equipment and a computer readable storage medium. The method comprises the following steps: acquiring batch parameter information corresponding to N batch tasks of a first check service respectively, wherein the batch parameter information comprises batch period information and batch state information, the first check service is a check service derived from Q indexes in P databases, and the N batch tasks are used for checking data of the Q indexes in different batch periods respectively; determining whether to execute the first batch running task according to batch parameter information corresponding to the first batch running task; and under the condition that the first batch running task is determined to be executed, 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, and a first checking result corresponding to the first batch running task is obtained. The method and the device can autonomously realize the task of checking the indexes of different batches of the service, and improve the efficiency of index checking.

Description

Index checking method, device, equipment and computer readable storage medium
Technical Field
The present application relates to the field of data processing technologies, and in particular, to an index checking method, apparatus, device, and computer readable storage medium.
Background
For a management department, whether daily business management or supervision reporting is dealt with, many reports need to be used for support, a certain checking relation may exist among multiple indexes of the reports, and business personnel need to check and verify each index data among different reports when using the reports so as to ensure the consistency and accuracy of the data among the final set of reports.
In the prior art, index check of a plurality of reports is performed by using EXCEL, in this mode, reports of different batches and different sources need to be collected and sorted in EXCEL manually, however, a comparison formula of different EXCEL list items is defined, and therefore, workload is large and time consumption is long. As can be seen, the existing index checking rate is slow.
Disclosure of Invention
The embodiment of the application provides an index checking method, an index checking device, index checking equipment and a computer readable storage medium, which can solve the problem that the existing index checking speed is slow.
In a first aspect, an embodiment of the present application provides an index checking method, where the method includes:
acquiring batch parameter information corresponding to N batch tasks of a first checking service respectively, wherein the batch parameter information comprises batch period information and batch state information, the first checking service is a checking service derived from Q indexes in P databases, the N batch tasks are respectively used for checking data of the Q indexes in different batch periods, N and P are positive integers, and Q is an integer greater than 1;
determining whether to execute a first batch task according to the batch parameter information corresponding to the first batch task, wherein the first batch task is any one of the N batch tasks;
and under the condition that the first batch running task is determined to be executed, 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, and a first checking result corresponding to the first batch running task is obtained.
In a second aspect, an embodiment of the present application provides an index checking apparatus, including:
the system comprises an acquisition module, a comparison module and a comparison module, wherein the acquisition module is used for acquiring batch parameter information corresponding to N batch tasks of a first check service respectively, the batch parameter information comprises batch period information and batch state information, the first check service is a check service derived from Q indexes in P databases, the N batch tasks are respectively used for checking data of the Q indexes in different batch periods, N and P are positive integers, and Q is an integer greater than 1;
the determining module is used for determining whether to execute a first batch task according to the batch parameter information corresponding to the first batch task, wherein the first batch task is any one of the N batch tasks;
and the execution module is used for checking the configuration information according to the index corresponding to the first checking service and the first batch running period corresponding to the first batch running task under the condition of determining to execute the first batch running task, and executing the first batch running task to obtain a first checking result corresponding to the first batch running task.
In a third aspect, an embodiment of the present application provides an index checking apparatus, including: a processor and a memory storing computer program instructions; the processor, when executing the computer program instructions, implements the method for index checking as described in the first aspect.
In a fourth aspect, the present application provides a computer-readable storage medium, on which computer program instructions are stored, and when executed by a processor, the computer program instructions implement the index checking method according to the first aspect.
In a fifth aspect, the present application provides a computer program product, wherein instructions in the computer program product, when executed by a processor of an electronic device, cause the electronic device to perform the index checking method according to the first aspect.
In this embodiment, for any check service, the index check device may autonomously determine whether to execute the batch running task according to batch running period information and batch running state information corresponding to each batch running task of the check service. And under the condition that the running and batching task is determined to be executed, the running and batching task can be executed according to the index checking configuration information corresponding to the checking service, so that the index checking task of the batch of the checking service is realized. Therefore, the method and the device for checking the indexes can autonomously realize the task of checking the indexes of different batches of the service, so that the efficiency of checking the indexes can be improved.
Drawings
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 described below, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a flowchart of an index checking method according to an embodiment of the present disclosure;
FIG. 2 is a diagram illustrating index checking provided by an embodiment of the present application;
FIG. 3 is a second flowchart of an index checking method according to an embodiment of the present application;
FIG. 4 is a schematic structural diagram of an index checking apparatus according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of an index checking apparatus according to an embodiment of the present application.
Detailed Description
Features and exemplary embodiments of various aspects of the present application will be described in detail below, and in order to make objects, technical solutions and advantages of the present application more apparent, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are intended to be illustrative only and are not intended to be limiting. It will be apparent to one skilled in the art that the present application may be practiced without some of these specific details. The following description of the embodiments is merely intended to provide a better understanding of the present application by illustrating examples thereof.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising … …" does not exclude the presence of additional identical elements in the process, method, article, or apparatus that comprises the element.
For convenience of understanding, the following description is provided for some of the matters involved in the embodiments of the present application:
the checking service may be: a data reconciliation service between at least two metrics. In practical applications, the at least two indicators may be derived from at least one data table, and further, the at least one data table may be derived from at least one database. For indexes from different databases, the data may be processed differently. The at least one database may include at least one of: an oracle (ora) database, a Massively Parallel analysis (MPP) database, a MySQL database, a grenplum (gp) database, an EXCEL file, a text file, a teradata (td) database, and the like.
In this embodiment of the present application, an index checking task for checking a service may be "batched" according to a certain period, and the batched task may also be referred to as: batch processing, and the like.
Checking tasks according to indexes of batch running in a certain period, which are called as follows: and (5) batching tasks.
The batch running period (hereinafter referred to as batch running period) may be one hour, one day, one month, one quarter, one year, or the like, and may be specifically set according to actual needs, which is not limited in this embodiment of the present application.
One batch running task can correspond to one batch running period, and the batch running task is used for checking data of the indexes to be checked in the batch running period.
In practice, a reconciliation service may include at least one batching task. In the case where a reconciliation service comprises two or more batching tasks, it will be appreciated that the reconciliation of the different batching tasks of the reconciliation service is performed on the same data with the same metrics over different batching periods. Such as: the ith batch running task is used for checking data of the index to be checked in the ith batch running period, and the (i + 1) th batch running task is used for checking data of the index to be checked in the (i + 1) th batch running period.
The index checking method provided by the embodiment of the present application is described in detail below with reference to the accompanying drawings by using some embodiments and application scenarios thereof.
Referring to fig. 1, fig. 1 is a schematic diagram of an index checking method provided in an embodiment of the present application.
As shown in fig. 1, the index checking method according to the embodiment of the present application may include the following steps:
step 101, obtaining batch parameter information corresponding to N batch tasks of a first checking service respectively, wherein the batch parameter information comprises batch period information and batch state information, the first checking service is a checking service derived from Q indexes in P databases, the N batch tasks are respectively used for checking data of the Q indexes in different batch periods, N and P are positive integers, and Q is an integer greater than 1.
The first reconciliation service may be understood as any reconciliation service. The first reconciliation service is configured to reconcile the Q metrics, which may be derived from at least one table derived from the P databases.
The batching period information corresponding to the batching task may be used at least to: and determining the starting time of the batch corresponding to the batch task. In one implementation, the batching period information corresponding to the batching task may include: the method comprises the steps of obtaining a serial number of a batch period corresponding to a batch task and the starting time of the first batch period of a check service to which the batch task belongs. In another implementation manner, the batching period information corresponding to the batching task may include: the starting time of the batch task further comprises at least one of the following items: the length of the batch period of the batch task, and the batch ending time of the batch task.
The batch status information corresponding to the batch task may be used to: the completion of the batch task is characterized. The run batch status information may include at least one of:
first state information characterizing that the first batching task is not executed;
second state information, the second state information characterizing that the first batching task is executing;
third state information, the third state information representing that the first batching task is abandoned;
fourth state information, the fourth state information characterizing that the first batching task is successfully executed.
Step 102, determining whether to execute the first batch task according to the batch parameter information corresponding to the first batch task, wherein the first batch task is any one of the N batch tasks.
In specific implementation, for each batch task, the index checking device may determine whether to execute the batch task according to batch parameter information corresponding to the batch task.
For ease of understanding, the first batch task is illustrated as:
in specific implementation, the index checking device may determine, according to the batch period information corresponding to the first batch task, a batch start time corresponding to the first batch task; and determining the execution state of the first batch task according to the batch state information corresponding to the first batch task. And then, determining whether to execute the first batching task according to the batching starting time corresponding to the first batching task and the execution state of the first batching task.
Such as: the index verification apparatus may determine to execute the first batching task if the first batching task is not executed and a batching start time of the first batching task is reached, and may determine not to execute the first batching task otherwise.
In the case where it is determined that the first batching task is performed, the index collation of the first collation service may be implemented by performing step 103. In the case where it is determined not to execute the first batch task, the step 102 may be similar to sequentially traverse to determine whether to execute other batch tasks included in the first reconciliation service until it is determined to execute a certain batch task, or all batch tasks are traversed and all batch tasks are determined not to be executed.
And 103, under the condition that the first batch running task is determined to be executed, 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, and a first checking result corresponding to the first batch running task is obtained.
In this embodiment of the present application, the checking configuration information of the index corresponding to the checking service may include: the check index corresponding to the check service and its source (including data table source and database source), the check rule (or called check mode) of the index corresponding to the check service, etc.
In a specific implementation, the index checking device may first locate the checking indexes of the first checking service, that is, the Q indexes, in the P databases according to the checking indexes corresponding to the first checking service and the source of the checking indexes. And then, acquiring the data of the Q indexes in the first batch running period according to the batch running period corresponding to the first batch running task, namely the first batch running period. Then, the obtained data may be checked according to an index checking rule corresponding to the first checking service, so as to obtain a checking result corresponding to the first batch running task, that is, the first checking result.
In the embodiment of the present application, information corresponding to each check service may be configured in advance. For convenience of understanding, the following description takes the first checkup service as an example:
in one example, the information corresponding to the verification service may be configured through a configuration interface.
As shown in FIG. 2, the configuration interface may include a data source configuration control, a metrics collation configuration control, and a timed batch configuration control.
In the event that input is received for the data source configuration control, the metrics checking device can display a data source configuration page in response to the input. In the data source configuration page, for the first verification service, a user may input the following information according to the user's own needs: the Q indexes, the identifier (such as the name of the data table) of the data table corresponding to each index in the Q indexes, and the identifier (such as the name of the database) of the database corresponding to each data table, thereby implementing configuration of the check index and the source corresponding to the first check service. In a case where an input for the index collation rule configuration control is received, the index collation apparatus may display an index collation rule configuration page in response to the input. In the index matching rule configuration page, for the first matching service, a user can input matching rules among the Q indexes according to the own requirements, so that the configuration of the index matching rules corresponding to the first matching service is realized.
The index collation apparatus may generate index collation configuration information corresponding to the first collation service based on information for the first collation service input by a user on the data source configuration page and the index collation configuration page.
Upon receiving input for the timed batch configuration control, the metrics verification device may display a timed batch configuration page in response to the input. In the index checking rule configuration page, for the first checking service, a user may input the batch running start time, the batch running end time, and the batch running cycle length of the first checking service according to the user's own requirements. In this way, after the index checking device obtains these pieces of information, the number of batch running cycles and the number of batch running tasks of the first checking service may be determined according to the batch running start time, the batch running end time, and the batch running cycle length of the first checking service, thereby implementing configuration of the batch running tasks of the first checking service. It is to be understood that the number of batch periods of the first collation service is equal to the number of batch tasks of the first collation service, and the number of batch periods and the number of batch tasks of the first collation service are N values.
The index checking device may generate batch running period information corresponding to each batch running task of the N batch running tasks according to the input batch running start time, batch running end time, and batch running period length of the first checking service.
In addition, in the embodiment of the present application, as shown in fig. 2, the information input in the data source configuration page may be stored in the data source information table. The information input in the index collation rule configuration page may be stored in the index collation configuration table. The batching tasks included in the reconciliation service and the batching state information corresponding to the batching tasks may be stored in a batching state table.
According to the index checking method, aiming at any checking service, the index checking equipment can determine whether to execute the batch running task or not according to batch running period information and batch running state information corresponding to each batch running task of the checking service. And under the condition that the running batch task is determined to be executed, the running batch task can be executed according to the index checking configuration information corresponding to the checking service, and the index checking task of the batch of the checking service is realized. Therefore, the index checking tasks of different batches of the checking service can be independently realized, and the index checking efficiency can be improved.
The following illustrates a specific implementation of step 102.
In one example, the determining whether to execute the first batching task according to the batching parameter information corresponding to the first batching task may include:
determining whether the batching state information corresponding to the first batching task is first state information, wherein the first state information represents that the first batching task is not executed;
under the condition that the batch state information corresponding to the first batch task is the first state information, determining whether the batch starting time corresponding to the first batch task is reached according to the batch period information corresponding to the first batch task;
and determining to execute the first batching task under the condition that the batching starting time corresponding to the first batching task is reached.
In this example, the index checking device may first screen out the unexecuted batching tasks, and then compare the starting time of the batching corresponding to each unexecuted batching task with the current time to determine the batching task to be executed. Finally, the running batch task which is not executed and reaches the starting time of the running batch is determined as the running batch task to be executed.
Taking the first batch running task as an example: if the running batch task is not executed and the corresponding running batch starting time is reached, the first running batch task can be determined to be executed; if it is not executed, or the starting time of the running batch corresponding to the running batch is not reached, it can be determined not to execute the first running batch task. Namely, the conditions to be satisfied for executing the first batching task are: the first batching task is not executed, and the batching starting time corresponding to the first batching task is reached.
By the mode, the batch running task of the service checking can be executed according to the preset setting, so that the reliability of the service index checking execution can be improved.
It will be appreciated that in other examples, the index checking apparatus may screen out the batching tasks that do not reach the starting time of the batching, and then determine the batching tasks to be executed according to the execution status of each screened batching task. Finally, the running batch task which is not executed and reaches the starting time of the running batch is determined as the running batch task to be executed.
The following describes a specific implementation of step 103 in an embodiment of the present application.
In an example, when the first batch running task is determined to be executed, the executing the first batch running task 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 the first checking result corresponding to the first batch running task includes:
under the condition that the first batch running task is determined to be executed, according to index checking configuration information corresponding to the first checking service, determining whether to-be-checked data corresponding to the first batch running task exists or not;
under the condition that data to be checked corresponding to the first batch running task exist, configuration information is checked according to indexes corresponding to the first checking service, the first batch running period corresponding to the first batch running task is executed, and the first checking result corresponding to the first batch running task is obtained.
In this example, after making a decision to execute a certain batch task, the index checking device may further determine, in combination with index checking configuration information corresponding to a checking service to which the batch task belongs, whether to actually execute the batch task again, so as to further improve reliability of service index checking execution.
The data to be checked corresponding to the first batch task may be understood as: and the Q indexes are data in the batch running period corresponding to the first batch running task.
In a specific implementation, the index checking device may determine the checking index and the source thereof of the first checking service from the index checking configuration information corresponding to the first checking service. And then, interacting with a corresponding database to determine whether the data corresponding to the first batch running period exists in the Q indexes stored in the database.
If the first batch running task exists, the index checking equipment can execute the first batch running task and check the data to be checked corresponding to the first batch running task. If the index check device does not exist, the data corresponding to the first batch task is not checked, and the first batch task can be abandoned to be executed, so that the operation load of the index check device is reduced.
As can be seen, in this example, the conditions that need to be met to execute the first batching task may include: the first batch running task is not executed, the starting time of the batch running corresponding to the first batch running task is reached, and the data to be checked corresponding to the first batch running task exist. Thus, the reliability of the service index checking execution can be further improved.
In the above example, further, before the determining whether there is data to be collated corresponding to the first batch running task according to the index collation configuration information corresponding to the first collation service, the method may further include:
under the condition that the first batching task is determined to be executed, updating batching state information corresponding to the first batching task into second state information, wherein the second state information represents that the first batching task is being executed;
after determining whether the data to be checked corresponding to the first batch running task exists according to the index checking configuration information corresponding to the first checking service, the method further comprises the following steps:
and under the condition that the data to be checked corresponding to the first batching task does not exist, updating the batching state information corresponding to the first batching task into third state information, wherein the third state information represents that the first batching task is abandoned to be executed.
In the embodiment of the present application, when the state of the first batching task is changed, the batching state information of the first batching task needs to be updated in time.
Such as: in the event that it is determined that the first batching task is being executed, the execution status of the first batching task may be written and its batching status information updated as being executed. In the event that it is determined to abort execution of the first batching task, its batching status information may be updated to abort execution.
Therefore, the batch running state information of the first batch running task can be consistent with the actual state of the first batch running task, and the reliability of checking and executing the service index is improved.
The following illustrates specific execution of the batching task according to the embodiment of the present application:
in a specific implementation, when the first batch running task is executed, that is, when the data of the Q indicators in the first batch running period is checked, the indicator checking device may extract the data of the Q indicators in the first batch from the corresponding data table in the P databases. Then, the check of the extracted data can be completed according to the index check rule of the Q indexes.
In an example, the executing the first batch running task according to the index checking configuration information corresponding to the first checking service to obtain a first checking result corresponding to the first batch running task may include:
calling P data processing units corresponding to the P databases one to execute first operation to obtain Q index processing results corresponding to the Q indexes one to one, wherein the first operation executed by a first data processing unit in the P data processing units comprises the following steps: acquiring target data of a target index in the first batch running period from a first database corresponding to the first data processing unit; processing the target data to obtain an index processing result corresponding to the target index, wherein the target index comprises at least one index in the Q indexes;
and checking the Q index processing results according to the index checking configuration information corresponding to the first checking service to obtain a first checking result corresponding to the first batch running task.
The target index is an index derived from the first database among the Q indexes.
The index checking device may determine the data processing units respectively corresponding to the P databases, that is, the P data processing units, after determining to execute the first batch task. Then, the P data processing units may be called to respectively execute the first operation.
Taking the first data processing unit as an example, the first data processing unit may first determine a target index in the first database, and then extract data of the target index in a batch period corresponding to the first batch task, that is, the target data, from the first database. And then, processing the target data by adopting a data processing mode corresponding to the first database to obtain an index processing result corresponding to the target index.
By analogy, the index checking device can obtain Q index processing results corresponding to the Q indexes one to one. Then, the index checking device may obtain the index checking rule of the Q indexes from the index checking configuration information corresponding to the first checking service, and check the processing result of the Q indexes by using the index checking rule, so as to check the Q indexes in the first checking period, that is, complete the execution of the first batch running task.
In this example, in consideration of different data processing modes of different databases, different data processing units may be used to process data in different databases, so as to improve reliability of data processing and further improve reliability of service index checking.
Further, after the executing the first batching task and obtaining the first checking result corresponding to the first batching task, the method may further include:
updating the batch running state information corresponding to the first batch running task into fourth state information, wherein the fourth state information represents that the first batch running task is successfully executed;
receiving a first input, wherein the first input is used for inquiring a checking result of the checking service;
in response to the first input, displaying a first page, the first page including the first collation result.
The index checking device may determine that the first batching task is completely executed after obtaining the first checking result, and may update the batching status information of the first batching task to the fourth status information. Therefore, the batch running state information of the first batch running task can be consistent with the actual state of the first batch running task, and the reliability of checking and executing the service index is improved.
In addition, the index checking apparatus may store the acquired first checking result, for example, in an index checking result table, for the user to query.
In order to facilitate the user to query the check result of the service, as shown in fig. 2, an index check result query control may be set in the configuration interface. In a case where an input for the index collation result query control is received, the index collation apparatus may display an index collation result display page in response to the input. In the display page, the checking result corresponding to each batch task in which each checking service is successfully executed may be displayed.
Further, a query time control may be added to the index collation result display page to select a time period of the query. In this way, only the index check result corresponding to the query time period can be displayed in the display page, so that the flexibility of the index check result query can be improved.
It should be noted that, in the embodiments of the present application, various optional implementations that are described in the embodiments may be implemented in combination with each other or separately without conflicting with each other, and the embodiments of the present application are not limited to this.
For ease of understanding, the following is illustrated in connection with fig. 2 and 3:
in this example, the index checking method may be implemented by a configuration interface and an index checking program, and the configuration interface and the index checking program may be implemented by Python code and SQL language.
The configuration interface may be used to implement basic configuration and result query for index collation. As shown in fig. 2, a data source configuration control, an index check rule configuration control, an index check batch configuration control, and an index check result query control may be included. The relevant configuration result data can be saved in the index checking data storage to provide corresponding information for the execution of the index checking program.
The index checking program can comprise a batch main control unit, a data source analysis unit and data processing units corresponding to different databases. And through interaction with the index checking data storage, acquiring source data required by index checking from the index source data storage, and storing the final checking result in an index checking result table of the index checking data storage. The batch running main control unit can use a resident process mode developed by python, can regularly scan indexes to check the task state of each batch running task in a batch running state table in the data storage, and executes the corresponding batch running task when the condition is met.
The index checking program realizes automatic analysis of the checking rules, interacts with a database in the index source data storage to acquire different index data, realizes the comparison of index result data, and finally loads the comparison result back to an index checking result table in the index checking data storage.
As shown in fig. 3, the index checking method may include the steps of:
and 301, acquiring batch running parameters.
During specific implementation, batch parameter information corresponding to each batch task is obtained.
Step 302, determine whether a lot is needed.
I.e., to determine whether the corresponding batching task needs to be performed.
In case of yes, step 303 may be performed. In the case of "no", the flow may be ended.
Step 303, insert run batch status.
During specific implementation, the running batch task determined to be executed is written in the running batch state table, and the running batch state of the running batch task is updated to be executed.
And step 304, acquiring index checking configuration information from the index checking configuration table.
Step 305, determining whether the batch task has data to check.
In the case of "yes", step 306 is executed. In the case of "no", step 310 is executed and step 302 is re-executed.
And step 306, acquiring data source information from the data source information table.
Step 307, the data source is analyzed.
And 308, respectively processing the different types of data, and performing data checking to obtain a checking result.
Step 309, storing the check result into the index check result.
In concrete implementation, when each check rule is executed under the condition that the index needs to be checked, the index check configuration information can be obtained, detailed data source connection information is obtained by analyzing the data source and the data source configuration table in the rule, the data processing unit is used for realizing the connection with the index source database, the index result data is further obtained according to the index check configuration rule, and the result data is loaded into the index check result table.
And returning to batch running task judgment after updating the batch running state after all the index check rules are executed, and exiting the program if no task needs to be executed.
Step 310, updating the batch status.
The method and the device can support automatic calculation of different batches of data tables from different sources through the configuration interface, are high in speed, and are convenient to check through centralized display of comparison results.
In addition, the application can use python to combine with a database to check data of multiple data sources. The method is realized by adopting a general Python and a relational database, has no special requirements on the configuration of an operating system and hardware, and can be conveniently transplanted; the core processing logic of the program is realized by Python codes, and the formed product installation package is convenient for product output. The method and the system have the advantages of being convenient to transplant and deploy, capable of processing different types of databases and the like.
Based on the index checking method provided by the embodiment, correspondingly, the application also provides a specific implementation mode of the index checking device. As shown in fig. 4, an index checking apparatus provided in an embodiment of the present application may include:
an obtaining module 401, configured to obtain batch parameter information corresponding to N batch tasks of a first checking service, where the batch parameter information includes batch period information and batch state information, where the first checking service is a checking service derived from Q indexes in P databases, the N batch tasks are used to check data of the Q indexes in different batch periods, N and P are positive integers, and Q is an integer greater than 1;
a determining module 402, configured to determine whether to execute a first batch task according to the batch parameter information corresponding to the first batch task, where the first batch task is any one of the N batch tasks;
an executing module 403, configured to, when it is determined to execute the first batch running task, check configuration information according to an index corresponding to the first check service and a first batch running period corresponding to the first batch running task, execute the first batch running task, and obtain a first check result corresponding to the first batch running task.
The index checking device of the embodiment of the application can determine whether to execute the batch running task according to batch running period information and batch running state information corresponding to each batch running task of any checking service. And under the condition that the running batch task is determined to be executed, the running batch task can be executed according to the index checking configuration information corresponding to the checking service, and the index checking task of the batch of the checking service is realized. Therefore, the index checking device of the embodiment of the application can autonomously realize the task of checking the indexes of different batches of the service, thereby improving the efficiency of index checking.
In one example, the determining module includes:
the first determining unit is used for determining whether batch state information corresponding to the first batch task is first state information, and the first state information represents that the first batch task is not executed;
the second determining unit is used for determining whether the starting time of the batch corresponding to the first batch task is reached according to the batch period information corresponding to the first batch task under the condition that the batch state information corresponding to the first batch task is the first state information;
and the third determining unit is used for determining to execute the first batching task under the condition that the batching starting time corresponding to the first batching task is reached.
In one example, the execution module includes:
a fourth determining unit, configured to determine, when it is determined that the first batch task is executed, whether there is data to be checked corresponding to the first batch task according to index checking configuration information corresponding to the first checking service;
and the first execution unit is used for checking configuration information according to the index corresponding to the first checking service and a first batch running period corresponding to the first batch running task under the condition that the data to be checked corresponding to the first batch running task exists, executing the first batch running task and obtaining a first checking result corresponding to the first batch running task.
In one example, the apparatus further comprises:
the first updating module is used for updating the batch state information corresponding to the first batch task into second state information under the condition that the first batch task is determined to be executed, wherein the second state information represents that the first batch task is being executed;
and the second updating module is used for updating the batch running state information corresponding to the first batch running task into third state information under the condition that the data to be checked corresponding to the first batch running task does not exist, and the third state information represents that the first batch running task is abandoned to be executed.
In one example, the execution module includes:
a second executing unit, configured to invoke P data processing units that are one-to-one corresponding to the P databases to execute first operations, so as to obtain Q index processing results that are one-to-one corresponding to the Q indexes, where the first operations executed by a first data processing unit in the P data processing units include: acquiring target data of a target index in the first batch running period from a first database corresponding to the first data processing unit; processing the target data to obtain an index processing result corresponding to the target index, wherein the target index comprises at least one index in the Q indexes;
and the checking unit is used for checking the Q index processing results according to the index checking configuration information corresponding to the first checking service to obtain a first checking result corresponding to the first batch running task.
In one example, the apparatus further comprises:
the third updating module is used for updating the batch running state information corresponding to the first batch running task into fourth state information, and the fourth state information represents that the first batch running task is successfully executed;
the receiving module is used for receiving a first input, and the first input is used for inquiring a checking result of the checking service;
a response module to display a first page in response to the first input, the first page including the first collation result.
Fig. 5 shows a hardware structure diagram of index checking provided in the embodiment of the present application.
The index checking device may include a processor 501 and a memory 502 storing computer program instructions.
Specifically, the processor 501 may include a Central Processing Unit (CPU), or an Application Specific Integrated Circuit (ASIC), or may be configured to implement one or more Integrated circuits of the embodiments of the present Application.
Memory 502 may include mass storage for data or instructions. By way of example, and not limitation, memory 502 may include a Hard Disk Drive (HDD), a floppy Disk Drive, flash memory, an optical Disk, a magneto-optical Disk, tape, or a Universal Serial Bus (USB) Drive or a combination of two or more of these. Memory 502 may include removable or non-removable (or fixed) media, where appropriate. The memory 502 may be internal or external to the integrated gateway disaster recovery device, where appropriate. In a particular embodiment, the memory 502 is non-volatile solid-state memory.
The memory may include Read Only Memory (ROM), Random Access Memory (RAM), magnetic disk storage media devices, optical storage media devices, flash memory devices, electrical, optical, or other physical/tangible memory storage devices. Thus, in general, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software comprising computer-executable instructions and when the software is executed (e.g., by one or more processors), it is operable to perform operations described with reference to the methods according to an aspect of the present disclosure.
The processor 501 reads and executes the computer program instructions stored in the memory 502 to implement any one of the index checking methods in the above embodiments.
In one example, the metric reconciliation device can also include a communication interface 503 and a bus 510. As shown in fig. 5, the processor 501, the memory 502, and the communication interface 503 are connected via a bus 510 to complete communication therebetween.
The communication interface 503 is mainly used for implementing communication between modules, apparatuses, units and/or devices in the embodiments of the present application.
Bus 510 comprises hardware, software, or both to couple the components of the online data traffic billing device to each other. By way of example, and not limitation, a bus may 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 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 other suitable bus or a combination of two or more of these. Bus 510 may include one or more buses, where appropriate. Although specific buses are described and shown in the embodiments of the application, any suitable buses or interconnects are contemplated by the application.
In addition, in combination with the index checking method in the foregoing embodiments, the embodiments of the present application may provide a computer-readable storage medium to implement. The computer readable storage medium having stored thereon computer program instructions; the computer program instructions, when executed by a processor, implement any of the index checking methods in the above embodiments.
It is to be understood that the present application is not limited to the particular arrangements and instrumentalities described above and shown in the attached drawings. A detailed description of known methods is omitted herein for the sake of brevity. In the above embodiments, several specific steps are described and shown as examples. However, the method processes of the present application are not limited to the specific steps described and illustrated, and those skilled in the art can make various changes, modifications, and additions or change the order between the steps after comprehending the spirit of the present application.
The functional blocks shown in the above-described structural block diagrams may be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, it may be, for example, an electronic circuit, an Application Specific Integrated Circuit (ASIC), suitable firmware, plug-in, function card, or the like. When implemented in software, the elements of the present application are the programs or code segments used to perform the required tasks. The program or code segments may be stored in a machine-readable medium or transmitted by a data signal carried in a carrier wave over a transmission medium or a communication link. A "machine-readable medium" may include any medium that can store or transfer information. Examples of a machine-readable medium include electronic circuits, semiconductor memory devices, ROM, flash memory, Erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, Radio Frequency (RF) links, and so forth. The code segments may be downloaded via computer networks such as the internet, intranet, etc.
It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, the present application is not limited to the order of the above-described steps, that is, the steps may be performed in the order mentioned in the embodiments, may be performed in an order different from the order in the embodiments, or may be performed simultaneously.
Aspects of the present disclosure are described above with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the disclosure. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, enable the implementation of the functions/acts specified in the flowchart and/or block diagram block or blocks. Such a processor may be, but is not limited to, a general purpose processor, a special purpose processor, an application specific processor, or a field programmable logic circuit. It will also be understood that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware for performing the specified functions or acts, or combinations of special purpose hardware and computer instructions.
As described above, only the specific embodiments of the present application are provided, and it can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the system, the module and the unit described above may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again. It should be understood that the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive various equivalent modifications or substitutions within the technical scope of the present application, and these modifications or substitutions should be covered within the scope of the present application.

Claims (10)

1. An index checking method, comprising:
acquiring batch parameter information corresponding to N batch tasks of a first checking service respectively, wherein the batch parameter information comprises batch period information and batch state information, the first checking service is a checking service derived from Q indexes in P databases, the N batch tasks are respectively used for checking data of the Q indexes in different batch periods, N and P are positive integers, and Q is an integer greater than 1;
determining whether to execute a first batch task according to the batch parameter information corresponding to the first batch task, wherein the first batch task is any one of the N batch tasks;
and under the condition that the first batch running task is determined to be executed, the first batch running task is executed according to index checking configuration information corresponding to the first checking service and a first batch running period corresponding to the first batch running task, and a first checking result corresponding to the first batch running task is obtained.
2. The method of claim 1, wherein determining whether to execute the first batching task based on the batching parameter information corresponding to the first batching task comprises:
determining whether the batching state information corresponding to the first batching task is first state information, wherein the first state information represents that the first batching task is not executed;
under the condition that the batch state information corresponding to the first batch task is the first state information, determining whether the batch starting time corresponding to the first batch task is reached according to the batch period information corresponding to the first batch task;
and determining to execute the first batching task under the condition that the batching starting time corresponding to the first batching task is reached.
3. The method of claim 1, wherein the checking configuration information according to the indicator corresponding to the first checking service and the first batching period corresponding to the first batching task to execute the first batching task when the first batching task is determined to be executed comprises:
under the condition that the first batch running task is determined to be executed, according to index checking configuration information corresponding to the first checking service, determining whether to-be-checked data corresponding to the first batch running task exists or not;
and under the condition that the data to be checked corresponding to the first batch running task exists, checking configuration information according to the index corresponding to the first checking service and a first batch running period corresponding to the first batch running task, executing the first batch running task, and obtaining a first checking result corresponding to the first batch running task.
4. The method of claim 3, wherein before determining whether there is data to be collated corresponding to the first batch task based on the index collation configuration information corresponding to the first collation transaction, the method further comprises:
under the condition that the first batching task is determined to be executed, updating batching state information corresponding to the first batching task into second state information, wherein the second state information represents that the first batching task is being executed;
after determining whether the data to be checked corresponding to the first batch running task exists according to the index checking configuration information corresponding to the first checking service, the method further comprises the following steps:
and under the condition that the data to be checked corresponding to the first batching task does not exist, updating the batching state information corresponding to the first batching task into third state information, wherein the third state information represents that the first batching task is abandoned to be executed.
5. The method of claim 1, wherein the performing the first batch task according to the index checking configuration information corresponding to the first checking service to obtain a first checking result corresponding to the first batch task comprises:
calling P data processing units corresponding to the P databases one to execute first operation to obtain Q index processing results corresponding to the Q indexes one to one, wherein the first operation executed by a first data processing unit in the P data processing units comprises the following steps: acquiring target data of a target index in the first batch running period from a first database corresponding to the first data processing unit; processing the target data to obtain an index processing result corresponding to the target index, wherein the target index comprises at least one index in the Q indexes;
and checking the Q index processing results according to the index checking configuration information corresponding to the first checking service to obtain a first checking result corresponding to the first batch running task.
6. The method of claim 1, wherein after the executing the first batching task and the obtaining of the first reconciliation result corresponding to the first batching task, the method further comprises:
updating the batch running state information corresponding to the first batch running task into fourth state information, wherein the fourth state information represents that the first batch running task is successfully executed;
receiving a first input, wherein the first input is used for inquiring a checking result of the checking service;
in response to the first input, displaying a first page, the first page including the first collation result.
7. An index collation apparatus, characterized in that the apparatus comprises:
the system comprises an acquisition module, a comparison module and a comparison module, wherein the acquisition module is used for acquiring batch parameter information corresponding to N batch tasks of a first check service respectively, the batch parameter information comprises batch period information and batch state information, the first check service is a check service derived from Q indexes in P databases, the N batch tasks are respectively used for checking data of the Q indexes in different batch periods, N and P are positive integers, and Q is an integer greater than 1;
the determining module is used for determining whether to execute a first batch task according to the batch parameter information corresponding to the first batch task, wherein the first batch task is any one of the N batch tasks;
and the execution module is used for checking configuration information according to the index corresponding to the first checking service and a first batch running period corresponding to the first batch running task under the condition of determining to execute the first batch running task, and executing the first batch running task to obtain a first checking result corresponding to the first batch running task.
8. An index collation apparatus characterized by comprising: a processor and a memory storing computer program instructions; the processor, when executing the computer program instructions, implements the method of on-index reconciliation of any of claims 1 to 6.
9. A computer-readable storage medium having computer program instructions stored thereon, which when executed by a processor implement the index checking method according to any one of claims 1 to 6.
10. A computer program product, wherein instructions in the computer program product, when executed by a processor of an electronic device, cause the electronic device to perform an index checking method according to any one of claims 1 to 6.
CN202210298893.7A 2022-03-25 2022-03-25 Index checking method, device, equipment and computer readable storage medium Pending CN114647496A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210298893.7A CN114647496A (en) 2022-03-25 2022-03-25 Index checking method, device, equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210298893.7A CN114647496A (en) 2022-03-25 2022-03-25 Index checking method, device, equipment and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN114647496A true CN114647496A (en) 2022-06-21

Family

ID=81994967

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210298893.7A Pending CN114647496A (en) 2022-03-25 2022-03-25 Index checking method, device, equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN114647496A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117236804A (en) * 2023-11-16 2023-12-15 恒丰银行股份有限公司 Financial enterprise performance identification method, equipment and medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117236804A (en) * 2023-11-16 2023-12-15 恒丰银行股份有限公司 Financial enterprise performance identification method, equipment and medium
CN117236804B (en) * 2023-11-16 2024-03-08 恒丰银行股份有限公司 Financial enterprise performance identification method, equipment and medium

Similar Documents

Publication Publication Date Title
CN114647496A (en) Index checking method, device, equipment and computer readable storage medium
CN114461644A (en) Data acquisition method and device, electronic equipment and storage medium
CN114064112A (en) Business process configuration method, device, equipment and storage medium
CN114036147A (en) Data warehouse construction method, device, equipment and storage medium
CN115222361A (en) Business process flow transfer method, device, equipment and computer storage medium
CN110990350A (en) Log analysis method and device
CN114095332A (en) Information processing method, device, equipment and computer storage medium
CN115905145A (en) File processing method, device, equipment and computer storage medium
CN115587143A (en) Data synchronization method, device, equipment and computer readable storage medium
CN115238094A (en) Index data analysis method, device, equipment and medium based on knowledge graph
CN115965451A (en) Data checking method, device, electronic equipment, medium and program product
CN114675952A (en) Information processing method, information processing apparatus, electronic device, information processing medium, and program product
CN114372072A (en) Data storage method, device, equipment, computer storage medium and program product
CN112749187A (en) Data query method and device, electronic equipment and computer storage medium
CN113076365A (en) Data synchronization method and device, electronic equipment and storage medium
CN114185944A (en) Data processing method, data processing apparatus, electronic device, medium, and computer program product
CN115203207A (en) Data acquisition method, device, equipment, medium and product
CN117971618A (en) Database performance problem processing method, device, equipment, medium and product
CN110532561B (en) Data detection method and device, storage medium and electronic device
CN115048917B (en) Information processing method, device, equipment, medium and product
CN114723249A (en) Method, device, equipment and medium for evaluating innovation stability of science and technology enterprise
CN116028521A (en) Data processing method, device, equipment, medium and product
CN115481204A (en) Data checking method, data checking device, electronic equipment, medium and program product
CN117762814A (en) Test result recording method, device, equipment, medium and product
CN116029502A (en) Data processing method, device, equipment and computer storage medium

Legal Events

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