A method, apparatus, device, medium and product for account reconciliation
By splitting the data files of the source database and storing them in multiple reconciliation databases to perform account reconciliation in parallel, the problems of high database pressure and low efficiency in high concurrency and multi-partner scenarios are solved, and efficient reconciliation processing is achieved.
Patent Information
- Application Number
- CN202411877943.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-19
- Publication Date
- 2025-10-10
- Estimated Expiration
- 2044-12-19
AI Technical Summary
The existing reconciliation method causes high database pressure, high performance consumption, and low efficiency in high-concurrency and multi-partner scenarios, and cannot support high-concurrency processing and multi-partner scenarios.
By splitting the data files of the source database into multiple first reconciliation files and storing them in different reconciliation databases, the account reconciliation work can be performed in parallel, reducing the pressure on the source database and improving reconciliation efficiency.
It improves reconciliation efficiency, reduces database pressure, supports high-concurrency processing and multi-partner scenarios, and improves resource utilization.
Smart Images

Figure CN119671764B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of big data technology, and in particular to a reconciliation method, device, equipment, medium and product. Background Art
[0002] Reconciliation is a very important task in the daily financial management of financial enterprises. By comparing data and information between different accounts, the accuracy and consistency of financial records can be ensured.
[0003] Currently, reconciliation is done directly with the help of a database. For example, using Structured Query Language (SQL) to extract specific data from the database for comparative analysis (using a cursor to obtain the data corresponding to each transaction one by one and compare them), identify differences between specific data, process the identified differences, and obtain reconciliation results and reports. Reconciliation is a key core operation for banks and partners. With the increase in partners and cooperative projects, business volume has gradually increased. Complex transaction scenarios and a large amount of transaction data have become the characteristics of current reconciliation. This feature easily triggers the database's high watermark mechanism, causing greater database pressure and performance consumption, affecting reconciliation efficiency. In addition, the line-by-line comparison method has low concurrency and does not support high-concurrency processing and multi-partner scenarios. Summary of the Invention
[0004] The present invention provides a reconciliation method, device, equipment, medium and product that can be applied in the field of financial technology. It aims to achieve high-concurrency processing and account reconciliation work in multi-partner scenarios, improve the efficiency of account reconciliation work, and reduce the pressure on the database.
[0005] According to one aspect of the present invention, a reconciliation method is provided, the method comprising:
[0006] Determining the number of reconciliation databases running in parallel and data configuration rules, and parsing data files of the source database based on the number of reconciliation databases running in parallel and the data configuration rules to obtain i first reconciliation files, where i is a positive integer not less than 1, and the number of first reconciliation files is the same as the number of reconciliation databases;
[0007] When the current time is the preset reconciliation time, the host reconciliation file is split by the public processing node to obtain j second reconciliation files, where j is a positive integer not less than 1, and the second reconciliation files correspond one-to-one to the first reconciliation files;
[0008] The data processors of the reconciliation databases are used to perform the account reconciliation work of the i first reconciliation files and the j second reconciliation files in parallel to obtain the reconciliation results of the account data.
[0009] According to another aspect of the present invention, a reconciliation device is provided. The reconciliation device is used to implement the reconciliation method in any embodiment of the present invention. The device includes:
[0010] a first determining module, configured to determine the number of reconciliation databases running in parallel and data configuration rules, and parse data files of the source database based on the number of reconciliation databases running in parallel and the data configuration rules to obtain i first reconciliation files, where i is a positive integer not less than 1, and the number of first reconciliation files is the same as the number of reconciliation databases;
[0011] a second determining module configured to, when the current time is a preset reconciliation time, split the host reconciliation file using a public processing node to obtain j second reconciliation files, where j is a positive integer not less than 1, and the second reconciliation files correspond one-to-one to the first reconciliation files;
[0012] The account reconciliation module is used to utilize the data processors of each reconciliation database to execute the account reconciliation work of i first reconciliation files and j second reconciliation files in parallel to obtain the reconciliation result of the account data.
[0013] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:
[0014] at least one processor; and a memory communicatively coupled to the at least one processor;
[0015] The memory stores a computer program that can be executed by at least one processor, and the computer program is executed by at least one processor so that the at least one processor can execute the reconciliation method in any embodiment of the present invention.
[0016] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the reconciliation method in any embodiment of the present invention when executed.
[0017] According to another aspect of the present invention, a computer program product is provided. The computer program product includes a computer program. When the computer program is executed by a processor, it implements the reconciliation method of any embodiment of the present invention.
[0018] The reconciliation method of the present invention includes: determining the number and data configuration rules of the reconciliation databases running in parallel, and parsing the data files of the source database based on the number and data configuration rules of the reconciliation databases running in parallel to obtain i first reconciliation files, i is a positive integer not less than 1, and the number of the first reconciliation files is the same as the number of the reconciliation databases; when the current moment is a preset reconciliation moment, splitting the host reconciliation file through a public processing node to obtain j second reconciliation files, j is a positive integer not less than 1, and the second reconciliation files correspond to the first reconciliation files one-to-one; using the data processors of each reconciliation database, executing the account verification work of the i first reconciliation files and the j second reconciliation files in parallel to obtain the verification result of the account data. The technical solution of the present invention will split the data files of the source database into multiple first account files and store them in different databases, and at the same time split the host account file into multiple second account files corresponding to the first account files, and execute the account verification work in parallel under each database, reducing the pressure on the source database and improving the efficiency of the reconciliation work. It solves the problems that as the number of partners and cooperation projects increases, the business volume gradually increases, the transaction scenarios of reconciliation work are complex, the transaction data is large, and it is easy to trigger the database high water level mechanism, resulting in high database pressure and performance consumption, low reconciliation efficiency, and low concurrency of the one-by-one comparison method, which does not support high-concurrency processing and multi-partner scenarios.
[0019] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present invention, nor is it intended to limit the scope of the present invention. Other features of the present invention will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the technical solutions in the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0021] Figure 1 This is a flow chart of a reconciliation method provided by the present invention;
[0022] Figure 2 It is a schematic diagram of a data acquisition method of a database provided by the present invention;
[0023] Figure 3 This is a schematic diagram of a method for splitting a host reconciliation file provided by the present invention;
[0024] Figure 4 It is a flowchart of another reconciliation method provided by the present invention;
[0025] Figure 5 This is a schematic diagram of a method for splitting a platform reconciliation file provided by the present invention;
[0026] Figure 6 It is a schematic diagram of a reconciliation method provided by the present invention;
[0027] Figure 7 This is a structural diagram of a reconciliation device provided by the present invention;
[0028] Figure 8 It is a structural schematic diagram of an electronic device provided by the present invention. DETAILED DESCRIPTION
[0029] In order to enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.
[0030] It should be noted that the terms "first", "second", "intermediate", "candidate", "initial", "alternative", "target", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0031] Figure 1 This is a flow chart of a reconciliation method provided by the present invention. This embodiment is applicable to realizing the account reconciliation work in high-concurrency processing and multi-partner scenarios. The method can be executed by the reconciliation device provided by the present invention. The device can be implemented in the form of hardware and / or software. In a specific embodiment, the device can be integrated into an electronic device. The following embodiments will be described by taking the device integrated into an electronic device as an example. Figure 1 , the method specifically comprises the following steps:
[0032] S101: Determine the number of reconciliation databases running in parallel and data configuration rules, and parse data files of a source database based on the number of reconciliation databases running in parallel and the data configuration rules to obtain i first reconciliation files.
[0033] The number of parallel reconciliation databases can be understood as the number of shards. Different databases are assigned different data, i.e., the number of splits of the source database data. Each reconciliation database processes one split data file. Generally, different databases process different types of data. Data configuration rules can be understood as database data processing instructions, which assist in splitting transaction data in the source database. The split data file is the first reconciliation file. Specifically, i is a positive integer not less than 1. The number of first reconciliation files is the same as the number of reconciliation databases.
[0034] Figure 2 This is a schematic diagram of a data acquisition method for a database provided by the present invention, combined with Figure 2 The method of database partitioning is explained. Based on the partner identification, the data of the source database (usually the processing layer) is split, and the data of different partners are divided into different databases for parallel processing. Figure 2 Database 1 is used to process partner transaction data with Class A identifiers, which include but are not limited to partner identifiers A1 and A2. Database 2 is used to process partner transaction data with Class B identifiers, which include but are not limited to partner identifiers B1 and B2. Database 3 is used to process partner transaction data with Class C identifiers, which include but are not limited to partner identifiers C1 and C2. Database 4 is used to process partner transaction data with Class D identifiers, which include but are not limited to partner identifiers D1 and D2. Configuration rules are recorded in Appolo (an open source configuration management center). The processing layer identifies the configuration information in Appolo and distributes the data to the databases corresponding to each partner for processing.
[0035] Database 1 and database 3 are mutually active and standby, and database 2 and database 4 are mutually active and standby. The advantage of this arrangement is that it provides a backup data processing solution to ensure smooth reconciliation. Data distribution can be performed by the data source routing distribution device.
[0036] S102: When the current moment is the preset reconciliation moment, the host reconciliation file is split by the public processing node to obtain j second reconciliation files.
[0037] Reconciliation has a clear time point, for example, 5 pm, 5:30 pm, etc. The specific reconciliation time is related to the company's management method and the needs of partners. The preset reconciliation time can be understood as the account reconciliation time set in advance. The account reconciliation work is started when the current time is the preset reconciliation time. Since the data stored in the host contains a lot of account information and the data volume is large, the present invention refines the public processing node to uniformly split the host reconciliation file. Figure 3 This is a schematic diagram of a host reconciliation file splitting method provided by the present invention, combined with Figure 3 The splitting process of the host reconciliation file is explained. The present invention uses a public processing node to perform a simple division of the host reconciliation file, dividing it into multiple parts for parallel processing. The specific number of divisions is related to the number of executors. The executors perform file disassembly according to the splitting rules set by the user (for example, unique identifier, region, outlet) and specific fields (key information) of the file, and split the reconciliation file into multiple identification files according to the dimensions set by the splitting rules. The identification files can be understood as small files of the brokerage (partner) dimension. The second reconciliation file is all file information of the same type of partner, so the second reconciliation file includes multiple identification files. For example, Class A files such as small files of the A1 partner dimension and small files of the A2 partner dimension constitute Class A reconciliation files.
[0038] The host reconciliation file consists of a data file and a verification file. j is a positive integer not less than 1, and the second reconciliation file corresponds one-to-one with the first reconciliation file. The data file can be understood as transaction data, i.e., data used for reconciliation, while the verification file can be understood as a check file used to verify the integrity of the data required for reconciliation. This configuration has the advantage of only performing reconciliation when the data is complete, avoiding unnecessary verification work and wasting resources.
[0039] Reconciliation generally involves checking the platform's account data against the host's account data. In this application, the first reconciliation file is the platform's account data, and the second reconciliation file is the host's account data.
[0040] S103 , using the data processors of the reconciliation databases, executing the account reconciliation work of the i first reconciliation files and the j second reconciliation files in parallel to obtain the reconciliation result of the account data.
[0041] The verification result of the accounting data is used to indicate whether the accounting data recorded by the platform is consistent with the accounting data recorded by the host.
[0042] For example, assuming the parallel reconciliation databases are database 1 and database 2, the data processor of database 1 performs the reconciliation work on the first reconciliation file 1 and the second reconciliation file 1, and the data processor of database 2 performs the reconciliation work on the first reconciliation file 2 and the second reconciliation file 2. The data processors of the two databases are controlled to operate in parallel. The data processor of database 1 determines whether the accounting data of the first reconciliation file 1 and the second reconciliation file 1 are consistent, and the data processor of database 2 determines whether the accounting data of the first reconciliation file 2 and the second reconciliation file 2 are consistent. This improves the efficiency of account reconciliation by operating in parallel. The reconciliation result of the account data is the summary information of the reconciliation conclusions of the two data processors.
[0043] The present invention will also send the reconciliation report to the partner for review after the reconciliation is completed, so that the partner can understand the account information or perform a second account check.
[0044] The existing reconciliation method is mainly based on Oracle (a relational database management system), and generally compares transaction data one by one through a cursor. This method has the following problems: 1) In scenarios with large data volumes, it is easy to trigger the database high water mark mechanism, which easily leads to performance bottlenecks and extremely slow reconciliation efficiency. 2) The concurrency of the one-by-one comparison is low, and it cannot support high concurrent processing. The reconciliation efficiency in multi-partner scenarios is extremely poor. 3) Through analysis of the central processing unit (CPU), it was found that the overall CPU usage during the reconciliation period showed no obvious change, that is, the performance utilization rate of the server during the reconciliation period was low, most of the resources were consumed in the database, and the usage of server resources was insufficient. The present invention decompresses the database by sharding, splits the reconciliation files according to the routing distribution mechanism through the public node, and the platform privatizes the partner files (i.e., reconciliation files) through routing distribution, and performs "part-by-part reconciliation" and "total reconciliation" on the files through the file comparison device. Finally, the reconciled files are forwarded through the file sending device. This solution primarily addresses the current business challenges of slow reconciliation, high processing pressure, and large data volumes. It proposes a new approach to reconciliation that significantly reduces database pressure while improving reconciliation performance by nearly 20 times. It offers the following benefits: 1) Improves resource allocation and utilization, isolating high-IO and high-CPU tasks, enabling parallel processing and improving overall resource utilization. 2) Decouples the relationship between the database and reconciliation files, reducing database pressure during critical time periods. 3) Improves reconciliation efficiency and performance, reducing the time required for batch reconciliation tasks from hours to minutes.
[0045] The technical solution of the above embodiment splits the data files of the source database into multiple first accounting files, which are stored in different databases. At the same time, the host accounting files are split into multiple second accounting files corresponding to the first accounting files. Account reconciliation work is performed in parallel in each database, reducing the pressure on the source database and improving the efficiency of reconciliation work. This solves the problem that with the increase in partners and cooperation projects, the business volume gradually increases, the transaction scenarios of reconciliation work are complex, the transaction data is large, and it is easy to trigger the database high water mark mechanism, resulting in high database pressure and performance consumption, low reconciliation efficiency, and low concurrency of the one-by-one comparison method, which does not support high concurrency processing and multi-partner scenarios.
[0046] Figure 4 This is a flow chart of another reconciliation method provided by the present invention. This embodiment provides a preferred account reconciliation method based on the above embodiment. Specifically, Figure 4 As shown, the method specifically includes:
[0047] S201: Determine the number of reconciliation databases running in parallel based on the total number of reconciliation databases.
[0048] Generally, reconciliation databases can run in parallel. Therefore, the total number of reconciliation databases is the number of concurrently running reconciliation databases. However, if standby databases are required to perform specialized reconciliation tasks, the number of concurrently running reconciliation databases is the total number of reconciliation databases minus the number of standby databases. This setup ensures reconciliation efficiency while accommodating customized reconciliation tasks.
[0049] S202: Determine data configuration rules for the parallel reconciliation databases based on the partner identifier and the number of the parallel reconciliation databases.
[0050] The data configuration rules include at least one data splitting rule, and the number of data splitting rules corresponds to the reconciliation database. In general, the data configuration rules are used to instruct the reconciliation database which partners' data to process. Figure 2 The data configuration rules of database 1 include partner identification A1, partner identification A2, etc., the data configuration rules of database 2 include partner identification B1, partner identification B2, etc., the data configuration rules of database 3 include partner identification C1, partner identification C2, etc., and the data configuration rules of database 4 include partner identification D1, partner identification D2, etc.
[0051] S203 . Split the data files of the source database using at least one data splitting rule to obtain i first reconciliation files, and store the i first reconciliation files in reconciliation databases running in parallel.
[0052] Wherein, i is a positive integer not less than 1, the number of the first reconciliation files is the same as the number of the reconciliation databases, and the first reconciliation files and the reconciliation databases are one-to-one corresponding.
[0053] In combination Figure 2 , the data files of the source database are split into 4 parts according to 4 data splitting rules, and the splitting results are the first reconciliation file 1, the first reconciliation file 2, the first reconciliation file 3 and the first reconciliation file 4, which are respectively stored to the database 1, the database 2, the database 3 and the database 4. The advantage of such setting is that the personalized and targeted splitting platform reconciliation files are processed in parallel by each database.
[0054] The first reconciliation file batch processing is to release the database pressure of the data source routing distribution table (the source database), and the first reconciliation file is essentially a large data file, and a plurality of groups of executors are further configured on each reconciliation database of the application, which are used to batch split the first reconciliation file, and the specific splitting manner is similar to the host reconciliation file, Figure 5 is a schematic diagram of a splitting manner of a platform reconciliation file provided by the application, Figure 5 The databases in the figure represent the database 1, the database 2, the database 3 and the database 4, the platform file splitting can be understood as platform reconciliation file exporting, and from Figure 5 It can be seen from the figure that the executors can perform file splitting tasks in parallel according to the set rules, and can also export the platform reconciliation files of each securities company according to the division dimension of the executors, and each platform reconciliation file is independent and does not interfere with each other. It is worth noting that the platform reconciliation file is a small file of the securities company (cooperation party) dimension, and the reconciliation is to check whether the data before and after the securities company dimension small file of the platform and the securities company dimension small file of the host are consistent.
[0055] S204, when the current time is the preset reconciliation time, the data file and the verification file meet the preset reconciliation condition, the verification file is stored to the backup directory, and the data file is moved to the log directory.
[0056] The host reconciliation file includes a data file and a verification file, and the preset reconciliation condition is that the number of files in the data file is equal to the first quantity threshold, the number of files in the verification file is equal to the second quantity threshold, and the file content of the verification file is normal.
[0057] The data file can be a binary (BIN) file, and the check file is a CHecK (CHK, a "lost cluster recovery file" generated by the user after using the "Disk Defragmenter" to defragment the hard drive). The number of files in the data file equal to the first quantity threshold and the number of files in the check file equal to the second quantity threshold indicate that the number of files in the host reconciliation file is correct. The absence of abnormalities in the file content of the check file indicates that the BIN file is qualified (i.e., the information is complete and the transmission is normal). The first quantity threshold can be 16, and the second quantity threshold can be 18. The quantity can be set and adjusted according to verification requirements, and this implementation does not limit this.
[0058] It is worth noting that if the data file and the inspection file do not meet the preset reconciliation conditions, the system will pause for 1 minute and continue to determine whether the data file and the inspection file meet the preset reconciliation conditions. If the data file and the inspection file still do not meet the preset reconciliation conditions for 30 consecutive times, the reconciliation work will be terminated and a reconciliation exception alert will be generated to prompt the staff to resolve the exception in a timely manner to advance the reconciliation work.
[0059] Verification files are not involved in reconciliation and only serve as a verification function. When they meet the reconciliation criteria, they are stored in the backup directory to ensure data traceability. Data files are also moved to the log directory for processing, including but not limited to splitting files and file contents according to rules, generating new BIN files by broker, and recording file split log tables.
[0060] S205: Process the data file according to the partner identifier to obtain j second reconciliation files.
[0061] j is a positive integer not less than 1, and the second reconciliation file corresponds to the first reconciliation file one by one. The splitting process can be referred to Figure 2 .
[0062] Optionally, after obtaining the j second reconciliation files, the method further includes: determining, based on the partner identifier, a corresponding reconciliation database for each second reconciliation file; and transmitting the corresponding second reconciliation file to each reconciliation database, so that the reconciliation database performs account reconciliation. For example, the reconciliation file for a Class A host may be sent to Database 1, and the reconciliation file for a Class B host may be sent to Database 2, etc. This arrangement has the advantage of promptly transmitting the split host reconciliation files to the corresponding database, allowing each database to perform account reconciliation, saving data retrieval time and improving reconciliation efficiency.
[0063] S206 , using the data processors of the reconciliation databases, executing the account reconciliation work of the i first reconciliation files and the j second reconciliation files in parallel to obtain the reconciliation result of the account data.
[0064] Optionally, for any reconciliation database, the data processor of the reconciliation database is used to perform account reconciliation work on the first reconciliation file and the second reconciliation file to obtain a reconciliation result of the account data, including: using the data processor of the reconciliation database to determine whether the summary identifiers of the first reconciliation file and the second reconciliation file are consistent; the first reconciliation file includes at least one first sub-reconciliation file and at least one first summary, and the first sub-reconciliation file and the first summary correspond one-to-one; the second reconciliation file includes at least one second sub-reconciliation file and at least one second summary, and the second sub-reconciliation file and the second summary correspond one-to-one, and the first sub-reconciliation file and the second sub-reconciliation file correspond one-to-one; when the summary identifiers of the first reconciliation file and the second reconciliation file are completely consistent, the reconciliation result of the account data is determined to be passed; when the summary identifiers of the first reconciliation file and the second reconciliation file are not completely consistent, the reconciliation result of the account data is determined based on the first sub-reconciliation file and the second sub-reconciliation file with inconsistent summary identifiers.
[0065] The sub-reconciliation file can be understood as a small file at the brokerage level, and the digest can be understood as the identifier data of the entire sub-reconciliation file. If the digests are the same, it proves that the sub-reconciliation files are the same, directly confirming that the sub-reconciliation files have been successfully reconciled. The present invention can use the SHA-256 algorithm (a secure hash algorithm) to calculate the file digest.
[0066] If the digests are different, the "part-by-part comparison" mechanism is triggered. For example, the diff difference between the two files is first determined (a file for comparing differences), sorted (a template function for element sorting), and then the diff difference files are compared. The difference files are compared in detail using a field-by-field analysis method. If the verification is correct, it means that the two files are completely consistent.
[0067] Figure 6 This is a schematic diagram of a reconciliation method provided by the present invention, from Figure 6 As can be seen from the figure, the present invention will first compare the digests of the platform reconciliation file and the host reconciliation file. If the digests are consistent, it is considered that the comparison has passed and the reconciliation is completed. If the digests are inconsistent, it is considered that the comparison has failed, and the platform and host reconciliation files are merged to perform "sub-by-sub-comparison" reconciliation, that is, the verification result of the accounting data is determined based on the first sub-reconciliation file and the second sub-reconciliation file with inconsistent digest identifiers.
[0068] Specifically, determining the verification result of the accounting data based on the first sub-reconciliation file and the second sub-reconciliation file with inconsistent summary identifiers includes: determining whether the reconciliation key elements of the first sub-reconciliation file and the second sub-reconciliation file with inconsistent summary identifiers are consistent; the reconciliation key element is at least one of the account information, transaction type, transaction amount, and transaction code; when the reconciliation key elements of the first sub-reconciliation file and the second sub-reconciliation file with inconsistent summary identifiers are consistent, determining that the verification result of the accounting data is verification passed; when the reconciliation key elements of the first sub-reconciliation file and the second sub-reconciliation file with inconsistent summary identifiers are inconsistent, determining that the verification result of the accounting data is verification abnormal.
[0069] Among them, the key elements of reconciliation may also include transaction code, debit and credit direction, banknote identifier, bank serial number, currency and other information. The specific reconciliation elements can be set and adjusted according to the business, and this embodiment does not limit this.
[0070] After the file verification is completed, in order to ensure the consistency of the current reconciliation data, you can also perform a "total reconciliation", that is, re-aggregate the split comparison file (parse the amount field and summarize the amount) to compare whether the dynamic accounts of the platform and the host are consistent. If they are consistent, the reconciliation is successful.
[0071] The present invention provides two account verification methods. On the premise of ensuring the correctness of the verification work, a summary verification method is set to improve the efficiency of the account verification work. When the summary verification method cannot be used, a key element verification method is set to ensure that the account verification work can be carried out stably.
[0072] The technical solution of the above embodiment splits the data files of the source database into multiple first accounting files, which are stored in different databases. At the same time, the host accounting files are split into multiple second accounting files corresponding to the first accounting files. Account reconciliation work is performed in parallel in each database, reducing the pressure on the source database and improving the efficiency of reconciliation work. This solves the problem that with the increase in partners and cooperation projects, the business volume gradually increases, the transaction scenarios of reconciliation work are complex, the transaction data is large, and it is easy to trigger the database high water mark mechanism, resulting in high database pressure and performance consumption, low reconciliation efficiency, and low concurrency of the one-by-one comparison method, which does not support high concurrency processing and multi-partner scenarios.
[0073] Figure 7 This is a schematic diagram of the structure of a reconciliation device provided by the present invention. Figure 7 As shown, the device includes: a first determination module 301, a second determination module 302 and an account verification module 303.
[0074] The first determination module 301 is configured to determine the number of reconciliation databases running in parallel and data configuration rules, and parse the data files of the source database based on the number of reconciliation databases running in parallel and the data configuration rules to obtain i first reconciliation files, where i is a positive integer not less than 1, and the number of first reconciliation files is the same as the number of reconciliation databases.
[0075] The second determining module 302 is configured to split the host reconciliation file through a common processing node when the current moment is a preset reconciliation moment, to obtain j second reconciliation files, where j is a positive integer not less than 1, and the second reconciliation files correspond one-to-one to the first reconciliation files.
[0076] The account reconciliation module 303 is configured to utilize the data processors of each reconciliation database to execute the account reconciliation work of i first reconciliation files and j second reconciliation files in parallel to obtain the reconciliation result of the account data.
[0077] Optionally, the first determination module 301 is specifically used to determine the number of reconciliation databases running in parallel based on the total number of reconciliation databases; determine the data configuration rules of the reconciliation databases running in parallel based on the partner identifier and the number of reconciliation databases running in parallel, the data configuration rules including at least one data splitting rule, and the number of data splitting rules and reconciliation databases corresponding one-to-one; use at least one data splitting rule to split the data file of the source database to obtain i first reconciliation files, and store the i first reconciliation files respectively in the reconciliation databases running in parallel, and the first reconciliation files and the reconciliation databases correspond one-to-one.
[0078] Optionally, the second determination module 302 is specifically used to store the verification file in a backup directory and move the data file to a log directory when the data file and the verification file meet the preset reconciliation conditions; wherein the preset reconciliation conditions are that the number of files in the data file is equal to a first quantity threshold, the number of files in the verification file is equal to a second quantity threshold, and there is no abnormality in the file content of the verification file; the data file is processed according to the partner identifier to obtain j second reconciliation files.
[0079] Optionally, the account reconciliation module 303 is further configured to, after obtaining j second reconciliation files, determine a reconciliation database corresponding to each second reconciliation file based on the partner identifier; and transmit the corresponding second reconciliation file to each reconciliation database respectively, so that the reconciliation database performs the account reconciliation work.
[0080] Optionally, for any reconciliation database, the account verification module 303 is specifically configured to utilize a data processor of the reconciliation database to perform an account verification operation on the first reconciliation file and the second reconciliation file to obtain a verification result of the account data. Specifically, the data processor of the reconciliation database is configured to determine whether the summary identifiers of the first reconciliation file and the second reconciliation file are consistent; wherein the first reconciliation file includes at least one first sub-reconciliation file and at least one first summary, the first sub-reconciliation file and the first summary being in one-to-one correspondence, and the second reconciliation file includes at least one second sub-reconciliation file and at least one second summary, the second sub-reconciliation file and the second summary being in one-to-one correspondence; when the summary identifiers of the first reconciliation file and the second reconciliation file are completely consistent, the verification result of the account data is determined to be verified; when the summary identifiers of the first reconciliation file and the second reconciliation file are not completely consistent, the verification result of the account data is determined based on the first sub-reconciliation file and the second sub-reconciliation file having inconsistent summary identifiers.
[0081] Optionally, the account reconciliation module 303 is specifically used to determine whether the reconciliation key elements of the first sub-reconciliation file and the second sub-reconciliation file with inconsistent summary identifiers are consistent; wherein the reconciliation key element is at least one of the account information, transaction type, transaction amount, and transaction code; when the reconciliation key elements of the first sub-reconciliation file and the second sub-reconciliation file with inconsistent summary identifiers are consistent, the reconciliation result of the account data is determined to be reconciliation passed; when the reconciliation key elements of the first sub-reconciliation file and the second sub-reconciliation file with inconsistent summary identifiers are inconsistent, the reconciliation result of the account data is determined to be reconciliation abnormal.
[0082] The reconciliation device provided in the above embodiments can execute the reconciliation method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0083] Figure 8 : is a structural diagram of an electronic device provided by the present invention. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or claimed herein.
[0084] like Figure 8As shown, the electronic device 10 includes at least one processor 11 and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (also known as random access memory, RAM) 13, etc., wherein the memory stores a computer program that can be executed by the at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. Various programs and data required for the operation of the electronic device 10 can also be stored in the RAM 13. The processor 11, ROM 12 and RAM 13 are connected to each other via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0085] Multiple components in the electronic device 10 are connected to the I / O interface 15, including an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a magnetic disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0086] Processor 11 can be any general-purpose and / or specialized processing component with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any other suitable processor, controller, microcontroller, etc. Processor 11 executes the various methods and processes described above, such as the reconciliation method.
[0087] In some embodiments, the reconciliation method can be implemented as a computer program tangibly embodied in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the reconciliation method described above can be performed. Alternatively, in other embodiments, processor 11 can be configured to execute the reconciliation method in any other suitable manner (e.g., via firmware).
[0088] The various embodiments of the systems and techniques described above can be implemented in digital electronic circuitry, integrated circuitry, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system on a chip systems (SOCs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include implementation in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which can be special or general purpose, coupled to receive data and instructions from, and to transmit data and instructions to, a storage system, at least one input device, and at least one output device.
[0089] Computer programs used to implement the processes of the application can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer program
[0090] In the context of the present application, a computer-readable storage medium can be a tangible medium that can contain or store computer programs for use by or in connection with an instruction execution system, apparatus, or device. Computer-readable storage media can include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium can be a machine-readable signal medium. More specific examples of the machine-readable storage medium will include one or more lines of electrical connections, portable computer disks, hard disk drives, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or Flash memory), optical fibers, portable compact disc read-only memories (CD-ROMs), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0091] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device that has: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0092] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0093] A computing system may include clients and servers. The clients and servers are typically remote from each other and typically interact via a communication network. This client-server relationship arises through computer programs running on the respective computers, creating a client-server relationship. The server may be a cloud server, also known as a cloud computing server or cloud host. This server is a hosting product within the cloud computing service ecosystem that addresses the management difficulties and limited scalability of traditional physical hosting and VPS services.
[0094] In one embodiment, the present invention further includes a computer program product, which includes a computer program. When the computer program is executed by a processor, it implements the reconciliation method of any embodiment of the present invention.
[0095] The computer program product may be implemented in a computer program code for performing the operations of the present invention written in one or more programming languages, or a combination thereof, including object-oriented programming languages and conventional procedural programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0096] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in the present invention can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present invention can be achieved. This is not limited herein.
[0097] The above specific embodiments do not limit the scope of protection of the present invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention are intended to be included within the scope of protection of the present invention.
Claims
1. A reconciliation method, characterized in that: include: Determining the number of reconciliation databases running in parallel and data configuration rules, and parsing data files of the source database based on the number of reconciliation databases running in parallel and the data configuration rules to obtain i first reconciliation files, where i is a positive integer not less than 1, and the number of the first reconciliation files is the same as the number of the reconciliation databases; When the current time is the preset reconciliation time, splitting the host reconciliation file by the public processing node to obtain j second reconciliation files, where j is a positive integer not less than 1, and the second reconciliation files correspond one-to-one to the first reconciliation file; Using the data processors of the reconciliation databases, performing the account reconciliation work of the i first reconciliation files and the j second reconciliation files in parallel to obtain a reconciliation result of the account data; The host reconciliation file includes a data file and a verification file. The host reconciliation file is split by the public processing node to obtain j second reconciliation files, including: When the data file and the verification file meet a preset reconciliation condition, the verification file is stored in a backup directory, and the data file is moved to a log directory; wherein the preset reconciliation condition is that the number of files in the data file is equal to a first quantity threshold, the number of files in the verification file is equal to a second quantity threshold, and the file content of the verification file is normal; The data file is processed according to the partner identifier to obtain the j second reconciliation files.
2. The method according to claim 1, characterized in that The determining the number of reconciliation databases running in parallel and data configuration rules, and parsing the data files of the source database based on the number of reconciliation databases running in parallel and the data configuration rules to obtain i first reconciliation files, includes: Determining the number of the reconciliation databases running in parallel based on the total number of the reconciliation databases; Determining, based on the partner identifier and the number of the reconciliation databases running in parallel, data configuration rules for the reconciliation databases running in parallel, wherein the data configuration rules include at least one data splitting rule, and the number of the data splitting rules corresponds to the number of the reconciliation databases; The data files of the source database are split using the at least one data splitting rule to obtain the i first reconciliation files, and the i first reconciliation files are respectively stored in the reconciliation databases running in parallel, wherein the first reconciliation files correspond to the reconciliation databases in a one-to-one manner.
3. The method according to claim 1, characterized in that After obtaining j second reconciliation files, the following steps are also included: determining, based on the partner identifier, a reconciliation database corresponding to each of the second reconciliation files; The corresponding second reconciliation file is transmitted to each reconciliation database respectively, so that the reconciliation database performs the account reconciliation work.
4. The method according to claim 1, wherein For any reconciliation database, using a data processor of the reconciliation database, performing an account reconciliation operation on the first reconciliation file and the second reconciliation file to obtain a reconciliation result of the account data, including: Determining, using a data processor of the reconciliation database, whether summary identifiers of the first reconciliation file and the second reconciliation file are consistent; wherein the first reconciliation file includes at least one first sub-reconciliation file and at least one first summary, and the first sub-reconciliation file and the first summary have a one-to-one correspondence; the second reconciliation file includes at least one second sub-reconciliation file and at least one second summary, and the second sub-reconciliation file and the second summary have a one-to-one correspondence; and the first sub-reconciliation file and the second sub-reconciliation file have a one-to-one correspondence; When the summary identifiers of the first reconciliation file and the second reconciliation file are completely consistent, determining that the verification result of the accounting data is passed; When the summary identifiers of the first reconciliation file and the second reconciliation file are not completely consistent, a verification result of the accounting data is determined based on the first sub-reconciliation file and the second sub-reconciliation file having inconsistent summary identifiers.
5. The method according to claim 4, characterized in that The determining the verification result of the accounting data based on the first sub-reconciliation file and the second sub-reconciliation file having inconsistent summary identifiers includes: determining whether key reconciliation elements of the first sub-reconciliation file and the second sub-reconciliation file, whose summary identifiers are inconsistent, are consistent; wherein the key reconciliation element is at least one of account information, transaction type, transaction amount, and transaction code; When the reconciliation key elements of the first sub-reconciliation file and the second sub-reconciliation file, which have inconsistent summary identifiers, are consistent, determining that the reconciliation result of the accounting data is passed; When the reconciliation key elements of the first sub-reconciliation file and the second sub-reconciliation file having inconsistent summary identifiers are inconsistent, it is determined that the reconciliation result of the accounting data is a reconciliation exception.
6. A reconciliation device, characterized in that: For implementing the reconciliation method according to any one of claims 1 to 5, the reconciliation device comprises: a first determining module, configured to determine the number of reconciliation databases running in parallel and data configuration rules, and parse data files of a source database based on the number of reconciliation databases running in parallel and the data configuration rules to obtain i first reconciliation files, where i is a positive integer not less than 1, and the number of the first reconciliation files is the same as the number of the reconciliation databases; a second determining module configured to, when the current time is a preset reconciliation time, split the host reconciliation file using a public processing node to obtain j second reconciliation files, where j is a positive integer not less than 1, and the second reconciliation files correspond one-to-one to the first reconciliation file; an account reconciliation module, configured to utilize the data processors of the reconciliation databases to perform, in parallel, an account reconciliation operation on the i first reconciliation files and the j second reconciliation files, thereby obtaining a reconciliation result of the account data; The host reconciliation file includes a data file and a verification file, and the second determination module is specifically used to: when the data file and the verification file meet preset reconciliation conditions, store the verification file in a backup directory and move the data file to a log directory; wherein the preset reconciliation conditions are that the number of files in the data file is equal to a first quantity threshold, the number of files in the verification file is equal to a second quantity threshold, and there is no abnormality in the file content of the verification file; and process the data file according to the partner identifier to obtain the j second reconciliation files.
7. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively coupled to the at least one processor; The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the reconciliation method described in any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the reconciliation method according to any one of claims 1 to 5 when executed.
9. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the computer program implements the reconciliation method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Combined account checking method and device for distributed system
CN111429264A
Account checking method and device, electronic equipment and computer readable medium
CN113590553A