Method for removing duplicate bank fund flow data
By sorting and comparing bank capital flow data and calculating post-transaction balances, the duplication problem caused by the lack of transaction time data is solved, and data deduplication and accuracy are improved.
Patent Information
- Application Number
- CN202111429072.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-29
- Publication Date
- 2024-10-15
- Estimated Expiration
- 2041-11-29
AI Technical Summary
When converting bank capital flow data into a collection and payment format, the lack of transaction time data leads to duplicate data, affecting the accuracy and reliability of case study and judgment.
By sorting and comparing the capital flow data in the receipt and payment format, the post-transaction balance is calculated, allocated and stored to valid or suspected capital flow data sets, and duplicate data is judged and deleted based on the duplicate item ratio and the end-of-period balance.
Effectively remove duplicate data from bank capital flow data, improve the accuracy and reliability of data usage, and meet actual needs.
Smart Images

Figure CN114218201B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a method for cleaning bank fund data, in particular to a method for removing duplication of bank fund flow data. Background Art
[0002] In the current tax audit and other work situations, it is generally necessary to retrieve bank fund flow data. In actual retrieval, the retrieved bank fund flow data exists in multiple formats and multiple channels. In order to facilitate subsequent processing, it is generally necessary to convert the retrieved bank fund flow data into a receipt and payment format. When converting to a receipt and payment format, if the bank fund flow data lacks transaction time data, due to the characteristics of the receipt and payment format, it is known that the format data of the receipt and payment after conversion will be repeated.
[0003] When repeated payment and receipt format data is used for case analysis and other situations, it will seriously affect the accuracy and reliability of the actual case analysis and it will be difficult to meet the actual data usage needs. Summary of the invention
[0004] The purpose of the present invention is to overcome the deficiencies in the prior art and provide a method for deduplicating bank fund flow data, which can effectively remove duplicate data in bank fund flow data that lacks transaction time, meet the actual use requirements of bank fund flow data, and is safe and reliable.
[0005] According to the technical solution provided by the present invention, the method for deduplicating bank fund flow data comprises the following steps:
[0006] Step 1: Provide fund flow data in the payment format. If the fund flow data in the payment format is duplicated, jump to step 2; otherwise, jump to step 8.
[0007] Step 2: Sort the fund flow data in the payment and receipt format by transaction date, and store the first fund flow data in the established valid fund flow data set as the current valid fund flow data;
[0008] Step 3: compare the sorted fund flow data next to the current valid fund flow data with all the valid fund flow data in the valid fund flow data set. If the fund flow data is completely consistent with any valid fund flow data, store the current fund flow data in the established suspected fund flow data set. Otherwise, jump to step 4.
[0009] Step 4: Calculate the post-transaction balance after the current fund flow data, where the post-transaction balance is the sum of the fund balance after the current valid fund flow data and the transaction amount corresponding to the current fund flow data; and after calculating the post-transaction balance, store the current fund flow data in the valid fund flow data set as the current valid fund flow data;
[0010] Step 5, repeat the above steps 3 and 4 until the fund flow data at the end of the sorting is allocated and stored in the suspected fund flow data set or the valid fund flow data set, and an ending balance is obtained; when the ending balance is consistent with the balance in the account card, jump to step 6, otherwise, jump to step 7;
[0011] Step 6: Delete the fund flow data in the suspected fund flow data set as duplicate fund flow data, and jump to step 8;
[0012] Step 7: Determine whether the fund flow data in the suspected fund flow data set is non-duplicate fund flow data, and jump to step 8;
[0013] Step 8: Deduplication is complete.
[0014] In step 1, the process of checking and confirming whether there is duplication in the fund flow data of the payment and receipt format includes the following steps:
[0015] Step 1.1, according to the transaction date of the fund flow data in the payment and receipt format, determine the daily duplication ratio Nx in the fund flow data, and determine the number of days Dx with duplicate data according to the daily duplication ratio Nx;
[0016] Step 1.2: When the number of days with repeated data Dx is greater than 1 or the daily repetition ratio Nx is greater than the repetition ratio threshold, it can be determined that the fund flow data in the payment and receipt format is repeated.
[0017] The daily repetition ratio Nx is the number of repeated transaction amounts on the same transaction date / the total number of transaction flows on the current transaction date.
[0018] The fund flow data in the payment and receipt format includes the transaction date, transaction counterparty, transaction amount and payment and receipt mark.
[0019] In step 5, when the ending balance is not equal to the balance in the account card, the transaction amounts in all the flow fund data in the suspected fund flow data set are added to the ending balance. If the sum of the additions is equal to the balance in the card, execute step 7, otherwise, jump to step 6.
[0020] The advantages of the present invention are as follows: for bank fund flow data lacking transaction time, duplicate data in the bank fund flow data can be effectively removed, the use requirements of the actual bank fund flow data can be met, and the method is safe and reliable. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Figure 1 This is a flow chart of the present invention for checking and confirming whether there is duplication in the fund flow of the payment and receipt format.
[0022] Figure 2 This is a deduplication flow chart of the present invention. DETAILED DESCRIPTION
[0023] The present invention will be further described below in conjunction with specific drawings and embodiments.
[0024] like Figure 2 As shown: For bank fund flow data lacking transaction time, in order to effectively remove duplicate data in the bank fund flow data and meet the actual use requirements of the bank fund flow data, the deduplication method of the present invention includes the following steps:
[0025] Step 1: Provide fund flow data in the payment format. If the fund flow data in the payment format is duplicated, jump to step 2; otherwise, jump to step 8.
[0026] Specifically, the fund flow data of the payment and receipt format can be converted using existing commonly used technical means. For any fund flow data, the fund flow data in the payment and receipt format includes transaction date, transaction counterparty, transaction amount and payment and receipt mark, that is, the fund flow data in the payment and receipt format lacks transaction time information.
[0027] like Figure 1 As shown, it is a flowchart for checking and confirming whether there is duplication of fund flow data in the payment and receipt format. Specifically, the checking and confirmation process includes:
[0028] Step 1.1, according to the transaction date of the fund flow data in the payment and receipt format, determine the daily duplication ratio Nx in the fund flow data, and determine the number of days Dx with duplicate data according to the daily duplication ratio Nx;
[0029] Specifically, the daily repetition ratio Nx is the number of repeated transaction amounts on the same transaction date / the total number of transaction flows on the current transaction date. Since the fund flow data contains information on the transaction date, the number of repeated transaction amounts on the same transaction date can be conveniently counted based on the transaction date, and the total number of transaction flows on the same transaction date can also be directly counted. Therefore, the daily repetition ratio Nx can be obtained.
[0030] Step 1.2: When the number of days with repeated data Dx is greater than 1 or the daily repetition ratio Nx is greater than the repetition ratio threshold, it can be determined that the fund flow data in the payment and receipt format is repeated.
[0031] Specifically, the duplication ratio threshold can be selected and confirmed according to actual needs. Generally, the duplication ratio threshold can be set to 20%. That is, when the daily duplication ratio Nx is greater than 0.2, or the number of repeated data days Dx is greater than, it can be directly confirmed that the fund flow data in the payment format is repeated and subsequent deduplication steps are required. Otherwise, it can be confirmed that all fund flow data does not need to be deduplicated and can be used directly.
[0032] Step 2: Sort the fund flow data in the payment and receipt format by transaction date, and store the first fund flow data in the established valid fund flow data set as the current valid fund flow data;
[0033] Specifically, it can be seen from the above description that due to the existence of the transaction date, it can be directly sorted according to the transaction date. Generally, the transaction date is a date containing year-month-day. When sorting, the date is sorted in ascending order. The first fund flow data is the data of the first transaction of a certain bank card. The specific details are well known to people in the field of this technology and will not be repeated here.
[0034] The established effective fund flow data set can be in the form of a commonly used database, etc., which can be selected according to actual needs and will not be described in detail here. When the first fund flow data is stored in the effective fund flow data set, it can be used as the current effective fund flow data, and the current effective fund flow data is used as the basis for subsequent deduplication comparison.
[0035] Step 3: compare the sorted fund flow data next to the current valid fund flow data with all the valid fund flow data in the valid fund flow data set. If the fund flow data is completely consistent with any valid fund flow data, store the current fund flow data in the established suspected fund flow data set. Otherwise, jump to step 4.
[0036] Specifically, when the first fund flow data is the current valid fund flow data, the fund flow data next to the current valid fund flow data after sorting is the second fund flow data, and the rest of the cases are analogous. All fund flow data in the valid fund flow data set are valid fund flow data, and the latest deposited fund flow data in the valid fund flow data set is the current valid fund flow data.
[0037] In an embodiment of the present invention, when comparing, the cash flow that is adjacent to the current valid cash flow after sorting is compared with all valid cash flow data. The cash flow data is completely consistent with any valid cash flow data, specifically means that the transaction date, transaction amount, transaction counterparty and payment mark of the two are exactly the same. When there is a difference among them, it is considered different.
[0038] Specifically, when the fund flow data is completely consistent with a valid fund flow data, it can be considered as suspected duplicate data. At this time, the current fund flow data is stored in the suspected fund flow data set. The specific situation of the suspected fund flow data set can refer to the description of the valid fund flow data set, which will not be repeated here.
[0039] When the fund flow data is not completely the same as all the valid fund flow data, you need to jump to step 4.
[0040] Step 4: Calculate the post-transaction balance after the current fund flow data, where the post-transaction balance is the sum of the fund balance after the current valid fund flow data and the transaction amount corresponding to the current fund flow data; and after calculating the post-transaction balance, store the current fund flow data in the valid fund flow data set as the current valid fund flow data;
[0041] Specifically, the post-transaction balance is calculated, and the post-transaction balance is the sum of the fund balance after the current valid fund flow data and the transaction amount corresponding to the current fund flow data. If the first fund flow data is valid fund flow data, and the second fund flow data is not completely the same as the first fund flow data, then it is necessary to calculate the post-transaction balance after the second fund flow data, that is, calculate the sum of the fund balance after the first fund flow data and the transaction amount corresponding to the second fund flow data. Of course, the transaction amount is related to the payment mark. When the payment mark is payment, it is a direct accumulation of the values. When the payment mark is payment, the transaction amount corresponding to the second fund flow data is a corresponding negative value. The specific details are well known to the technical personnel in this field and will not be repeated here.
[0042] In an embodiment of the present invention, after the post-squeeze balance is calculated, the current cash flow data is stored in the valid cash flow data and used as the current valid cash flow data. For example, after the second-digit cash flow data is stored in the valid cash flow data set, the current valid cash flow data is the second-digit cash flow data, and the first-digit cash flow data is only stored in the valid cash flow data set as valid cash flow data.
[0043] In specific implementation, the post-transaction balance is used as the subsequent fund balance. For example, when the second-digit fund flow data is stored in the valid fund flow data set and used as the current valid fund flow data, when the third-digit fund flow data or other subsequent fund flow data executes step 4, the fund balance after the current valid fund flow data is the post-transaction balance. The rest of the situations are similar and no examples are given here one by one.
[0044] Step 5, repeat the above steps 3 and 4 until the fund flow data at the end of the sorting is allocated and stored in the suspected fund flow data set or the valid fund flow data set, and an ending balance is obtained; when the ending balance is consistent with the balance in the account card, jump to step 6, otherwise, jump to step 7;
[0045] Specifically, if there are multiple sorted cash flow data, it is necessary to repeat the above steps 3 and 4 until the cash flow data at the end of the sort is allocated and stored in the suspected cash flow data set or the valid cash flow data set. In the embodiment of the present invention, the end-of-period balance obtained is the post-transaction balance calculated in step 4. Among them, when the last cash flow data is allocated to the valid cash flow data set, the end-of-period balance is the post-transaction balance calculated using the transaction amount corresponding to the last cash flow data, otherwise, it is the post-transaction balance calculated using the transaction amount corresponding to the last cash flow data allocated to the valid cash flow data set, which is well known to those in the technical field and will not be repeated here.
[0046] Step 6: Delete the fund flow data in the suspected fund flow data set as duplicate fund flow data, and jump to step 8;
[0047] Specifically, when the balance at the end of the period is consistent with the balance in the account card, the fund flow data in the suspected fund flow data set is considered to be duplicate fund flow data and needs to be deleted. After deletion, jump to step 8. The balance in the account card is the basic information of the account, which can be directly obtained and is well known to those skilled in the art, and will not be described in detail here.
[0048] Step 7: Determine whether the fund flow data in the suspected fund flow data set is non-duplicate fund flow data, and jump to step 8;
[0049] Specifically, when the ending balance is inconsistent with the balance in the account card, it is generally not possible to directly assume that the fund flow data in the suspected fund flow data set is duplicate fund flow velocity data.
[0050] In an embodiment of the present invention, when the ending balance is not equal to the balance in the account card, the transaction amounts in all the flow fund data in the suspected fund flow data set are added to the ending balance. If the sum of the additions is equal to the balance in the card, step 7 is executed, otherwise, jump to step 6.
[0051] Step 8: Deduplication is complete.
[0052] Specifically, when deduplication is completed, all bank fund flow data that lack transaction time can be deduplicated.
Claims
1. A method for deduplication of bank fund flow data. Its characteristics are: The deduplication method comprises the following steps: Step 1: Provide fund flow data in the payment format. If the fund flow data in the payment format is duplicated, jump to step 2; otherwise, jump to step 8. Step 2: Sort the fund flow data in the payment and receipt format by transaction date, and store the first fund flow data in the established valid fund flow data set as the current valid fund flow data; Step 3: compare the sorted fund flow data next to the current valid fund flow data with all the valid fund flow data in the valid fund flow data set. If the fund flow data is completely consistent with any valid fund flow data, store the current fund flow data in the established suspected fund flow data set. Otherwise, jump to step 4. Step 4: Calculate the post-transaction balance after the current fund flow data, where the post-transaction balance is the sum of the fund balance after the current valid fund flow data and the transaction amount corresponding to the current fund flow data; and after calculating the post-transaction balance, store the current fund flow data in the valid fund flow data set as the current valid fund flow data; Step 5, repeat the above steps 3 and 4 until the fund flow data at the end of the sorting is allocated and stored in the suspected fund flow data set or the valid fund flow data set, and an ending balance is obtained; when the ending balance is consistent with the balance in the account card, jump to step 6, otherwise, jump to step 7; Step 6: Delete the fund flow data in the suspected fund flow data set as duplicate fund flow data, and jump to step 8; Step 7: Determine whether the fund flow data in the suspected fund flow data set is non-duplicate fund flow data, and jump to step 8; Step 8: Deduplication is complete.
2. The method for deduplicating bank fund flow data according to claim 1, Its characteristics are: In step 1, the process of checking and confirming whether there is duplication in the fund flow data of the payment and receipt format includes the following steps: Step 1.1, according to the transaction date of the fund flow data in the payment and receipt format, determine the daily duplication ratio Nx in the fund flow data, and determine the number of days Dx with duplicate data according to the daily duplication ratio Nx; Step 1.2: When the number of days with repeated data Dx is greater than 1 or the daily repetition ratio Nx is greater than the repetition ratio threshold, it can be determined that the fund flow data in the payment and receipt format is repeated; The daily repetition ratio Nx is the number of repeated transaction amounts on the same transaction date / the total number of transaction flows on the current transaction date.
3. The method for deduplicating bank fund flow data according to any one of claims 1 to 2, Its characteristics are: The fund flow data in the payment and receipt format includes the transaction date, transaction counterparty, transaction amount and payment and receipt mark.
4. The method for deduplicating bank fund flow data according to any one of claims 1 to 2, Its characteristics are: In step 5, when the ending balance is not equal to the balance in the account card, the transaction amounts in all the flow fund data in the suspected fund flow data set are added to the ending balance. If the accumulated sum is equal to the balance in the card, execute step 7, otherwise, jump to step 6.
