Accounting processing method, electronic equipment and storage medium
By comparing transaction data through a distributed stream processing framework, erroneous transaction data can be quickly screened out, solving the problem of insufficient timeliness in processing massive accounts in existing technologies and achieving fast and accurate account reconciliation.
Patent Information
- Application Number
- CN202510687775.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-27
- Publication Date
- 2025-09-05
AI Technical Summary
When processing massive accounts, the existing technology's method of checking accounts is very time-consuming and cannot meet the timeliness requirements of account processing.
A distributed stream processing framework is used to compare transaction detail files of other banks with those of our bank. Error files are screened out through collaborative grouping and connection operations. A secondary comparative analysis is conducted in combination with the bank's database flow table, and the error detail table is determined and imported for final adjustment.
The distributed stream processing framework can quickly filter out transaction data that may involve errors, improve the speed and accuracy of large-scale data reconciliation, and meet the timeliness requirements of accounting processing.
Smart Images

Figure CN120596529A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to the field of data processing technology, and in particular to an accounting processing method, electronic device, and storage medium. Background Art
[0002] Interbank clearing systems employ mechanisms such as reconciliation and adjustment to mitigate accounting risks. In interbank transactions, commercial banks receive daily transaction details from other banks covering the previous trading day. These details are sent to the commercial banks in the form of text messages for reconciliation.
[0003] The existing method for reconciling accounts is to read a transaction record from the database of another commercial bank, query the relevant transaction from the transaction flow table of the bank's database based on the message number; compare the transaction record based on information such as transaction type, transaction status, and transaction amount to determine whether there is an error; if there is an error, write the transaction record to the error file; continue to read the next transaction record from the database of the other commercial bank, and repeat the above steps until all transaction records of other commercial banks are compared.
[0004] However, the existing method of checking accounts consumes a lot of time due to frequent read and write operations. When processing massive accounts, it cannot meet the timeliness requirements of account processing. Summary of the Invention
[0005] The present invention provides an account processing method, electronic equipment and storage medium to solve the problem that the prior art cannot meet the timeliness requirement of account processing when processing massive accounts.
[0006] According to one aspect of the present invention, there is provided an accounting processing method, comprising:
[0007] Based on the transaction details file of the other bank and the transaction details file of the current bank, the first error file is determined through the distributed stream processing framework;
[0008] Comparing and analyzing the first error file with the bank's database flow table to determine a second error file;
[0009] Importing the data records in the second error file into the error details table of this bank;
[0010] Adjust the transaction data in the bank's error details table.
[0011] According to another aspect of the present invention, there is provided an accounting processing device, comprising:
[0012] A first reconciliation module is configured to determine a first error file based on the other bank's transaction detail file and the bank's transaction detail file through a distributed stream processing framework;
[0013] a second reconciliation module, configured to compare and analyze the first error file with the bank's database flow table to determine a second error file;
[0014] An import module, configured to import the data records in the second error file into the error detail table of this bank;
[0015] The account adjustment module is used to adjust the transaction data in the bank's error details table.
[0016] According to another aspect of the present invention, an electronic device is provided, comprising:
[0017] at least one processor;
[0018] and a memory communicatively coupled to the at least one processor;
[0019] 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 accounting processing method described in any embodiment of the present invention.
[0020] 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 accounting processing method described in any embodiment of the present invention when executed.
[0021] 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, the accounting processing method according to any embodiment of the present invention is implemented.
[0022] The technical solution of the embodiment of the present invention compares transaction data through a distributed stream processing framework, quickly filters out transaction data that may involve errors, and provides support for large-scale data reconciliation. It solves the problem that the existing technology cannot meet the timeliness requirements of account processing when processing massive accounts, and achieves the beneficial effect of enabling rapid reconciliation.
[0023] 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
[0024] In order to more clearly illustrate the technical solutions in the embodiments of 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.
[0025] Figure 1 A flowchart of an accounting processing method provided in Example 1 of the present invention;
[0026] Figure 2 A flowchart of an accounting processing method provided in Example 2 of the present invention;
[0027] Figure 3 A flowchart of an accounting processing method provided in Example 3 of the present invention;
[0028] Figure 4 A flowchart of an accounting processing method provided in Example 4 of the present invention;
[0029] Figure 5 A schematic diagram of the structure of an accounting processing device provided in the fifth embodiment of the present invention;
[0030] Figure 6 A schematic diagram of the structure of an electronic device for an account processing method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0031] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only embodiments of a part of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work should fall within the scope of protection of the present invention. It should be understood that the various steps described in the method implementation mode of the present invention can be performed in different orders and / or in parallel. In addition, the method implementation mode may include additional steps and / or omit the steps shown. The scope of the present invention is not limited in this respect.
[0032] As used herein, the term "including" and its variations are open-ended, i.e., "including but not limited to." The term "based on" means "based, at least in part, on." The term "one embodiment" means "at least one embodiment," the term "another embodiment" means "at least one additional embodiment," and the term "some embodiments" means "at least some embodiments." Other terms are defined in the following description.
[0033] It should be noted that the terms "first", "second", 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.
[0034] It should be noted that the modifications of "one" and "multiple" mentioned in the present invention are illustrative rather than restrictive. Those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0035] The names of the messages or information exchanged between multiple devices in the embodiments of the present invention are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0036] It should be noted that the acquisition, storage, use, and processing of data in the technical solutions of this application comply with relevant national laws and regulations. Before using the technical solutions disclosed in each embodiment of the present invention, the scope of use and usage scenarios of the financial parameters involved in the present invention should be informed to the user in accordance with relevant laws and regulations in an appropriate manner, and the user's authorization should be obtained.
[0037] Example 1
[0038] Figure 1 This is a flow chart of an accounting processing method provided in Example 1 of the present invention. This method is applicable to the case of accounting comparison of large-scale transaction volumes. The method can be executed by an accounting processing device, wherein the device can be implemented by software and / or hardware and is generally integrated on an electronic device. In this embodiment, the electronic device includes but is not limited to: computer equipment.
[0039] like Figure 1 As shown, the first embodiment of the present invention provides an accounting processing method, including the following steps:
[0040] S110. Based on the other bank's transaction detail file and the bank's transaction detail file, a first error file is determined through a distributed stream processing framework.
[0041] Among them, the other-bank transaction details file can be understood as a file consisting of all transaction details of other commercial banks on a certain day. The other-bank transaction details file may include information such as message number, request date, account number, transaction amount, transaction date and transaction type; the bank's transaction details file can be understood as a file consisting of all transaction details of this commercial bank on a certain day. The bank's transaction details file may include information such as message number, request date, account number, transaction amount, transaction status, transaction type, etc.
[0042] It should be noted that the message number is defined as a transaction identifier in interbank clearing systems, and each interaction between commercial banks generates a new message number; transaction types include nostro transactions and invoicing transactions; and transaction status includes success and failure.
[0043] It should be noted that all transaction details in the transaction details file of other banks and all transaction details in the transaction details file of this bank are transaction details of the same day. Generally, the transaction details of the previous day are obtained on the same day, that is, the transaction details file of other banks and the transaction details file of this bank include all transaction details of the previous day; all transaction details may include nostro transactions and renminbi transactions. Nostro transactions can be understood as the settlement of funds in the accounts of this commercial bank to accounts of other commercial banks, and renminbi transactions can be understood as the settlement of funds in accounts of other commercial banks to accounts of this commercial bank.
[0044] Among them, other banks can send their transaction details of the previous day to our bank. When sending, the transaction details of other banks will be divided into multiple small files and sent gradually. After receiving these small files, our bank will assemble these small files into other bank transaction details files, namely other bank transaction files, for subsequent reconciliation use.
[0045] Among them, the transaction details of the previous day can be extracted from the bank's database journal table to assemble the bank's transaction details file, that is, the current account journal file, for subsequent reconciliation.
[0046] In this embodiment, the first round of reconciliation can be implemented through a distributed stream processing framework. After the transaction detail files of the bank and the transaction detail files of other banks are loaded into the distributed stream processing framework respectively, the collaborative grouping operation CoGroup and the connection operation join of the distributed stream processing framework are used to filter out abnormal transaction data. Then, according to the preset strategy, the cause of the error is analyzed and the abnormal transaction data is marked, and the abnormal data marked as errors form the first error file.
[0047] Distributed stream processing frameworks are architectures capable of processing data streams in a distributed manner across multiple nodes. These frameworks typically feature high throughput, low latency, fault tolerance, and scalability, making them suitable for processing large datasets. The collaborative grouping operation, CoGroup, is an operator in distributed stream processing frameworks that merges two datasets for aggregation. The join operation, defined in distributed stream processing frameworks, is an operation that associates two or more datasets using a specified keyword.
[0048] S120: Compare and analyze the first error file with the bank's database flow table to determine a second error file.
[0049] It should be noted that the accuracy of the difference data in the first error file obtained in the first round of reconciliation is not high. The main reason is that the transaction data compared in the first round of reconciliation is extracted on a daily basis, that is, the transaction data in the transaction details file of the other bank and the transaction details file of our bank are the transaction data of T-1 day obtained during the reconciliation on T day. However, there may be multiple flow records corresponding to a transaction. For example, our bank first deducts money from account A. At this time, a transaction data trace1 is generated in the flow table, and then the other bank is notified through a message to record the account B in the other bank. However, when recording the account, our bank It fails and informs our bank of the result. At this time, our bank will reverse the deduction to account A and generate a transaction data trace2 in the journal. Generally, trace1 and trace2 are on the same day, but there are also cases where trace1 is on T-2 and trace2 is on T-1. Therefore, the practice of only obtaining the transaction data of T-1 in the first round of reconciliation may lead to inaccurate reconciliation results. Therefore, a second round of reconciliation is needed to check trace1 and trace2 through the second round of reconciliation to avoid errors.
[0050] Among them, in the second round of reconciliation, the first error file obtained from the first round of reconciliation is compared and analyzed again with the data in the bank's transaction flow sheet. According to the analysis results, the abnormal data records in the first error file are re-marked, and the abnormal data records marked as errors form a second error file.
[0051] S130. Import the data records in the second error file into the error details table of this bank.
[0052] In this embodiment, importing the data records in the second error file into the error details table of the current bank includes the following steps:
[0053] Step 1: extract data records from the second error file one by one, determine the database to which the data record belongs, and add the data record to a preset list;
[0054] Step 2: Determine whether the number of data record entries in the preset list reaches the preset value. If so, insert the data in the preset list into the error detail table of this row and clear the data in the preset list at the same time.
[0055] Continue to execute step 1 until there is no data record in the second error file.
[0056] S140. Adjust the transaction data in the bank's error details table.
[0057] Among them, you can perform batch adjustments of incoming and outgoing accounts based on the type of erroneous transaction data. There is no specific restriction on the adjustment method here.
[0058] The first embodiment of the present invention provides an account processing method, which first determines a first error file based on the transaction detail file of another bank and the transaction detail file of the bank through a distributed stream processing framework; secondly, compares and analyzes the first error file with the bank's database flow table to determine a second error file; then imports the data records in the second error file into the bank's error detail table; and finally adjusts the transaction data in the bank's error detail table. On the one hand, the above method utilizes the advantages of the distributed stream processing framework in batch processing of large amounts of data in the first round of reconciliation, and can quickly screen out accounts that may involve errors; on the other hand, the above method first narrows the scope of the error transaction data based on the distributed stream processing framework reconciliation, and then performs accurate reconciliation based on the bank's database flow table, which can take into account both reconciliation speed and reconciliation accuracy.
[0059] Example 2
[0060] Figure 2 This is a flowchart of an accounting processing method provided by Example 2 of the present invention. This Example 2 is optimized based on the above-mentioned embodiments. For details not yet fully described in this Example, please refer to Example 1.
[0061] like Figure 2 As shown, the second embodiment of the present invention provides an accounting processing method, including the following steps:
[0062] S210: Use the distributed stream processing framework to load the transaction detail files of other banks and the transaction detail files of the current bank, and generate the data set of other banks and the data set of the current bank accordingly.
[0063] Among them, the distributed stream processing framework Dataset is suitable for scenarios that require batch processing and analysis of large amounts of data. This component optimizes the use of memory and can efficiently process large-scale data sets. It supports dividing data sets into multiple subtasks and processing them in parallel on multiple working nodes to improve processing performance. It can also recover and continue processing data in the event of a failure.
[0064] In this embodiment, after the other bank's transaction details file is loaded into the Dataset, it is instantiated as the other bank's data set thirdRecord; after the current bank's transaction details file is loaded into the Dataset, it is instantiated as the current bank's data set bankRecord.
[0065] S220 , using the collaborative grouping operation and the join operation in the distributed stream processing framework, compare and analyze the other-row data set with the current-row data set to obtain abnormal data records.
[0066] Among them, a collaborative grouping operation is used to group the transaction data with the same message number in the other bank's data set and the current bank's data set; a connection operation is used to perform association calculation on each group of data to obtain abnormal data records.
[0067] S230: Mark the abnormal data records using a preset strategy, and output the marked abnormal data records to a result set.
[0068] Among them, a pre-set strategy can be used to mark abnormal data records. The marking includes marking the abnormal data records with corresponding tags and marking the abnormal data records marked with error tags with error causes. The marked abnormal data records can be understood as abnormal data records marked with tags and error causes.
[0069] Specifically, the abnormal data records are marked using a preset strategy, including:
[0070] If the abnormal data record only exists in the data set of the other bank, the transaction amount of the abnormal data record is determined; if the transaction amount is not 0, the abnormal data record is marked with an error label, and the error cause is marked as unilateral by the other bank; if the transaction amount is 0, the abnormal data record is marked with a balance label.
[0071] If the abnormal data record only exists in the bank's data set, the transaction data in the bank's data set with the same message number as the abnormal data record will be summed to obtain a first total transaction amount; if the first total transaction amount is 0, the abnormal data record will be marked with a balance label; if the first total transaction amount is not 0, the abnormal data record will be marked with an error label, and the error cause will be marked as account adjustment.
[0072] If the abnormal data record exists in both the bank's data set and the other bank's data set, the transaction data in the bank's data set with the same message number as the abnormal data record are summed to obtain a second total transaction amount; if the second total transaction amount is greater than the total transaction amount in the other bank's data set and the abnormal data record is an incoming transaction, the abnormal data record is marked with an error label, and the error cause is marked as over-entry; if the second total transaction amount is less than the total transaction amount in the other bank's data set and the abnormal data record is an incoming transaction, the abnormal data record is marked with an error label, and the error cause is marked as under-entry; if the second total transaction amount is greater than the total transaction amount in the bank's data set and the abnormal data record is a non-transaction transaction, the abnormal data record is marked with an error label, and the error cause is marked as under-deduction; if the second total transaction amount is less than the total transaction amount in the bank's data set and the abnormal data record is a non-transaction transaction, the abnormal data record is marked with an error label, and the error cause is marked as over-deduction.
[0073] S240: Record the abnormal data marked as errors in the result set to form a first error file.
[0074] Among them, the abnormal data records marked as "error" in the result set are recorded to form the first error file, which is used for the subsequent two rounds of reconciliation.
[0075] S250: Compare and analyze the first error file with the bank's transaction details file to determine a second error file.
[0076] S260. Import the data records in the second error file into the error details table of this bank.
[0077] S270. Adjust the error transaction details in the bank's error details table.
[0078] A second embodiment of the present invention provides an accounting processing method that specifically implements the process of determining a first error file using a distributed stream processing framework. This method utilizes a distributed stream processing framework to improve data processing efficiency and effectively save reconciliation time.
[0079] Example 3
[0080] Figure 3 This is a flowchart of an accounting processing method provided by Example 3 of the present invention. This Example 3 is optimized based on the above-mentioned examples. For details not yet fully described in this Example, please refer to Example 1 and Example 2.
[0081] like Figure 3 As shown, the third embodiment of the present invention provides an accounting processing method, including the following steps:
[0082] S310. Based on the other bank's transaction detail file and the bank's transaction detail file, a first error file is determined through a distributed stream processing framework.
[0083] S320. Query the bank's database flow table according to the message number of the abnormal data record in the first error file.
[0084] The abnormal data in the first error file is read line by line; the message number in each line is used as a keyword to query the database flow table of this line.
[0085] S330. If no transaction data record with the same message number as the abnormal data record is found in the bank's database flow table, the error cause of the abnormal data record is marked as unilateral by another bank, and the target abnormal data record with the error cause re-marked is formed into a second error file.
[0086] S340: If transaction data with the same message number as the abnormal data record is found in the bank's database flow table, the transaction data in the bank's database flow table are summed to obtain a third total transaction amount.
[0087] S350: Mark the abnormal data record based on a comparison result between the third total transaction amount and the total transaction amount in the other bank's transaction details file.
[0088] Specifically, if the third total transaction amount is equal to the total transaction amount in the transaction details file of the other bank, the abnormal data record is marked with a balance label; if the third total amount is greater than the total transaction amount in the transaction details file of the other bank, and the queried transaction data is an incoming transaction, the abnormal data record is marked with an error label, and the error cause is marked as over-entry; if the third total amount is less than the total transaction amount in the transaction details file of the other bank, and the queried transaction data is an incoming transaction, the abnormal data record is marked with an error label, and the error cause is marked as under-entry; if the third total amount is greater than the total transaction amount in the transaction details file of the other bank, and the queried transaction data record is a non-transaction transaction, the abnormal data record is marked with an error label, and the error cause is marked as under-deduction; if the third total amount is less than the total transaction amount in the transaction details file of the other bank, and the queried transaction data record is a non-transaction transaction, the abnormal data record is marked with an error label, and the error cause is marked as over-deduction.
[0089] S360: Record the abnormal data labeled as errors to form a second error file.
[0090] S370. Import the data records in the second error file into the error details table of this bank.
[0091] S380. Adjust the transaction data in the bank's error details table.
[0092] The third embodiment of the present invention provides an accounting processing method that specifically implements the process of determining the second error file. The method utilizes the bank's database flow table to achieve precise reconciliation and accurately identify error transaction data.
[0093] Example 4
[0094] Figure 4 This is a flowchart of an accounting processing method provided by the fourth embodiment of the present invention. This fourth embodiment is optimized based on the above embodiments. For details not yet fully described in this embodiment, please refer to the above embodiments.
[0095] like Figure 4 As shown, the fourth embodiment of the present invention provides an accounting processing method, including the following steps:
[0096] S410. Based on the other bank's transaction detail file and the bank's transaction detail file, a first error file is determined through a distributed stream processing framework.
[0097] S420: Compare and analyze the first error file with the bank's database flow table to determine a second error file.
[0098] S430: Import the data records in the second error file into the error details table of this bank.
[0099] S440. Determine whether an account adjustment program is currently running based on the anti-duplicate table.
[0100] It's important to note that the reconciliation process operates in batches, and a key issue to address during the reconciliation process is duplicate entries caused by program anomalies. For example, if a batch reconciliation process is already running and a batch scheduling anomaly triggers the reconciliation again, without a restriction plan, the same account could be reconciled twice, resulting in capital losses.
[0101] To address this issue, in this embodiment, before the batch reconciliation process is started, a piece of data is inserted into the anti-duplicate table using "date + reconciliation" as the key. Once the reconciliation process is complete, the piece of data is deleted from the anti-duplicate table. This approach ensures that only one batch of reconciliation processes is running at a time.
[0102] S450. If not, the status of the transaction data in the bank's error details table is changed to "under adjustment".
[0103] Before adjusting each transaction, the status of the transaction data in the error details table is changed to "adjusting". At this time, any other process attempting to adjust the account will be rejected until the adjustment status is updated to "success" or "failure".
[0104] S460. Adjust the transaction data in the bank's error details table.
[0105] S470: After the account adjustment is completed, the status of the transaction data is modified to success or failure.
[0106] Among them, after the status of the transaction data is changed to success or failure, other account adjustment programs can be started and executed.
[0107] In this embodiment, account adjustments include incoming transaction adjustments and outgoing transaction adjustments.
[0108] The steps for adjusting incoming transactions are as follows:
[0109] Step 1: Determine whether the reconciliation for the day is completed.
[0110] If not finished, exit; if finished, continue to step 2.
[0111] Step 2: If an account adjustment program is currently running, exit.
[0112] Step 3: Add the incoming transaction data in the bank's error details table with error reasons of "other bank unilateral" and "under-entry" to the list of transactions to be adjusted.
[0113] Among them, if there is too much incoming transaction data, it can be added in batches.
[0114] Step 4: Take an incoming transaction from the list of transactions to be adjusted, change the status of the incoming transaction in the bank's error details table to "Adjustment in Progress", and determine whether the modification is successful.
[0115] If not, exit the account adjustment procedure; if so, proceed to step 5.
[0116] Step 5: Obtain key information such as the account, error amount, and transaction type from the bank's error details table based on the message number of the incoming transaction data, and call the account adjustment interface to post the transaction to the account.
[0117] Step 6: After the account adjustment is successful, the status of the incoming transaction data in the bank's error details table will be changed to "Account adjustment successful", otherwise the status of the incoming transaction data will be changed to "Account adjustment failed".
[0118] Repeat steps 4 to 6 until the list of transactions to be adjusted is empty.
[0119] The steps for adjusting nostro transactions are as follows:
[0120] Step 1: Determine whether the reconciliation for the day is completed.
[0121] If not finished, exit; if finished, continue to step 2.
[0122] Step 2: If an account adjustment program is currently running, exit.
[0123] Step 3: Add the nostro transaction data in the bank's error details table with error reasons of "other bank unilateral" or "under-entry" to the list of transactions to be adjusted.
[0124] If there is too much transaction data, it can be added in batches.
[0125] Step 4: Take a non-reciprocal transaction from the list of transactions to be adjusted, change the status of the non-reciprocal transaction in the bank's error details table to "Adjustment in Progress", and determine whether the modification is successful.
[0126] If not, exit the account adjustment procedure; if so, proceed to step 5.
[0127] Step 5: Obtain key information such as the account, error amount, and transaction type from the bank's error details table based on the message number of the no-transaction data, and call the account adjustment interface to post the transaction to the account.
[0128] Step 6. After the account adjustment is successful, the status of the transaction data in the bank's error details table will be changed to "Account adjustment successful". Otherwise, the status of the transaction data will be changed to "Account adjustment failed".
[0129] Repeat steps 4 to 6 until the list of transactions to be adjusted is empty.
[0130] A fourth embodiment of the present invention provides a reconciliation processing method that uses automatic account adjustment with entry-level anti-duplication and transaction-level anti-duplication, which can not only meet the needs of rapid account adjustment, but also reduce account losses caused by various abnormal situations.
[0131] Example 5
[0132] Figure 5 This is a structural diagram of an accounting processing device provided in Example 5 of the present invention. The device can be applied to the case of accounting comparison of large-scale transaction volumes, wherein the device can be implemented by software and / or hardware and is generally integrated on an electronic device.
[0133] like Figure 5 As shown, the apparatus includes: a first reconciliation module 110 , a second reconciliation module 120 , an import module 130 and an adjustment module 140 .
[0134] A first reconciliation module 110 is configured to determine a first error file based on the other bank's transaction detail file and the bank's transaction detail file through a distributed stream processing framework;
[0135] A second reconciliation module 120 is configured to compare and analyze the first error file with the bank's database flow table to determine a second error file;
[0136] An import module 130 is configured to import the data records in the second error file into the error detail table of the current bank;
[0137] The account adjustment module 140 is used to adjust the transaction data in the bank's error details table.
[0138] In this embodiment, the device first determines the first error file through the first reconciliation module 110 based on the transaction detail file of another bank and the transaction detail file of the bank through the distributed stream processing framework; secondly, the first error file is compared and analyzed with the bank's database flow table through the second reconciliation module 120 to determine the second error file; then, the data records in the second error file are imported into the bank's error detail table through the import module 130; finally, the transaction data in the bank's error detail table is adjusted through the adjustment module 140.
[0139] This embodiment provides an accounting processing device that can balance reconciliation speed and reconciliation accuracy.
[0140] Furthermore, the first reconciliation module 110 includes:
[0141] The loading submodule is used to load transaction detail files of other banks and the bank's transaction detail files using the distributed stream processing framework, and generate data sets of other banks and the bank's data sets accordingly;
[0142] A comparison submodule, configured to use the coordinated grouping operation and the join operation in the distributed stream processing framework to compare and analyze the other-row data set with the current-row data set to obtain abnormal data records;
[0143] a marking submodule, configured to mark the abnormal data records using a preset strategy, and output the marked abnormal data records to a result set;
[0144] A forming submodule is configured to record the abnormal data marked as errors in the result set into a first error file.
[0145] Based on the above optimization, the marking submodule includes:
[0146] a first marking unit configured to, if the abnormal data record only exists in the other bank's data set, determine the transaction amount of the abnormal data record; if the transaction amount is not zero, mark the abnormal data record with an error tag and mark the error cause as unilateral transaction by the other bank; if the transaction amount is zero, mark the abnormal data record with a balance tag;
[0147] a second marking unit configured to, if the abnormal data record exists only in the bank's data set, sum the transaction data in the bank's data set that have the same message number as the abnormal data record to obtain a first total transaction amount; if the first total transaction amount is 0, mark the abnormal data record with a balance tag; if the first total transaction amount is not 0, mark the abnormal data record with an error tag, and mark the error cause as an account adjustment;
[0148] a third marking unit, configured to, if the abnormal data record exists in both the bank's data set and the other-bank data set, sum the transaction data in the bank's data set that have the same message number as the abnormal data record to obtain a second total transaction amount; if the second total transaction amount is greater than the total transaction amount in the other-bank data set and the abnormal data record is an incoming transaction, mark the abnormal data record with an error tag, and mark the error cause as over-entry; if the second total transaction amount is less than the total transaction amount in the other-bank data set and the abnormal data record is an incoming transaction, mark the abnormal data record with an error tag, and mark the error cause as under-entry; if the second total transaction amount is greater than the total transaction amount in the bank's data set and the abnormal data record is a non-transaction transaction, mark the abnormal data record with an error tag, and mark the error cause as under-deduction; if the second total transaction amount is less than the total transaction amount in the bank's data set and the abnormal data record is a non-transaction transaction, mark the abnormal data record with an error tag, and mark the error cause as over-deduction.
[0149] Furthermore, the second reconciliation module 120 includes:
[0150] A query submodule, configured to query the bank's database flow table according to the message number of the abnormal data record in the first error file;
[0151] a first marking submodule configured to mark the error cause of the abnormal data record as a unilateral error of another bank if no transaction data record with the same message number as the abnormal data record is found in the flow table of the local bank's database, and to form a second error file with the target abnormal data record with the re-marked error cause;
[0152] a summing submodule, configured to sum the transaction data in the flow table of the bank's database to obtain a third total transaction amount if transaction data with the same message number as the abnormal data record is found in the flow table of the bank's database;
[0153] a second marking submodule, configured to mark the abnormal data record based on a comparison result between the third total transaction amount and the total transaction amount in the other bank's transaction details file;
[0154] A submodule is formed, which is used to record the abnormal data marked as errors to form a second error file.
[0155] Based on the above technical solution, the second marking submodule includes:
[0156] a first marking unit, configured to mark the abnormal data record with a label indicating a balance if the third total transaction amount is equal to the total transaction amount in the other bank's transaction details file;
[0157] a second marking unit, configured to mark the abnormal data record with an error tag and mark the cause of the error as over-entry if the third total amount is greater than the total transaction amount in the other bank's transaction details file and the queried transaction data is an incoming transaction;
[0158] a third marking unit, configured to mark the abnormal data record with an error tag and mark the cause of the error as under-entry if the third total amount is less than the total transaction amount in the other bank's transaction details file and the queried transaction data is an incoming transaction;
[0159] a fourth marking unit, configured to mark the abnormal data record with an error tag and mark the cause of the error as underdeduction if the third total amount is greater than the total transaction amount in the other bank's transaction details file and the queried transaction data record is a nostro transaction;
[0160] The fifth marking unit is used to mark the abnormal data record with an error label and mark the cause of the error as overdeduction if the third total amount is less than the total transaction amount in the transaction details file of the other bank and the queried transaction data record is a non-transaction transaction.
[0161] Furthermore, the account adjustment module 140 is specifically used to: determine whether an account adjustment program is currently running based on the anti-duplicate table; if not, change the status of the transaction data in the bank's error detail table to being adjusted; adjust the transaction data in the bank's error detail table; after the adjustment is completed, change the status of the transaction data to success or failure.
[0162] The above-mentioned accounting processing device can execute the accounting processing method provided by any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0163] Example 6
[0164] Figure 6 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. 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 can 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.
[0165] like Figure 6 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., which is communicatively connected to the at least one processor 11. The memory stores a computer program that can be executed by the at least one processor. 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 into 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.
[0166] 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.
[0167] 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, digital signal processors (DSPs), and any other suitable processor, controller, microcontroller, etc. Processor 11 executes the various methods and processes described above, such as an accounting processing method.
[0168] In some embodiments, the accounting processing 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 accounting processing method described above can be performed. Alternatively, in other embodiments, processor 11 can be configured to execute the accounting processing method in any other suitable manner (e.g., via firmware).
[0169] Various embodiments of the systems and techniques described herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system-on-chip systems (SOCs), programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0170] In some embodiments, the accounting processing method can be implemented as a computer program, which is invisibly included in a computer program product. When the computer program is executed by a processor, it implements the accounting processing method of the present invention. The computer program product can be understood as a software product that mainly implements its solution through a computer program. The computer program for implementing the method of the present invention 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, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flowchart and / or block diagram are implemented. The computer program can be executed entirely on the machine, partially on the machine, partially on the machine as a stand-alone software package and partially on a remote machine, or entirely on a remote machine or server.
[0171] In the context of the present invention, computer-readable storage media can be tangible media that can contain or store a computer program for use with an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. Computer-readable storage media can include but are not limited to electronic, magnetic, optical, electromagnetic, infrared or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, computer-readable storage media can be machine-readable signal media. More specific examples of machine-readable storage media can include electrical connections based on one or more lines, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0172] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: 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).
[0173] 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 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.
[0174] 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.
[0175] 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.
[0176] 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. An accounting processing method, characterized in that: The method comprises: Based on the transaction details file of the other bank and the transaction details file of the current bank, the first error file is determined through the distributed stream processing framework; Comparing and analyzing the first error file with the bank's database flow table to determine a second error file; Importing the data records in the second error file into the error details table of this bank; Adjust the transaction data in the bank's error details table.
2. The method according to claim 1, characterized in that The step of determining the first error file based on the other bank's transaction detail file and the bank's transaction detail file through a distributed stream processing framework includes: Use the distributed stream processing framework to load transaction detail files of other banks and the bank's transaction detail files, and generate corresponding data sets of other banks and the bank's data set; Using the coordinated grouping operation and the join operation in the distributed stream processing framework, the data set of the other row is compared and analyzed with the data set of the current row to obtain abnormal data records; Marking the abnormal data records using a preset strategy, and outputting the marked abnormal data records to a result set; Abnormal data records marked as errors in the result set are recorded to form a first error file.
3. The method according to claim 2, characterized in that Marking the abnormal data records using a preset strategy includes: If the abnormal data record only exists in the other bank's data set, determining the transaction amount of the abnormal data record; If the transaction amount is not 0, the abnormal data record is marked with an error label, and the error reason is marked as unilateral by another bank; If the transaction amount is 0, the abnormal data record is marked with a balance label.
4. The method according to claim 2, characterized in that Marking the abnormal data records using a preset strategy includes: If the abnormal data record only exists in the data set of the current bank, then summing the transaction data in the data set of the current bank that have the same message number as the abnormal data record to obtain a first total transaction amount; If the first total transaction amount is 0, the abnormal data record is marked with a balance label; If the first total transaction amount is not 0, the abnormal data record is marked with an error label, and the error cause is marked as account adjustment.
5. The method according to claim 2, characterized in that Marking the abnormal data records using a preset strategy includes: If the abnormal data record exists in both the local bank data set and the other bank data set, summing the transaction data in the local bank data set that have the same message number as the abnormal data record to obtain a second total transaction amount; If the second total transaction amount is greater than the total transaction amount in the other bank's data set, and the abnormal data record is an incoming transaction, then the abnormal data record is marked with an error label, and the error cause is marked as over-entry; If the second total transaction amount is less than the total transaction amount in the other bank's data set, and the abnormal data record is an incoming transaction, then mark the abnormal data record with an error tag, and mark the error cause as under-entry; If the second total transaction amount is greater than the total transaction amount in the bank's data set, and the abnormal data record is a nostro transaction, then the abnormal data record is marked with an error label, and the error reason is marked as underdeduction; If the second total transaction amount is less than the total transaction amount in the bank's data set, and the abnormal data record is a no-remittance transaction, the abnormal data record is marked with an error label, and the error cause is marked as overdeduction.
6. The method according to claim 1, wherein The comparing and analyzing the first error file with the bank's database flow table to determine the second error file includes: querying the bank's database flow table based on the message number of the abnormal data record in the first error file; If no transaction data record with the same message number as the abnormal data record is found in the bank's database flow table, the error cause of the abnormal data record is marked as unilateral to the other bank, and the abnormal data record with the re-marked error cause is formed into a second error file; If transaction data having the same message number as the abnormal data record is found in the flow table of the bank's database, the transaction data in the flow table of the bank's database are summed to obtain a third total transaction amount; marking the abnormal data record based on a comparison result of the third total transaction amount with the total transaction amount in the other bank's transaction details file; The abnormal data marked as errors are recorded to form a second error file.
7. The method according to claim 6, characterized in that The marking of the abnormal data record according to the comparison result of the third total transaction amount with the total transaction amount in the transaction details file of the other bank includes: If the third total transaction amount is equal to the total transaction amount in the other bank's transaction details file, marking the abnormal data record with a label indicating a balance; If the third total amount is greater than the total transaction amount in the other bank's transaction details file, and the queried transaction data is an incoming transaction, the abnormal data record is marked with an error label, and the error cause is marked as over-entry; If the third total amount is less than the total transaction amount in the transaction details file of the other bank, and the queried transaction data is an incoming transaction, the abnormal data record is marked with an error label, and the error reason is marked as under-entry; If the third total amount is greater than the total transaction amount in the other bank's transaction details file, and the queried transaction data record is a nostro transaction, the abnormal data record is marked with an error label, and the error reason is marked as underdeduction; If the third total amount is less than the total transaction amount in the transaction details file of the other bank, and the queried transaction data record is a current account transaction, the abnormal data record will be marked with an error label, and the cause of the error will be marked as overdeduction.
8. The method according to claim 1, characterized in that The adjustment of the transaction data in the bank's error details table includes: Determine whether an account adjustment program is currently running based on the anti-duplicate table; If not, the status of the transaction data in the bank's error details table will be changed to "under adjustment"; Adjust the transaction data in the bank's error details table; After the account adjustment is completed, the status of the transaction data is changed to success or failure.
9. 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 accounting processing method according to any one of claims 1 to 8.
10. 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 accounting processing method according to any one of claims 1 to 8 when executed.