CN114356454A - Account checking data processing method, account checking data processing device, account checking data storage medium and program product - Google Patents
Account checking data processing method, account checking data processing device, account checking data storage medium and program product Download PDFInfo
- Publication number
- CN114356454A CN114356454A CN202210011846.XA CN202210011846A CN114356454A CN 114356454 A CN114356454 A CN 114356454A CN 202210011846 A CN202210011846 A CN 202210011846A CN 114356454 A CN114356454 A CN 114356454A
- Authority
- CN
- China
- Prior art keywords
- reconciliation
- data
- account checking
- parties
- script
- 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.)
- Granted
Links
- 238000003672 processing method Methods 0.000 title claims abstract description 21
- 238000012545 processing Methods 0.000 title claims description 15
- 238000013500 data storage Methods 0.000 title description 6
- 238000000034 method Methods 0.000 claims abstract description 49
- 238000004364 calculation method Methods 0.000 claims description 18
- 238000004590 computer program Methods 0.000 claims description 9
- 239000002699 waste material Substances 0.000 abstract description 4
- 238000010586 diagram Methods 0.000 description 4
- 238000004891 communication Methods 0.000 description 3
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 230000006870 function Effects 0.000 description 3
- 238000012423 maintenance Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000006978 adaptation Effects 0.000 description 1
- 125000004122 cyclic group Chemical group 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Images
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The embodiment of the application provides a reconciliation data processing method, equipment, a storage medium and a program product, through acquiring reconciliation configuration information of a current reconciliation task, the reconciliation configuration information comprises data source information of both reconciliation parties, a field to be reconciled and a reconciliation type, and the reconciliation type comprises adopting non-script reconciliation or adopting script reconciliation; if the current reconciliation task adopts the non-script reconciliation, executing the current reconciliation task through the application program according to the data source information of the reconciliation parties and the field to be reconciled; and if the current account checking task adopts the script account checking, generating an account checking script according to the data source information of the account checking parties, the field to be checked and a preset script template, and running the account checking script to execute the current account checking task. Different account checking methods are respectively adopted for different account checking tasks by configuring account checking configuration information, the method is suitable for different account checking scenes, program codes do not need to be manually written respectively according to different account checking requirements, the expansibility is good, the account checking efficiency can be improved, and the waste of resources and labor cost is avoided.
Description
Technical Field
The embodiment of the application relates to the technical field of big data, in particular to a reconciliation data processing method, equipment, a storage medium and a program product.
Background
In accounting, in order to ensure the correctness and reliability of the records of the account book, the data records of the account book need to be checked and verified so as to ensure the accuracy of the data and to check the difference data such as repeated payment and wrong payment.
In the related art, program codes are generally written according to the account checking requirement, and the program codes are run in an application program to realize account checking. Because the data source and the reconciliation scheme of the reconciliation parties of each reconciliation requirement are fixed, a program code is usually developed for each reconciliation requirement, when the reconciliation requirement is modified, the program code needs to be modified in time, the maintenance cost is high, the expansibility is poor, if a new reconciliation requirement exists, the program code needs to be developed again, the efficiency is low, and the resource and the labor cost are wasted.
Disclosure of Invention
The embodiment of the application provides a reconciliation data processing method, equipment, a storage medium and a program product, which are used for improving the reconciliation efficiency and avoiding wasting resources and labor cost.
In a first aspect, an embodiment of the present application provides a reconciliation data processing method, including:
acquiring account checking configuration information of a current account checking task, wherein the account checking configuration information comprises data source information of both account checking parties, an account checking field to be checked and an account checking type, and the account checking type comprises non-script account checking or script account checking;
if the current account checking task adopts non-script account checking according to the account checking type, executing the current account checking task according to the data source information of both account checking parties and the field to be checked by an application program;
and if the current account checking task adopts script account checking according to the account checking type, generating an account checking script according to the data source information of the account checking parties, the field to be checked and a preset script template, and operating the account checking script to execute the current account checking task.
In a second aspect, an embodiment of the present application provides a reconciliation data processing apparatus, including:
the system comprises an acquisition module, a reconciliation configuration module and a reconciliation processing module, wherein the reconciliation configuration information comprises data source information of two reconciliation parties, a field to be reconciled and a reconciliation type, and the reconciliation type comprises adopting non-script reconciliation or adopting script reconciliation;
the program reconciliation module is used for executing the current reconciliation task according to the data source information of both reconciliation parties and the field to be reconciled by the application program if the non-script reconciliation is determined to be adopted by the current reconciliation task according to the reconciliation type;
and the script reconciliation module is used for generating a reconciliation script according to the data source information of both reconciliation parties, the field to be reconciled and a preset script template if the current reconciliation task adopts script reconciliation according to the reconciliation type, and operating the reconciliation script to execute the current reconciliation task.
In a third aspect, an embodiment of the present application provides an electronic device, including: at least one processor; and a memory;
the memory stores computer-executable instructions;
the at least one processor executing the computer-executable instructions stored by the memory causes the at least one processor to perform the method of the first aspect.
In a fourth aspect, embodiments of the present application provide a computer-readable storage medium, in which computer-executable instructions are stored, and when a processor executes the computer-executable instructions, the method according to the first aspect is implemented.
In a fifth aspect, the present application provides a computer program product comprising computer instructions which, when executed by a processor, implement the method according to the first aspect.
According to the account checking data processing method, the account checking data processing equipment, the storage medium and the program product, account checking configuration information of a current account checking task is obtained, wherein the account checking configuration information comprises data source information of both account checking parties, an account checking field to be checked and an account checking type, and the account checking type comprises non-script account checking or script account checking; if the current account checking task adopts the non-script account checking according to the account checking type, executing the current account checking task according to the data source information of both account checking parties and the field to be checked by the application program; and if the current account checking task adopts script account checking according to the account checking type, generating an account checking script according to the data source information of both account checking parties, the field to be checked and a preset script template, and running the account checking script to execute the current account checking task. According to the embodiment of the application, different reconciliation methods can be respectively adopted for reconciliation tasks with small data volume and large data volume by configuring reconciliation configuration information, the method is suitable for reconciliation scenes with different data volumes, program codes do not need to be manually written respectively aiming at different reconciliation requirements, and the program codes do not need to be modified or developed again when the reconciliation requirements are modified or newly increased, so that the expansibility is good, the quick reconciliation can be realized, the reconciliation efficiency is improved, and the waste of resources and labor cost is avoided.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application.
Fig. 1 is a schematic view of an application scenario of a reconciliation data processing method according to an embodiment of the present application;
fig. 2 is a flowchart of a reconciliation data processing method according to an embodiment of the present application;
fig. 3 is a flowchart of a reconciliation data processing method according to another embodiment of the present application;
fig. 4 is a flowchart of a reconciliation data processing method according to another embodiment of the present application;
fig. 5 is a flowchart of a reconciliation data processing method according to another embodiment of the present application;
fig. 6 is a flowchart of a reconciliation data processing method according to another embodiment of the present application;
fig. 7 is a block diagram of a reconciliation data processing device according to an embodiment of the present application;
fig. 8 is a block diagram of an electronic device according to an embodiment of the present application.
With the above figures, there are shown specific embodiments of the present application, which will be described in more detail below. These drawings and written description are not intended to limit the scope of the inventive concepts in any manner, but rather to illustrate the inventive concepts to those skilled in the art by reference to specific embodiments.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
In accounting, in order to ensure the correctness and reliability of the records of the account book, the data records of the account book need to be checked and verified so as to ensure the accuracy of the data and to check the difference data such as repeated payment and wrong payment.
In the related art, program codes are generally written according to account checking requirements, and the program codes are run in application programs to realize account checking. Because the data source and the reconciliation scheme of the reconciliation parties of each reconciliation requirement are fixed, a program code is usually developed for each reconciliation requirement, when the reconciliation requirement is modified, the program code needs to be modified in time, the maintenance cost is high, the expansibility is poor, if a new reconciliation requirement exists, the program code needs to be developed again, the efficiency is low, and the resource and the labor cost are wasted.
In order to solve the technical problems, in the embodiment of the application, for the current reconciliation task, the data source information, the field to be reconciled and the reconciliation type of both reconciliation parties are reconciled through reconciliation configuration information, wherein the reconciliation type comprises that non-script reconciliation is adopted or script reconciliation is adopted for configuration, and then the current reconciliation task is completed through an application program or a reconciliation script based on the reconciliation configuration information, program codes are not required to be modified or re-developed when reconciliation requirements are modified or newly increased, the expansibility is good, the quick reconciliation can be realized, the reconciliation efficiency is improved, and the waste of resources and labor cost is avoided; and the account checking can be directly performed by adopting an application program for the account checking of small data volume, and the account checking script is used for rapidly checking the account checking of large data volume, so that the method and the device are suitable for account checking scenes of different data volumes.
A specific application scenario of the embodiment of the application is shown in fig. 1, and includes data storage devices 110 and 111 in a small-data-volume reconciliation scenario, data storage devices 120 and 121 in a large-data-volume reconciliation scenario, and a server 130, where the data storage devices 110 and 111 in the small-data-volume reconciliation scenario and the data storage devices 120 and 121 in the large-data-volume reconciliation scenario are used for storing and providing data as data sources for the server 130, and the server 130 can obtain reconciliation configuration information of a current reconciliation task, where the reconciliation configuration information includes data source information, a field to be reconciled, and a reconciliation type, and the reconciliation type includes adopting non-script reconciliation or adopting script reconciliation; if the current account checking task adopts non-script account checking according to the account checking type, executing the current account checking task according to the data source information of both account checking parties and the field to be checked by an application program; and if the current account checking task adopts script account checking according to the account checking type, generating an account checking script according to the data source information of the account checking parties, the field to be checked and a preset script template, and operating the account checking script to execute the current account checking task.
The following describes the technical solutions of the present application and how to solve the above technical problems with specific embodiments. The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments. Embodiments of the present application will be described below with reference to the accompanying drawings.
Fig. 2 is a flowchart of a reconciliation data processing method provided in the embodiment of the present application. The embodiment provides a reconciliation data processing method, an execution main body of which is an electronic device such as a terminal device or a server, and the reconciliation data processing method comprises the following specific steps:
s201, obtaining account checking configuration information of a current account checking task, wherein the account checking configuration information comprises data source information of both account checking parties, an account checking field to be checked and an account checking type, and the account checking type comprises non-script account checking or script account checking.
In this embodiment, reconciliation configuration information of a current reconciliation task can be determined according to a reconciliation requirement, where data source information of two reconciliation parties in the reconciliation configuration information is used for indicating data sources of the two reconciliation parties, such as a database, a table, or a storage address where the two reconciliation parties are located, a field to be reconciled is used for indicating a field requiring reconciliation, and a reconciliation type is used for indicating whether to adopt a script for reconciliation, where non-script reconciliation adopts an application program for reconciliation, pre-written code pair data are run and compared one by one, and the script reconciliation needs to generate a reconciliation script earlier, and the reconciliation is completed based on the reconciliation script. As an example, the reconciliation configuration information may be as shown in table one below:
watch 1
According to the reconciliation configuration information of the reconciliation task 1, it can be known that non-script reconciliation needs to be adopted to compare the Name1 field and Value1 field in the table a of the reconciliation source with the data of the Name2 field and Value2 field in the table B of the reconciliation target, and the reconciliation task 2 is the same, and is not described again here.
Further, determining that the current account checking task adopts non-script account checking according to the account checking type, or adopting script account checking, wherein the following step S202 can be executed by adopting non-script account checking, and the following step S203 can be executed by adopting script account checking.
S202, if the current account checking task adopts the non-script account checking according to the account checking type, executing the current account checking task according to the data source information of the account checking parties and the field to be checked through an application program.
In this embodiment, the unscripted reconciliation can be applied to the reconciliation with a small data volume, the reconciliation needs to be directly performed in the application program according to the reconciliation configuration information, and the application program writes program codes in advance, but the reconciliation configuration information can be configured, so that the method is applicable to different data sources and different fields to be reconciled.
In an alternative embodiment, as shown in fig. 3, the step S202 may specifically include:
s2021, extracting corresponding data of the fields to be checked from the data sources of the two checking parties respectively through an application program according to the data source information of the two checking parties and the fields to be checked;
s2022, comparing the corresponding data of the fields to be checked of the two checking parties one by one, and searching for difference data.
In this embodiment, the application program may run a pre-written program code to extract corresponding data of the field to be checked from the data sources of the two parties of the checking, according to the data source information of the two parties of the checking and the field to be checked, and store the data, for example, the data is stored in a key-value key value pair form in a memory, and the stored data are compared one by one in a traversal manner to find difference data therein and record the difference data, which is convenient for subsequent query and adjustment, and in addition, statistical data such as the number of successful account checking and the number of failed account checking may also be recorded.
Optionally, in consideration of the fact that the corresponding field names in different data sources may be different, after the data is extracted, the corresponding field names in different data sources may be unified, for example, the reconciliation task 1 in table one may rename the Name1 field in table a to the field a, the Name2 field in table B to the field a, the Value1 field in table a to the field B, and the Value2 field in table B to the field B, so that the data corresponding to the same field Name may be compared during comparison.
Of course, other application program execution modes may also be adopted in the embodiment to implement the unscripted account checking, which may not be limited herein.
S203, if the current account checking task adopts script account checking according to the account checking type, generating an account checking script according to the data source information of both account checking parties, the field to be checked and a preset script template, and operating the account checking script to execute the current account checking task.
In this embodiment, the script reconciliation is suitable for large data volume reconciliation, and because the data volume is too large, the reconciliation is difficult to run out in the application program, and effective reconciliation cannot be performed, so that the reconciliation script can be adopted for comparison operation in a large data environment. In this embodiment, an applicable reconciliation script can be generated for the data source information, the field to be reconciled and the preset script template of both reconciliation parties in the reconciliation configuration information, and the reconciliation script is uploaded to a big data environment to run, so as to complete the current reconciliation task.
In an alternative embodiment, as shown in fig. 4, the step S203 may specifically include:
s2031, generating an sql statement for extracting data according to the data source information of the account checking parties and the field to be checked, adding the sql statement into the preset script template, and generating the account checking script;
s2032, executing the reconciliation script to respectively extract corresponding data of the field to be reconciled from data sources of both reconciliation parties through the sql statement; and respectively sorting the corresponding data of the fields to be checked of the two checking parties according to a preset rule and then storing the sorted data in different first temporary tables through a preset instruction in the preset script template, and comparing the data based on the temporary tables of the two checking parties to search for difference data.
In this embodiment, an sql (Structured Query Language) statement for extracting data from a data source may be generated according to data source information of both reconciliation parties and a field to be reconciled, and the sql statement is added to a preset script template, where the preset script template further includes preset instructions for comparing the extracted data, and one of the preset instructions is an instruction for sorting the data extracted by both reconciliation parties, respectively storing the data in a temporary table, and comparing the data in the temporary tables of both reconciliation parties, and may also include other preset instructions. Further, after the reconciliation script is generated, the reconciliation script can be executed, and corresponding data of fields to be reconciled are respectively extracted from data sources of both reconciliation parties based on the sql statement in the reconciliation script; and respectively sorting the data extracted by the account checking parties according to a preset rule and storing the data in different first temporary tables through a preset instruction in the account checking script, comparing the data based on the temporary tables of the account checking parties, and searching for difference data.
It should be noted that, in order to ensure comparability of the first temporary tables of the two reconciliation parties, the first temporary tables of the two reconciliation parties need to be sorted by using the same predetermined rule, and optionally, the corresponding data of the fields to be reconciled of the two reconciliation parties may be sorted according to any field to be reconciled and then stored in different first temporary tables.
Of course, in this embodiment, other script generation manners and script operation manners may also be adopted to implement the script reconciliation, which may not be limited herein.
In the reconciliation data processing method provided by the embodiment, the reconciliation configuration information of the current reconciliation task is acquired, wherein the reconciliation configuration information comprises data source information of both reconciliation parties, a field to be reconciled and a reconciliation type, and the reconciliation type comprises adopting non-script reconciliation or adopting script reconciliation; if the current account checking task adopts the non-script account checking according to the account checking type, executing the current account checking task according to the data source information of both account checking parties and the field to be checked by the application program; and if the current account checking task adopts script account checking according to the account checking type, generating an account checking script according to the data source information of both account checking parties, the field to be checked and a preset script template, and running the account checking script to execute the current account checking task. In the embodiment, different reconciliation methods can be respectively adopted for reconciliation tasks with small data volume and large data volume by configuring the reconciliation configuration information, so that the reconciliation method is suitable for reconciliation scenes with different data volumes, program codes do not need to be manually written respectively aiming at different reconciliation requirements, and the program codes do not need to be modified or re-developed when the reconciliation requirements are modified or newly increased, so that the expansibility is good, the quick reconciliation can be realized, the reconciliation efficiency is improved, and the waste of resources and labor cost is avoided.
On the basis of the foregoing embodiment, as shown in fig. 5, in the case of non-script reconciliation, comparing the corresponding data of the fields to be reconciled of both reconciliation parties in S2022 one by one, and searching for difference data may specifically include:
s301, performing hash calculation on the data corresponding to the fields to be checked of the two checking parties respectively to obtain hash values of the data corresponding to the fields to be checked of the two checking parties;
s302, if the hash values of the data corresponding to the fields to be checked of the two checking parties are different, comparing the data corresponding to the fields to be checked of the two checking parties one by one, and searching for difference data.
In this embodiment, when the application program is used to perform data one-to-one comparison, the corresponding data of the fields to be checked extracted from the two checking parties may be integrally compared, that is, the corresponding data of the fields to be checked of the two checking parties are hash-calculated, respectively, and if the hash values of the corresponding data of the fields to be checked of the two checking parties are the same, it is indicated that the corresponding data of the fields to be checked of the two checking parties are completely the same, and the data do not need to be compared one by one; and if the hash values of the corresponding data of the fields to be checked of the two checking parties are different, the difference data is searched by traversing the corresponding data of the fields to be checked of the two checking parties for comparison one by one. According to the embodiment, through integral comparison, when the corresponding data of the fields to be checked of the two sides of the account checking are determined to be completely the same, comparison is not required to be performed one by one, and when the corresponding data of the fields to be checked of the two sides of the account checking are determined to be not completely the same, comparison is performed one by one, so that the data comparison efficiency can be effectively improved, and the calculation resources are saved.
On the basis of the above embodiment, in the case of the script reconciliation, the preset instruction for comparing the extracted data in the preset script template may include an instruction for searching for difference data by a bisection method. Therefore, the comparing the first temporary tables based on the reconciliation parties in S2032 to find the difference data may specifically include:
and comparing the first temporary tables of the account checking parties through a bisection method, and searching difference data.
In this embodiment, considering that the dichotomy is faster than the one-by-one comparison, and the method is simple and can ensure convergence and accuracy, the dichotomy may be used to compare the first temporary tables of both accounts and search for difference data. As shown in fig. 6, the specific process can be as follows:
reading partial data from the first temporary tables of the account checking parties according to the sorting, and performing hash calculation respectively to obtain hash values of the partial data read by the account checking parties; wherein the number of the read partial data is half of the total number of data in the first temporary table;
if the hash values of the partial data read by the account checking parties are different, storing the partial data read by the account checking parties in different second temporary tables, reading the partial data from the second temporary tables of the account checking parties according to the sequence, and performing hash calculation to obtain the hash values of the partial data read by the account checking parties; wherein the number of the read partial data is half of the total number of data in the second temporary table; repeating the process until only one piece of data is left in the last temporary table, and determining the piece of data as difference data; or
And if the hash values of the partial data read by the account checking parties are the same, reading the rest partial data from the first temporary tables of the account checking parties according to the sequence, and repeating the process to search for the difference data.
In this embodiment, it should be noted that, in order to ensure comparability of the first temporary tables of the reconciliation parties, the plurality of pieces of data in the first temporary tables of the reconciliation parties need to be sorted by the same predetermined rule. On the basis, partial data are respectively read from the first temporary tables of the two reconciliation parties, the number of the read partial data is one half of the total number of the data in the first temporary tables, and are respectively subjected to hash calculation to obtain hash values of the partial data read by the two reconciliation parties, namely the hash value of the partial data read by the first temporary table of the reconciliation source and the hash value of the partial data read by the first temporary table of the reconciliation target.
If the hash value of the part of the data read by the reconciliation source first temporary table is different from the hash value of the part of the data read by the reconciliation target first temporary table, the part of the data read by the reconciliation source first temporary table is not completely the same as the part of the data read by the reconciliation target first temporary table, at this time, the part of the data read by the reconciliation source first temporary table and the part of the data read by the reconciliation target first temporary table are respectively stored in different second temporary tables, and then the same method is executed for the second temporary table, namely, the part of the data is read from the second temporary tables of the reconciliation parties, the number of the read part of the data is half of the total number of the data in the second temporary tables, and the hash value is respectively calculated to obtain the hash value of the part of the data read by the reconciliation parties, namely, the hash value of the part of the data read by the reconciliation source second temporary table and the hash value of the part of the data read by the reconciliation target second temporary table, if the two hash values are the same, the fact that part of data read by the second temporary table of the reconciliation source is completely the same as part of data read by the second temporary table of the reconciliation target is shown, the difference data exists in the rest data of the second temporary tables of the reconciliation parties, and then the rest data read from the second temporary tables of the reconciliation parties are compared by adopting the same method; if the hash values of part of the data read by the reconciliation source second temporary table and the part of the data read by the reconciliation target second temporary table are different, the fact that difference data exists between the part of the data read by the reconciliation source second temporary table and the part of the data read by the reconciliation target second temporary table is shown, at this time, the part of the data read by the reconciliation source second temporary table and the part of the data read by the reconciliation target second temporary table are respectively stored in different third temporary tables, the same method is executed on the third temporary tables, and the like until only one piece of data remains in the last temporary table, and the piece of data is determined as the difference data. Through the cyclic iteration process of the dichotomy, the difference data of the reconciliation parties can be accurately determined.
In an optional embodiment, before the bisection, hash calculation may be performed on data in the first temporary tables of the two reconciliation parties, so as to obtain a hash value of the first temporary tables of the two reconciliation parties; if the hash values of the first temporary tables of the account checking parties are the same, the first temporary tables of the account checking parties are completely the same, so that dichotomy is not needed, and account checking efficiency can be effectively improved; otherwise, if the hash values of the first temporary tables of the two reconciliation parties are different, bisection needs to be performed, that is, part of data is read from the first temporary tables of the two reconciliation parties according to the sorting, and a subsequent comparison process is performed, which is not described herein again.
Fig. 7 is a block diagram of a reconciliation data processing device according to an embodiment of the present application. The reconciliation data processing device provided in this embodiment can execute the processing flow provided in the method embodiment, and as shown in fig. 7, the reconciliation data processing device 700 includes an obtaining module 701, a program reconciliation module 702, and a script reconciliation module 703.
An obtaining module 701, configured to obtain reconciliation configuration information of a current reconciliation task, where the reconciliation configuration information includes data source information of both reconciliation parties, a field to be reconciled, and a reconciliation type, and the reconciliation type includes adopting non-script reconciliation or adopting script reconciliation;
a program reconciliation module 702, configured to execute, by an application program, the current reconciliation task according to the data source information of both reconciliation parties and the field to be reconciled, if it is determined that the current reconciliation task adopts non-script reconciliation according to the reconciliation type;
and the script reconciliation module 703 is configured to generate a reconciliation script according to the data source information of both reconciliation parties, the field to be reconciled, and a preset script template if it is determined that the current reconciliation task adopts script reconciliation according to the reconciliation type, and run the reconciliation script to execute the current reconciliation task.
In one or more embodiments of the present application, when the program reconciliation module 702 executes the current reconciliation task according to the data source information of the reconciliation parties and the to-be-reconciled field through the application program, the program reconciliation module is configured to:
extracting corresponding data of the fields to be checked from the data sources of the two checking parties respectively through an application program according to the data source information of the two checking parties and the fields to be checked;
and comparing the corresponding data of the fields to be checked of the two checking parties one by one, and searching for difference data.
In one or more embodiments of the present application, the program reconciliation module 702 is configured to, when comparing the corresponding data of the fields to be reconciled of the reconciliation parties one by one, and searching for difference data,:
performing hash calculation on the corresponding data of the fields to be checked of the two checking parties respectively to obtain hash values of the corresponding data of the fields to be checked of the two checking parties;
and if the hash values of the data corresponding to the fields to be checked of the two checking parties are different, comparing the data corresponding to the fields to be checked of the two checking parties one by one, and searching for difference data.
In one or more embodiments of the present application, the script reconciliation module 703 is configured to, when generating a reconciliation script according to the data source information of the reconciliation party, the field to be reconciled, and the preset script template, and running the reconciliation script to execute a current reconciliation task:
generating an sql statement for extracting data according to the data source information of the account checking parties and the field to be checked, and adding the sql statement into the preset script template to generate the account checking script;
executing the reconciliation script to respectively extract corresponding data of the field to be reconciled from data sources of both reconciliation parties through the sql statement; and respectively sorting the corresponding data of the fields to be checked of the two checking parties according to a preset rule and then storing the sorted data in different first temporary tables through a preset instruction in the preset script template, and comparing the data based on the temporary tables of the two checking parties to search for difference data.
In one or more embodiments of the present application, when the script reconciliation module 703 compares the first temporary tables based on the reconciliation parties and finds difference data, it is configured to:
and comparing the first temporary tables of the account checking parties through a bisection method, and searching difference data.
In one or more embodiments of the present application, when the script reconciliation module 703 compares the first temporary tables of the reconciliation parties by bisection and finds difference data, it is configured to:
reading partial data from the first temporary tables of the account checking parties according to the sorting, and performing hash calculation respectively to obtain hash values of the partial data read by the account checking parties; wherein the number of the read partial data is half of the total number of data in the first temporary table;
if the hash values of the partial data read by the account checking parties are different, storing the partial data read by the account checking parties in different second temporary tables, reading the partial data from the second temporary tables of the account checking parties according to the sequence, and performing hash calculation to obtain the hash values of the partial data read by the account checking parties; wherein the number of the read partial data is half of the total number of data in the second temporary table; repeating the process until only one piece of data is left in the last temporary table, and determining the piece of data as difference data; or
And if the hash values of the partial data read by the account checking parties are the same, reading the rest partial data from the first temporary tables of the account checking parties according to the sequence, and repeating the process to search for the difference data. In one or more embodiments of the present application, when the script reconciliation module 703 reads partial data from the first temporary tables of the two reconciliation parties according to the sorting, and performs hash calculation respectively, the script reconciliation module is configured to:
performing hash calculation on the data of the first temporary tables of the two reconciliation parties to obtain a hash value of the first temporary tables of the two reconciliation parties;
and if the hash values of the first temporary tables of the two reconciliation parties are different, reading partial data from the first temporary tables of the two reconciliation parties according to the sequence, and respectively carrying out hash calculation.
In one or more embodiments of the present application, when the script reconciliation module 703 sorts, according to a predetermined rule, the data corresponding to the fields to be reconciled of the reconciliation parties and stores the sorted data in different first temporary tables, the script reconciliation module is configured to:
and respectively sorting the corresponding data of the fields to be checked of the two checking parties according to any field to be checked and storing the sorted data in different first temporary tables.
The reconciliation data processing device provided in the embodiment of the present application can be specifically configured to execute the method embodiments provided in fig. 2 to 6, and specific functions are not described herein again.
Fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present application. The electronic device provided in the embodiment of the present application may execute the processing flow provided in the embodiment of the reconciliation data processing method, as shown in fig. 8, the electronic device 80 includes a memory 81, a processor 82, and a computer program; wherein the computer program is stored in the memory 81 and is configured to be executed by the processor 82 for the reconciliation data processing method described in the above embodiment. Furthermore, the electronic device 80 may also have a communication interface 83 for transmitting control commands and/or data.
The electronic device in the embodiment shown in fig. 8 may be used to implement the technical solution of the foregoing reconciliation data processing method embodiment, and the implementation principle and technical effect are similar, which are not described herein again.
In addition, the present embodiment also provides a computer-readable storage medium on which a computer program is stored, the computer program being executed by a processor to implement the method of the above embodiment.
In addition, the present embodiment also provides a computer program product, which includes a computer program, and the computer program is executed by a processor to implement the method of the above embodiment.
In the several embodiments provided in the embodiments of the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
The integrated unit implemented in the form of a software functional unit may be stored in a computer readable storage medium. The software functional unit is stored in a storage medium and includes several instructions to enable a computer device (which may be a personal computer, a server, or a network device) or a processor (processor) to execute some steps of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
It is obvious to those skilled in the art that, for convenience and simplicity of description, the foregoing division of the functional modules is merely used as an example, and in practical applications, the above function distribution may be performed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to perform all or part of the above described functions. For the specific working process of the device described above, reference may be made to the corresponding process in the foregoing method embodiment, which is not described herein again.
It should be noted that: the above embodiments are only used for illustrating the technical solutions of the embodiments of the present application, and are not limited thereto; although the embodiments of the present application have been described in detail with reference to the foregoing embodiments, those skilled in the art will understand that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present application.
Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the application being indicated by the following claims.
It will be understood that the present application is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the application is limited only by the appended claims.
Claims (12)
1. A reconciliation data processing method is characterized by comprising the following steps:
acquiring account checking configuration information of a current account checking task, wherein the account checking configuration information comprises data source information of both account checking parties, an account checking field to be checked and an account checking type, and the account checking type comprises non-script account checking or script account checking;
if the current account checking task adopts non-script account checking according to the account checking type, executing the current account checking task according to the data source information of both account checking parties and the field to be checked by an application program;
and if the current account checking task adopts script account checking according to the account checking type, generating an account checking script according to the data source information of the account checking parties, the field to be checked and a preset script template, and operating the account checking script to execute the current account checking task.
2. The method of claim 1, wherein the executing, by the application program, the current reconciliation task according to the data source information of the reconciliation parties and the field to be reconciled comprises:
extracting corresponding data of the fields to be checked from the data sources of the two checking parties respectively through an application program according to the data source information of the two checking parties and the fields to be checked;
and comparing the corresponding data of the fields to be checked of the two checking parties one by one, and searching for difference data.
3. The method according to claim 2, wherein comparing the data corresponding to the fields to be checked of the two checking parties one by one, and searching for difference data comprises:
performing hash calculation on the corresponding data of the fields to be checked of the two checking parties respectively to obtain hash values of the corresponding data of the fields to be checked of the two checking parties;
and if the hash values of the data corresponding to the fields to be checked of the two checking parties are different, comparing the data corresponding to the fields to be checked of the two checking parties one by one, and searching for difference data.
4. The method according to claim 1, wherein the generating a reconciliation script according to the data source information of the reconciliation parties, the field to be reconciled and a preset script template, and running the reconciliation script to execute the current reconciliation task comprises:
generating a structured query language sql statement for extracting data according to the data source information of the account checking parties and the field to be checked, and adding the sql statement into the preset script template to generate the account checking script;
executing the reconciliation script to respectively extract corresponding data of the field to be reconciled from data sources of both reconciliation parties through the sql statement; and respectively sorting the corresponding data of the fields to be checked of the two checking parties according to a preset rule and then storing the sorted data in different first temporary tables through a preset instruction in the preset script template, and comparing the data based on the temporary tables of the two checking parties to search for difference data.
5. The method of claim 4, wherein the comparing the first temporary tables based on the reconciliation parties to find difference data comprises:
and comparing the first temporary tables of the account checking parties through a bisection method, and searching difference data.
6. The method of claim 5, wherein the comparing the first temporary tables of the reconciling parties by dichotomy to find difference data comprises:
reading partial data from the first temporary tables of the account checking parties according to the sorting, and performing hash calculation respectively to obtain hash values of the partial data read by the account checking parties; wherein the number of the read partial data is half of the total number of data in the first temporary table;
if the hash values of the partial data read by the account checking parties are different, storing the partial data read by the account checking parties in different second temporary tables, reading the partial data from the second temporary tables of the account checking parties according to the sequence, and performing hash calculation to obtain the hash values of the partial data read by the account checking parties; wherein the number of the read partial data is half of the total number of data in the second temporary table; repeating the process until only one piece of data is left in the last temporary table, and determining the piece of data as difference data; or
And if the hash values of the partial data read by the account checking parties are the same, reading the rest partial data from the first temporary tables of the account checking parties according to the sequence, and repeating the process to search for the difference data.
7. The method of claim 6, wherein reading partial data from the first temporary tables of the reconciling parties according to the sorting and performing hash calculation respectively comprises:
performing hash calculation on the data of the first temporary tables of the two reconciliation parties to obtain a hash value of the first temporary tables of the two reconciliation parties;
and if the hash values of the first temporary tables of the two reconciliation parties are different, reading partial data from the first temporary tables of the two reconciliation parties according to the sequence, and respectively carrying out hash calculation.
8. The method according to any one of claims 4 to 7, wherein the step of sorting the corresponding data of the fields to be checked out of the two checking parties according to a predetermined rule and then storing the sorted data in different first temporary tables comprises:
and respectively sorting the corresponding data of the fields to be checked of the two checking parties according to any field to be checked and storing the sorted data in different first temporary tables.
9. A reconciliation data processing apparatus comprising:
the system comprises an acquisition module, a reconciliation configuration module and a reconciliation processing module, wherein the reconciliation configuration information comprises data source information of two reconciliation parties, a field to be reconciled and a reconciliation type, and the reconciliation type comprises adopting non-script reconciliation or adopting script reconciliation;
the program reconciliation module is used for executing the current reconciliation task according to the data source information of both reconciliation parties and the field to be reconciled by the application program if the non-script reconciliation is determined to be adopted by the current reconciliation task according to the reconciliation type;
and the script reconciliation module is used for generating a reconciliation script according to the data source information of both reconciliation parties, the field to be reconciled and a preset script template if the current reconciliation task adopts script reconciliation according to the reconciliation type, and operating the reconciliation script to execute the current reconciliation task.
10. An electronic device, comprising: at least one processor; and a memory;
the memory stores computer-executable instructions;
the at least one processor executing the computer-executable instructions stored by the memory causes the at least one processor to perform the method of any one of claims 1-8.
11. A computer-readable storage medium having computer-executable instructions stored thereon which, when executed by a processor, implement the method of any one of claims 1-8.
12. A computer program product comprising computer instructions, characterized in that the computer instructions, when executed by a processor, implement the method according to any of claims 1-8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210011846.XA CN114356454B (en) | 2022-01-06 | 2022-01-06 | Reconciliation data processing method, device, storage medium and program product |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210011846.XA CN114356454B (en) | 2022-01-06 | 2022-01-06 | Reconciliation data processing method, device, storage medium and program product |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114356454A true CN114356454A (en) | 2022-04-15 |
CN114356454B CN114356454B (en) | 2024-06-18 |
Family
ID=81106402
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210011846.XA Active CN114356454B (en) | 2022-01-06 | 2022-01-06 | Reconciliation data processing method, device, storage medium and program product |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114356454B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116012185A (en) * | 2023-03-24 | 2023-04-25 | 北京沐融信息科技股份有限公司 | Method, device, electronic equipment and computer readable storage medium for checking account |
Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105989059A (en) * | 2015-02-09 | 2016-10-05 | 阿里巴巴集团控股有限公司 | Data record checking method and device |
CN109739934A (en) * | 2019-01-08 | 2019-05-10 | 厦门投融汇网络有限公司 | Difference set account checking method, medium, computer equipment and system |
CN110018819A (en) * | 2019-01-17 | 2019-07-16 | 阿里巴巴集团控股有限公司 | A kind of verification of data scenario generation method, device and equipment |
US20190310835A1 (en) * | 2017-03-28 | 2019-10-10 | Tencent Technology (Shenzhen) Company Limited | Application development method, tool, and device, and storage medium |
CN110413428A (en) * | 2019-08-06 | 2019-11-05 | 中国联合网络通信集团有限公司 | Processing method, electronic equipment and the storage medium of reconciliation data |
CN111325626A (en) * | 2020-02-21 | 2020-06-23 | 中国工商银行股份有限公司 | Account checking data pushing method and device |
CN111639028A (en) * | 2020-05-26 | 2020-09-08 | 深圳乐信软件技术有限公司 | Account checking rule script test method, device, engine and storage medium |
CN111784318A (en) * | 2020-06-29 | 2020-10-16 | 京东数字科技控股有限公司 | Data processing method and device, electronic equipment and storage medium |
CN112686759A (en) * | 2020-12-30 | 2021-04-20 | 平安证券股份有限公司 | Account checking monitoring method, device, equipment and medium |
CN113656194A (en) * | 2021-08-12 | 2021-11-16 | 京东科技控股股份有限公司 | Account checking result data notification method and device, electronic device and storage medium |
-
2022
- 2022-01-06 CN CN202210011846.XA patent/CN114356454B/en active Active
Patent Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105989059A (en) * | 2015-02-09 | 2016-10-05 | 阿里巴巴集团控股有限公司 | Data record checking method and device |
US20190310835A1 (en) * | 2017-03-28 | 2019-10-10 | Tencent Technology (Shenzhen) Company Limited | Application development method, tool, and device, and storage medium |
CN109739934A (en) * | 2019-01-08 | 2019-05-10 | 厦门投融汇网络有限公司 | Difference set account checking method, medium, computer equipment and system |
CN110018819A (en) * | 2019-01-17 | 2019-07-16 | 阿里巴巴集团控股有限公司 | A kind of verification of data scenario generation method, device and equipment |
CN110413428A (en) * | 2019-08-06 | 2019-11-05 | 中国联合网络通信集团有限公司 | Processing method, electronic equipment and the storage medium of reconciliation data |
CN111325626A (en) * | 2020-02-21 | 2020-06-23 | 中国工商银行股份有限公司 | Account checking data pushing method and device |
CN111639028A (en) * | 2020-05-26 | 2020-09-08 | 深圳乐信软件技术有限公司 | Account checking rule script test method, device, engine and storage medium |
CN111784318A (en) * | 2020-06-29 | 2020-10-16 | 京东数字科技控股有限公司 | Data processing method and device, electronic equipment and storage medium |
CN112686759A (en) * | 2020-12-30 | 2021-04-20 | 平安证券股份有限公司 | Account checking monitoring method, device, equipment and medium |
CN113656194A (en) * | 2021-08-12 | 2021-11-16 | 京东科技控股股份有限公司 | Account checking result data notification method and device, electronic device and storage medium |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116012185A (en) * | 2023-03-24 | 2023-04-25 | 北京沐融信息科技股份有限公司 | Method, device, electronic equipment and computer readable storage medium for checking account |
Also Published As
Publication number | Publication date |
---|---|
CN114356454B (en) | 2024-06-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112199366B (en) | Data table processing method, device and equipment | |
CN110309071B (en) | Test code generation method and module, and test method and system | |
CN111382070B (en) | Compatibility testing method and device, storage medium and computer equipment | |
CN111367886A (en) | Method and device for data migration in database | |
CN104252481A (en) | Dynamic check method and device for consistency of main and salve databases | |
CN102236672A (en) | Method and device for importing data | |
CN111435367B (en) | Knowledge graph construction method, system, equipment and storage medium | |
CN112948473A (en) | Data processing method, device and system of data warehouse and storage medium | |
CN105630656A (en) | Log model based system robustness analysis method and apparatus | |
CN108446224B (en) | Performance analysis method of application program on mobile terminal and storage medium | |
CN111475494A (en) | Mass data processing method, system, terminal and storage medium | |
CN114356454B (en) | Reconciliation data processing method, device, storage medium and program product | |
CN109241163B (en) | Electronic certificate generation method and terminal equipment | |
CN112395307A (en) | Statement execution method, statement execution device, server and storage medium | |
CN116775488A (en) | Abnormal data determination method, device, equipment, medium and product | |
CN116561003A (en) | Test data generation method, device, computer equipment and storage medium | |
CN115422180A (en) | Data verification method and system | |
CN113407378A (en) | Fragmentation information backup method and device for distributed database | |
CN112559331A (en) | Test method and device | |
CN112347095B (en) | Data table processing method, device and server | |
CN111324434B (en) | Configuration method, device and execution system of computing task | |
CN116401177B (en) | DDL correctness detection method, device and medium | |
CN114327377B (en) | Method and device for generating demand tracking matrix, computer equipment and storage medium | |
CN117149745A (en) | Report form checking method, device, equipment and storage medium of new and old systems | |
CN113360511A (en) | Method, device and equipment for processing credit investigation information |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |