Automatic account checking method and device, storage medium and program product
By standardizing and extracting features from multi-source heterogeneous data, and combining dynamic expansion of time windows and multi-stage matching, the problem of low efficiency and poor accuracy in reconciliation in the consumer finance and retail sectors has been solved, achieving fully automated reconciliation and improving efficiency and accuracy.
Patent Information
- Application Number
- CN202610197979.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-02-11
- Publication Date
- 2026-04-10
AI Technical Summary
Existing technologies in the reconciliation process in the consumer finance and retail sectors suffer from high workload and error-proneness, especially in scenarios with multi-source heterogeneous data, where manual processing is complex and it is difficult to achieve efficient and accurate reconciliation.
By standardizing and extracting features from multi-source heterogeneous data, combining dynamic expansion of time windows and multi-stage accounting-transaction candidate pair matching, a greedy algorithm is used for multi-dimensional matching, and a backtracking verification mechanism is used to achieve fully automated reconciliation.
It achieves fully automated reconciliation, significantly reducing manual workload, improving reconciliation efficiency and accuracy, reducing human error, and supporting historical account retrospective verification.
Smart Images

Figure CN121836707A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer application technology, and more specifically, to an automatic reconciliation method, device, storage medium, and program product. Background Technology
[0002] The main lending scenarios in the current consumer finance sector and some retail sectors include: generating repayment plans through third-party platforms or offline scenarios, and completing payment deductions through third-party payment companies and offline channels. Therefore, during the batch transmission of accounting documents (mainly including repayment plan tables and repayment transaction records) and the reconciliation process between payment records and accounting documents, it is only necessary to compare whether the total ledger and total amount for each channel on that day are consistent. When the total ledger and total amount for each channel are inconsistent, a one-to-one matching method between repayment transaction records and payment records is used, comparing them one by one according to data association logic. In the face of one-to-many scenarios, such as multiple offline payments without transaction numbers, or multiple deductions corresponding to a single repayment application, manual searching for amount discrepancies is required, using personal experience to find and analyze the reasons. At the same time, discrepancies in accounting records (repayment transaction records) and payment transaction records due to date-based issues frequently occur, all of which require manual processing and analysis. However, manual reconciliation not only involves a large workload and is prone to errors, but also requires a full reconciliation and retrospective at certain intervals to reverse and correct discrepancies. Summary of the Invention
[0003] To address the problems, or at least some of the problems, existing technologies described above, this invention provides an automatic reconciliation method, system, storage medium, device, and computer program product for multi-source heterogeneous data. By standardizing and extracting features from multi-source heterogeneous data, and combining dynamic expansion of time windows and multi-stage account-transaction candidate pair matching, the system can achieve fully automatic reconciliation, significantly reducing manual intervention and improving reconciliation efficiency and accuracy.
[0004] According to a first aspect of the present invention, an automatic reconciliation method for multi-source heterogeneous data is provided. The method includes: acquiring original accounting documents and payment transaction files; preprocessing the original accounting documents and payment transaction files to obtain preprocessed accounting data and payment transaction data; extracting features from the preprocessed accounting data and payment transaction data to generate accounting data feature vectors and transaction data feature vectors; extracting first accounting-transaction candidate pairs from the accounting data feature vectors and transaction data feature vectors based on a short-term time window, wherein the first accounting-transaction candidate pairs constitute a first candidate set; and performing multi-dimensional analysis on the first candidate set. The matching process yields a first matching result, and the first candidate set is updated based on the first matching result. When there are unmatched account-transaction candidate pairs in the first candidate set, the time window is dynamically expanded. Based on the expanded time window, second account-transaction candidate pairs are extracted from the account data feature vector and transaction data feature vector, and the second account-transaction candidate pairs form a second candidate set. Within the expanded time window, a greedy matching process is performed on the second account-transaction candidate pairs in the second candidate set to obtain a second matching result. The first matching result and / or the second matching result are backtracked for verification to obtain the optimized matching result and abnormal records.
[0005] According to the above embodiments of the present invention, by preprocessing and extracting features from the original accounting files and payment transaction files from multiple data sources, it can adapt to multi-source heterogeneous data scenarios and achieve data standardization; through multi-dimensional matching within a short time window, it can quickly filter effective candidate pairs and improve reconciliation efficiency; when candidate pairs cannot be completely matched within a short time window, it can efficiently solve reconciliation matching problems in complex scenarios such as date cutoff and payment delays by dynamically expanding the time window and using greedy matching, thus automating the entire reconciliation process, significantly reducing manual workload, minimizing human error, and improving the overall efficiency and accuracy of reconciliation. Furthermore, the present invention employs a backtracking verification mechanism to verify matching results and accurately retain abnormal records, strengthening fault tolerance and supporting historical accounting backtracking and verification.
[0006] In some embodiments of the present invention, a progressive expansion strategy is used to dynamically expand the time window.
[0007] In some embodiments of the present invention, preprocessing the original accounting documents and payment transaction documents includes: standardizing the timestamps in the original accounting documents and payment transaction documents from multiple data sources; normalizing the amount data in the original accounting documents and payment transaction documents and marking abnormal amount data; and cleaning and standardizing the text fields in the original accounting documents and payment transaction documents.
[0008] In some embodiments of the present invention, multi-dimensional matching processing of the first candidate set includes: high-confidence exact matching processing, medium-confidence univariate greedy processing, and low-confidence multi-dimensional greedy matching processing.
[0009] In some embodiments of the present invention, the high-confidence exact matching process includes: extracting first sub-account-transaction candidate pairs that meet the exact matching conditions from the first candidate set; calculating the time proximity weight for each candidate pair in the first sub-account-transaction candidate pair; performing matching processing on the first sub-account-transaction candidate pairs according to the time proximity weight; and deleting the successfully matched candidate pair from the first candidate set when a candidate pair in the first sub-account-transaction candidate pair is successfully matched.
[0010] In some embodiments of the present invention, the medium-confidence univariate greedy processing includes: taking the remaining candidate pairs in the first candidate set after high-confidence exact matching processing as second sub-account-transaction candidate pairs; calculating the amount similarity, time proximity, business relevance, and identity relevance of each candidate pair in the second sub-account-transaction candidate pairs, and calculating the comprehensive matching degree of each candidate pair based on the amount similarity, time proximity, business relevance, and identity relevance; performing matching processing on the second sub-account-transaction candidate pairs according to the comprehensive matching degree; and deleting the successfully matched candidate pairs from the first candidate set when a candidate pair in the second sub-account-transaction candidate pairs is successfully matched.
[0011] In some embodiments of the present invention, retrospective verification of the first matching result and / or the second matching result includes: identifying abnormal matching patterns in the first matching result and / or the second matching result based on historical matching data, and releasing low-confidence successfully matched account-transaction matching pairs.
[0012] According to a second aspect of the present invention, an automatic reconciliation system for multi-source heterogeneous data is provided. The reconciliation system includes: a preprocessing module for acquiring original accounting documents and payment transaction files, and preprocessing the original accounting documents and payment transaction files to obtain preprocessed accounting data and payment transaction data; a feature extraction module for extracting features from the preprocessed accounting data and payment transaction data and generating accounting data feature vectors and transaction data feature vectors; and a first reconciliation module for performing the following operations: extracting first accounting-transaction candidate pairs from the accounting data feature vectors and transaction data feature vectors based on a short-term time window, wherein the first accounting-transaction candidate pairs form a first candidate set; and reconciling the first... The candidate set undergoes multi-dimensional matching processing to obtain a first matching result, and the first candidate set is updated based on the first matching result. A second reconciliation module is used to dynamically expand the time window when there are unmatched account-transaction candidate pairs in the first candidate set. Based on the expanded time window, it extracts second account-transaction candidate pairs from the account data feature vector and transaction data feature vector. These second account-transaction candidate pairs form a second candidate set. Furthermore, within the expanded time window, a greedy matching algorithm is used to perform a second matching result on the second account-transaction candidate pairs in the second candidate set. A backtracking verification module is used to backtrack and verify the first matching result and / or the second matching result to obtain optimized matching results and abnormal records.
[0013] According to the above embodiments of the present invention, by preprocessing and extracting features from the original accounting files and payment transaction files from multiple data sources, it can adapt to multi-source heterogeneous data scenarios and achieve data standardization; through multi-dimensional matching within a short time window, it can quickly filter effective candidate pairs and improve reconciliation efficiency; when candidate pairs cannot be completely matched within a short time window, it can efficiently solve reconciliation matching problems in complex scenarios such as date cutoff and payment delays by dynamically expanding the time window and using greedy matching, thus automating the entire reconciliation process, significantly reducing manual workload, minimizing human error, and improving the overall efficiency and accuracy of reconciliation. Furthermore, the present invention employs a backtracking verification mechanism to verify matching results and accurately retain abnormal records, strengthening fault tolerance and supporting historical accounting backtracking and verification.
[0014] In some embodiments of the present invention, the second reconciliation module adopts a progressive expansion strategy to dynamically expand the time window.
[0015] In some embodiments of the present invention, preprocessing the original accounting documents and payment transaction documents includes: standardizing the timestamps in the original accounting documents and payment transaction documents from multiple data sources; normalizing the amount data in the original accounting documents and payment transaction documents and marking abnormal amount data; and cleaning and standardizing the text fields in the original accounting documents and payment transaction documents.
[0016] In some embodiments of the present invention, multi-dimensional matching processing of the first candidate set includes: high-confidence exact matching processing, medium-confidence univariate greedy processing, and low-confidence multi-dimensional greedy matching processing.
[0017] In some embodiments of the present invention, the high-confidence exact matching process includes: extracting first sub-account-transaction candidate pairs that meet the exact matching conditions from the first candidate set; calculating the time proximity weight for each candidate pair in the first sub-account-transaction candidate pair; performing matching processing on the first sub-account-transaction candidate pairs according to the time proximity weight; and deleting the successfully matched candidate pair from the first candidate set when a candidate pair in the first sub-account-transaction candidate pair is successfully matched.
[0018] In some embodiments of the present invention, the medium-confidence univariate greedy processing includes: taking the remaining candidate pairs in the first candidate set after high-confidence exact matching processing as second sub-account-transaction candidate pairs; calculating the amount similarity, time proximity, business relevance, and identity relevance of each candidate pair in the second sub-account-transaction candidate pairs, and calculating the comprehensive matching degree of each candidate pair based on the amount similarity, time proximity, business relevance, and identity relevance; performing matching processing on the second sub-account-transaction candidate pairs according to the comprehensive matching degree; and deleting the successfully matched candidate pairs from the first candidate set when a candidate pair in the second sub-account-transaction candidate pairs is successfully matched.
[0019] In some embodiments of the present invention, retrospective verification of the first matching result and / or the second matching result includes: identifying abnormal matching patterns in the first matching result and / or the second matching result based on historical matching data, and releasing low-confidence successfully matched account-transaction matching pairs.
[0020] According to a third aspect of the present invention, an embodiment of the present invention provides a computer-readable storage medium having stored thereon computer-readable instructions, which, when executed by a processor, cause a computer to perform the following operations: the operations include the steps included in the reconciliation method as described in any of the above embodiments.
[0021] According to a fourth aspect of the present invention, an embodiment of the present invention provides a computer device including a memory and a processor, wherein the memory is used to store one or more computer-readable instructions, wherein the one or more computer-readable instructions, when executed by the processor, can implement the reconciliation method as described in any of the above embodiments.
[0022] According to a fifth aspect of the present invention, an embodiment of the present invention provides a computer program product including a computer program, which, when executed by a processor, implements the reconciliation method as described in any of the above embodiments.
[0023] As can be seen from the above, the automatic reconciliation method, system, storage medium, device and computer program product for multi-source heterogeneous data provided by the embodiments of the present invention can achieve full-process automatic reconciliation after standardizing and feature extraction of multi-source heterogeneous data, by dynamically expanding the time window and combining multi-stage accounting-transaction candidate pair matching, which can significantly reduce labor costs and error rates. At the same time, it strengthens fault tolerance by relying on backtracking verification, thereby improving the overall reconciliation efficiency and accuracy. Attached Figure Description
[0024] Figure 1 This is a flowchart illustrating the automatic reconciliation method for multi-source heterogeneous data according to Embodiment 1 of the present invention; Figure 2 This is a flowchart illustrating an automatic reconciliation method based on dynamic expansion of time windows according to Embodiment 2 of the present invention. Figure 3 This is a schematic diagram of the architecture of an automatic reconciliation system for multi-source heterogeneous data according to Embodiment 3 of the present invention. Detailed Implementation
[0025] The various aspects of the present invention will be described in detail below with reference to the accompanying drawings and specific embodiments. Well-known modules, units, and their connections, links, communications, or operations are not shown or described in detail. Furthermore, the described features, architectures, or functions can be combined in any way in one or more embodiments. Those skilled in the art should understand that the various embodiments described below are for illustrative purposes only and are not intended to limit the scope of protection of the present invention. It will also be readily understood that the modules, units, or processing methods in the embodiments described herein and shown in the accompanying drawings can be combined and designed in various different configurations.
[0026]
Example 1
[0027] like Figure 1As shown, in Embodiment 1 of the present invention, the reconciliation method may include at least the following steps S11, S12, S13, S14, S15, S16 and S17, which are described in detail below.
[0028] In step S11, the original accounting documents and payment transaction documents are obtained, and the original accounting documents and payment transaction documents are preprocessed to obtain preprocessed accounting data and payment transaction data.
[0029] In some implementations, preprocessing the original accounting files and payment transaction files includes: standardizing the timestamps in the original accounting files and payment transaction files from multiple data sources; normalizing the monetary data in the original accounting files and payment transaction files and marking abnormal monetary data; and cleaning and standardizing the text fields in the original accounting files and payment transaction files. Adapting to multi-source heterogeneous data scenarios, preprocessing the original accounting files and payment transaction files from multiple data sources can eliminate format differences in the original accounting / payment transaction files, achieving data standardization without requiring manual intervention.
[0030] In step S12, feature extraction is performed on the preprocessed accounting data and payment transaction data to generate accounting data feature vectors and transaction data feature vectors.
[0031] In this embodiment, the following multi-dimensional feature vectors are extracted from the preprocessed standard accounting data and payment transaction data: (1) Time features: payment time, order placement time, and processing time difference; (2) Amount features: precise amount and amount tolerance range; (3) Identity features: payer's ID number; (4) Business features: product channel number (the matching code value of repayment source and payment channel is converted into a unified product channel number). The feature vector construction lays the foundation for the accurate matching of subsequent accounting-transaction candidate pairs and improves the correlation identification of accounting and transaction data.
[0032] In step S13, based on a short-term time window, first accounting-transaction candidate pairs are extracted from the accounting data feature vector and the transaction data feature vector. These first accounting-transaction candidate pairs form a first candidate set. For example, the short-term time window is based on the core time of the accounting record, setting an initial fixed time window range; preferably, a 24-hour window of a natural day is used. The accounting-transaction candidate pairs are accounting-transaction (matching) pairs that match in terms of amount, product channel number, and customer identity characteristics.
[0033] In step S14, multi-dimensional matching processing is performed on the first candidate set to obtain a first matching result, and the first candidate set is updated based on the first matching result. Specifically, a greedy algorithm is used to perform multi-dimensional matching on the candidate set to obtain the first matching result. Optionally, the multi-dimensional matching using the greedy algorithm includes: calculating the comprehensive matching degree of the candidate matching pair in at least two dimensions: amount, time, payer name, and order placer name; and sequentially selecting and locking matching pairs according to the comprehensive matching degree from high to low.
[0034] In this embodiment, the multi-dimensional matching process for the first candidate set includes: high-confidence exact matching, medium-confidence univariate greedy matching, and low-confidence multi-dimensional greedy matching.
[0035] In some implementations, the high-confidence exact matching process includes: extracting first sub-account-transaction candidate pairs that meet the exact matching conditions from the first candidate set; calculating a time proximity weight for each candidate pair in the first sub-account-transaction candidate pair; performing matching processing on the first sub-account-transaction candidate pairs according to the time proximity weight; and deleting the successfully matched candidate pair from the first candidate set when a candidate pair in the first sub-account-transaction candidate pair is successfully matched.
[0036] In a further embodiment, the medium-confidence univariate greedy processing includes: taking the remaining candidate pairs in the first candidate set after high-confidence exact matching processing as second sub-account-transaction candidate pairs; calculating the amount similarity, time proximity, business relevance, and identity relevance of each candidate pair in the second sub-account-transaction candidate pairs, and calculating the comprehensive matching degree of each candidate pair based on the amount similarity, time proximity, business relevance, and identity relevance; performing matching processing on the second sub-account-transaction candidate pairs according to the comprehensive matching degree; and deleting the successfully matched candidate pair from the first candidate set when a candidate pair in the second sub-account-transaction candidate pairs is successfully matched.
[0037] The low-confidence multi-dimensional greedy matching process includes: taking the remaining candidate pairs in the first candidate set after high-confidence precise matching and medium-confidence univariate greedy matching as third sub-account-transaction candidate pairs; matching and modeling a single account data feature vector in the third sub-account-transaction candidate pair with multiple transaction data feature vectors to form a subset; using a dynamic programming algorithm to obtain the optimal combination in which the sum of payment transaction amounts in multiple transaction data feature vectors equals the account amount in a single account data feature vector, wherein the optimal combination is the combination with fewer transactions, concentrated time, and strongest consistency of business characteristics; and deleting the account data feature vector and multiple transaction data feature vectors from the optimal combination in the first candidate set. The optimal combination is the combination with fewer transactions, concentrated time, and strongest consistency of business characteristics.
[0038] In a further implementation, multi-level confidence thresholds are set to determine whether the candidate accounts-transaction pairs / matching accounts-transaction pairs to be matched are confirmed as successful. If the candidate accounts-transaction pairs / matching accounts-transaction pairs to be matched pass through high-confidence exact matching, medium-confidence greedy matching, and low-confidence dynamic programming sequentially, and are all removed, and pass the verification process without any of the three types of errors, the match is considered successful. If the candidate accounts-transaction pairs / matching accounts-transaction pairs to be matched pass through high-confidence exact matching, medium-confidence greedy matching, and low-confidence dynamic programming sequentially, and are all removed, and the verification process contains three types of errors, they are marked as suspicious and enter the manual verification stage. Manual verification refers to pushing suspicious data to the human-computer interaction page for manual matching. If, after sequentially passing high-confidence exact matching, medium-confidence greedy matching, and low-confidence dynamic programming, there are still matching pairs remaining, then all matching is considered a failure, and the time window is expanded for rematching. If, even within the maximum time window, all pairs still cannot be matched, an entry error is reported, and manual database programming is performed to exclude data with consistent time, amount, and customer identity characteristics. The remaining data is then manually verified and matched based on experience.
[0039] In this embodiment, deleting / removing candidate pairs from the candidate set is considered a temporary / preliminary successful match. If all candidate pairs are successfully matched through the high, medium, and low stages, the current short-term window is considered a successful match, and accounting files are generated. If it is impossible to remove all candidate pairs from the candidate set, the process is extended to the next time window.
[0040] In step S15, when there are unmatched account-transaction candidate pairs in the first candidate set, the time window is dynamically expanded. Based on the expanded time window, the second account-transaction candidate pairs are extracted from the account data feature vector and the transaction data feature vector. The second account-transaction candidate pairs form the second candidate set.
[0041] In step S16, within the extended time window, a greedy matching process is performed on the second account-transaction candidate pairs in the second candidate set to obtain the second matching result. Specifically, a greedy algorithm is used to perform multi-dimensional matching on the set of unmatched account-transaction candidate pairs to obtain the second matching result.
[0042] In this embodiment, a progressive expansion strategy is used to dynamically expand the time window. Furthermore, candidate pairs are matched according to priority during the expanded window matching process. Specifically, records with obvious monetary and business characteristics are processed first, improving the efficiency of the expanded matching.
[0043] Optionally, the expansion sequence of the progressive expansion strategy includes 1 day, 3 days, 7 days, and 15 days.
[0044] In step S17, the first matching result and / or the second matching result are backtracked for verification to obtain the optimized matching result and the abnormal record.
[0045] In this embodiment, backtracking verification of the first matching result and / or the second matching result includes: identifying abnormal matching patterns in the first matching result and / or the second matching result based on historical matching data, and releasing low-confidence successfully matched account-transaction pairings. The backtracking verification mechanism enables accurate verification of matching results and retention of abnormal records, strengthens fault tolerance, and supports historical account backtracking and verification.
[0046] In a further implementation, the released records (account-transaction matching pairs) are reintroduced into the matching process for matching.
[0047] In a further embodiment, the first matching result and / or the second matching result are backtested to detect and correct historical erroneous matches.
[0048] The automatic reconciliation method described in Embodiment 1 of this invention quickly filters out effective candidate pairs through multi-dimensional matching within a short time window, thereby improving reconciliation efficiency. When candidate pairs cannot be fully matched within a short time window, the reconciliation matching problem in complex scenarios such as day-cutting and payment delays is efficiently solved by dynamically expanding the time window and using greedy matching. The entire reconciliation process is automated, significantly reducing manual workload, minimizing human error, and improving the overall efficiency and accuracy of reconciliation.
[0049]
Example 2
[0050] like Figure 2As shown, in Embodiment 2 of the present invention, the reconciliation method may include at least the following steps S21, S22, S23, S24 and S25, which are described in detail below.
[0051] Step S21, Data Preprocessing and Feature Extraction. This step, S21, serves as the data preprocessing stage, cleaning, standardizing, and performing feature engineering on the original accounting documents and payment records. The specific processing steps are as follows: (1) Timestamp unification and standardization: Time information from different data sources is uniformly converted into a standard time format and a unified time zone, and time feature vectors are extracted, including time dimension features such as the specific time when the transaction occurs.
[0052] (2) Amount normalization processing: unify the currency unit and precision of all amounts, and identify and mark abnormal amount data.
[0053] (3) Text field cleaning and standardization: Standardize text fields such as the name on the repayment receipt and the name of the deduction account, including but not limited to removing special characters, unifying the encoding format, and handling the conversion between simplified and traditional Chinese characters.
[0054] (4) Multi-dimensional feature vector construction: Integrating information from multiple aspects such as time, amount, text, and business channels, a complete feature vector is constructed for each record (each accounting data and each payment transaction data). That is, based on the standardized accounting data and payment transaction data, the feature vector corresponding to each accounting data and the feature vector corresponding to each payment transaction data are generated respectively, which serve as the input basis for subsequent matching algorithms.
[0055] Step S22: Within a short window (e.g., 1 day), reconciliation and matching are performed (i.e., steps S221 to S223 below).
[0056] Step S221, high-confidence exact match.
[0057] The exact matching conditions for high confidence exact matching are: (1) Amount is consistent: Account amount = Payment flow amount; (2) Product channel number is consistent: Business product identifier is exactly matched; (3) Customer identity characteristics are consistent (Payment ID number, Payment ID number).
[0058] High-confidence exact matching time proximity matching execution: (1) Candidate set generation: Extract all account-transaction candidate pairs that meet the above exact matching conditions; (2) Time weight calculation: Calculate the time proximity weight for each candidate pair, time proximity weight = f(time difference), where time difference = |account record time - payment transaction time|; the function f adopts the Gaussian decay function: weight = e^(-λ×(time difference / σ)²), where σ is the scale parameter, with a value of 4 (unit hour), and λ has a value of 0.5. This ensures that the smaller the time difference, the higher the weight. For example, if the time difference is 3 minutes, then the time weight = e^(-0.5 × (0.05 / 4)²). The values of σ and λ are adjusted according to the subsequent optimization based on the model performance.
[0059] The optimal matching selection for high-confidence exact matching is as follows: (1) Determine the preset threshold of "time proximity weight", with a reference value of 0.9; (2) Sort all candidate pairs in descending order of time weight; (3) Starting from the candidate pair with the highest weight, perform one-to-one matching on candidate pairs that meet the preset threshold; (4) Once a record is matched, remove it from the candidate set immediately; (5) Continue processing the next candidate pair with the highest weight; (6) Stop when the candidate set becomes empty or when the "time proximity weight" of the current candidate pair to be processed is lower than the preset threshold. In the financial reconciliation scenario, the "select-remove" greedy matching strategy based on time weight sorting, combined with "high-confidence exact matching conditions", "Gaussian decay calculation of time proximity weight" and "multi-stage progressive matching framework", can improve the overall efficiency and accuracy of reconciliation.
[0060] Step S222: Use a univariate greedy algorithm with medium confidence.
[0061] The matching range of the medium confidence univariate greedy processing is: the remaining accounting records and payment flow that failed to match in step S221.
[0062] For the candidate pairs / matching pairs of account statements to be matched, select candidate pairs with exactly the same amount and calculate the overall matching score: The overall matching score is calculated as follows: w12 × Time proximity + w13 × Business relevance + w14 × Identity relevance. Time proximity is the decay weight within the extended time window (i.e., time proximity weight, weight = e^(-λ × (time difference / σ)²)); Business relevance: 1 for identical business features, 0 for inconsistent business features; Identity relevance: 1 for identical identity features, 0 for inconsistent identity features.
[0063] The greedy matching strategy for the medium-confidence univariate greedy processing is as follows: (1) Score sorting: all candidate pairs are sorted in descending order of comprehensive score; (2) Sequential matching: matching starts from the candidate pair with the highest score; (3) Record removal: the relevant record is removed immediately after a successful match; (4) Iterative execution: repeat until there are no available candidate pairs or the score is lower than the threshold. The threshold for comprehensive score is set at 0.7.
[0064] Step S223: Low-confidence multi-dimensional greedy matching.
[0065] The matching range of the low-confidence multi-dimensional greedy matching is: the remaining accounting records and payment flow that could not be matched in step S222.
[0066] The low-confidence multi-dimensional greedy matching adopts the amount aggregation matching mechanism and performs the following matching steps: (1) Subset sum problem solving: the matching of a single accounting record with multiple payment transactions is modeled as a subset; (2) For the remaining accounting records in step S222, multiple payment transactions are aggregated and matched, and the dynamic programming algorithm is used to find the optimal combination in which the sum of payment transaction amounts equals the accounting amount. The optimal combination is the combination with fewer transactions, concentrated time, and the strongest consistency of business characteristics.
[0067] This application provides an example of a dynamic programming algorithm for determining the optimal combination in the aggregation and matching of multiple payment transactions: (1) Problem modeling: For a remaining accounting record A_i (amount M_i), find a subset {P_j} from all remaining payment transaction records such that the sum of transaction amounts in the subset is equal to (or close to) M_i within a certain tolerance.
[0068] (2) Define the optimization objective: The goal is not just to find a subset of matching amounts, but the "optimal" subset. Optimality is defined by combining the following two indicators: * Number of transactions: The fewer transactions in the subset, the better.
[0069] * Time concentration: The smaller the timestamp variance of the transactions in the subset, the better (the more concentrated the payment time).
[0070] Solution Algorithm: Dynamic Programming (DP) is used to solve the constrained subset sum problem. The DP state dp[k][s] represents whether the amount s can be reached using the first k transactions, and records the "cost" (comprehensive quantity, time dispersion, etc.) at this state. After obtaining all subsets that can fit M_i using the Python linear programming library PuLP, the subset with the minimum total cost is selected as the matching result. The total cost is calculated as w21 * transaction quantity index + w22 * time concentration. The transaction quantity index is configured according to a gradient; for example, 1 transaction earns 0.1 points, 2-3 earn 0.4 points, 3-6 earn 0.7 points, and more than 6 earn 1 point. The time concentration is calculated from the time variance.
[0071] Matching and Removal: Once the optimal subset of payment transactions is found for A_i, the match is confirmed, and A_i and all transaction records in that subset are marked as matched and removed from the subsequent matching candidate pool.
[0072] Specific examples are explained below: Assumption: Account record A1: Amount 1000 yuan, payer Zhang San, planned date October 1st.
[0073] Remaining payment details: P1: 600 yuan, payer Zhang San, October 1st, 09:00.
[0074] P2: 400 yuan, paid by Zhang San, October 1, 09:05.
[0075] P3: 300 yuan, payer Li Si, October 1, 10:00 AM.
[0076] P4: 700 yuan, payer Zhang San, October 2nd, 08:00.
[0077] Matching process: High and medium confidence level matches were unsuccessful.
[0078] Enter the low-confidence multi-dimensional greedy matching process and process A1.
[0079] Dynamic programming algorithm to find subsets whose sum is 1000: Candidate subset 1: {P1(600), P2(400)}, sum of amount = 1000, number of transactions = 2, time clustered (within a few minutes on the same day), payer is consistent.
[0080] Candidate subset 2: {P3(300), P4(700)}, with a sum of 1000, but the payers are not all the same and the time span is large.
[0081] Candidate subset 3: {P1, P3, P4} etc., with excessive amounts or a large number of transactions.
[0082] The algorithm calculates the "cost" of each subset, and the cost of subset 1 is much lower than that of subset 2.
[0083] Therefore, the system successfully matched A1 with {P1, P2}. A1, P1, and P2 were removed.
[0084] P3 and P4 will still be available when processing other accounting records.
[0085] Step S23: The time window dynamic expansion algorithm is used to process records that cannot be matched in the short-term window. In this embodiment, a progressive window expansion is used to adjust the time window. Specifically, when the short-term window is matched but cannot be completely matched, a progressive expansion strategy of 1 day → 3 days → 7 days → 15 days is used for matching.
[0086] In this embodiment, step S23 includes the following steps S231 and S232: Step S231, Window Expansion: After the first short-term (1-day) window matching, the time window of the unmatched accounting records is expanded to 1 day before and after its core time, for a total of 3 days.
[0087] Candidate set reconstruction: Based on the expanded time window, release all matched data within the time window and reread all accounting and payment data within the new time window (3 days).
[0088] Step S232, parameter adjustment: λ parameter adjustment: when the time window is 1 day, λ=0.5; when the time window is 3 days, λ=0.4; when the time window is 7 days, λ=0.3; when the time window is 15 days, λ=0.2.
[0089] Repeat step S22 until all data matches or the maximum extended window limit is reached, then terminate the extended matching process.
[0090] Step S24, backtracking verification and optimization. Step S24 performs quality control and optimization on the matching results obtained in steps S22 and S23: Among them, backtracking verification refers to detecting the following three non-single matching scenarios and backtracking the consistency of the amount for each transaction: (1) One-to-many matching detection The detection content was: one accounting record matched multiple payment transaction records; Key point of inspection: Whether the sum of the amounts of the matched multiple payment transaction records equals the amount of the current accounting record.
[0091] (2) Many-to-one matching detection Detection findings: Multiple transaction records matched the same payment transaction record; Key point of inspection: Whether the sum of the amounts of the matched multiple accounting records equals the amount of the payment transaction record.
[0092] (3) Cross-collision detection Detection content: Complex matching relationships exist between multiple accounting records and multiple payment transaction records; Key points of inspection: Establish a matching relationship matrix and check the consistency of the total amount in each direction; Conflict detection: Detects inconsistent data and marks it as anomalous data.
[0093] Step S25: Result Output and Anomaly Handling. Step S25 outputs the final result based on the backtracking verification and optimization of the matching / reconciliation results from step S24, and manages anomalies. Anomalies are recorded and pushed to the human-computer interaction system for manual review.
[0094] The automatic reconciliation method based on dynamic time window expansion described in Embodiment 2 of this invention performs multi-dimensional matching on the candidate matching pair set using a greedy algorithm to obtain a first matching result. Then, when there are unmatched records, the time window is dynamically expanded, and the greedy matching is re-executed on all records within the expanded time window to obtain a second matching result. This achieves fully automated reconciliation, significantly reducing manual workload, minimizing human error, and improving overall reconciliation efficiency and accuracy.
[0095] Those skilled in the art should understand that the automatic reconciliation methods of Embodiments 1 and 2 of the present invention are applicable to various financial reconciliation fields, especially multi-source data reconciliation scenarios in the consumer finance field and retail banking. In the consumer finance field, the present invention can be used to process the reconciliation between batch accounting files from Internet platforms and payment transactions from payment companies or banks. In the retail industry, the present invention can be used to process the reconciliation between sales orders from online malls and offline stores and transactions from various payment methods.
[0096]
Example 3
[0097] like Figure 3 As shown, the reconciliation system includes: a preprocessing module 310, a feature extraction module 320, a first reconciliation module 330, a second reconciliation module 340, and a backtracking verification module 350.
[0098] The preprocessing module 310 is used to acquire the original accounting documents and payment transaction documents, and to preprocess the original accounting documents and payment transaction documents to obtain preprocessed accounting data and payment transaction data.
[0099] The feature extraction module 320 is used to extract features from the preprocessed accounting data and payment transaction data and generate accounting data feature vectors and transaction data feature vectors.
[0100] The first reconciliation module 330 is used to perform the following operations: based on a short time window, extracting the first accounting-transaction candidate pairs from the accounting data feature vector and the transaction data feature vector, the first accounting-transaction candidate pairs forming a first candidate set; performing multi-dimensional matching processing on the first candidate set to obtain a first matching result, and updating the first candidate set according to the first matching result.
[0101] The second reconciliation module 340 is used to dynamically expand the time window when there are unmatched account-transaction candidate pairs in the candidate set, extract the second account-transaction candidate pairs from the account data feature vector and transaction data feature vector according to the expanded time window, form a second candidate set from the second account-transaction candidate pairs, and perform greedy matching on the second account-transaction candidate pairs in the second candidate set within the expanded time window to obtain a second matching result.
[0102] The backtracking verification module 350 is used to backtrack and verify the first matching result and / or the second matching result, obtain the optimized matching result and the abnormal record, and output them.
[0103] The automated reconciliation system described in Embodiment 3 of this invention preprocesses and extracts features from original accounting files and payment transaction files from multiple data sources, enabling it to adapt to multi-source heterogeneous data scenarios and achieve data standardization. Through multi-dimensional matching within a short time window, it quickly filters effective candidate pairs, improving reconciliation efficiency. When candidate pairs cannot be fully matched within a short time window, it efficiently solves reconciliation matching problems in complex scenarios such as date cutoffs and payment delays by dynamically expanding the time window and using greedy matching. The entire reconciliation process is automated, significantly reducing manual workload, minimizing human error, and improving overall reconciliation efficiency and accuracy. Furthermore, this invention employs a backtracking verification mechanism to verify matching results and accurately retain abnormal records, enhancing fault tolerance and supporting historical accounting backtracking and verification.
[0104] Through the above description of the embodiments, those skilled in the art can clearly understand that the present invention can be implemented by means of software combined with a hardware platform. Based on this understanding, all or part of the technical solution of the present invention that contributes to the background art can be embodied in the form of a software product. This computer software product can be stored in a storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in various embodiments or some parts of the embodiments of the present invention.
[0105] Correspondingly, embodiments of the present invention also provide a computer-readable storage medium storing computer-readable instructions or programs thereon. When executed by a processor, the computer-readable instructions or programs cause a computer to perform the following operations, which include the steps included in the automatic reconciliation method described in any of the above embodiments, and will not be repeated here. The storage medium may include, for example, an optical disc, a hard disk, a floppy disk, flash memory, magnetic tape, etc.
[0106] In addition, embodiments of the present invention also provide a computer device including a memory and a processor. The memory is used to store one or more computer-readable instructions or programs, wherein the one or more computer-readable instructions or programs, when executed by the processor, can implement the automatic reconciliation method described in any of the above embodiments. The computer device may be, for example, a server, a desktop computer, a laptop computer, a tablet computer, etc.
[0107] This invention also provides a computer program product including a computer program containing program code for executing the automatic reconciliation method shown in the flowchart. When the computer program product is run on a computer system, the program code enables the computer system to implement the automatic reconciliation method provided in the embodiments of this disclosure.
[0108] According to embodiments of this disclosure, program code for executing the computer programs provided in embodiments of this disclosure can be written in any combination of one or more programming languages. Specifically, these computational programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages include, but are not limited to, languages such as Java, C++, Python, "C", or similar programming languages. The program code can execute entirely on a user's computing device, partially on a user's device, partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0109] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention. Therefore, the scope of protection of the present invention should be determined by the claims.
Claims
1. An automatic reconciliation method of multi-source heterogeneous data, characterized in that, The account reconciliation method comprises: obtaining original account files and payment transaction files, preprocessing the original account files and payment transaction files to obtain preprocessed account data and payment transaction data; extracting features from the preprocessed account data and payment transaction data to generate account data feature vectors and transaction data feature vectors; based on a short-term time window, extracting first account-transaction candidate pairs from the account data feature vectors and the transaction data feature vectors, the first account-transaction candidate pairs forming a first candidate set; performing multi-dimensional matching processing on the first candidate set to obtain a first matching result, and updating the first candidate set according to the first matching result; when there are unmatched account-transaction candidate pairs in the first candidate set, dynamically expanding the time window, and extracting second account-transaction candidate pairs from the account data feature vectors and the transaction data feature vectors according to the expanded time window, the second account-transaction candidate pairs forming a second candidate set; performing greedy matching on the second account-transaction candidate pairs in the second candidate set within the expanded time window to obtain a second matching result; performing backtracking verification on the first matching result and / or the second matching result to obtain an optimized matching result and an exception record.
2. The reconciliation method of claim 1, wherein, The time window is dynamically expanded using a progressive expansion strategy.
3. The reconciliation method of claim 1, wherein, The preprocessing of the original account files and payment transaction files comprises: standardizing timestamps in the original account files and payment transaction files of multiple data sources; normalizing amount data in the original account files and payment transaction files and marking abnormal amount data; cleaning and standardizing text fields in the original account files and payment transaction files.
4. The reconciliation method of claim 1, wherein, The multi-dimensional matching processing on the first candidate set comprises high-confidence accurate matching processing, medium-confidence one-dimensional greedy processing, and low-confidence multi-dimensional greedy matching processing.
5. The reconciliation method of claim 4, wherein, The high-confidence accurate matching processing comprises: extracting first sub-account-transaction candidate pairs in the first candidate set that meet accurate matching conditions; calculating time proximity weights for each candidate pair in the first sub-account-transaction candidate pairs; performing matching processing on the first sub-account-transaction candidate pairs according to the time proximity weights; when a candidate pair in the first sub-account-transaction candidate pairs is successfully matched, deleting the successfully matched candidate pair from the first candidate set.
6. The reconciliation method of claim 5, wherein, The medium-confidence one-dimensional greedy processing comprises: taking the candidate pairs remaining in the first candidate set after the high-confidence accurate matching processing as second sub-account-transaction candidate pairs; calculating amount similarity, time proximity, business correlation, and identity correlation for each candidate pair in the second sub-account-transaction candidate pairs, and calculating a comprehensive matching degree for each candidate pair according to the amount similarity, time proximity, business correlation, and identity correlation; performing matching processing on the second sub-account-transaction candidate pairs according to the comprehensive matching degrees; when a candidate pair in the second sub-account-transaction candidate pairs is successfully matched, deleting the successfully matched candidate pair from the first candidate set.
7. The reconciliation method of claim 1, wherein, The backtracking verification on the first matching result and / or the second matching result comprises: identifying an abnormal matching mode in the first matching result and / or the second matching result based on historical matching data, and releasing a matched account-flow pair with low confidence which has been matched successfully.
8. A computer-readable storage medium storing computer-readable instructions, wherein, The computer readable instructions are executed by the processor to implement the account reconciliation method as claimed in any one of claims 1-7. 9.A computer device comprising a memory and a processor, The memory stores computer readable instructions, characterized in that, The processor executes the computer readable instructions to implement the account reconciliation method as claimed in any one of claims 1-7.
10. A computer program product comprising a computer program, characterised in that, The computer program, when executed by the processor, implements the account reconciliation method as claimed in any one of claims 1-7.
