Multi-source financial data intelligent classification and automatic accounting optimization processing method and system
By constructing transaction scenario maps and transaction traceability maps, the problem of integrating and classifying multi-source financial data has been solved, enabling intelligent processing and automatic accounting of corporate financial data, improving transaction identification and risk control capabilities, and optimizing financial management processes.
Patent Information
- Application Number
- CN202510852764.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-24
- Publication Date
- 2025-11-18
- Estimated Expiration
- 2045-06-24
AI Technical Summary
Existing financial processing technologies struggle to effectively integrate and consistently process financial data from different sources and in different formats, resulting in severe information silos. This makes it difficult to accurately understand the business scenarios and contextual semantics of transactions, particularly in terms of the ability to identify unconventional transactions and new business scenarios. It also makes it difficult to track the flow and source of funds, and to detect potential abnormal transactions and risk points, which is detrimental to the prevention and control of corporate financial risks and compliance management.
By receiving financial data from multiple sources and preprocessing it into text, a transaction scenario map is constructed, the correlation between transaction entities is calculated for scenario clustering, transactions are classified using a transaction classification rule set, a transaction traceability map is constructed for fund flow analysis, anomaly analysis reports are generated, and finally automatic accounting is achieved.
It improves the accuracy and efficiency of financial data processing, reduces the need for manual intervention, makes corporate financial management more intelligent, enhances financial risk control capabilities, improves the traceability and transparency of financial data, and optimizes corporate financial management processes.
Smart Images

