A method and device for restoring and processing information of aggregating counterparties
By obtaining and matching bank statement data, splitting and supplementing summary counterparty information, and recalculating balances, the problem of the summary counterparty information in bank accounts is difficult to accurately display, and the system processing efficiency and transaction integrity are improved.
Patent Information
- Application Number
- CN202110618116.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-06-03
- Publication Date
- 2024-12-10
- Estimated Expiration
- 2041-06-03
AI Technical Summary
The summary counterparty information of one loan or one loan in the existing bank account statement is difficult to accurately display, resulting in the inability of customers to clearly see the transaction flow and the system processing efficiency is low.
By obtaining business account data and bank statements, matching and splitting summary records, supplementing counterparty information, and recalculating balances according to transaction order, general mass storage technology is used to restore competitor information in one-to-many and many-to-many scenarios.
It improves the restoration efficiency and system processing performance of aggregated counterparty information, ensures transaction integrity and traceability, reduces the complexity of the restoration algorithm, and supports seamless access to multiple business data.
Smart Images

Figure CN113344694B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of bank account data processing, and in particular to a method and device for restoring and processing aggregated counterparty information. Background Art
[0002] In the existing bank account flow, the aggregator customers of one debit and multiple loans or multiple debits and one loan only pay attention to the public information such as the aggregated transaction amount, transaction time, transaction institution, summary, etc., but do not pay attention to the specific information of the counterparty details such as the transaction amount, counterparty account number, counterparty account name, counterparty bank number, counterparty bank name, etc.; and the transaction details of such one debit and multiple loans or multiple debits and one loan are huge. If they are displayed one by one, there will be too many account flows, and the aggregator customers cannot clearly see the current transaction flow. In order to meet business needs, the final flow only shows one aggregated transaction flow, and the details of this transaction only show public information, and the counterparty information is displayed as empty.
[0003] In order to accurately display the real information of aggregated transaction counterparties, a universal, efficient and intelligent technical solution for restoring aggregated recorded counterparty information is urgently needed. Summary of the invention
[0004] In order to overcome the defects of the prior art, the present invention proposes a method and device for restoring the aggregated counterparty information. The present invention can realize the restoration of counterparty information with a huge amount of details in one-to-many or many-to-many aggregation modes. The present invention can restore a large amount of aggregated counterparty information, effectively solving the problem of restoring the application business module independently developed system, and also improving the restoration transmission processing timeliness, processing performance and other issues.
[0005] In a first aspect of an embodiment of the present invention, a method for restoring and processing aggregated counterparty information is proposed, the method comprising:
[0006] Obtain business account data and bank statements;
[0007] According to the business account entry data and bank statements, the number of summary account entry records of the current batch is obtained, and one or more summaries are obtained according to the number of records. The detailed data of the business account entry and the bank statement of the summary party are matched, and then registered in the database;
[0008] According to the matching relationship between the detailed party data and the bank flow of the aggregator, the summary records are split according to the granularity of the details, with the aggregator as the account number of the party and the detailed party as the account number of the other party. The detailed party information is supplemented to the counterparty information and registered in the database;
[0009] According to the detailed data and summary data in the database, in the order of credit first and debit later, with the beginning balance of the summary record as the initial, the actual balance of the current transaction record is recalculated according to the amount of each transaction detail, and the amount and actual balance are updated to the database.
[0010] In a second aspect of an embodiment of the present invention, a device for restoring and processing aggregated counterparty information is provided, the device comprising:
[0011] Data acquisition module, used to obtain business account data and bank statements;
[0012] The detail party matching registration module is used to obtain the number of summary entry records of the current batch according to the business entry data and bank statements, obtain one summary or multiple summaries according to the number of entries, match the detail party data of the business entry with the bank statement of the summary party, and register them in the database;
[0013] The counterparty restoration module is used to split the summary records according to the granularity of details based on the matching relationship between the detailed party data recorded in the business account and the bank flow of the aggregator, with the aggregator as the account number of the party and the detailed party as the account number of the other party, and supplement the detailed party information to the counterparty information and register it in the database;
[0014] The balance recalculation module is used to recalculate the actual balance of the current transaction record based on the amount of each transaction detail according to the detailed data and summary data in the database, in the order of credit first and debit later, with the beginning balance of the summary record as the initial balance, and update the amount and actual balance to the database.
[0015] In a third aspect of an embodiment of the present invention, a computer device is proposed, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements a method for restoring aggregated counterparty information when executing the computer program.
[0016] In a fourth aspect of an embodiment of the present invention, a computer-readable storage medium is proposed, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, a method for restoring and processing aggregated counterparty information is implemented.
[0017] The method and device for restoring the aggregated counterparty information proposed in the present invention can realize universal, efficient and intelligent restoration of aggregated recorded counterparty information, effectively solving the timeliness problem of restoration at different aggregation levels and with a huge amount of details; the method and device of the present invention use universal mass storage and other technical means, in one-to-many and many-to-many transaction scenarios, use unique index information to match the records of the aggregating party and the detailing party, and split the aggregating party according to the granularity of the detailing party. The balance is recalculated and the counterparty information is supplemented according to the beginning balance recorded by the aggregating party, ensuring the integrity and traceability of each transaction. The present invention can achieve high reusability of counterparty information restoration, and each application business only needs to provide data based on universal mass storage to reuse the restoration of the present invention, reducing the complexity of the restoration algorithm, shortening the research and development cycle, and improving the system processing efficiency. It also has good scalability and supports seamless access to multiple business data. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0019] Figure 1 It is a flowchart of a method for restoring and processing aggregated counterparty information according to an embodiment of the present invention.
[0020] Figure 2 It is a detailed flowchart of detail party matching registration according to a specific embodiment of the present invention.
[0021] Figure 3 It is a schematic diagram of a summary detail matching warehousing algorithm according to a specific embodiment of the present invention.
[0022] Figure 4 It is a schematic diagram of a secondary summary detail matching warehousing algorithm according to a specific embodiment of the present invention.
[0023] Figure 5 It is a detailed flowchart of opponent restoration according to a specific embodiment of the present invention.
[0024] Figure 6 It is a detailed flowchart of balance recalculation according to a specific embodiment of the present invention.
[0025] Figure 7 It is a schematic diagram of the architecture of a device for restoring and processing aggregating counterparty information according to an embodiment of the present invention.
[0026] Figure 8 It is a schematic diagram of the architectural relationship of a device for restoring and processing information of aggregating counterparties according to a specific embodiment of the present invention.
[0027] Fig. 9 It is a schematic diagram of the structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0028] The principles and spirit of the present invention will be described below with reference to several exemplary embodiments. It should be understood that these embodiments are provided only to enable those skilled in the art to better understand and implement the present invention, and are not intended to limit the scope of the present invention in any way. On the contrary, these embodiments are provided to make the present disclosure more thorough and complete, and to fully convey the scope of the present disclosure to those skilled in the art.
[0029] Those skilled in the art will appreciate that the embodiments of the present invention may be implemented as a system, device, apparatus, method or computer program product. Therefore, the present disclosure may be specifically implemented in the following forms, namely: complete hardware, complete software (including firmware, resident software, microcode, etc.), or a combination of hardware and software.
[0030] According to an embodiment of the present invention, a method and device for restoring and processing aggregated counterparty information are proposed, which relate to the technical field of bank account data processing.
[0031] The principle and spirit of the present invention are explained in detail below with reference to several representative embodiments of the present invention.
[0032] Figure 1 FIG. 1 is a flow chart of a method for restoring the aggregated counterparty information according to an embodiment of the present invention. Figure 1 As shown, the method includes:
[0033] Step S1, obtaining business account data and bank statements;
[0034] Step S2, according to the business account entry data and bank statements, obtain the number of summary account entry records of the current batch, divide them into one summary or multiple summaries according to the number of records, match the detailed data of the business account entry with the bank statements of the summary party, and register them in the database;
[0035] Step S3: according to the matching relationship between the detailed party data and the bank flow of the aggregating party, the summary record is split according to the granularity of the details, with the aggregating party as the account number of the own party and the detailed party as the account number of the other party, and the detailed party information is supplemented to the counterparty information and registered in the database;
[0036] Step S4, based on the detailed data and summary data in the database, in the order of credit first and debit later, with the beginning balance of the summary record as the initial, recalculate the actual balance of the current transaction record based on the amount of each transaction detail, and update the amount and actual balance to the database.
[0037] In order to explain the above-mentioned method of restoring the aggregated counterparty information more clearly, each step is described in detail below.
[0038] Step S2:
[0039] refer to Figure 2 , is a detailed flow chart of detail party matching registration in a specific embodiment of the present invention. Figure 2 As shown, the specific process is:
[0040] Step S201, traverse the business account data, obtain the detailed party data and the summary party of the business account data, and query the bank statement according to the summary party to obtain the summary account record in the bank statement;
[0041] Step S202: if there is only one summary entry record in the current batch of business entry data, it is classified as one summary;
[0042] Step S203: if there are more than one summary entry record of the same account number in the current batch of business entry data, the data is divided into multiple summaries.
[0043] Step S204, if it is a one-time aggregation, match the aggregation party's bank statements one by one according to the granularity of the detail party's records, match the detail party's data recorded in the business with the aggregation party's bank statements, and register them in the database, and the number of aggregations is registered as 1.
[0044] Specifically, refer to Figure 3 , which is a schematic diagram of a summary detail matching warehousing algorithm according to a specific embodiment of the present invention.
[0045] like Figure 3 As shown, the business account entry detail data is traversed, the summary party of the current batch of business account entry data is matched according to the detail party, and then the bank flow is queried according to the unique account entry identifier of the summary record, and the corresponding relationship is stored in the general mass storage database according to the general storage structure.
[0046] Step S205, if it is multiple summaries, match the business account data according to the detailed records, and the business account data of the current batch has more than one summary account record of the same account; among them, match the bank flow according to the summary account number, if it matches, it is a second summary; if it does not match, continue to search for the summary account record corresponding to the business account data of the current batch, match the bank flow according to the summary account number, repeat this step until the summary record of the business account data matches the bank flow, and the number of matches plus 1 is the number of times the multiple summaries are processed.
[0047] Step S206, according to the first summary record matched with the detail party record, the bank statements of the first summary party are matched one by one according to the granularity of the detail party record, and the detail party data recorded in the business is matched with the bank statement of the first summary party, and registered in the database, and the number of summarizations is registered as n_1;
[0048] Step S207, use the last summary record as the detail party of the next summary, match the bank flow of the next summary party one by one, register it in the database, and register the number of summaries as n_2. Repeat this step until multiple summaries are completed, and the number of summaries is registered as n_n.
[0049] Specifically, according to the initial summary record matched to the detail party record, the bank statements of the initial summary party are matched one by one according to the granularity of the detail party record, and the detail party data recorded in the business and the bank statements of the initial summary party are matched one by one and registered in the general storage, and the number of summarizations is registered as 2_1; then the previous summary record is used as the detail party for the second summary, and the final bank statements of the second summary party are matched one by one and registered in the general storage, and the number of summarizations is registered as 2_2.
[0050] refer to Figure 4 , is a schematic diagram of a secondary summary detail matching warehousing algorithm according to a specific embodiment of the present invention. Figure 4 As shown, the business account entry detail data is traversed, the initial summary party of the current batch of business account entry data is matched according to the detail party, and the corresponding relationship is stored in the general mass storage data lake according to the general storage structure; then the initial summary party record is used as the detail party, and the bank flow of the corresponding summary party is queried according to the unique account entry identifier of the initial summary record, and the matching result is stored in the general mass storage data lake.
[0051] Step S3:
[0052] According to the matching relationship between the detailed party data and the bank flow of the aggregation party, the aggregation records are split according to the granularity of the details, with the aggregation party as the account number of the party and the detailed party as the account number of the other party. The detailed party information is supplemented to the counterparty information and registered in the database.
[0053] If it is a summary, obtain the detailed records of the detailed summary paired with the summary in the database, register the detailed records of the detailed summary paired with the database, and register the summary record as 0;
[0054] If there are multiple summaries, the matching relationship between the detailed data of the business account and the bank flow of the summarizing party will be arranged in descending order according to the number of summarizations, and the database will be traversed to obtain the detailed and summarized matching relationship records in the order of descending order of the number of summarizations, and registered in the database.
[0055] refer to Figure 5, is a detailed flowchart of opponent restoration according to a specific embodiment of the present invention. Figure 5 As shown, the specific process is:
[0056] Step S301, the detail-summary matching relationship records in the general mass storage are arranged in descending order according to the number of summarizations, and the order of the number of summarizations is n_n, n_(n-1), ..., n_1.
[0057] For example, refer to Figure 4 Secondary summary of examples, sorted by 2_2, 2_1.
[0058] Step S302, traverse the general mass storage, and obtain the detail-summary matching relationship records in descending order of the number of summarizations. Determine whether the number of summarizations of the current matching record is one, if it is one, jump to step S303; if it is multiple summarizations, jump to step S305.
[0059] Step S303, if it is a summary, obtain the detailed records of the detailed summary pairing of the summary in the database;
[0060] Step S304, register the detailed record of the detailed summary pairing into the database, and register the summary record as 0;
[0061] Step S305: if the aggregation is multiple times, obtain the split detail record with the highest number of times n_n, match the split detail record with the aggregation number of times n_(n-1) according to the index information, until the split detail record with the number of times n_1 is obtained;
[0062] Step S306, matching the detailed record with the highest number of times and the summary record with the lowest number of times, registering them in the database, and registering the summary record as 0.
[0063] refer to Figure 4 For an exemplary secondary aggregation, the record with aggregation times of 0 that is finally registered in the general mass storage should be a detailed record that is a pair of the detailed record of 2_2 and the aggregation record corresponding to the detailed record of 2_1.
[0064] Step S4:
[0065] refer to Figure 6 , is a detailed flow chart of balance recalculation in a specific embodiment of the present invention. Figure 6 As shown, the specific process is:
[0066] Step S401, sort the same group data in the database in ascending order of time, and put the credit transactions in front and the debit transactions in the back;
[0067] Step S402, setting a cursor in the grouped data to traverse the grouped data;
[0068] Step S403, calculating the opening balance according to the debit and credit flags, the amount and the balance of the first summary record, wherein the calculation formula is: opening balance = balance - amount;
[0069] Step S404, set the beginning balance as the starting balance of the detailed transactions in the current group, and accumulate the actual balance after the current detailed transactions according to the debit and credit marks of the detailed records;
[0070] Step S405: After the processing is completed, the cursor moves to the next detail record, and the actual balance of the previous detail record is used as the starting balance. According to the debit and credit signs, the amount incurred is accumulated to the latest actual balance. This step is repeated until the actual balance of each detail record is calculated and the amount incurred is accumulated to the latest actual balance.
[0071] Step S406, update the amount incurred and the actual balance to the database.
[0072] The present invention provides a general method for restoring aggregated counterparty information, which effectively solves the timeliness problem of restoration at different aggregation levels and with a huge amount of details, and has the following effects and advantages:
[0073] 1. Greatly improve the reusability of summary detail restoration;
[0074] 2. Reduce the complexity of the restoration algorithm and improve system processing efficiency;
[0075] 3. It has good scalability and supports seamless access to multiple business data.
[0076] It should be noted that, although the operations of the method of the present invention are described in a specific order in the above embodiments and the accompanying drawings, this does not require or imply that the operations must be performed in the specific order, or that all the operations shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps.
[0077] After introducing the method of the exemplary embodiment of the present invention, next, refer to Figures 7 and 8 A restoration processing device for aggregating counterparty information according to an exemplary embodiment of the present invention is introduced.
[0078] The implementation of the reduction processing device for aggregating counterparty information can refer to the implementation of the above method, and the repeated parts will not be repeated. The term "module" or "unit" used below can be a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0079] Based on the same inventive concept, the present invention also proposes a device for restoring and processing information of aggregating counterparties, such as Figure 7 As shown, the device comprises:
[0080] Data acquisition module 710, used to acquire business account data and bank statements;
[0081] The detail party matching registration module 720 is used to obtain the number of summary entry records of the current batch according to the business entry data and bank statements, obtain one summary or multiple summaries according to the number of entries, match the detail party data of the business entry with the summary party bank statements, and register them in the database;
[0082] The counterparty restoration module 730 is used to split the summary records according to the granularity of the details based on the matching relationship between the detail party data and the bank flow of the aggregation party, take the aggregation party as the account number of the own party and the detail party as the account number of the other party, supplement the detail party information to the counterparty information, and register it in the database;
[0083] The balance recalculation module 740 is used to recalculate the actual balance of the current transaction record based on the amount of each transaction detail according to the detailed data and summary data in the database, in the order of credit first and debit later, with the beginning balance of the summary record as the initial, and update the amount and actual balance to the database.
[0084] In one embodiment, the detail party matching registration module 720 is specifically used for:
[0085] Traverse the business account data, obtain the detailed data and the summary of the business account data, and query the bank statement based on the summary to obtain the summary account record in the bank statement;
[0086] If there is only one summary entry record in the current batch of business entry data, it is classified as one summary;
[0087] If the current batch of business entry data contains more than one summary entry record of the same account, it will be divided into multiple summaries.
[0088] In one embodiment, the detail party matching registration module 720 is specifically used for:
[0089] If it is a one-time aggregation, the bank statements of the aggregation party are matched one by one according to the granularity of the detail party records, and the detail party data recorded in the business is matched with the bank statements of the aggregation party, and recorded in the database, and the number of aggregations is recorded as 1;
[0090] If there are multiple summaries, the bank statements of the initial summarization party are matched one by one according to the granularity of the detail party records according to the initial summarization record matched by the detail party records, and the detail party data recorded in the business is matched with the bank statements of the initial summarization party, and recorded in the database, and the number of summarizations is recorded as n_1;
[0091] Use the last summary record as the detail party of the next summary, match the bank flow of the next summary party one by one, and register it in the database. The number of summaries is recorded as n_2. Repeat this step until multiple summaries are completed, and the number of summaries is recorded as n_n.
[0092] In one embodiment, if there are multiple summaries, the detail party matching registration module 720 is further used to:
[0093] Match the business accounting data according to the detailed records. The business accounting data of the current batch has more than one summary accounting record of the same account. Among them, match the bank flow according to the summary account number. If a match is found, it is a secondary summary. If a match is not found, continue to search for the summary accounting record corresponding to the business accounting data of the current batch, match the bank flow according to the summary account number, and repeat this step until the summary record of the business accounting data matches the bank flow. The number of matches plus 1 is the number of times the multiple summaries are processed.
[0094] In one embodiment, the opponent restoration module 730 is specifically used to:
[0095] If it is a summary, obtain the detailed records of the detailed summary paired with the summary in the database, register the detailed records of the detailed summary paired with the database, and register the summary record as 0;
[0096] If there are multiple summaries, the matching relationship between the detailed data of the business account and the bank flow of the summarizing party will be arranged in descending order according to the number of summarizations, and the database will be traversed to obtain the detailed and summarized matching relationship records in the order of descending order of the number of summarizations, and registered in the database.
[0097] In one embodiment, if there are multiple summaries, the opponent restoration module 730 is further used to:
[0098] Get the split detail record with the highest number of times n_n, match and summarize the split detail records with the number of times n_(n-1) according to the index information, until the split detail record with the number of times n_1 is obtained;
[0099] Match the detailed record with the highest number of times and the summary record with the lowest number of times, register them in the database, and register the summary record as 0.
[0100] In one embodiment, the balance recalculation module 740 is specifically used for:
[0101] Arrange the same group of data in the database in ascending order of time, and put the credit transactions first and the debit transactions last;
[0102] Set a cursor in the grouped data, traverse the grouped data, and calculate the opening balance according to the debit and credit flags, amount and balance of the first summary record. The calculation formula is: opening balance = balance - amount;
[0103] Set the opening balance as the starting balance of the detail transaction in the current group, and accumulate the actual balance after the current detail transaction according to the debit and credit signs of the detail record;
[0104] After the processing is completed, the cursor moves to the next detail record, and the actual balance of the previous detail record is used as the starting balance. According to the debit and credit signs, the amount is accumulated to the latest actual balance. This step is repeated until the actual balance of each detail record is calculated and the amount is accumulated to the latest actual balance.
[0105] Update the database with the amounts and actual balances.
[0106] In order to explain the above-mentioned restoration processing device for aggregating counterparty information more clearly, a specific embodiment is described below. However, it should be noted that this embodiment is only for better illustrating the present invention and does not constitute an improper limitation to the present invention.
[0107] Figure 8 Schematic diagram of the architecture of a device for processing and restoring transaction counterparty information according to a specific embodiment of the present invention. Figure 8 As shown, the present invention can retain the original account processing process when restoring the aggregated counterparty information. After normal account entry processing, only one bank statement of the aggregated record is displayed according to business needs.
[0108] Without affecting the normal account entry process, the present invention matches and summarizes the detailed records and stores them in a universal data carrier, and then restores the summary records through a data processing device. Among them, universal mass storage is the basis of this invention, and the detailed matching storage device, balance recalculation device and counterparty restoration device are the core of the present invention. The functions of each device module are as follows:
[0109] Detailed party matching registration module: responsible for matching business data according to the granularity of detailed party records, based on the accounting comparison relationship between summary records and detailed records, and storing them in the general data carrier.
[0110] General mass storage repository: responsible for storing the basic information of detailed records, the basic information of corresponding summary records and the unique index information of accounting.
[0111] Counterparty restoration module: responsible for traversing the one-to-one matching relationship between each detailed record and the summary record, splitting the summary record according to the granularity of the details, taking the summary party as the account number of the party incurring the transaction and the detailed party as the account number of the other party incurring the transaction, and supplementing the basic information of the detailed party into the recorded counterparty information.
[0112] Balance recalculation module: responsible for recalculating the balance of the current transaction record according to the amount of each transaction detail, in the order of credit first and debit later, with the beginning balance of the summary record as the initial.
[0113] The present invention uses general mass storage and other technical means to match the records of the aggregation party and the detail party with unique index information in one-to-many and many-to-many transaction scenarios, and splits the aggregation party according to the detail party granularity. The balance is recalculated and the counterparty information is supplemented according to the opening balance recorded by the aggregation party, ensuring the integrity and traceability of each transaction.
[0114] The device can achieve high reusability of counterparty information restoration. Each application business only needs to provide data based on general mass storage to reuse the device for restoration, shortening the R&D cycle and improving efficiency.
[0115] It should be noted that although several modules of the reduction processing device for aggregating counterparty information are mentioned in the above detailed description, such division is only exemplary and not mandatory. In fact, according to an embodiment of the present invention, the features and functions of two or more modules described above can be embodied in one module. Conversely, the features and functions of one module described above can be further divided into multiple modules for embodiment.
[0116] Based on the above invention concept, Fig. 9 As shown, the present invention also proposes a computer device 900, including a memory 910, a processor 920, and a computer program 930 stored in the memory 910 and executable on the processor 920, wherein the processor 920 implements the aforementioned method for restoring the aggregated counterparty information when executing the computer program 930.
[0117] Based on the aforementioned inventive concept, the present invention proposes a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the computer program implements the aforementioned method for restoring the aggregated counterparty information.
[0118] The method and device for restoring the aggregated counterparty information proposed in the present invention can realize universal, efficient and intelligent restoration of aggregated recorded counterparty information, effectively solving the timeliness problem of restoration at different aggregation levels and with a huge amount of details; the method and device of the present invention use universal mass storage and other technical means, in one-to-many and many-to-many transaction scenarios, use unique index information to match the records of the aggregating party and the detailing party, and split the aggregating party according to the granularity of the detailing party. The balance is recalculated and the counterparty information is supplemented according to the beginning balance recorded by the aggregating party, ensuring the integrity and traceability of each transaction. The present invention can achieve high reusability of counterparty information restoration, and each application business only needs to provide data based on universal mass storage to reuse the restoration of the present invention, reducing the complexity of the restoration algorithm, shortening the research and development cycle, and improving the system processing efficiency. It also has good scalability and supports seamless access to multiple business data.
[0119] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, devices, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0120] The present invention is described with reference to flowcharts and / or block diagrams of methods and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0121] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0122] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0123] Finally, it should be noted that the above-described embodiments are only specific implementations of the present invention, which are used to illustrate the technical solutions of the present invention, rather than to limit them. The protection scope of the present invention is not limited thereto. Although the present invention is described in detail with reference to the above-described embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-described embodiments within the technical scope disclosed by the present invention, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
Claims
1. A method for restoring and processing aggregated counterparty information, characterized in that: The method includes: Obtain business account data and bank statements; According to the business account entry data and bank statements, the number of summary account entry records of the current batch is obtained, and one or more summaries are obtained according to the number of records. The detailed data of the business account entry and the bank statement of the summary party are matched, and then registered in the database; According to the matching relationship between the detailed party data and the bank flow of the aggregator, the summary records are split according to the granularity of the details, with the aggregator as the account number of the party and the detailed party as the account number of the other party. The detailed party information is supplemented to the counterparty information and registered in the database; According to the detailed data and summary data in the database, in the order of credit first and debit later, with the beginning balance of the summary record as the initial, the actual balance of the current transaction record is recalculated according to the amount of each transaction detail, and the amount and actual balance are updated to the database; Among them, according to the business account data and bank statements, the number of summary account records of the current batch is obtained, and one summary or multiple summaries are obtained according to the number of records. The detailed data of the business account and the bank statements of the summary party are matched and registered in the database, including: Traverse the business account data, obtain the detailed data and the summary of the business account data, and query the bank statement based on the summary to obtain the summary account record in the bank statement; If there is only one summary entry record in the current batch of business entry data, it is classified as one summary; If there are more than one summary entry record of the same account number in the current batch of business entry data, it will be divided into multiple summaries; If it is a one-time aggregation, the bank statements of the aggregation party are matched one by one according to the granularity of the detail party records, and the detail party data recorded in the business is matched with the bank statements of the aggregation party, and recorded in the database, and the number of aggregations is recorded as 1; If there are multiple summaries, the bank statements of the initial summarization party are matched one by one according to the granularity of the detail party records according to the initial summarization record matched by the detail party records, and the detail party data recorded in the business is matched with the bank statements of the initial summarization party, and recorded in the database, and the number of summarizations is recorded as n_1; Use the last summary record as the detail party of the next summary, match the bank flow of the next summary party one by one, and register it in the database. The number of summaries is recorded as n_2. Repeat this step until multiple summaries are completed, and the number of summaries is recorded as n_n.
2. The method for restoring the aggregated counterparty information according to claim 1, characterized in that: If it is a multiple aggregation, it also includes: Match the business accounting data according to the detailed records. The business accounting data of the current batch has more than one summary accounting record of the same account. Among them, match the bank flow according to the summary account number. If a match is found, it is a secondary summary. If a match is not found, continue to search for the summary accounting record corresponding to the business accounting data of the current batch, match the bank flow according to the summary account number, and repeat this step until the summary record of the business accounting data matches the bank flow. The number of matches plus 1 is the number of times the multiple summaries are processed.
3. The method for restoring the aggregated counterparty information according to claim 1, characterized in that: According to the matching relationship between the detailed party data and the bank flow of the aggregation party, the aggregation records are split according to the granularity of the details, with the aggregation party as the account number of the party and the detailed party as the account number of the other party. The detailed party information is supplemented to the counterparty information and registered in the database, including: If it is a summary, obtain the detailed records of the detailed summary paired with the summary in the database, register the detailed records of the detailed summary paired with the database, and register the summary record as 0; If there are multiple summaries, the matching relationship between the detailed data of the business account and the bank flow of the summarizing party will be arranged in descending order according to the number of summarizations, and the database will be traversed to obtain the detailed and summarized matching relationship records in the order of descending order of the number of summarizations, and registered in the database.
4. The method for restoring the aggregated counterparty information according to claim 3, characterized in that: If it is a multiple aggregation, it also includes: Get the split detail record with the highest number of times n_n, match and summarize the split detail records with the number of times n_(n-1) according to the index information, until the split detail record with the number of times n_1 is obtained; Match the detailed record with the highest number of times and the summary record with the lowest number of times, register them in the database, and register the summary record as 0.
5. The method for restoring the aggregated counterparty information according to claim 4, characterized in that: According to the detailed data and summary data in the database, in the order of credit first and debit later, with the beginning balance of the summary record as the initial, the actual balance of the current transaction record is recalculated according to the amount of each transaction detail, and the amount and actual balance are updated to the database, including: Arrange the same group of data in the database in ascending order of time, and put the credit transactions first and the debit transactions last; Set a cursor in the grouped data, traverse the grouped data, and calculate the opening balance according to the debit and credit flags, amount and balance of the first summary record. The calculation formula is: opening balance = balance - amount; Set the opening balance as the starting balance of the detail transaction in the current group, and accumulate the actual balance after the current detail transaction according to the debit and credit signs of the detail record; After the processing is completed, the cursor moves to the next detail record, and the actual balance of the previous detail record is used as the starting balance. According to the debit and credit signs, the amount is accumulated to the latest actual balance. This step is repeated until the actual balance of each detail record is calculated and the amount is accumulated to the latest actual balance. Update the database with the amounts and actual balances.
6. A device for restoring and processing information of aggregating counterparties, characterized in that: The device includes: Data acquisition module, used to obtain business account data and bank statements; The detail party matching registration module is used to obtain the number of summary entry records of the current batch according to the business entry data and bank statements, obtain one summary or multiple summaries according to the number of entries, match the detail party data of the business entry with the bank statement of the summary party, and register them in the database; The counterparty restoration module is used to split the summary records according to the granularity of details based on the matching relationship between the detailed party data recorded in the business account and the bank flow of the aggregator, with the aggregator as the account number of the party and the detailed party as the account number of the other party, and supplement the detailed party information to the counterparty information and register it in the database; The balance recalculation module is used to recalculate the actual balance of the current transaction record based on the amount of each transaction detail according to the detailed data and summary data in the database, in the order of credit first and debit later, with the beginning balance of the summary record as the initial balance, and update the amount and actual balance to the database; Among them, the detail party matching registration module is specifically used for: Traverse the business account data, obtain the detailed data and the summary of the business account data, and query the bank statement based on the summary to obtain the summary account record in the bank statement; If there is only one summary entry record in the current batch of business entry data, it is classified as one summary; If there are more than one summary entry record of the same account number in the current batch of business entry data, it will be divided into multiple summaries; If it is a one-time aggregation, the bank statements of the aggregation party are matched one by one according to the granularity of the detail party records, and the detail party data recorded in the business is matched with the bank statements of the aggregation party, and recorded in the database, and the number of aggregations is recorded as 1; If there are multiple summaries, the bank statements of the initial summarization party are matched one by one according to the granularity of the detail party records according to the initial summarization record matched by the detail party records, and the detail party data recorded in the business is matched with the bank statements of the initial summarization party, and recorded in the database, and the number of summarizations is recorded as n_1; Use the last summary record as the detail party of the next summary, match the bank flow of the next summary party one by one, and register it in the database. The number of summaries is recorded as n_2. Repeat this step until multiple summaries are completed, and the number of summaries is recorded as n_n.
7. The device for restoring the aggregated counterparty information according to claim 6, characterized in that: If there are multiple summaries, the detail party matching registration module is also used to: Match the business accounting data according to the detailed records. The business accounting data of the current batch has more than one summary accounting record of the same account. Among them, match the bank flow according to the summary account number. If a match is found, it is a secondary summary. If a match is not found, continue to search for the summary accounting record corresponding to the business accounting data of the current batch, match the bank flow according to the summary account number, and repeat this step until the summary record of the business accounting data matches the bank flow. The number of matches plus 1 is the number of times the multiple summaries are processed.
8. The device for restoring the aggregated counterparty information according to claim 6, characterized in that: The opponent recovery module is specifically used for: If it is a summary, obtain the detailed records of the detailed summary paired with the summary in the database, register the detailed records of the detailed summary paired with the database, and register the summary record as 0; If there are multiple summaries, the matching relationship between the detailed data of the business account and the bank flow of the summarizing party will be arranged in descending order according to the number of summarizations, and the database will be traversed to obtain the detailed and summarized matching relationship records in the order of descending order of the number of summarizations, and registered in the database.
9. The device for restoring the aggregated counterparty information according to claim 8, characterized in that: If there are multiple aggregations, the opponent recovery module is also used to: Get the split detail record with the highest number of times n_n, match and summarize the split detail records with the number of times n_(n-1) according to the index information, until the split detail record with the number of times n_1 is obtained; Match the detailed record with the highest number of times and the summary record with the lowest number of times, register them in the database, and register the summary record as 0.
10. The device for restoring the aggregated counterparty information according to claim 9, characterized in that: The balance recalculation module is specifically used for: Arrange the same group of data in the database in ascending order of time, and put the credit transactions first and the debit transactions last; Set a cursor in the grouped data, traverse the grouped data, and calculate the opening balance according to the debit and credit flags, amount and balance of the first summary record. The calculation formula is: opening balance = balance - amount; Set the opening balance as the starting balance of the detail transaction in the current group, and accumulate the actual balance after the current detail transaction according to the debit and credit signs of the detail record; After the processing is completed, the cursor moves to the next detail record, and the actual balance of the previous detail record is used as the starting balance. According to the debit and credit signs, the amount is accumulated to the latest actual balance. This step is repeated until the actual balance of each detail record is calculated and the amount is accumulated to the latest actual balance. Update the database with the amounts and actual balances.
11. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 5 is implemented.
12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.