Figure CN120689153B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of enterprise financial management technology, and in particular to a method and system for intelligent classification and automatic accounting optimization of multi-source financial data. Background Technology
[0002] As enterprises deepen their digital transformation, their financial data is becoming increasingly multi-sourced and complex. The sources of enterprise financial data are wide-ranging, including bank statements, electronic invoices, paper documents, ERP system data, and many other forms.
[0003] Traditional financial processing mainly relies on manual data entry and processing by financial personnel, which consumes a lot of human resources and time and is prone to human error. Using intelligent means to automatically classify and record corporate financial data can not only improve financial processing efficiency, but also reduce error rate, helping companies achieve intelligent and refined financial management.
[0004] However, existing financial processing technologies still have shortcomings, such as difficulty in effectively integrating and consistently processing financial data from different sources and in different formats, resulting in serious information silos, inability to accurately understand the business scenarios and contextual semantics of transactions, low classification accuracy, particularly weak ability to identify unconventional transactions and new business scenarios, and neglect of the relationships between transactions. They also fail to track the flow and source of funds, making it difficult to discover potential abnormal transactions and risk points, which is not conducive to the prevention and control of corporate financial risks and compliance management.
[0005] Therefore, a solution is urgently needed to address the problems existing in the current technology. Summary of the Invention
[0006] This invention provides a method and system for intelligent classification and automatic accounting optimization of multi-source financial data, which can at least solve some of the problems existing in the prior art.
[0007] A first aspect of this invention provides a method for intelligent classification and automatic accounting optimization of multi-source financial data, comprising:
[0008] It receives financial data from multiple sources and performs text preprocessing to obtain transaction keyword groups, structured transaction text, and bill transaction text;
[0009] A transaction scenario graph is constructed based on the semantic vector of transaction keyword groups. The structured transaction text and bill transaction text are mapped to the transaction scenario graph to calculate the correlation degree of transaction entities. The transactions are clustered according to the correlation degree of transaction entities to obtain transaction scenario clusters. The transaction scenario clusters are constrained and mapped with preset financial rules to obtain a transaction classification rule set. The transactions are classified using the transaction classification rule set to obtain regular transaction data, non-regular transaction data, and pending confirmation transaction data.
[0010] Based on the transaction classification rule set, match the regular transaction data with expense type labels, revenue and expenditure type labels, business type labels, and accounting subject codes;
[0011] A transaction traceability graph is constructed from non-routine transaction data and pending confirmation transaction data. The fund destination chain is obtained by tracing the fund flow in the forward direction in the transaction traceability graph, and the fund source chain is obtained by tracing in the reverse direction. The transaction node relationship is extracted based on the fund destination chain and the fund source chain to obtain a transaction link set. The completeness of the transaction link set is analyzed, incomplete transaction links are marked and an anomaly analysis report corresponding to the incomplete transaction links is output. Complete transaction links are marked as valid transaction data and accounting vouchers are generated.
[0012] The accounting vouchers are written into the financial accounting system to complete the automatic accounting.
[0013] In one alternative implementation,
[0014] It receives multi-source corporate financial data and performs text preprocessing to obtain transaction keyword phrases, structured transaction texts, and bill transaction texts, including:
[0015] Acquire multi-source corporate financial data, including corporate bank statement data, invoice data, contract data, and image invoice data;
[0016] The enterprise's bank transaction data is segmented and labeled with parts of speech to obtain transaction keyword groups;
[0017] The invoice data and contract data are parsed and format converted according to preset text structure rules to obtain structured transaction text;
[0018] Optical character recognition and layout analysis are performed on the image ticket data to extract text information from key areas of the ticket and obtain the ticket transaction text.
[0019] In one alternative implementation,
[0020] A transaction scenario graph is constructed based on the semantic vectors of transaction keyword groups. Structured transaction texts and bill transaction texts are mapped to the transaction scenario graph to calculate the correlation degree of transaction entities. Based on the correlation degree, transactions are clustered into scenario clusters. These scenario clusters are then constrained and mapped with preset financial rules to obtain a transaction classification rule set. The transaction classification rule set is used to classify transactions into regular transaction data, non-regular transaction data, and pending confirmation transaction data, including:
[0021] The transaction keyword group is semantically vectorized to obtain word vector representations. The correlation between the word vector representations is calculated to obtain a semantic correlation matrix. A transaction scenario graph is constructed based on the correlation values in the semantic correlation matrix that are greater than a preset threshold. The edge weights between nodes in the transaction scenario graph are the corresponding correlation values.
[0022] Transaction entities are extracted from structured transaction text and bill transaction text as mapping nodes. The association strength between the mapping nodes and nodes in the transaction scenario graph is calculated. The association strength is composed of a weighted combination of semantic similarity, co-occurrence frequency and positional relevance. A transaction entity association matrix is constructed based on the association strength.
[0023] The transaction entity association matrix is decomposed to obtain a feature matrix, and the feature matrix is clustered to obtain transaction scenario clusters, which represent the feature distribution of different types of transactions.
[0024] The transaction scenario clusters are matched with preset financial rules to obtain rule mapping relationships. The rule mapping relationships are scored and filtered to construct a transaction classification rule set. The transaction score is calculated based on the transaction classification rule set. Based on the transaction score and a preset score threshold, the transactions are divided into regular transactions, non-regular transactions, and pending confirmation transactions.
[0025] In one alternative implementation,
[0026] The transaction scenario clusters are matched with preset financial rules to obtain rule mapping relationships. These rule mapping relationships are then scored and filtered to construct a transaction classification rule set. Transaction scores are calculated based on this set of rules, including:
[0027] Project the feature vectors of the transaction scenario clusters and the feature vectors of the preset financial rules onto the same feature space. Calculate the dot product between the feature vectors of the transaction scenario clusters and the feature vectors of the financial rules and divide it by the vector magnitude product to obtain the feature vector similarity. Based on the scenario clusters and financial rule pairs whose feature vector similarity is greater than the first preset threshold, construct the initial rule mapping relationship.
[0028] Extract the fund receipt and payment information of transaction entities in the initial rule mapping relationship, take the transaction entity as a node, take the fund receipt and payment relationship as a directed edge, assign weights to the directed edge according to the direction of fund flow and the amount of fund flow to construct a fund flow dependency graph, and calculate the correlation strength of transaction events according to the time interval, co-occurrence frequency and amount correlation of transaction entities.
[0029] The basic score of rule mapping is calculated by using the initial rule mapping relationship and the rule coverage ratio. Implicit transaction patterns are determined and derivative rules are generated based on the fund flow dependency graph and the correlation strength of transaction events. The initial rule mapping relationship and the derivative rules are merged to obtain the enhanced rule mapping relationship. The causal influence strength is obtained by weighting the influence strength and reliability of the causal transmission path.
[0030] The rule mapping base score and the causal influence intensity are weighted and fused according to preset weight coefficients to obtain the rule mapping relationship score. The link integrity is obtained by calculating the ratio of the number of effective nodes to the total number of nodes in the enhanced rule mapping relationship. A transaction classification rule set is constructed based on the rule mapping relationship score that is greater than the second preset threshold and the link integrity is greater than the third preset threshold.
[0031] Calculate the matching degree between the transaction to be classified and each rule in the transaction classification rule set, and then sum the matching degree with the rule weight to obtain the transaction score.
[0032] In one alternative implementation,
[0033] Based on the transaction classification rule set, regular transaction data is matched with expense type tags, revenue and expenditure type tags, business type tags, and accounting subject codes, including:
[0034] Receive regular transaction data, calculate the matching degree between the regular transaction data and each rule in the rule set according to the transaction classification rule set, and select the rule with the highest matching degree as the target rule;
[0035] Extract the expense type label, revenue and expenditure type label, business type label, and accounting subject code from the target rules;
[0036] Establish a correlation between the expense type label, the income and expenditure type label, the business type label, and the accounting subject code and the regular transaction data.
[0037] In one alternative implementation,
[0038] A transaction traceability graph is constructed from non-routine transaction data and pending transaction data. The flow of funds is traced forward along the fund flow path to obtain the fund destination chain, and backward to obtain the fund source chain. Based on the fund destination and source chains, the relationships between transaction nodes are extracted to obtain a transaction link set. The completeness of the transaction link set is analyzed, incomplete transaction links are marked, and an anomaly analysis report corresponding to the incomplete transaction links is output. Complete transaction links are marked as valid transaction data, and accounting vouchers are generated, including:
[0039] The transaction entities in the non-routine transaction data and the unconfirmed transaction data are used as nodes, and the fund transfer relationships are used as directed edges to construct a transaction traceability graph. The edge weights between the nodes are calculated based on the transaction amount, transaction frequency, and time relevance.
[0040] The starting node is extracted from the transaction traceability graph. The path with the maximum edge weight is selected by the depth-first search algorithm and the funds are traced forward along the direction of the funds to obtain the fund destination chain. The ending node is extracted and traced in reverse to obtain the fund source chain. The transaction node relationship is extracted based on the fund destination chain and the fund source chain to obtain the transaction link set.
[0041] Nodes with complete fund transfer relationships in the statistical transaction chain are considered valid nodes. The ratio of the number of valid nodes to the total number of nodes is used to obtain a node integrity score. The difference between fund inflows and outflows and the maximum amount of inflows and outflows are used to obtain an amount consistency score. The transaction time interval is used to obtain a time sequence rationality score.
[0042] A comprehensive transaction link score is obtained by weighting the node integrity score, amount consistency score, and timing reasonableness score. Transaction links with a comprehensive transaction link score less than a preset threshold are marked as incomplete transaction links. The location of the broken link, the amount difference, and the timing anomaly are extracted to generate an anomaly analysis report.
[0043] Transaction links with a comprehensive score greater than the preset threshold are marked as valid transaction data. The transaction entity information, transaction amount, transaction time and business type are extracted, the debit and credit accounts are determined and accounting vouchers are generated.
[0044] In one alternative implementation,
[0045] The starting node is extracted from the transaction traceability graph. A depth-first search algorithm is used to select the path with the maximum edge weight and trace the fund flow forward to obtain the fund destination chain. The ending node is extracted and traced in reverse to obtain the fund source chain. Based on the fund destination chain and the fund source chain, the transaction node relationships are extracted to obtain the transaction chain set, including:
[0046] The time dimension features are obtained by extracting the adjacent transaction time interval, transaction frequency features, and time sequence pattern features of the transaction node. The spatial dimension features are obtained by calculating the node degree, centrality, and clustering coefficient of the transaction node. The spatiotemporal coupling features are obtained by performing tensor outer product operation on the time dimension features and spatial dimension features.
[0047] The edge weights of the transaction traceability graph are updated based on the spatiotemporal coupling characteristics. The time decay value is obtained by calculating the exponential decay product of the transaction time difference and the initial time. The spatial correlation is obtained by calculating the ratio of the number of common neighbors among transaction nodes to the total number of neighbors. The maximum edge weight is obtained by weighting the time decay value and the spatial correlation.
[0048] The starting node is extracted from the transaction traceability graph. The path is expanded using a depth-first search algorithm and the maximum edge weight. A dynamic threshold is determined based on the path length and node degree, and low-weight paths are filtered out. The fund destination chain is obtained by tracing forward along the fund flow direction. The ending node is extracted and traced in reverse to obtain the fund source chain.
[0049] The edge weights corresponding to the newly added transaction data are merged and updated with the fund destination chain and fund source chain. The transaction node relationship is obtained by analyzing the transfer direction, transfer amount and transfer time between adjacent nodes in the fund destination chain and fund source chain. The fund destination chain and fund source chain containing the same transaction node relationship are combined to form a transaction link set.
[0050] A second aspect of this invention provides a multi-source financial data intelligent classification and automatic accounting optimization processing system, comprising:
[0051] The first unit is used to receive financial data from multiple sources of enterprises and perform textual preprocessing to obtain transaction keyword groups, structured transaction text, and bill transaction text;
[0052] The second unit is used to construct a transaction scenario graph based on the semantic vector of transaction keyword groups. It maps structured transaction text and bill transaction text to the transaction scenario graph, calculates the correlation degree of transaction entities, clusters transactions according to the correlation degree of transaction entities to obtain transaction scenario clusters, and maps the transaction scenario clusters with preset financial rules to obtain a transaction classification rule set. It uses the transaction classification rule set to classify transactions to obtain regular transaction data, non-regular transaction data, and pending confirmation transaction data.
[0053] The third unit is used to match expense type labels, income and expenditure type labels, business type labels, and accounting subject codes to regular transaction data according to the transaction classification rule set;
[0054] The fourth unit is used to construct a transaction traceability graph from non-routine transaction data and unconfirmed transaction data. In the transaction traceability graph, the fund destination chain is obtained by tracing the fund flow in the forward direction and the fund source chain is obtained by tracing in the reverse direction. The transaction node relationship is extracted based on the fund destination chain and the fund source chain to obtain a transaction link set. The integrity of the transaction link set is analyzed, incomplete transaction links are marked and the corresponding anomaly analysis report is output. Complete transaction links are marked as valid transaction data and accounting vouchers are generated.
[0055] The fifth unit is used to write the accounting vouchers into the financial accounting system to complete automatic accounting.
[0056] A third aspect of the present invention provides an electronic device, comprising:
[0057] A processor and a memory for storing processor-executable instructions, wherein the processor is configured to invoke instructions stored in the memory to perform the aforementioned method.
[0058] A fourth aspect of the present invention provides a computer-readable storage medium having stored thereon computer program instructions that, when executed by a processor, implement the aforementioned method.
[0059] This invention achieves intelligent classification of multi-source financial data of enterprises by constructing a transaction scenario graph, improving the accuracy and efficiency of financial data processing, effectively reducing the need for manual intervention, and making enterprise financial management more intelligent. By using transaction traceability graph technology to analyze the flow of funds for non-routine transactions and pending confirmation transactions, it can automatically identify abnormal transactions and generate analysis reports, enhancing the enterprise's financial risk control capabilities and improving the traceability and transparency of financial data. By automatically matching expense types, income and expenditure types, business types and accounting subject codes, and automatically generating accounting vouchers for valid transactions and writing them into the financial accounting system, it realizes an end-to-end automated accounting process, improves the efficiency of enterprise financial processing, reduces human error, and optimizes the enterprise's financial management process. Attached Figure Description
[0060] Figure 1 This is a flowchart illustrating the intelligent classification and automatic accounting optimization method for multi-source financial data according to an embodiment of the present invention.
[0061] Figure 2 This is a graph showing the accuracy and distribution trend of transaction classification corresponding to an embodiment of the present invention.
[0062] Figure 3 This is a flowchart illustrating the feature matching and transaction classification rule set construction process corresponding to the multi-source financial data intelligent classification and automatic accounting optimization processing method in this embodiment of the invention.
[0063] Figure 4 This is a simulation diagram of dynamic threshold filtering and fund flow tracking for the transaction link corresponding to an embodiment of the present invention. Detailed Implementation
[0064] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0065] The technical solution of the present invention will be described in detail below with reference to specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments.
[0066] Figure 1 This is a flowchart illustrating the multi-source financial data intelligent classification and automatic accounting optimization processing method according to an embodiment of the present invention, as shown below. Figure 1 As shown, the method includes:
[0067] It receives financial data from multiple sources and performs text preprocessing to obtain transaction keyword groups, structured transaction text, and bill transaction text;
[0068] A transaction scenario graph is constructed based on the semantic vector of transaction keyword groups. The structured transaction text and bill transaction text are mapped to the transaction scenario graph to calculate the correlation degree of transaction entities. The transactions are clustered according to the correlation degree of transaction entities to obtain transaction scenario clusters. The transaction scenario clusters are constrained and mapped with preset financial rules to obtain a transaction classification rule set. The transactions are classified using the transaction classification rule set to obtain regular transaction data, non-regular transaction data, and pending confirmation transaction data.
[0069] Based on the transaction classification rule set, match the regular transaction data with expense type labels, revenue and expenditure type labels, business type labels, and accounting subject codes;
[0070] A transaction traceability graph is constructed from non-routine transaction data and pending confirmation transaction data. The fund destination chain is obtained by tracing the fund flow in the forward direction in the transaction traceability graph, and the fund source chain is obtained by tracing in the reverse direction. The transaction node relationship is extracted based on the fund destination chain and the fund source chain to obtain a transaction link set. The completeness of the transaction link set is analyzed, incomplete transaction links are marked and an anomaly analysis report corresponding to the incomplete transaction links is output. Complete transaction links are marked as valid transaction data and accounting vouchers are generated.
[0071] The accounting vouchers are written into the financial accounting system to complete the automatic accounting.
[0072] In one alternative implementation,
[0073] It receives multi-source corporate financial data and performs text preprocessing to obtain transaction keyword phrases, structured transaction texts, and bill transaction texts, including:
[0074] Acquire multi-source corporate financial data, including corporate bank statement data, invoice data, contract data, and image invoice data;
[0075] The enterprise's bank transaction data is segmented and labeled with parts of speech to obtain transaction keyword groups;
[0076] The invoice data and contract data are parsed and format converted according to preset text structure rules to obtain structured transaction text;
[0077] Optical character recognition and layout analysis are performed on the image ticket data to extract text information from key areas of the ticket and obtain the ticket transaction text.
[0078] This involves acquiring multi-source corporate financial data, including bank statement data, invoice data, contract data, and image document data. Corporate bank statement data typically includes information such as transaction date, transaction amount, counterparty, and transaction summary, and can be obtained from the company's online banking system or bank statements. For example, a typical bank statement might read: "May 10, 2023, expenditure of 50,000 yuan for goods from XX Trading Co., Ltd." Invoice data includes information such as invoice code, invoice number, invoice date, buyer's name, seller's name, product name, specifications, unit price, quantity, and amount, and can be obtained from the company's invoice management system or electronic invoice data. Contract data includes information such as contract number, signing date, parties to the contract, contract amount, and contract subject matter, and can be obtained from the company's contract management system. Image document data includes scanned copies or photos of various paper documents, such as paper invoices, receipts, and expense reports, and can be obtained through a scanner or by taking photos with a mobile phone.
[0079] The transaction summary field in bank statement data is preprocessed, including removing special characters and standardizing numbers. Then, a word segmentation tool is used to segment the preprocessed transaction summary, dividing continuous text into meaningful word units. For example, for the transaction summary "Pay for office supplies in May", the segmentation result might be "Pay / May / Office Supplies / Purchase Amount". After segmentation, each word is tagged with part-of-speech tags to identify different types of words such as nouns, verbs, and adjectives. In this embodiment, the segmentation result is processed using a part-of-speech tagging tool, resulting in a tagging result such as "Pay / v May / t Office Supplies / n Purchase Amount / n", where v represents a verb, t represents a time word, and n represents a noun. Based on the part-of-speech tagging results, the nouns and verbs are extracted as transaction keyword groups. For example, "payment", "office supplies", and "purchase amount" are extracted from the above example as transaction keyword groups. For large amounts of bank statement data, a dictionary of common transaction keywords can be established, including "payment for goods", "service fee", "salary", and "tax", to assist in the keyword extraction process.
[0080] For invoice data, the XML or JSON format of electronic invoices is parsed to extract key field information, including basic invoice information (invoice code, invoice number, invoice date), transaction party information (buyer's name, seller's name, buyer's tax ID, seller's tax ID), product information (product name, specifications, unit price, quantity, amount), and tax information (tax rate, tax amount). For example, the information extracted from an electronic invoice might include "Invoice code: 1234567890, Invoice number: 12345678, Invoice date: 2023-05-15, Buyer: XX Technology Co., Ltd., Seller: XX Electronics Co., Ltd., Product name: Laptop computer, Specifications: A2023, Unit price: 5000 yuan, Quantity: 10, Amount: 50000 yuan, Tax rate: 13%, Tax amount: 6500 yuan". For contract data, extract key fields such as basic contract information (contract number, signing date), information of both parties (name of Party A, name of Party B), and contract content information (contract subject matter, contract amount, performance period). For example, information extracted from a contract might include: "Contract Number: HT-20230520, Signing Date: 2023-05-20, Party A: XX Technology Co., Ltd., Party B: XX Supply Chain Co., Ltd., Contract Subject Matter: Procurement of Office Equipment, Contract Amount: 200,000 RMB, Performance Period: 2023-06-01 to 2023-06-30". Based on preset text structure rules, convert the extracted field information into a structured text description. For example, invoice data can be converted into: "XX Technology Co., Ltd. purchased 10 laptops of model A2023 from XX Electronics Co., Ltd. on 2023-05-15, at a unit price of 5,000 RMB, for a total amount of 50,000 RMB, with a tax payment of 6,500 RMB." Convert the contract data to: "XX Technology Co., Ltd. (Party A) and XX Supply Chain Co., Ltd. (Party B) signed an office equipment purchase contract with contract number HT-20230520 on May 20, 2023. The contract amount is RMB 200,000 and the performance period is from June 1, 2023 to June 30, 2023."
[0081] For image-based invoice data, image preprocessing is performed, including grayscale conversion, binarization, tilt correction, and noise reduction, to improve the accuracy of subsequent recognition. For example, for a tilted invoice scan, the tilt angle is determined by detecting straight lines in the image, and rotation correction is performed to align the text horizontally. Optical character recognition (OCR) technology is used to recognize the text in the preprocessed image, converting the text into editable text information. In this embodiment, specialized OCR models are used for different types of invoices (such as VAT invoices, ordinary invoices, receipts, etc.) to improve recognition accuracy. For example, for a scanned VAT invoice, OCR technology identifies text containing information such as the invoice number, amount, and date. Layout analysis is performed to identify the structure and layout of the invoice, locating key information areas such as the header area, product details area, amount area, and signature area. For example, for a VAT invoice, layout analysis can determine that the invoice code and invoice number are usually located in the upper right corner, the buyer and seller information is located in the upper center, the product details are located in the middle, and the amount and tax information are located at the bottom. Based on the layout analysis, key information is extracted from the relevant areas, such as invoice number, invoice date, names of the buyer and seller, product name, and amount. For example, information extracted from a scanned copy of a VAT invoice might include: "Invoice code: 0123456789, Invoice number: 01234567, Invoice date: 2023-05-25, Buyer: XX Trading Co., Ltd., Seller: XX Manufacturing Co., Ltd., Product name: Raw materials, Amount: 30,000 yuan, Tax: 3,900 yuan." This extracted key information is then integrated into a structured invoice transaction text, such as: "XX Trading Co., Ltd. purchased raw materials from XX Manufacturing Co., Ltd. on 2023-05-25, paying 30,000 yuan, with a tax of 3,900 yuan, and invoice number 01234567."
[0082] In this embodiment, by acquiring multi-source corporate financial data, including corporate bank statement data, invoice data, contract data, and image invoice data, comprehensive collection of corporate financial information is achieved, providing a complete data foundation for subsequent analysis. Word segmentation and part-of-speech tagging of corporate bank statement data yield transaction keyword groups, transforming unstructured statement data into analyzable structured information, facilitating subsequent transaction feature extraction. Invoice and contract data are parsed and format-converted according to preset text structure rules to obtain structured transaction text, achieving unified processing of data in different formats and improving data processing efficiency. Optical character recognition and layout analysis of image invoice data extract text information from key areas of the invoice to obtain the invoice transaction text, solving the problem of the difficulty in directly analyzing invoice image data and expanding the scope of analyzable data.
[0083] In one alternative implementation,
[0084] A transaction scenario graph is constructed based on the semantic vectors of transaction keyword groups. Structured transaction texts and bill transaction texts are mapped to the transaction scenario graph to calculate the correlation degree of transaction entities. Based on the correlation degree, transactions are clustered into scenario clusters. These scenario clusters are then constrained and mapped with preset financial rules to obtain a transaction classification rule set. The transaction classification rule set is used to classify transactions into regular transaction data, non-regular transaction data, and pending confirmation transaction data, including:
[0085] The transaction keyword group is semantically vectorized to obtain word vector representations. The correlation between the word vector representations is calculated to obtain a semantic correlation matrix. A transaction scenario graph is constructed based on the correlation values in the semantic correlation matrix that are greater than a preset threshold. The edge weights between nodes in the transaction scenario graph are the corresponding correlation values.
[0086] Transaction entities are extracted from structured transaction text and bill transaction text as mapping nodes. The association strength between the mapping nodes and nodes in the transaction scenario graph is calculated. The association strength is composed of a weighted combination of semantic similarity, co-occurrence frequency and positional relevance. A transaction entity association matrix is constructed based on the association strength.
[0087] The transaction entity association matrix is decomposed to obtain a feature matrix, and the feature matrix is clustered to obtain transaction scenario clusters, which represent the feature distribution of different types of transactions.
[0088] The transaction scenario clusters are matched with preset financial rules to obtain rule mapping relationships. The rule mapping relationships are scored and filtered to construct a transaction classification rule set. The transaction score is calculated based on the transaction classification rule set. Based on the transaction score and a preset score threshold, the transactions are divided into regular transactions, non-regular transactions, and pending confirmation transactions.
[0089] Keyword groups related to transactions, such as "payment," "transfer," "purchase," "investment," and "reimbursement," are extracted from the transaction database. These keyword groups are then vectorized using a pre-trained language model, with each keyword mapped to a 300-dimensional vector. For example, the word vector for "electronic payment" can be represented as [0.123, 0.456, ..., 0.789], and the word vector for "funds transfer" can be represented as [0.234, 0.567, ..., 0.890].
[0090] For any two keyword phrases, the semantic relevance is measured by calculating the cosine similarity. For example, the cosine similarity between "electronic payment" and "funds transfer" is 0.82, indicating that these two concepts are highly related semantically. The similarity calculation results between all pairs of keyword phrases are used to construct an n×n semantic relevance matrix, where n is the total number of keyword phrases.
[0091] A transaction scenario graph is constructed based on the association values in the semantic association matrix that exceed a preset threshold. A similarity threshold of 0.7 is set, and keyword groups with similarity greater than 0.7 are connected to form edges in the graph. The weight of each edge represents its similarity value. For example, the edge weight between "electronic payment" and "fund transfer" is 0.82, and the edge weight between "investment and wealth management" and "fund purchase" is 0.85. This constructs a transaction scenario graph where nodes are keyword groups, edges between nodes represent semantic associations, and edge weights represent the strength of the association.
[0092] The transaction entities are extracted as mapping nodes from structured transaction texts and invoice transaction texts. A structured transaction text might be, "User A paid Supplier B 10,000 yuan via e-banking on May 10, 2023," while an invoice transaction text might be, "Invoice number E12345, amount 8,500 yuan, project: office equipment purchase." The transaction entities such as "User A," "Supplier B," "e-banking," "payment," "invoice E12345," and "office equipment" are extracted from these texts as mapping nodes.
[0093] The association strength between the mapped node and nodes in the transaction scenario graph is calculated. Association strength consists of three parts: semantic similarity, co-occurrence frequency, and positional relevance. Semantic similarity is obtained by calculating the cosine similarity of the word vectors of the transaction entity and the graph node; co-occurrence frequency is the number of times the transaction entity and the graph node appear simultaneously in historical transaction data; positional relevance considers the relationship between the transaction entity's position in the text and the graph node. For example, the semantic similarity between "electronic banking" and "electronic payment" is 0.75, the co-occurrence frequency is 120 times, and the positional relevance is 0.68; the weighted combination of these three factors results in an association strength of 0.72.
[0094] The association strengths between all transaction entities and graph nodes are organized into an association matrix. The rows of the matrix represent transaction entities, the columns represent graph nodes, and the matrix elements are the corresponding association strength values. For example, in a 5×10 association matrix, the value 0.72 in the 1st row and 3rd column indicates that the association strength between the 1st transaction entity and the 3rd graph node is 0.72.
[0095] The association matrix of transaction entities is decomposed to obtain the feature matrix. Matrix factorization is used to decompose the association matrix into the product of two low-dimensional matrices, one of which represents the representation of the transaction entity in the latent semantic space, i.e., the feature matrix. For example, a 5×10 association matrix can be decomposed into two matrices, 5×3 and 3×10. The 5×3 matrix is the feature matrix, representing the distribution of each transaction entity across the three latent semantic dimensions.
[0096] Clustering algorithms are used to analyze the feature matrix, grouping similar transaction entities together to form different transaction scenario clusters. For example, clustering results based on the feature matrix may yield transaction scenario clusters such as "daily operating expenses," "procurement transactions," "investment and financial management," and "abnormal payments," with each cluster containing transaction entities with similar semantics.
[0097] The transaction scenario clusters are matched with preset financial rules to obtain rule mapping relationships. For example, the preset financial rules include "normal purchase transaction amount does not exceed 120% of the budget", "reimbursement documents must have corresponding invoices", and "investment transactions must go through an approval process". Financial rules can be selected from rule templates or added by users. The features of each transaction scenario cluster are matched with the rules, and the matching degree is calculated. For example, the matching degree between the "purchase transaction" cluster and the rule "normal purchase transaction amount does not exceed 120% of the budget" is 0.88.
[0098] The rule mapping relationships are scored and filtered to construct a transaction classification rule set. A matching degree threshold of 0.8 is set, and rule mapping relationships with a matching degree greater than 0.8 are filtered out to form the transaction classification rule set. For example, the rules corresponding to the "procurement transaction" cluster include "the normal procurement transaction amount shall not exceed 120% of the budget" and "procurement must have supplier qualification review records," etc.
[0099] For each transaction, a rule compliance score is calculated based on its transaction scenario cluster and corresponding rule set. For example, a procurement transaction with an amount of 115% of the budget and supplier qualification verification records has a rule compliance score of 0.85. A score threshold of [0.8, 0.6] is set, meaning a score greater than 0.8 is considered a regular transaction, a score between 0.6 and 0.8 is considered a pending confirmation transaction, and a score less than 0.6 is considered an irregular transaction. Ultimately, this procurement transaction is classified as a regular transaction.
[0100] Figure 2 The graph shows the transaction classification accuracy and distribution trend corresponding to the embodiments of the present invention, illustrating the trend of classification accuracy changes of the transaction classification system based on semantic vectorization and rule matching during a six-month operation period;
[0101] Initial data shows that the accuracy rate for classifying regular transactions started at 92.5% and steadily improved to 96.2% after six months of continuous optimization and learning. The accuracy rate for classifying unconfirmed transactions showed a significant increase, from 75.3% to 85.6%, and the accuracy rate for identifying irregular transactions also increased from 80.1% to 89.5%. This indicates that the system's ability to identify abnormal transaction patterns is continuously improving, with the average classification accuracy rate steadily increasing from the initial 86.3% to 93.1%, fully demonstrating the effectiveness of the transaction classification method based on semantic vectorization and rule matching.
[0102] With continuous learning and optimization of the system, and the ongoing improvement of the transaction scenario map, the system performance is expected to continue its upward trend.
[0103] In this embodiment, by semantically vectorizing transaction keyword groups and constructing a semantic association matrix, the automatic construction of a transaction scenario map is achieved, effectively capturing the semantic relationships between transaction terms. Transaction entities are extracted from structured transaction text and bill transaction text, and the association strength is calculated. Multi-dimensional indicators such as semantic similarity, co-occurrence frequency, and positional relevance are used to ensure the accuracy of transaction entity mapping. The transaction entity association matrix is decomposed and clustered to obtain transaction scenario clusters, enabling automatic identification and classification of different types of transaction features and improving the representation capability of transaction scenarios. A transaction classification rule set is constructed through scoring and filtering of rule mapping relationships, and automatic classification of transactions is achieved based on transaction scores, providing a quantitative basis for identifying regular transactions, non-regular transactions, and transactions awaiting confirmation.
[0104] In one alternative implementation,
[0105] The transaction scenario clusters are matched with preset financial rules to obtain rule mapping relationships. These rule mapping relationships are then scored and filtered to construct a transaction classification rule set. Transaction scores are calculated based on this set of rules, including:
[0106] Project the feature vectors of the transaction scenario clusters and the feature vectors of the preset financial rules onto the same feature space. Calculate the dot product between the feature vectors of the transaction scenario clusters and the feature vectors of the financial rules and divide it by the vector magnitude product to obtain the feature vector similarity. Based on the scenario clusters and financial rule pairs whose feature vector similarity is greater than the first preset threshold, construct the initial rule mapping relationship.
[0107] Extract the fund receipt and payment information of transaction entities in the initial rule mapping relationship, take the transaction entity as a node, take the fund receipt and payment relationship as a directed edge, assign weights to the directed edge according to the direction of fund flow and the amount of fund flow to construct a fund flow dependency graph, and calculate the correlation strength of transaction events according to the time interval, co-occurrence frequency and amount correlation of transaction entities.
[0108] The basic score of rule mapping is calculated by using the initial rule mapping relationship and the rule coverage ratio. Implicit transaction patterns are determined and derivative rules are generated based on the fund flow dependency graph and the correlation strength of transaction events. The initial rule mapping relationship and the derivative rules are merged to obtain the enhanced rule mapping relationship. The causal influence strength is obtained by weighting the influence strength and reliability of the causal transmission path.
[0109] The rule mapping base score and the causal influence intensity are weighted and fused according to preset weight coefficients to obtain the rule mapping relationship score. The link integrity is obtained by calculating the ratio of the number of effective nodes to the total number of nodes in the enhanced rule mapping relationship. A transaction classification rule set is constructed based on the rule mapping relationship score that is greater than the second preset threshold and the link integrity is greater than the third preset threshold.
[0110] Calculate the matching degree between the transaction to be classified and each rule in the transaction classification rule set, and then sum the matching degree with the rule weight to obtain the transaction score.
[0111] The feature vectors of transaction scenario clusters and the feature vectors of pre-defined financial rules are projected into the same feature space to ensure that the two types of vectors are comparable on the same dimension. The original data is preprocessed, including data cleaning, normalization, and dimensionality reduction, to eliminate noise and redundant information. Principal component analysis or tensor decomposition is used during the projection process to compress high-dimensional features into lower-dimensional vector representations. In the feature space, the similarity between each pair of transaction scenario clusters and financial rules is calculated by dividing the dot product of the two vectors by the product of their respective vector magnitudes. A perfect positive correlation results in a similarity of one, a perfect negative correlation results in a similarity of -1, and orthogonal vectors have a similarity of zero. Scenario clusters and financial rule pairs with similarity greater than a first pre-defined threshold are selected to establish an initial rule mapping relationship. The threshold setting needs to balance accuracy and coverage; too high a threshold will lead to insufficient rule coverage, while too low a threshold may introduce irrelevant rule mappings.
[0112] For example, taking inter-enterprise procurement and payment transactions as an example, a large amount of inter-enterprise procurement transaction data was collected, forming multiple transaction scenario clusters, such as "regular procurement payment," "prepayment procurement," and "installment payment procurement." The original features of the scenario clusters include dozens of dimensions such as transaction amount distribution, transaction frequency, participating entity types, and payment conditions. The financial system pre-sets various financial rule feature vectors, such as "standard procurement process," "prepayment process," and "installment payment process." Through feature engineering, the original features were reduced to twenty core dimensions, ensuring that the scenario cluster features and rule features are comparable in the same space. After calculation, it was found that the similarity between "regular procurement payment" and "standard procurement process" was 0.85, and the similarity between "prepayment procurement" and "prepayment process" was 0.92, both higher than the preset threshold of 0.7, thus establishing the corresponding initial mapping relationship. However, the similarity between "regular procurement payment" and "prepayment process" was only 0.45, lower than the threshold, and no mapping relationship was formed.
[0113] This process constructs a dependency graph of fund flows and calculates the strength of transaction associations. It extracts fund payment and receipt information of transaction entities from the initial rule mapping relationship, designating these entities as nodes in the graph and fund payment and receipt relationships as directed edges. Weights are assigned to the edges based on the direction and amount of fund flow. A detailed analysis of core elements in transaction records, such as payers, payees, transaction amounts, and transaction times, is conducted to identify the main paths and patterns of fund flows. When constructing the dependency graph, special cases such as duplicate and abnormal transactions are handled to ensure the graph structure accurately reflects actual fund flow relationships. The temporal relationships between transaction entities are analyzed, and time intervals between entities are calculated to examine whether there are fixed temporal patterns in transactions, such as payment terms between upstream and downstream enterprises. The frequency of co-occurrence of transaction entities is statistically analyzed; frequently co-occurring entities may have stable business relationships. The degree of correlation in amounts is analyzed, including proportional relationships, fluctuation ranges, and correlations. These factors are then used to calculate the strength of association between transaction events.
[0114] For example, detailed fund receipt and payment information was extracted from the initial mapping relationship between "routine procurement payment" and "standard procurement process". It was found that purchasing company A paid an average of 1 million yuan to supplier company B, which in turn paid an average of 600,000 yuan to raw material supplier company C and an average of 200,000 yuan to auxiliary material supplier company D, forming a complete fund flow chain and creating a dependency graph with four nodes. Three directed edges represent fund flows from A to B, B to C, and B to D, respectively, with edge weights set to 1.0, 0.6, and 0.2 based on the amount. Analysis of the timing patterns of these inter-company transactions revealed that company B paid company C on average within 3.2 days after receiving payment from company A and paid company D within 5.7 days, exhibiting a clear time-series dependency. Statistics show that these four companies appeared together in relevant transaction records 42 times in the past year, far exceeding the industry average. The monetary correlation analysis shows that the amount paid by company B to company C is typically 58% to 63% of the amount paid by company A to company B, and the amount paid by company B to company D is typically 18% to 22% of the amount paid by company A to company B. This stable monetary ratio indicates a fixed supply chain allocation pattern among them. Considering the time interval, co-occurrence frequency, and monetary correlation, the calculated transaction correlation strength is 0.88 between A and B, 0.85 between B and C, and 0.79 between B and D.
[0115] The process involves calculating rule mapping scores and generating derived rules. Based on the initial rule mapping relationship and the rule's coverage ratio of transaction data, a basic score for the rule mapping is calculated. The coverage ratio refers to the proportion of transaction samples that a rule can explain out of the total sample, reflecting the rule's applicability. The basic score calculation comprehensively considers similarity and coverage ratio, using a harmonic average method for fusion. Utilizing the constructed fund flow dependency graph and the correlation strength of transaction events, transaction patterns hidden in the transaction data but not covered by the initial rules are identified, and derived rules are generated accordingly. During the derived rule generation process, complex relationship patterns such as indirect associations, circular dependencies, and multi-path transmission between nodes are analyzed to uncover potential transaction chains and fund cycles. The initial rule mapping relationship is merged with these derived rules to form an enhanced version of the rule mapping relationship. The enhanced rule mapping can more comprehensively describe the business logic and financial patterns behind transaction behavior. The causal transmission paths between transaction entities are analyzed, and the influence strength and reliability of each path are evaluated. Influence strength is obtained through the product of the correlation strength of each node on the path or other nonlinear combinations, while reliability considers factors such as path stability and anomaly rate. The overall causal impact strength is calculated using a weighted approach, and the weight allocation needs to be determined comprehensively based on the importance of the business and the degree of risk.
[0116] For example, based on the initial rule mapping relationship between "regular procurement payment" and "standard procurement process," it was calculated that it covers 78% of all relevant transaction samples. Combined with the previously calculated similarity of 0.85, the weighted harmonic average yields a basic rule mapping score of 0.82. In-depth analysis of the fund flow dependency graph reveals several important implicit patterns: when company A pays company B, company B will pay a certain percentage to companies C and D within a week; company C often pays approximately 40% of the amount to company E within 10 days of receiving payment from company B; in some cases, company D will pay company F, forming a branch path. These implicit patterns form three derived rules: "supply chain transmission payment," "secondary supplier association," and "auxiliary material supply branch." Combining the initial and derived rules results in an enhanced rule mapping relationship encompassing six transaction entities and five main fund flow paths. Analysis of the causal transmission path reveals that company A's payment behavior has a strong influence on company B's payment decision (influence strength 0.91), while company B's payment directly affects the financial situation of companies C and D (influence strengths 0.87 and 0.82, respectively). Company C's influence strength on company E is 0.75, and company D's influence strength on company F is 0.62. The reliability of each path, assessed based on historical transaction stability, is 0.92, 0.88, 0.83, 0.76, and 0.68, respectively. By weighting the influence strength and reliability in a 6:4 ratio, the causal influence strength of the A→B→C path is 0.86, the A→B→D path is 0.83, the A→B→C→E path is 0.77, and the A→B→D→F path is 0.69, resulting in an overall causal influence strength of 0.80.
[0117] The basic score of the rule mapping and the strength of causal influence are weighted and fused according to pre-set weighting coefficients to obtain a comprehensive score for each rule mapping relationship. The weighting process needs to be flexibly adjusted according to the emphasis of different business scenarios. Emphasizing the basic score emphasizes the matching degree between the rule and historical data, while emphasizing the strength of causal influence focuses more on the completeness and coherence of the transaction chain. The ratio of effective nodes to total nodes in the enhanced rule mapping relationship is calculated as the link integrity index. Effective nodes are nodes with clear input or output connections in the transaction network, while isolated nodes or nodes with only weak connections are considered invalid nodes. Link integrity reflects the coverage of the rule mapping of the entire transaction process. Rules with high integrity can more comprehensively describe transaction behavior. Rules with scores greater than a second preset threshold and link integrity greater than a third preset threshold are selected to construct a transaction classification rule set. For transactions that need to be classified, the matching degree between the transaction and each rule in the rule set is calculated through feature extraction and vector representation. The matching calculation process considers the fit of multi-dimensional features such as transaction amount, participating entities, and time series. The matching degree is then weighted and summed with the rule weights to obtain the final score of the transaction. Transaction scores can be used to identify transaction categories, assess transaction risks, or predict subsequent transaction behavior, providing support for financial decision-making and risk management.
[0118] For example, the rule mapping base score of 0.82 for "regular procurement payment" is fused with the causal influence strength of 0.80 in a weight ratio of 6:4, resulting in a rule mapping relationship score of 0.81. The enhanced rule mapping relationship includes six nodes: companies A, B, C, D, E, and F. All nodes are valid, with no isolated points, and the link integrity is 1.0. Since the score of 0.81 is greater than the second preset threshold of 0.75, and the link integrity of 1.0 is greater than the third preset threshold of 0.8, this rule is included in the transaction classification rule set and assigned a rule weight of 0.9. Similarly, the rule corresponding to "prepayment procurement" undergoes similar calculation, yielding a score of 0.79 and a link integrity of 0.95, and is also included in the rule set with a weight of 0.85. The rule corresponding to "installment payment procurement" has a score of 0.72, which is below the threshold, and is not included in the final rule set. When new transaction data needs to be classified, such as a payment of 1 million yuan from company G to company H, the vector representation of the transaction is obtained through feature extraction, and its matching degree with each rule in the rule set is calculated. The transaction's match score with the "Regular Procurement Payment" rule is 0.88, primarily reflected in the high consistency of payment amount range, payment interval, and subsequent fund flow patterns. Its match score with the "Prepayment Procurement" rule is 0.25, showing only slight similarities in some features. Multiplying the match score by the corresponding rule weight yields a partial score of 0.792 (0.88 × 0.9) for the "Regular Procurement Payment" rule and 0.2125 (0.25 × 0.85) for the "Prepayment Procurement" rule. Summing up the partial scores for all rules results in a final classification score of 1.0045 for this transaction. Based on this score, the system categorizes the transaction as "Regular Procurement Payment" and generates corresponding processing suggestions, such as reviewing and accounting according to standard procurement procedures and predicting possible subsequent transactions.
[0119] Figure 3 This is a flowchart illustrating the feature matching and transaction classification rule set construction process for the multi-source financial data intelligent classification and automatic accounting optimization processing method according to an embodiment of the present invention.
[0120] In this embodiment, the vector space-based mapping method avoids the limitations of traditional hard rule matching, captures the semantic relationship between transaction scenarios and rules, and improves the accuracy and flexibility of rule mapping. It not only considers direct fund payment relationships but also integrates multi-dimensional features such as time intervals, co-occurrence frequencies, and monetary correlation, making the analysis of transaction behavior more comprehensive and in-depth. It can better identify potential abnormal transaction patterns. The rule evaluation adopts a combination of rule mapping base score and causal influence strength, and generates derivative rules by discovering implicit transaction patterns, which significantly enhances the explanatory power and coverage of the rule system. It can continuously adapt to newly emerging transaction patterns and improve the ability to identify complex transaction behaviors. The link integrity index is introduced as an important basis for rule selection, ensuring that the selected rules can completely describe the causal relationship in the transaction link, effectively balancing the accuracy and integrity of the rules, and improving the reliability of transaction classification.
[0121] In one alternative implementation,
[0122] Based on the transaction classification rule set, regular transaction data is matched with expense type tags, revenue and expenditure type tags, business type tags, and accounting subject codes, including:
[0123] Receive regular transaction data, calculate the matching degree between the regular transaction data and each rule in the rule set according to the transaction classification rule set, and select the rule with the highest matching degree as the target rule;
[0124] Extract the expense type label, revenue and expenditure type label, business type label, and accounting subject code from the target rules;
[0125] Establish a correlation between the expense type label, the income and expenditure type label, the business type label, and the accounting subject code and the regular transaction data.
[0126] When receiving regular transaction data, detailed transaction information is retrieved. For example, a transaction might contain the following information: transaction amount of 1000 yuan, transaction date of May 15, 2023, counterparty of a certain technology company, and transaction description of "purchasing office supplies". After receiving this information, it is structured and prepared for matching with the rule set.
[0127] For each rule in the rule set, the degree of match between the transaction data and the rule is calculated. The degree of match is calculated based on a comprehensive evaluation of similarity across multiple dimensions. For example, for the transaction description "purchasing office supplies," the rules in the rule set are checked to see which rules contain keywords such as "purchasing," "office," and "supplies." If rule A contains the keyword "purchasing office supplies" and rule B contains the keyword "purchasing equipment," then the transaction description's degree of match with rule A will be higher than its degree of match with rule B.
[0128] Each field of the transaction data is compared with the rule conditions. For text fields (such as transaction descriptions), a text similarity algorithm is used to calculate the match degree; for numeric fields (such as transaction amounts), it is checked whether they fall within the range defined by the rules; for date fields, it is checked whether the time conditions in the rules are met. The match degrees of all these dimensions are combined to calculate an overall match score.
[0129] For example, suppose the rule set contains the following three rules:
[0130] Rule 1: If the transaction description includes "office supplies" and the transaction amount is less than 5,000 yuan, the expense type is "office expenses", the income and expenditure type is "expenditure", the business type is "daily operations", and the accounting subject code is "6601".
[0131] Rule 2: If the transaction description includes "equipment" and the transaction amount is greater than or equal to 5,000 yuan, the expense type is "fixed assets", the income and expenditure type is "expenditure", the business type is "asset purchase", and the accounting subject code is "1601".
[0132] Rule 3: If the counterparty includes "technology" and the transaction description includes "service" → the fee type is "technical service fee", the income / expense type is "expense", the business type is "technical support", and the accounting code is "6602".
[0133] For the aforementioned transaction data (transaction amount of 1000 yuan, counterparty of a certain technology company, transaction description of "purchase of office supplies"), calculate the matching degree with each rule:
[0134] Matching score with Rule 1: The description contains "office supplies" (match), the amount is less than 5000 yuan (match), and the overall matching score is 0.9.
[0135] Matching score with Rule 2: The description does not contain "device" (not a match), the amount is less than 5,000 yuan (does not meet the rule conditions), and the overall matching score is 0.1.
[0136] Match score with Rule 3: The counterparty contains "technology" (match), but the description does not contain "service" (mismatch), and the overall match score is 0.4.
[0137] Based on the calculation results, rule 1 has the highest matching degree, so the system selects rule 1 as the target rule.
[0138] The expense type label extracted from Rule 1 is "office expenses", the income and expenditure type label is "expenditure", the business type label is "daily operations", and the accounting subject code is "6601", which represents the classification result of this transaction.
[0139] The association between transaction data and extracted tags and codes will be established, either by creating a related record in the database or by directly adding the tags and codes as new fields to the transaction data record. For example, a new record can be created in the database containing the transaction ID, expense type "office expenses", income / expense type "expenses", business type "daily operations", and accounting code "6601".
[0140] After establishing the relationships, subsequent financial analysis and report generation are performed based on the classification information. For example, expenditure details for various expenses can be statistically analyzed based on expense type tags, the financial performance of different business activities can be analyzed based on business type tags, or accounting vouchers and financial statements can be automatically generated based on accounting subject codes.
[0141] In this embodiment, the matching-degree-based rule selection mechanism ensures that the most suitable rule is selected for label mapping for each transaction, improving the accuracy and reliability of transaction classification. The multi-dimensional label system can comprehensively characterize the business attributes and accounting features of transactions, providing rich information support for subsequent financial analysis and business management. By establishing a correlation between the extracted label information and regular transaction data, automatic classification and standardized processing of transaction data are achieved. The establishment of the correlation not only standardizes the attribute expression of transaction data, but also lays the foundation for rapid retrieval, statistical analysis, and standardized management of transaction data, significantly improving the efficiency and accuracy of financial data processing. It effectively solves the problems of low efficiency and inconsistent standards in traditional manual classification methods, providing strong technical support for the informatization and intelligentization of enterprise financial management.
[0142] In one alternative implementation,
[0143] A transaction traceability graph is constructed from non-routine transaction data and pending transaction data. The flow of funds is traced forward along the fund flow path to obtain the fund destination chain, and backward to obtain the fund source chain. Based on the fund destination and source chains, the relationships between transaction nodes are extracted to obtain a transaction link set. The completeness of the transaction link set is analyzed, incomplete transaction links are marked, and an anomaly analysis report corresponding to the incomplete transaction links is output. Complete transaction links are marked as valid transaction data, and accounting vouchers are generated, including:
[0144] The transaction entities in the non-routine transaction data and the unconfirmed transaction data are used as nodes, and the fund transfer relationships are used as directed edges to construct a transaction traceability graph. The edge weights between the nodes are calculated based on the transaction amount, transaction frequency, and time relevance.
[0145] The starting node is extracted from the transaction traceability graph. The path with the maximum edge weight is selected by the depth-first search algorithm and the funds are traced forward along the direction of the funds to obtain the fund destination chain. The ending node is extracted and traced in reverse to obtain the fund source chain. The transaction node relationship is extracted based on the fund destination chain and the fund source chain to obtain the transaction link set.
[0146] Nodes with complete fund transfer relationships in the statistical transaction chain are considered valid nodes. The ratio of the number of valid nodes to the total number of nodes is used to obtain a node integrity score. The difference between fund inflows and outflows and the maximum amount of inflows and outflows are used to obtain an amount consistency score. The transaction time interval is used to obtain a time sequence rationality score.
[0147] A comprehensive transaction link score is obtained by weighting the node integrity score, amount consistency score, and timing reasonableness score. Transaction links with a comprehensive transaction link score less than a preset threshold are marked as incomplete transaction links. The location of the broken link, the amount difference, and the timing anomaly are extracted to generate an anomaly analysis report.
[0148] Transaction links with a comprehensive score greater than the preset threshold are marked as valid transaction data. The transaction entity information, transaction amount, transaction time and business type are extracted, the debit and credit accounts are determined and accounting vouchers are generated.
[0149] Unconventional and pending transaction data are extracted from the database, including information such as the transaction entity, transaction amount, transaction time, and transaction description. For example, transaction entity A transfers 10,000 yuan to transaction entity B, completed on June 15, 2023 at 10:30:25, with the transaction description "payment for goods". Transaction entities A and B are treated as nodes, and the fund flow relationship from A to B is added as a directed edge to the transaction traceability graph. For each edge, an edge weight is calculated. The edge weight calculation considers three factors: transaction amount proportion, transaction frequency, and time relevance. The transaction amount proportion is the ratio of the transaction amount to the sum of all related transaction amounts; the transaction frequency is the number of transactions between the two entities within 30 days; and the time relevance is a relevance indicator calculated based on the transaction time interval. The final edge weight is obtained by weighted combination of these three factors, with a weight range from 0 to 1, where a weight closer to 1 indicates a stronger correlation.
[0150] Identify the start and end nodes in the transaction traceability graph. The start node is a node with only outflows of funds and no inflows, while the end node is a node with only inflows of funds and no outflows. For the start node C, a depth-first search algorithm is used for forward tracing. At each branch point, the path with the largest edge weight is selected to continue the search until the end node is reached or tracing can no longer continue. For example, starting from the start node C, passing through nodes D and E, and finally reaching the end node F, a fund flow chain C→D→E→F is formed. Starting from the end node F, a fund source chain G→H→I→F is obtained by reverse tracing. All forward and reverse tracing paths are combined to form a complete transaction chain set.
[0151] Each transaction link is evaluated across three dimensions. For node integrity scoring, the ratio of valid nodes (nodes with complete fund transfer records) to the total number of nodes in the link is calculated. Taking the link J→K→L→M as an example, if all nodes have complete fund transfer records, the node integrity score is 1.0; if node L lacks some transaction records, the score may be 0.75. For amount consistency scoring, the system calculates the ratio of the difference between fund inflows and outflows in the link to the maximum inflow and outflow amount. If the total inflow is 105,000 yuan, the total outflow is 100,000 yuan, the difference is 5,000 yuan, and the maximum inflow and outflow amount is 105,000 yuan, then the amount consistency score is 1 - (5,000 / 105,000) = 0.952. For time series reasonableness scoring, the reasonableness of the transaction time intervals is analyzed. If all transactions are completed within a reasonable business timeframe, the score is close to 1.0; if there are abnormal time spans (such as nighttime or holiday transactions), the score will decrease.
[0152] The comprehensive score of the transaction link is obtained by weighting the scores of the three dimensions. Assuming the weights are 0.4, 0.4, and 0.2 respectively, and a transaction link has a node integrity score of 0.8, a monetary consistency score of 0.9, and a timing rationality score of 0.7, then the comprehensive score is 0.8 × 0.4 + 0.9 × 0.4 + 0.7 × 0.2 = 0.82. A preset threshold of 0.75 is set; if the comprehensive score is below 0.75, it is marked as an incomplete transaction link. For incomplete transaction links, information such as the location of the break, monetary discrepancies, and timing anomalies is extracted to generate an anomaly analysis report. For example: "There is an anomaly in the transaction link N→O→P→Q, with a break between nodes O and P, a difference of 20,000 yuan in funds, and an abnormal transaction time interval (72 hours)."
[0153] For transaction chains with a comprehensive score exceeding a preset threshold, they are marked as valid transaction data, and accounting vouchers are automatically generated. The transaction entity information, transaction amount, transaction time, and business type are extracted from the transaction chain, and the debit and credit accounts are determined according to preset accounting subject mapping rules. For example, for a transaction described as "raw material purchase," the debit account is set to "raw materials," and the credit account is set to "accounts payable." The generated accounting vouchers contain information such as voucher number, document date, accounting subject, debit / credit direction, amount, and summary, and can be directly imported into the financial system for subsequent processing.
[0154] In this embodiment, the graph-based transaction representation method not only intuitively displays the fund flow relationship between transaction entities, but also integrates transaction amount, frequency, and time characteristics through edge weight calculation, providing a reliable data foundation for subsequent transaction link analysis. The two-way tracking mechanism can completely reconstruct the fund flow path and effectively identify the fund transfer process between different transaction entities, providing important clues for discovering potential abnormal transactions. The multi-dimensional scoring mechanism not only considers the structural integrity of the transaction link, but also focuses on the balance of fund inflows and outflows and the logicality of transaction timing, enabling more accurate judgment of the validity and rationality of the transaction link. This not only improves the accuracy and automation level of transaction analysis, but also provides a reliable data foundation for enterprise compliance management and decision support.
[0155] In one alternative implementation,
[0156] The starting node is extracted from the transaction traceability graph. A depth-first search algorithm is used to select the path with the maximum edge weight and trace the fund flow forward to obtain the fund destination chain. The ending node is extracted and traced in reverse to obtain the fund source chain. Based on the fund destination chain and the fund source chain, the transaction node relationships are extracted to obtain the transaction chain set, including:
[0157] The time dimension features are obtained by extracting the adjacent transaction time interval, transaction frequency features, and time sequence pattern features of the transaction node. The spatial dimension features are obtained by calculating the node degree, centrality, and clustering coefficient of the transaction node. The spatiotemporal coupling features are obtained by performing tensor outer product operation on the time dimension features and spatial dimension features.
[0158] The edge weights of the transaction traceability graph are updated based on the spatiotemporal coupling characteristics. The time decay value is obtained by calculating the exponential decay product of the transaction time difference and the initial time. The spatial correlation is obtained by calculating the ratio of the number of common neighbors among transaction nodes to the total number of neighbors. The maximum edge weight is obtained by weighting the time decay value and the spatial correlation.
[0159] The starting node is extracted from the transaction traceability graph. The path is expanded using a depth-first search algorithm and the maximum edge weight. A dynamic threshold is determined based on the path length and node degree, and low-weight paths are filtered out. The fund destination chain is obtained by tracing forward along the fund flow direction. The ending node is extracted and traced in reverse to obtain the fund source chain.
[0160] The edge weights corresponding to the newly added transaction data are merged and updated with the fund destination chain and fund source chain. The transaction node relationship is obtained by analyzing the transfer direction, transfer amount and transfer time between adjacent nodes in the fund destination chain and fund source chain. The fund destination chain and fund source chain containing the same transaction node relationship are combined to form a transaction link set.
[0161] In the transaction traceability graph, each node represents a transaction account, and edges represent transaction relationships between accounts. The graph is processed, and the starting node is extracted as the entry point for analysis. To extract time-dimensional features, the time interval between adjacent transactions is calculated. For example, multiple transactions between account A and account B occur at times "2023-01-01 08:00:00", "2023-01-01 15:30:00", and "2023-01-02 09:15:00", corresponding to time intervals of 7 hours and 30 minutes and 17 hours and 45 minutes, respectively. Transaction frequency is calculated based on the number of transactions per unit of time. For example, if account A completes 3 transactions within 24 hours, its transaction frequency is 0.125 times / hour. Temporal pattern features can be obtained through the time distribution pattern of transactions. For example, account C's transactions are mainly concentrated between 9:00 and 11:00 on weekdays, forming a specific temporal pattern.
[0162] Spatial dimensional features include node degree, centrality, and clustering coefficient. Node degree represents the number of other accounts directly connected to that account; for example, account D connects to 15 different accounts, so its node degree is 15. Centrality measures the importance of a node in the network. Taking betweenness centrality as an example, account E lies on multiple shortest paths, and its betweenness centrality value is 0.35, indicating its pivotal role in fund flows. The clustering coefficient reflects the degree of connectivity between a node's neighbors; for example, account F has 12 pairs of connected neighbors out of its 10 neighbors, so its clustering coefficient is 0.267 (12 divided by 45, i.e., the maximum number of possible connection pairs that 10 nodes can form).
[0163] The spatiotemporal coupling features are obtained through tensor outer product operations. Taking account G as an example, its time dimension feature vector is [0.8, 0.6, 0.7] (normalized time interval, frequency, and temporal pattern values), and its spatial dimension feature vector is [0.5, 0.4, 0.3] (normalized node degree, centrality, and clustering coefficient values). A 3×3 coupling feature matrix is generated through tensor outer product operations, which contains the interaction information of the two dimensions of features.
[0164] Edge weights are updated based on spatiotemporal coupling characteristics. For transaction time differences, the time decay value is calculated using an exponential decay function. For example, if the reference time is "2023-01-05 00:00:00", and a transaction occurs at "2023-01-03 12:00:00", the time difference is 36 hours. With a decay coefficient of 0.05, the time decay value is 0.166 (i.e., e^(-0.05×36)). Spatial correlation is calculated using the proportion of common neighbors. For instance, if account H and account I have 20 and 15 neighbors respectively, with 8 being common neighbors, the spatial correlation is 0.296 (i.e., 8 divided by 27, the number of common neighbors divided by the total number of unique neighbors). Edge weights are calculated using a weighted average. Assuming the time factor weight is 0.6 and the spatial factor weight is 0.4, the weight of edge HI is 0.166×0.6 + 0.296×0.4 = 0.218.
[0165] A depth-first search algorithm combined with a maximum edge weight strategy is used for path expansion. Starting from the initial node J, the nodes with the highest weights are visited sequentially. Assuming J connects nodes K, L, and M with edge weights of 0.8, 0.5, and 0.3 respectively, edge JK is selected for expansion first. Then, the highest-weighted edge among K's neighbors is recursively selected to continue exploration. A dynamic threshold is set to filter low-weight paths; the threshold is calculated based on path length and node degree. For example, when the path length is 5 and the average node degree is 10, the threshold is set to 0.15, and all edges with weights below this value are discarded.
[0166] When tracing the flow of funds in the forward direction, we explore along the outflow direction. Assume the initial node N has three outgoing edges leading to accounts O, P, and Q, with weights of 0.75, 0.6, and 0.2 respectively. The system selects edges NO and NP for expansion (assuming a threshold of 0.3). If O connects to R and S with weights of 0.65 and 0.3 respectively, and P connects to T with a weight of 0.55, then two flow chains are formed: N→O→R and N→P→T.
[0167] When tracing the funding source chain in reverse, explore along the direction of fund inflow from the terminating node (such as R and T). If R has incoming edges from U and V with weights of 0.7 and 0.4 respectively, and T has an incoming edge from W with a weight of 0.65, then the funding source chains are formed as follows: U→R and W→T.
[0168] During the update process, when new transaction data shows that account X transferred 100 units of currency to Y at "2023-01-06 10:00:00", the weight of this edge is calculated (assumed to be 0.45) and compared with the existing funding chain. If Y is already in a funding destination chain, then X→Y is added to the corresponding funding source chain; if X is already in a funding source chain, then X→Y is added to the corresponding funding destination chain.
[0169] Analyze the transaction relationships between adjacent nodes, including transfer direction, amount, and time. For example, Z transfers 50 units of currency to AA, and AA transfers 45 units of currency to BB, with a time interval of 30 minutes, forming a related transaction pattern. Combine the fund destination chain and fund source chain with the same transaction node relationship to form a complete transaction chain set, such as U→R→O→N→P→T→W, which shows the complete flow path of funds.
[0170] Figure 4 The simulation diagram of dynamic threshold filtering and fund flow tracking for transaction links corresponding to the embodiments of the present invention demonstrates the technical principle of applying dynamic threshold filtering mechanism and fund flow tracking in the process of transaction link identification.
[0171] Starting with node S, multiple possible fund flow paths were explored, among which two main paths were successfully identified as complete fund destination chains after being filtered by dynamic thresholds. The first main path is S→N1→N5→N9→T1, with edge weights of 0.85, 0.78, and 0.71 between nodes, eventually reaching the terminal node T1 to form a complete fund flow chain with a total weight of 0.71. The second main path is S→N2→N7→N10→T2, with edge weights of 0.76, 0.82, and 0.79, eventually reaching the terminal node T2 to form a second complete fund flow chain with a total weight of 0.76. The diagram also shows two types of filtered paths: one is the low-weight path S→N4 (weight 0.23) extending from the starting node, which is directly filtered because it is below the dynamic threshold of 0.35; the other is a path that, although initially having a high edge weight, is truncated in subsequent extensions, such as S→N3→N8→N11. Although the weights of the first two segments are 0.68 and 0.74 respectively, the weight of the connection from N11 to the terminal node, 0.28, is below the threshold of 0.35, causing the path to be truncated. The figure also shows the suboptimal path N1→N6 (weight 0.34), which was also filtered out because it was below the threshold. The entire dynamic threshold filtering mechanism consists of a base threshold of 0.25, a node degree influence factor of 0.05, and a path length compensation factor of 0.05, which are combined to obtain a final threshold of 0.35, effectively balancing the accuracy and computational efficiency of the algorithm.
[0172] Through optimized path selection and filtering mechanisms, this technical solution can quickly identify the most likely fund flow links in complex transaction networks, providing key support for the formation of subsequent transaction link sets.
[0173] In this embodiment, the feature representation method based on spatiotemporal coupling not only captures the evolutionary pattern of transactions over time but also characterizes the topological relationships of transaction entities in network space, making the characterization of transaction behavior more comprehensive and accurate. By calculating the spatial correlation between nodes, it effectively reflects the degree of association between transaction entities. The adaptive path filtering method ensures the integrity of important transaction links while effectively reducing computational complexity, improving the efficiency and accuracy of transaction tracing. Through the bidirectional tracking strategy, it can not only fully reconstruct the flow of funds but also effectively identify potential abnormal transaction patterns. The link reorganization method based on multidimensional transaction features can accurately identify fund links with similar transaction patterns, providing a reliable data foundation for subsequent transaction analysis and risk identification.
[0174] A second aspect of this invention provides a multi-source financial data intelligent classification and automatic accounting optimization processing system, comprising:
[0175] The first unit is used to receive financial data from multiple sources of enterprises and perform textual preprocessing to obtain transaction keyword groups, structured transaction text, and bill transaction text;
[0176] The second unit is used to construct a transaction scenario graph based on the semantic vector of transaction keyword groups. It maps structured transaction text and bill transaction text to the transaction scenario graph, calculates the correlation degree of transaction entities, clusters transactions according to the correlation degree of transaction entities to obtain transaction scenario clusters, and maps the transaction scenario clusters with preset financial rules to obtain a transaction classification rule set. It uses the transaction classification rule set to classify transactions to obtain regular transaction data, non-regular transaction data, and pending confirmation transaction data.
[0177] The third unit is used to match expense type labels, income and expenditure type labels, business type labels, and accounting subject codes to regular transaction data according to the transaction classification rule set;
[0178] The fourth unit is used to construct a transaction traceability graph from non-routine transaction data and unconfirmed transaction data. In the transaction traceability graph, the fund destination chain is obtained by tracing the fund flow in the forward direction and the fund source chain is obtained by tracing in the reverse direction. The transaction node relationship is extracted based on the fund destination chain and the fund source chain to obtain a transaction link set. The integrity of the transaction link set is analyzed, incomplete transaction links are marked and the corresponding anomaly analysis report is output. Complete transaction links are marked as valid transaction data and accounting vouchers are generated.
[0179] The fifth unit is used to write the accounting vouchers into the financial accounting system to complete automatic accounting.
[0180] A third aspect of the present invention provides an electronic device, comprising:
[0181] A processor and a memory for storing processor-executable instructions, wherein the processor is configured to invoke instructions stored in the memory to perform the aforementioned method.
[0182] A fourth aspect of the present invention provides a computer-readable storage medium having stored thereon computer program instructions that, when executed by a processor, implement the aforementioned method.
[0183] This invention can be a method, apparatus, system, and / or computer program product. The computer program product may include a computer-readable storage medium having computer-readable program instructions loaded thereon for performing various aspects of the invention.
[0184] 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 or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for intelligent classification and automatic accounting optimization of multi-source financial data, characterized in that, include: It receives financial data from multiple sources and performs text preprocessing to obtain transaction keyword groups, structured transaction text, and bill transaction text; A transaction scenario graph is constructed based on the semantic vector of transaction keyword groups. The structured transaction text and bill transaction text are mapped to the transaction scenario graph to calculate the correlation degree of transaction entities. The transactions are clustered according to the correlation degree of transaction entities to obtain transaction scenario clusters. The transaction scenario clusters are constrained and mapped with preset financial rules to obtain a transaction classification rule set. The transactions are classified using the transaction classification rule set to obtain regular transaction data, non-regular transaction data, and pending confirmation transaction data. Based on the transaction classification rule set, match the regular transaction data with expense type labels, revenue and expenditure type labels, business type labels, and accounting subject codes; A transaction traceability graph is constructed from non-routine transaction data and pending confirmation transaction data. The fund destination chain is obtained by tracing the fund flow in the forward direction in the transaction traceability graph, and the fund source chain is obtained by tracing in the reverse direction. The transaction node relationship is extracted based on the fund destination chain and the fund source chain to obtain a transaction link set. The completeness of the transaction link set is analyzed, incomplete transaction links are marked and an anomaly analysis report corresponding to the incomplete transaction links is output. Complete transaction links are marked as valid transaction data and accounting vouchers are generated. The accounting vouchers are written into the financial accounting system to complete the automatic accounting.
2. The method according to claim 1, characterized in that, It receives multi-source corporate financial data and performs text preprocessing to obtain transaction keyword phrases, structured transaction texts, and bill transaction texts, including: Acquire multi-source corporate financial data, including corporate bank statement data, invoice data, contract data, and image invoice data; The enterprise's bank transaction data is segmented and labeled with parts of speech to obtain transaction keyword groups; The invoice data and contract data are parsed and format converted according to preset text structure rules to obtain structured transaction text; Optical character recognition and layout analysis are performed on the image ticket data to extract text information from key areas of the ticket and obtain the ticket transaction text.
3. The method according to claim 1, characterized in that, A transaction scenario graph is constructed based on the semantic vectors of transaction keyword groups. Structured transaction texts and bill transaction texts are mapped to the transaction scenario graph to calculate the correlation degree of transaction entities. Based on the correlation degree, transactions are clustered into scenario clusters. These scenario clusters are then constrained and mapped with preset financial rules to obtain a transaction classification rule set. The transaction classification rule set is used to classify transactions into regular transaction data, non-regular transaction data, and pending confirmation transaction data, including: The transaction keyword group is semantically vectorized to obtain word vector representations. The correlation between the word vector representations is calculated to obtain a semantic correlation matrix. A transaction scenario graph is constructed based on the correlation values in the semantic correlation matrix that are greater than a preset threshold. The edge weights between nodes in the transaction scenario graph are the corresponding correlation values. Transaction entities are extracted from structured transaction text and bill transaction text as mapping nodes. The association strength between the mapping nodes and nodes in the transaction scenario graph is calculated. The association strength is composed of a weighted combination of semantic similarity, co-occurrence frequency and positional relevance. A transaction entity association matrix is constructed based on the association strength. The transaction entity association matrix is decomposed to obtain a feature matrix, and the feature matrix is clustered to obtain transaction scenario clusters, which represent the feature distribution of different types of transactions. The transaction scenario clusters are matched with preset financial rules to obtain rule mapping relationships. The rule mapping relationships are scored and filtered to construct a transaction classification rule set. The transaction score is calculated based on the transaction classification rule set. Based on the transaction score and a preset score threshold, the transactions are divided into regular transactions, non-regular transactions, and pending confirmation transactions.
4. The method according to claim 3, characterized in that, The transaction scenario clusters are matched with preset financial rules to obtain rule mapping relationships. These rule mapping relationships are then scored and filtered to construct a transaction classification rule set. Transaction scores are calculated based on this set of rules, including: Project the feature vectors of the transaction scenario clusters and the feature vectors of the preset financial rules onto the same feature space. Calculate the dot product between the feature vectors of the transaction scenario clusters and the feature vectors of the financial rules and divide it by the vector magnitude product to obtain the feature vector similarity. Based on the scenario clusters and financial rule pairs whose feature vector similarity is greater than the first preset threshold, construct the initial rule mapping relationship. Extract the fund receipt and payment information of transaction entities in the initial rule mapping relationship, take the transaction entity as a node, take the fund receipt and payment relationship as a directed edge, assign weights to the directed edge according to the direction of fund flow and the amount of fund flow to construct a fund flow dependency graph, and calculate the correlation strength of transaction events according to the time interval, co-occurrence frequency and amount correlation of transaction entities. The basic score of rule mapping is calculated by using the initial rule mapping relationship and the rule coverage ratio. Implicit transaction patterns are determined and derivative rules are generated based on the fund flow dependency graph and the correlation strength of transaction events. The initial rule mapping relationship and the derivative rules are merged to obtain the enhanced rule mapping relationship. The causal influence strength is obtained by weighting the influence strength and reliability of the causal transmission path. The rule mapping base score and the causal influence intensity are weighted and fused according to preset weight coefficients to obtain the rule mapping relationship score. The link integrity is obtained by calculating the ratio of the number of effective nodes to the total number of nodes in the enhanced rule mapping relationship. A transaction classification rule set is constructed based on the rule mapping relationship score that is greater than the second preset threshold and the link integrity is greater than the third preset threshold. Calculate the matching degree between the transaction to be classified and each rule in the transaction classification rule set, and then sum the matching degree with the rule weight to obtain the transaction score.
5. The method according to claim 1, characterized in that, Based on the transaction classification rule set, regular transaction data is matched with expense type tags, revenue and expenditure type tags, business type tags, and accounting subject codes, including: Receive regular transaction data, calculate the matching degree between the regular transaction data and each rule in the rule set according to the transaction classification rule set, and select the rule with the highest matching degree as the target rule; Extract the expense type label, revenue and expenditure type label, business type label, and accounting subject code from the target rules; Establish a correlation between the expense type label, the income and expenditure type label, the business type label, and the accounting subject code and the regular transaction data.
6. The method according to claim 1, characterized in that, A transaction traceability graph is constructed from non-routine transaction data and pending transaction data. The flow of funds is traced forward along the fund flow path to obtain the fund destination chain, and backward to obtain the fund source chain. Based on the fund destination and source chains, the relationships between transaction nodes are extracted to obtain a transaction link set. The completeness of the transaction link set is analyzed, incomplete transaction links are marked, and an anomaly analysis report corresponding to the incomplete transaction links is output. Complete transaction links are marked as valid transaction data, and accounting vouchers are generated, including: The transaction entities in the non-routine transaction data and the unconfirmed transaction data are used as nodes, and the fund transfer relationships are used as directed edges to construct a transaction traceability graph. The edge weights between the nodes are calculated based on the transaction amount, transaction frequency, and time relevance. The starting node is extracted from the transaction traceability graph. The path with the maximum edge weight is selected by the depth-first search algorithm and the funds are traced forward along the direction of the funds to obtain the fund destination chain. The ending node is extracted and traced in reverse to obtain the fund source chain. The transaction node relationship is extracted based on the fund destination chain and the fund source chain to obtain the transaction link set. Nodes with complete fund transfer relationships in the statistical transaction chain are considered valid nodes. The ratio of the number of valid nodes to the total number of nodes is used to obtain a node integrity score. The difference between fund inflows and outflows and the maximum inflow and outflow amount are used to obtain an amount consistency score. The transaction time interval is used to obtain a time sequence rationality score. A comprehensive transaction link score is obtained by weighting the node integrity score, amount consistency score, and timing reasonableness score. Transaction links with a comprehensive transaction link score less than a preset threshold are marked as incomplete transaction links. The location of the broken link, the amount difference, and the timing anomaly are extracted to generate an anomaly analysis report. Transaction links with a comprehensive score greater than the preset threshold are marked as valid transaction data. The transaction entity information, transaction amount, transaction time and business type are extracted, the debit and credit accounts are determined and accounting vouchers are generated.
7. The method according to claim 6, characterized in that, The starting node is extracted from the transaction traceability graph. A depth-first search algorithm is used to select the path with the maximum edge weight and trace the fund flow forward to obtain the fund destination chain. The ending node is extracted and traced in reverse to obtain the fund source chain. Based on the fund destination chain and the fund source chain, the transaction node relationships are extracted to obtain the transaction chain set, which includes: The time dimension features are obtained by extracting the adjacent transaction time interval, transaction frequency features, and time sequence pattern features of the transaction node. The spatial dimension features are obtained by calculating the node degree, centrality, and clustering coefficient of the transaction node. The spatiotemporal coupling features are obtained by performing tensor outer product operation on the time dimension features and spatial dimension features. The edge weights of the transaction traceability graph are updated based on the spatiotemporal coupling characteristics. The time decay value is obtained by calculating the exponential decay product of the transaction time difference and the initial time. The spatial correlation is obtained by calculating the ratio of the number of common neighbors among transaction nodes to the total number of neighbors. The maximum edge weight is obtained by weighting the time decay value and the spatial correlation. The starting node is extracted from the transaction traceability graph. The path is expanded using a depth-first search algorithm and the maximum edge weight. A dynamic threshold is determined based on the path length and node degree, and low-weight paths are filtered out. The fund destination chain is obtained by tracing forward along the fund flow direction. The ending node is extracted and traced in reverse to obtain the fund source chain. The edge weights corresponding to the newly added transaction data are merged and updated with the fund destination chain and fund source chain. The transaction node relationship is obtained by analyzing the transfer direction, transfer amount and transfer time between adjacent nodes in the fund destination chain and fund source chain. The fund destination chain and fund source chain containing the same transaction node relationship are combined to form a transaction link set.
8. A multi-source financial data intelligent classification and automatic accounting optimization processing system, used to implement the method of any one of claims 1-7, characterized in that, include: The first unit is used to receive financial data from multiple sources of enterprises and perform textual preprocessing to obtain transaction keyword groups, structured transaction text, and bill transaction text; The second unit is used to construct a transaction scenario graph based on the semantic vector of transaction keyword groups. It maps structured transaction text and bill transaction text to the transaction scenario graph, calculates the correlation degree of transaction entities, clusters transactions according to the correlation degree of transaction entities to obtain transaction scenario clusters, and maps the transaction scenario clusters with preset financial rules to obtain a transaction classification rule set. It uses the transaction classification rule set to classify transactions to obtain regular transaction data, non-regular transaction data, and pending confirmation transaction data. The third unit is used to match expense type labels, revenue and expenditure type labels, business type labels, and accounting subject codes to regular transaction data according to the transaction classification rule set. The fourth unit is used to construct a transaction traceability graph from non-routine transaction data and unconfirmed transaction data. In the transaction traceability graph, the fund destination chain is obtained by tracing the fund flow in the forward direction and the fund source chain is obtained by tracing in the reverse direction. The transaction node relationship is extracted based on the fund destination chain and the fund source chain to obtain a transaction link set. The integrity of the transaction link set is analyzed, incomplete transaction links are marked and the corresponding anomaly analysis report is output. Complete transaction links are marked as valid transaction data and accounting vouchers are generated. The fifth unit is used to write the accounting vouchers into the financial accounting system to complete automatic accounting.
9. An electronic device, characterized in that, include: processor; Memory used to store processor-executable instructions; The processor is configured to invoke instructions stored in the memory to execute the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having computer program instructions stored thereon, characterized in that, When the computer program instructions are executed by the processor, they implement the method described in any one of claims 1 to 7.
Citation Information
Patent Citations
Abnormal fund flow monitoring method and system based on knowledge graph
CN117314606A
Digital asset security verification and information monitoring method and system
CN119416179A