Multi-source financial data intelligent classification and automatic accounting optimization processing method and system
By constructing transaction scenario maps and capital flow analysis, the problems of integrating and consistent processing multi-source financial data are solved, intelligent classification and automatic accounting of corporate financial data are realized, transaction identification and risk control capabilities are improved, and financial management processes are optimized.
Patent Information
- Application Number
- CN202510852764.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-24
- Publication Date
- 2025-09-23
- Estimated Expiration
- 2045-06-24
AI Technical Summary
Existing technologies make it difficult to effectively integrate and consistently process financial data from different sources and in different formats, resulting in serious information silos and an inability to accurately understand the business scenarios and contextual semantics of transactions. In particular, the ability to identify unconventional transactions and new business scenarios is weak, making it impossible to track the flow and source of funds, and difficult to discover potential abnormal transactions and risk points, affecting the prevention and control of corporate financial risks and compliance management.
By constructing a transaction scenario graph, processing corporate financial data based on semantic vectorization, performing scenario clustering and rule mapping, identifying regular, irregular and pending transaction data, and analyzing capital flows through transaction traceability graphs, anomaly analysis reports are generated, and automatic accounting is achieved.
It improves the accuracy and efficiency of financial data processing, reduces the need for manual intervention, enhances the intelligence and transparency of corporate financial management, can automatically identify abnormal transactions and generate analysis reports, enhances financial risk control capabilities, and optimizes corporate financial management processes.
Smart Images

Figure CN120689153A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of enterprise financial management, and in particular to a method and system for intelligent classification and automatic accounting optimization processing of multi-source financial data. Background Art
[0002] As enterprises' digital transformation deepens, their financial data becomes multi-sourced and complex. It comes from a wide range of sources, including bank statements, electronic invoices, paper bills, and ERP system data. Traditional financial processing methods mainly rely on manual entry and processing by financial personnel, which consumes a lot of human resources and time costs and is prone to human errors. Using intelligent means to automatically classify and record corporate financial data can not only improve financial processing efficiency, but also reduce error rates, helping companies achieve intelligent and refined financial management. However, existing financial processing technologies still struggle to effectively integrate and consistently process financial data from different sources and formats. This leads to serious information silos, an inability to accurately understand the business scenarios and contextual semantics of transactions, and low classification accuracy. In particular, the ability to identify unconventional transactions and new business scenarios is weak, and the relationships between transactions are ignored. This makes it impossible to track the flow and source of funds, making it difficult to identify potential abnormal transactions and risk points, hindering corporate financial risk prevention and control and compliance management. Therefore, a solution is urgently needed to solve the problems existing in the prior art. Summary of the Invention
[0003] The embodiments of the present invention provide a method and system for intelligent classification and automatic accounting optimization processing of multi-source financial data, which can at least solve some of the problems existing in the prior art.
[0004] A first aspect of an embodiment of the present invention provides a method for intelligently classifying and optimizing automatic accounting of multi-source financial data, comprising: Receive multi-source enterprise financial data and perform text preprocessing to obtain transaction keyword phrases, structured transaction text, and bill transaction text; A transaction scenario graph is constructed based on the semantic vectors of transaction keyword phrases. Structured transaction text and bill transaction text are mapped to the transaction scenario graph to calculate the transaction entity association. Transaction scenarios are clustered based on the transaction entity association to obtain transaction scenario clusters. The transaction scenario clusters are constrained and mapped to preset financial rules to obtain a transaction classification rule set. The transaction classification rule set is used to classify transactions into regular transaction data, irregular transaction data, and pending transaction data. Match expense type tags, revenue and expenditure type tags, business type tags, and accounting subject codes for regular transaction data based on the transaction classification rule set; Construct a transaction traceability graph using irregular transaction data and pending transaction data. In the transaction traceability graph, trace the funds flow forward to obtain the funds destination chain, and trace it backward to obtain the funds source chain. Based on the funds destination chain and funds source chain, extract the transaction node relationships to obtain a transaction link set. Analyze the integrity of the transaction link set, mark incomplete transaction links, and output an anomaly analysis report corresponding to the incomplete transaction links. Mark complete transaction links as valid transaction data and generate accounting vouchers. The accounting voucher is written into the financial accounting system to complete automatic accounting.
[0005] In an optional embodiment, Receive multi-source enterprise financial data and perform text preprocessing to obtain transaction keyword phrases, structured transaction text, and bill transaction text, including: Acquiring multi-source enterprise financial data, including enterprise bank transaction data, invoice data, contract data, and image bill data; Performing word segmentation and part-of-speech tagging on the corporate bank transaction data to obtain transaction keyword phrases; Performing field parsing and format conversion on the invoice data and the contract data according to preset text structure rules to obtain a structured transaction text; Optical character recognition and layout analysis are performed on the image bill data to extract text information from key areas of the bill to obtain the bill transaction text.
[0006] In an optional embodiment, A transaction scenario graph is constructed based on the semantic vectors of transaction keyword phrases. Structured transaction text and bill transaction text are mapped to the transaction scenario graph to calculate the transaction entity association. Transaction scenarios are clustered based on the transaction entity association to obtain transaction scenario clusters. The transaction scenario clusters are constrained and mapped to preset financial rules to obtain a transaction classification rule set. The transaction classification rule set is used to classify transactions to obtain regular transaction data, irregular transaction data, and pending transaction data, including: Perform semantic vectorization on transaction keyword phrases to obtain word vector representations, calculate the correlation between the word vector representations to obtain a semantic association matrix, and construct a transaction scenario graph based on the correlation values greater than a preset threshold in the semantic association matrix, where the edge weights between nodes in the transaction scenario graph are the corresponding correlation values; Extracting transaction entities from structured transaction texts and bill transaction texts as mapping nodes, calculating the association strength between the mapping nodes and nodes in the transaction scenario graph, where the association strength is a weighted combination of semantic similarity, co-occurrence frequency, and position relevance, and constructing a transaction entity association matrix based on the association strength; Decomposing the transaction entity association matrix to obtain a feature matrix, performing cluster analysis on the feature matrix to obtain transaction scenario clusters, wherein the transaction scenario clusters represent feature distributions of different types of transactions; The transaction scenario cluster is feature-matched with preset financial rules to obtain a rule mapping relationship, the rule mapping relationship is scored and screened to construct a transaction classification rule set, a transaction score is calculated according to the transaction classification rule set, and transactions are divided into regular transactions, non-routine transactions and pending transactions based on the transaction score and a preset score threshold.
[0007] In an optional embodiment, Performing feature matching between the transaction scenario cluster and preset financial rules to obtain a rule mapping relationship, scoring and screening the rule mapping relationship to construct a transaction classification rule set, and calculating the transaction score based on the transaction classification rule set includes: Projecting the transaction scenario cluster feature vector and the preset financial rule feature vector into the same feature space, calculating the dot product between the transaction scenario cluster feature vector and the financial rule feature vector and dividing it by the vector modulus product to obtain feature vector similarity, and constructing an initial rule mapping relationship based on the scenario cluster and financial rule pairs whose feature vector similarity is greater than a first preset threshold; Extract the fund receipt and payment information of the transaction entities in the initial rule mapping relationship, take the transaction entities as nodes, and the fund receipt and payment relationship as directed edges. According to the direction and amount of fund flow, weight the directed edges to construct a fund flow dependency graph. Based on the time interval, co-occurrence frequency and amount correlation of the transaction entities, calculate the transaction event correlation strength. The rule mapping basic score is calculated using the initial rule mapping relationship and the rule coverage ratio. Based on the capital flow dependency graph and the correlation strength of trading events, the implicit trading patterns are determined to generate derived rules. The initial rule mapping relationship and the derived rules are combined to obtain an enhanced rule mapping relationship. The causal influence strength is obtained by taking the weighted sum of the influence strength and reliability of the causal transmission path. The rule mapping basic score and the causal influence strength are weighted and integrated according to a preset weight coefficient to obtain a rule mapping relationship score. The ratio of the number of valid nodes to the total number of nodes in the enhanced rule mapping relationship is calculated to obtain the link integrity. The transaction classification rule set is constructed based on the rules whose rule mapping relationship scores are greater than a second preset threshold and whose link integrity is greater than a third preset threshold. Calculate the matching degree between the transaction to be classified and each rule in the transaction classification rule set, and sum the matching degree with the rule weight to obtain the transaction score.
[0008] In an optional embodiment, Matching expense type tags, revenue and expenditure type tags, business type tags, and accounting subject codes for regular transaction data based on the transaction classification rule set includes: receiving regular transaction data, calculating the degree of matching between the regular transaction data and each rule in the rule set according to the transaction classification rule set, and selecting the rule with the highest matching degree as the target rule; Extracting expense type tags, revenue and expenditure type tags, business type tags, and accounting subject codes from the target rules; Establish an association relationship between the expense type tag, the income and expenditure type tag, the business type tag and the accounting subject code and the regular transaction data.
[0009] In an optional embodiment, Construct a transaction traceability graph using non-routine transaction data and pending transaction data. In the transaction traceability graph, trace the funds flow forward to obtain the funds destination chain, and trace the funds source chain backward. Based on the funds destination chain and funds source chain, extract the transaction node relationships to obtain a transaction link set. Analyze the integrity of the transaction link set, mark incomplete transaction links, and output an anomaly analysis report corresponding to the incomplete transaction links. Mark the complete transaction link as valid transaction data and generate accounting vouchers, including: Transaction entities in unconventional transaction data and pending transaction data are used as nodes, and fund flow relationships are used as directed edges to construct a transaction traceability graph. The edge weights between the nodes are calculated based on transaction amount, transaction frequency, and time correlation. Extract the starting node from the transaction tracing graph, select the path with the maximum edge weight through the depth-first search algorithm, and trace forward along the capital flow to obtain the capital destination chain. Extract the ending node and trace backward to obtain the capital source chain. Based on the capital destination chain and capital source chain, extract the transaction node relationship to obtain the transaction link set. Nodes with complete fund transactions in the transaction chain are counted as valid nodes. The ratio of the number of valid nodes to the total number of nodes is calculated to obtain the node integrity score. The difference between fund income and expenditure and the maximum income and expenditure amount is calculated to obtain the amount consistency score. The transaction time interval is calculated to obtain the time sequence rationality score. A comprehensive transaction link score is calculated by weighting the node integrity score, amount consistency score, and time sequence rationality score. Transaction links with a comprehensive transaction link score below a preset threshold are marked as incomplete. The broken link location, amount difference, and time sequence anomaly are extracted to generate an anomaly analysis report. The transaction links whose comprehensive scores are greater than the preset threshold are marked as valid transaction data, the transaction subject information, transaction amount, transaction time and business type are extracted, the debit and credit accounts are determined and the accounting vouchers are generated.
[0010] In an optional embodiment, Extract the starting node from the transaction tracing graph, select the path with the maximum edge weight through the depth-first search algorithm, and trace forward along the capital flow to obtain the capital destination chain. Extract the ending node and trace backward to obtain the capital source chain. Based on the capital destination chain and capital source chain, extract the transaction node relationship to obtain the transaction link set including: Extract the time intervals between adjacent transactions, transaction frequency characteristics, and time series pattern characteristics of transaction nodes to obtain time dimension characteristics. Calculate the node degree, centrality, and clustering coefficient of transaction nodes to obtain space dimension characteristics. Perform tensor outer product operations on the time dimension characteristics and space dimension characteristics to obtain space-time coupling characteristics. Based on the spatiotemporal coupling feature, the edge weights of the transaction traceability graph are updated. The time decay value is calculated by multiplying the exponential decay product of the transaction time difference and the initial time. The spatial correlation is calculated by calculating the ratio of the number of common neighbors between transaction nodes to the total number of neighbors. The time decay value and spatial correlation are weighted to obtain the maximum edge weight. Extract the starting node from the transaction tracing graph, use the depth-first search algorithm with maximum edge weight to expand the path, determine the dynamic threshold based on path length and node degree, and filter low-weight paths. Trace the funds flow forward to obtain the funds destination chain, and extract the ending node for reverse tracing to obtain the funds source chain. The edge weights corresponding to the newly added transaction data are merged and updated with the funds destination chain and funds source chain. The transfer direction, transfer amount and transfer time between adjacent nodes in the funds destination chain and funds source chain are analyzed to obtain the transaction node relationship. The funds destination chain and funds source chain containing the same transaction node relationship are combined to form a transaction link set.
[0011] A second aspect of an embodiment of the present invention provides a system for intelligent classification and automatic accounting optimization processing of multi-source financial data, including: The first unit is used to receive multi-source enterprise financial data and perform text preprocessing to obtain transaction keyword phrases, structured transaction texts, and bill transaction texts; The second unit is used to construct a transaction scenario graph based on the semantic vectors of transaction keyword phrases, map structured transaction text and bill transaction text into the transaction scenario graph, calculate the transaction entity association, cluster transactions according to the transaction entity association to obtain transaction scenario clusters, map the transaction scenario clusters to preset financial rules to obtain a transaction classification rule set, and use the transaction classification rule set to classify transactions into regular transaction data, irregular transaction data, and pending transaction data; The third unit is used to match the expense type label, the income and expenditure type label, the business type label and the accounting subject code for the regular transaction data according to the transaction classification rule set; The fourth unit is used to construct a transaction traceability graph based on non-routine transaction data and pending transaction data. In the transaction traceability graph, the funds flow is traced forward to obtain the funds destination chain, and the funds source chain is traced backward. Transaction node relationships are extracted based on the funds destination chain and funds source chain to obtain a transaction link set. The integrity of the transaction link set is analyzed, incomplete transaction links are marked, and anomaly analysis reports corresponding to the incomplete transaction links are output. Complete transaction links are marked as valid transaction data and accounting vouchers are generated. The fifth unit is used to write the accounting voucher into the financial accounting system to complete automatic accounting.
[0012] According to a third aspect of an embodiment of the present invention, an electronic device is provided, including: A processor and a memory for storing processor-executable instructions, wherein the processor is configured to call the instructions stored in the memory to execute the aforementioned method.
[0013] According to a fourth aspect of an embodiment of the present invention, a computer-readable storage medium is provided, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the method described above is implemented.
[0014] In the present invention, by constructing a transaction scenario graph, intelligent classification of multi-source financial data of an enterprise is achieved, the accuracy and efficiency of financial data processing are improved, the need for manual intervention is effectively reduced, and the financial management of an enterprise is made more intelligent. The transaction tracing graph technology is used to analyze the flow of funds for unconventional transactions and transactions to be confirmed, and abnormal transactions can be automatically identified and analysis reports can be generated, thereby enhancing the financial risk control capability of the enterprise 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, an end-to-end automated accounting process is achieved, which improves the efficiency of enterprise financial processing, reduces human errors, and optimizes the enterprise financial management process. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 Schematic diagram of the process of intelligent classification and automatic accounting optimization processing of multi-source financial data according to an embodiment of the present invention; Figure 2 This is a graph showing the transaction classification accuracy and distribution trend corresponding to an embodiment of the present invention; Figure 3 Constructing a flow chart for the feature matching and transaction classification rule set corresponding to the multi-source financial data intelligent classification and automatic accounting optimization processing method according to an embodiment of the present invention; Figure 4 This is a simulation diagram of dynamic threshold filtering and capital flow tracking of transaction links corresponding to an embodiment of the present invention. DETAILED DESCRIPTION
[0016] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.
[0017] The following specific embodiments are used to describe the technical solution of the present invention in detail. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.
[0018] Figure 1 FIG. 1 is a flow chart of a method for intelligent classification and automatic bookkeeping optimization of multi-source financial data according to an embodiment of the present invention. Figure 1 As shown, the method includes: Receive multi-source enterprise financial data and perform text preprocessing to obtain transaction keyword phrases, structured transaction text, and bill transaction text; A transaction scenario graph is constructed based on the semantic vectors of transaction keyword phrases. Structured transaction text and bill transaction text are mapped to the transaction scenario graph to calculate the transaction entity association. Transaction scenarios are clustered based on the transaction entity association to obtain transaction scenario clusters. The transaction scenario clusters are constrained and mapped to preset financial rules to obtain a transaction classification rule set. The transaction classification rule set is used to classify transactions into regular transaction data, irregular transaction data, and pending transaction data. Match expense type tags, revenue and expenditure type tags, business type tags, and accounting subject codes for regular transaction data based on the transaction classification rule set; Construct a transaction traceability graph using irregular transaction data and pending transaction data. In the transaction traceability graph, trace the funds flow forward to obtain the funds destination chain, and trace it backward to obtain the funds source chain. Based on the funds destination chain and funds source chain, extract the transaction node relationships to obtain a transaction link set. Analyze the integrity of the transaction link set, mark incomplete transaction links, and output an anomaly analysis report corresponding to the incomplete transaction links. Mark complete transaction links as valid transaction data and generate accounting vouchers. The accounting voucher is written into the financial accounting system to complete automatic accounting.
[0019] In an optional embodiment, Receive multi-source enterprise financial data and perform text preprocessing to obtain transaction keyword phrases, structured transaction text, and bill transaction text, including: Acquiring multi-source enterprise financial data, including enterprise bank transaction data, invoice data, contract data, and image bill data; Performing word segmentation and part-of-speech tagging on the corporate bank transaction data to obtain transaction keyword phrases; Performing field parsing and format conversion on the invoice data and the contract data according to preset text structure rules to obtain a structured transaction text; Optical character recognition and layout analysis are performed on the image bill data to extract text information from key areas of the bill to obtain the bill transaction text.
[0020] Acquire multi-source enterprise financial data, including bank transaction data, invoice data, contract data, and imaged bill data. Bank transaction data typically includes information such as transaction date, amount, counterparty, and summary, and can be obtained from the enterprise's online banking system or bank statements. For example, a typical bank transaction record might read: "On May 10, 2023, payment of 50,000 yuan was made to 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 enterprise's invoice management system or electronic invoice data. Contract data includes information such as contract number, signing date, contracting parties, contract amount, and contract subject matter, and can be obtained from the enterprise's contract management system. Imaged bill data includes scans or photos of various paper documents, such as paper invoices, receipts, and expense reports, and can be obtained using a scanner or mobile phone camera.
[0021] The transaction summary field in bank transaction data is preprocessed, including removing special characters and normalizing numbers. A word segmentation tool is then used to segment the preprocessed transaction summary, breaking the continuous text into meaningful units. For example, for the transaction summary "Payment for office supplies purchases in May," the segmentation result might be "payment / May / office supplies / purchase amount." After segmentation, each word is tagged with parts of speech to identify different types of words, such as nouns, verbs, and adjectives. In this example, the segmentation results are processed using a part-of-speech tagging tool, resulting in a tagging result such as "payment / v May / t office supplies / n purchase amount / n," where v represents a verb, t represents a time term, and n represents a noun. Based on the POS tagging results, the nouns and verbs are extracted as transaction keyword phrases. For example, in the above example, "payment," "office supplies," and "purchase amount" are extracted as transaction keyword phrases. For large amounts of bank transaction data, a dictionary of common transaction keywords, including "payment," "service fee," "salary," and "tax," can be established to assist in keyword extraction.
[0022] For invoice data, parse the XML or JSON format of electronic invoices and extract key fields, including basic invoice information (invoice code, invoice number, invoice date), transaction party information (buyer name, seller 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, Specifications: A2023, Unit price: 5,000 yuan, Quantity: 10, Amount: 50,000 yuan, Tax rate: 13%, Tax amount: 6,500 yuan." For contract data, key fields are extracted, including basic contract information (contract number, signing date), information about the contracting parties (Party A and Party B), and contract details (contract subject, contract amount, and fulfillment 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: Office Equipment Procurement, Contract Amount: 200,000 RMB, Fulfillment Period: 2023-06-01 to 2023-06-30." Based on pre-set text structure rules, the extracted field information is converted into a structured text description. For example, invoice data can be converted into: "XX Technology Co., Ltd. purchased 10 laptops, model A2023, from XX Electronics Co., Ltd. on May 15, 2023, at a unit price of 5,000 RMB, for a total of 50,000 RMB, with tax paid 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 procurement contract with contract number HT-20230520 on 2023-05-20, with a contract amount of RMB 200,000 and a performance period from 2023-06-01 to 2023-06-30."
[0023] Image preprocessing is performed on the imaged invoice data, including grayscale conversion, binarization, tilt correction, and noise removal, to improve subsequent recognition accuracy. 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 level the text. Optical character recognition technology is then used to recognize text in the preprocessed image, converting the text into editable text. In this embodiment, specialized optical character recognition models are used for different types of invoices (such as VAT invoices, ordinary invoices, and receipts) to improve recognition accuracy. For example, for a scanned VAT invoice, optical character recognition technology generates text containing information such as the invoice number, amount, and date. Layout analysis is performed to identify the structure and layout of the invoice and locate key information areas, such as the header, product details, amount, and signature area. For example, for a VAT invoice, layout analysis can determine that the invoice code and invoice number are typically located in the upper right corner, the buyer and seller information is located in the upper center, the product details are in the middle, and the amount and tax information are located at the bottom. Based on the layout analysis results, key information is extracted from the corresponding areas, such as the invoice number, invoice date, names of the buyer and seller, product name, and amount. For example, information extracted from a scanned VAT invoice might include: "Invoice Code: 0123456789, Invoice Number: 01234567, Invoice Date: 2023-05-25, Purchaser: XX Trading Co., Ltd., Seller: XX Manufacturing Co., Ltd., Product Name: Raw Materials, Amount: 30,000 RMB, Tax: 3,900 RMB." The extracted key information is then integrated into structured invoice transaction text, for example: "XX Trading Co., Ltd. purchased raw materials from XX Manufacturing Co., Ltd. on 2023-05-25, paying 30,000 RMB with a tax of 3,900 RMB. Invoice Number: 01234567."
[0024] In this embodiment, by acquiring multi-source enterprise financial data, including enterprise bank transaction data, invoice data, contract data and image bill data, comprehensive collection of enterprise financial information is achieved, providing a complete data foundation for subsequent analysis, and performing word segmentation and part-of-speech tagging on the enterprise bank transaction data to obtain transaction keyword phrases, so that unstructured transaction data is converted into analyzable structured information, which is convenient for subsequent transaction feature extraction. Invoice data and contract data are subjected to field parsing and format conversion according to preset text structure rules to obtain structured transaction text, achieving unified processing of data in different formats and improving data processing efficiency. By performing optical character recognition and layout analysis on image bill data, text information in key areas of the bill is extracted to obtain bill transaction text, solving the problem that bill image data is difficult to directly analyze and expanding the scope of analyzable data.
[0025] In an optional embodiment, A transaction scenario graph is constructed based on the semantic vectors of transaction keyword phrases. Structured transaction text and bill transaction text are mapped to the transaction scenario graph to calculate the transaction entity association. Transaction scenarios are clustered based on the transaction entity association to obtain transaction scenario clusters. The transaction scenario clusters are constrained and mapped to preset financial rules to obtain a transaction classification rule set. The transaction classification rule set is used to classify transactions to obtain regular transaction data, irregular transaction data, and pending transaction data, including: Perform semantic vectorization on transaction keyword phrases to obtain word vector representations, calculate the correlation between the word vector representations to obtain a semantic association matrix, and construct a transaction scenario graph based on the correlation values greater than a preset threshold in the semantic association matrix, where the edge weights between nodes in the transaction scenario graph are the corresponding correlation values; Extracting transaction entities from structured transaction texts and bill transaction texts as mapping nodes, calculating the association strength between the mapping nodes and nodes in the transaction scenario graph, where the association strength is a weighted combination of semantic similarity, co-occurrence frequency, and position relevance, and constructing a transaction entity association matrix based on the association strength; Decomposing the transaction entity association matrix to obtain a feature matrix, performing cluster analysis on the feature matrix to obtain transaction scenario clusters, wherein the transaction scenario clusters represent feature distributions of different types of transactions; The transaction scenario cluster is feature-matched with preset financial rules to obtain a rule mapping relationship, the rule mapping relationship is scored and screened to construct a transaction classification rule set, a transaction score is calculated according to the transaction classification rule set, and transactions are divided into regular transactions, non-routine transactions and pending transactions based on the transaction score and a preset score threshold.
[0026] We extracted transaction-related keyword phrases, including "payment," "transfer," "purchase," "investment," and "reimbursement," from the transaction database. These keyword phrases were vectorized using a pre-trained language model, with each keyword mapped to a 300-dimensional vector. For example, the word vector for "electronic payment" could be represented as [0.123, 0.456, ..., 0.789], and the word vector for "fund transfer" could be [0.234, 0.567, ..., 0.890].
[0027] For any two keyword phrases, we calculate cosine similarity to measure semantic relevance. For example, the cosine similarity between "electronic payment" and "fund transfer" is 0.82, indicating that these two concepts are highly semantically related. The similarity calculation results between all pairwise keyword phrases form an n×n semantic relevance matrix, where n is the total number of keyword phrases.
[0028] A transaction scenario graph is constructed based on association values in the semantic association matrix that exceed a preset threshold. The similarity threshold is set to 0.7, and keyword groups with similarities greater than 0.7 are connected to form edges in the graph. The edge weights are the corresponding similarity values. For example, the edge weight between "electronic payment" and "fund transfer" is 0.82, and the edge weight between "investment and financial management" and "fund purchase" is 0.85. This constructs a transaction scenario graph in which nodes represent keyword groups, edges between nodes represent semantic associations, and edge weights represent the strength of the association.
[0029] Transaction entities are extracted from structured transaction text and bill transaction text as mapping nodes. For example, a structured transaction text might be "User A paid Supplier B 10,000 RMB via electronic banking on May 10, 2023." Bill transaction text might be "2023 invoice number E12345, amount 8,500 RMB, for office equipment procurement." Transaction entities such as "User A," "Supplier B," "Electronic Banking," "Payment," "Invoice E12345," and "Office Equipment" are extracted from the text as mapping nodes.
[0030] Calculate the strength of association between the mapped node and the nodes in the transaction scenario graph. Association strength is composed of three components: semantic similarity, co-occurrence frequency, and positional relevance. Semantic similarity is calculated by calculating the cosine similarity of the word vectors between the transaction entity and the graph node; co-occurrence frequency counts the number of times the transaction entity and the graph node appear together in historical transaction data; and 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 yields an association strength of 0.72.
[0031] 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.
[0032] The transaction entity association matrix is decomposed into a feature matrix. Using matrix decomposition techniques, the association matrix is decomposed into the product of two low-dimensional matrices. One matrix represents the representation of the transaction entities in the latent semantic space, namely the feature matrix. For example, a 5×10 association matrix is 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.
[0033] A clustering algorithm is used to analyze the feature matrix, clustering similar transaction entities together to form different transaction scenario clusters. For example, clustering based on the feature matrix might yield transaction scenario clusters such as "daily operating expenses," "procurement transactions," "investment and financial management," and "abnormal payments." Each cluster contains transaction entities with similar semantics.
[0034] Transaction scenario clusters are matched against pre-set financial rules to obtain rule mappings. For example, pre-set financial rules include "normal procurement transaction amounts do not exceed 120% of the budget," "reimbursement documents must have corresponding invoices," and "investment transactions must undergo an approval process." Financial rules can be selected from rule templates or added by the user. The characteristics of each transaction scenario cluster are matched against the rules, and the matching degree is calculated. For example, the matching degree between the "procurement transaction" cluster and the "normal procurement transaction amounts do not exceed 120% of the budget" rule is 0.88.
[0035] Rule mappings are scored and filtered to construct a transaction classification rule set. A matching threshold of 0.8 is set to select rule mappings with a matching degree greater than 0.8 to form the transaction classification rule set. For example, the "Procurement Transaction" cluster corresponds to rules such as "Normal procurement transaction amounts do not exceed 120% of the budget" and "Procurement requires supplier qualification review records."
[0036] For each transaction, a rule compliance score is calculated based on the transaction scenario cluster and the corresponding rule set. For example, a procurement transaction with an amount of 115% of the budget and a supplier qualification review record has a rule compliance score of 0.85. The score threshold is set to [0.8, 0.6], meaning that a score greater than 0.8 is considered a regular transaction, a score between 0.6 and 0.8 is considered pending, and a score less than 0.6 is considered an irregular transaction. Ultimately, this procurement transaction is classified as a regular transaction.
[0037] Figure 2 This is a graph showing the transaction classification accuracy and distribution trend corresponding to an embodiment of the present invention, illustrating the classification accuracy trend of the transaction classification system based on semantic vectorization and rule matching during its six-month operation. Initial data showed that the accuracy of regular transaction classification started at 92.5%, and after six months of continuous optimization and learning, it steadily increased to 96.2%; the classification accuracy of pending transactions showed a significant increase, from 75.3% to 85.6%, and the recognition accuracy of unconventional transactions also increased from 80.1% to 89.5%, indicating that the system's ability to recognize abnormal transaction patterns is constantly improving. The average classification accuracy has steadily increased from the initial 86.3% to 93.1%, fully demonstrating the effectiveness of the transaction classification method based on semantic vectorization and rule matching.
[0038] As the system continues to learn and optimize, and the transaction scenario map continues to improve, it is expected that the system performance will continue to maintain a good improvement trend.
[0039] In this embodiment, by semantically vectorizing transaction keyword phrases and constructing a semantic association matrix, the automatic construction of the transaction scenario map is achieved, the semantic association relationship between transaction words is effectively captured, transaction entities are extracted from structured transaction texts and bill transaction texts, and the association strength is calculated. The multi-dimensional indicators of semantic similarity, co-occurrence frequency and position correlation are used to ensure the accuracy of transaction entity mapping. The transaction entity association matrix is decomposed and clustered to obtain transaction scenario clusters, which realizes the automatic recognition and classification of different types of transaction features and improves the representation ability of transaction scenarios. The transaction classification rule set is constructed through scoring and screening of rule mapping relationships, and automatic classification of transactions is achieved based on transaction scores, providing a quantitative basis for identifying conventional transactions, unconventional transactions and pending transactions.
[0040] In an optional embodiment, Performing feature matching between the transaction scenario cluster and preset financial rules to obtain a rule mapping relationship, scoring and screening the rule mapping relationship to construct a transaction classification rule set, and calculating the transaction score based on the transaction classification rule set includes: Projecting the transaction scenario cluster feature vector and the preset financial rule feature vector into the same feature space, calculating the dot product between the transaction scenario cluster feature vector and the financial rule feature vector and dividing it by the vector modulus product to obtain feature vector similarity, and constructing an initial rule mapping relationship based on the scenario cluster and financial rule pairs whose feature vector similarity is greater than a first preset threshold; Extract the fund receipt and payment information of the transaction entities in the initial rule mapping relationship, take the transaction entities as nodes, and the fund receipt and payment relationship as directed edges. According to the direction and amount of fund flow, weight the directed edges to construct a fund flow dependency graph. Based on the time interval, co-occurrence frequency and amount correlation of the transaction entities, calculate the transaction event correlation strength. The rule mapping basic score is calculated using the initial rule mapping relationship and the rule coverage ratio. Based on the capital flow dependency graph and the correlation strength of trading events, the implicit trading patterns are determined to generate derived rules. The initial rule mapping relationship and the derived rules are combined to obtain an enhanced rule mapping relationship. The causal influence strength is obtained by taking the weighted sum of the influence strength and reliability of the causal transmission path. The rule mapping basic score and the causal influence strength are weighted and integrated according to a preset weight coefficient to obtain a rule mapping relationship score. The ratio of the number of valid nodes to the total number of nodes in the enhanced rule mapping relationship is calculated to obtain the link integrity. The transaction classification rule set is constructed based on the rules whose rule mapping relationship scores are greater than a second preset threshold and whose link integrity is greater than a third preset threshold. Calculate the matching degree between the transaction to be classified and each rule in the transaction classification rule set, and sum the matching degree with the rule weight to obtain the transaction score.
[0041] The feature vectors of transaction scenario clusters and the pre-set feature vectors of financial rules are projected into the same feature space, ensuring that the two types of vectors are comparable in the same dimension. The raw 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 moduli. A completely positive correlation has a similarity of one, a completely negative correlation has a similarity of -1, and an orthogonal vector has a similarity of zero. Scenario cluster and financial rule pairs with similarities greater than a first preset threshold are selected to establish an initial rule mapping relationship. Setting the threshold requires a balance between accuracy and coverage. A too high threshold results in insufficient rule coverage, while a too low threshold may introduce irrelevant rule mappings.
[0042] For example, using inter-enterprise procurement and payment as an example, a large amount of inter-enterprise procurement transaction data was collected, resulting in multiple transaction scenario clusters, such as "regular procurement payment," "prepayment procurement," and "installment payment procurement." The original features of these scenario clusters encompass dozens of dimensions, including transaction amount distribution, transaction frequency, participating entity type, and payment conditions. The financial system also pre-defines several 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 were comparable in the same space. Calculations revealed 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 exceeding the preset threshold of 0.7. Therefore, initial mapping relationships were established. However, the similarity between "regular procurement payment" and "prepayment process" was only 0.45, below the threshold, and no mapping relationship was established.
[0043] A capital flow dependency graph is constructed and the transaction correlation strength is calculated. Funds receipt and payment information for transaction entities is extracted from the initial rule mapping relationship. Transaction entities are set as nodes in the graph, and fund receipt and payment relationships are set as directed edges. Edges are weighted based on the direction and amount of fund flow. Transaction records are analyzed in detail, including key elements such as the payer, payee, transaction amount, and transaction time, to identify the main paths and patterns of fund flow. When constructing the dependency graph, special cases such as duplicate and abnormal transactions are handled to ensure that the graph structure accurately reflects actual fund flow relationships. The temporal relationships between transaction entities are analyzed, the time intervals between entities are calculated, and whether there are fixed timing patterns in transactions, such as the payment period relationships between upstream and downstream companies, are examined. The frequency of co-occurrence of transaction entities is counted, as frequently co-occurring entities may have stable business relationships. The degree of correlation between amounts is analyzed, including the proportional relationship, fluctuation range, and correlation. These factors are combined to calculate the correlation strength between transaction events.
[0044] For example, detailed fund receipt and payment information was extracted from the initial mapping between "Regular Procurement Payments" and "Standard Procurement Processes." It was found that purchasing company A paid an average of 1 million RMB to supplier company B. Company B, in turn, paid an average of 600,000 RMB for raw materials to raw material supplier company C and an average of 200,000 RMB for auxiliary materials to auxiliary material supplier company D. This constituted a complete fund flow chain, forming a dependency graph with four nodes. The three directed edges represented fund flows from A to B, B to C, and B to D, with edge weights set to 1.0, 0.6, and 0.2, respectively, based on the amount. Analysis of the timing patterns of these inter-company transactions revealed that company B paid company C an average of 3.2 days after receiving payment from company A, and company D within 5.7 days, demonstrating a clear temporal dependency. Statistics show that these four companies appeared together 42 times in relevant transaction records over the past year, far exceeding the industry average. Analysis of dollar correlations shows that payments from enterprise B to enterprise C typically account for 58% to 63% of payments from enterprise A to enterprise B, while payments from enterprise B to enterprise D typically account for 18% to 22% of payments from enterprise A to enterprise B. This stable dollar ratio suggests a consistent supply chain distribution pattern. Combining time intervals, co-occurrence frequency, and dollar correlation, the transaction correlation strength between A and B is 0.88, between B and C is 0.85, and between B and D is 0.79.
[0045] Rule mapping scores and derived rule generation are performed. A basic rule mapping score is calculated based on the initial rule mapping relationship and the rule coverage ratio of transaction data. Coverage ratio refers to the proportion of transaction samples that a rule can explain relative to the total sample size, reflecting the rule's scope of application. The basic score calculation comprehensively considers similarity and coverage ratio, using a harmonic mean fusion method. The constructed capital flow dependency graph and the correlation strength of transaction events are used to identify transaction patterns implicit in the transaction data but not covered by the initial rules, and derived rules are generated based on these patterns. During the derived rule generation process, complex relationship patterns such as indirect connections, circular dependencies, and multi-path transmission between nodes are analyzed to uncover potential transaction chains and capital circulation. The initial rule mapping relationship is combined with these derived rules to form an enhanced rule mapping relationship. This enhanced rule mapping provides a more comprehensive description of the business logic and financial patterns underlying transaction behavior. The causal transmission paths between transaction entities are analyzed, and the impact strength and reliability of each path are assessed. The impact strength is obtained by multiplying or otherwise combining the correlation strengths of each node along the path. The reliability is determined by factors such as path stability and anomaly rate. The overall causal impact intensity 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.
[0046] For example, based on the initial rule mapping relationship between "Regular Procurement Payment" and "Standard Procurement Process," it was calculated to cover 78% of all relevant transaction samples. Combined with the previously calculated similarity of 0.85, a weighted harmonic average yielded a basic rule mapping score of 0.82. A deeper analysis of the capital flow dependency graph revealed several important implicit patterns: when enterprise A pays enterprise B, enterprise B pays a certain percentage to enterprises C and D within a week; enterprise C often pays approximately 40% of the payment to enterprise E within 10 days of receiving payment from enterprise B; and in some cases, enterprise D pays enterprise F, forming a branching path. These implicit patterns led to three derived rules: "Supply Chain Transmission Payment," "Second-Tier Supplier Connection," and "Supply of Auxiliary Materials Branch." Combining the initial and derived rules resulted in an enhanced rule mapping relationship encompassing six transaction entities and five major capital flow paths. Analysis of the causal transmission paths reveals that firm A's payment behavior has a strong influence on firm B's payment decision (influence strength 0.91), while firm B's payments directly affect the financial positions of firms C and D (influence strengths 0.87 and 0.82, respectively). Firm C's influence on firm E is 0.75, and firm D's influence on firm 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, for an overall causal influence strength of 0.80.
[0047] The rule mapping basic score and causal influence strength are weighted and combined according to pre-set weighting coefficients to generate a comprehensive score for each rule mapping relationship. The weighting process needs to be flexibly adjusted based on the focus of different business scenarios. A focus on the basic score emphasizes the match between the rule and historical data, while a focus on causal influence strength prioritizes the integrity and coherence of the transaction chain. The ratio of valid nodes to total nodes in the enhanced rule mapping relationship is calculated as a link integrity indicator. A valid node is a node with clear input or output connections in the transaction network, while isolated nodes or nodes with only weak connections are considered invalid. Link integrity reflects the extent to which the rule mapping covers the entire transaction process. Rules with high integrity provide a more comprehensive description of transaction behavior. Rules with scores greater than the second preset threshold and link integrity greater than the third preset threshold are selected to construct a transaction classification rule set. For transactions requiring classification, feature extraction and vector representation are used to calculate the degree of match with each rule in the rule set. The matching calculation considers the fit between multiple features such as transaction amount, participating entities, and time series. The match degree is then weighted and summed with the rule weight to obtain the final score for the transaction. Transaction scores can be used to determine transaction categories, assess transaction risks, or predict subsequent transaction behavior, providing support for financial decision-making and risk management.
[0048] For example, the "Regular Procurement Payment" rule mapping base score of 0.82 and the causal influence strength of 0.80 were combined in a weighted ratio of 6:4, resulting in a rule mapping score of 0.81. The enhanced rule mapping relationship includes six nodes: companies A, B, C, D, E, and F, all of which are valid, with no isolated nodes and a link integrity of 1.0. Because the score of 0.81 exceeds the second preset threshold of 0.75, and the link integrity of 1.0 exceeds 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" was similarly calculated, resulting in a score of 0.79 and a link integrity of 0.95. It was also included in the rule set and assigned a weight of 0.85. The rule corresponding to "Installment Procurement" had a score of 0.72, which fell below the threshold and was not included in the final rule set. When new transaction data requires classification, such as a 1 million yuan payment from company G to company H, feature extraction is used to generate a vector representation of the transaction, and its matching degree with each rule in the rule set is calculated. This transaction has a match degree of 0.88 with the "Regular Procurement Payment" rule, primarily reflecting high consistency in payment amount range, payment interval, and subsequent funds flow patterns. Its match degree with the "Prepayment Procurement" rule is 0.25, showing only slight similarities in some features. Multiplying the match degree by the corresponding rule weight yields a partial score of 0.792 (0.88 x 0.9) for the "Regular Procurement Payment" rule and a partial score of 0.2125 (0.25 x 0.85) for the "Prepayment Procurement" rule. Summing the partial scores for all rules yields 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 appropriate handling recommendations, such as reviewing and accounting according to standard procurement procedures and predicting potential subsequent transactions.
[0049] Figure 3 A flow chart is constructed for the feature matching and transaction classification rule set corresponding to the multi-source financial data intelligent classification and automatic accounting optimization processing method according to an embodiment of the present invention.
[0050] In this embodiment, the mapping method based on vector space avoids the limitations of traditional hard rule matching, can capture the semantic association between transaction scenarios and rules, and improves the accuracy and flexibility of rule mapping. It not only considers the direct relationship between funds collection and payment, but also integrates multi-dimensional features such as time interval, co-occurrence frequency and amount correlation, making the analysis of transaction behavior more comprehensive and in-depth, and can better identify potential abnormal transaction patterns. It adopts a combination of rule mapping basic score and causal influence intensity to evaluate rules, and generates derived rules by discovering implicit transaction patterns, which significantly enhances the explanatory power and coverage of the rule system, can continuously adapt to emerging transaction patterns, and improves the ability to identify complex transaction behaviors. The link integrity indicator is introduced as an important basis for rule screening to ensure that the selected rules can fully describe the causal relationship in the transaction link, effectively balance the accuracy and completeness of the rules, and improve the reliability of transaction classification.
[0051] In an optional embodiment, Matching expense type tags, revenue and expenditure type tags, business type tags, and accounting subject codes for regular transaction data based on the transaction classification rule set includes: receiving regular transaction data, calculating the degree of matching between the regular transaction data and each rule in the rule set according to the transaction classification rule set, and selecting the rule with the highest matching degree as the target rule; Extracting expense type tags, revenue and expenditure type tags, business type tags, and accounting subject codes from the target rules; Establish an association relationship between the expense type tag, the income and expenditure type tag, the business type tag and the accounting subject code and the regular transaction data.
[0052] When receiving regular transaction data, detailed transaction information is obtained. For example, a transaction might include the following information: the transaction amount is 1,000 yuan, the transaction date is May 15, 2023, the counterparty is a certain technology company, and the transaction description is "purchase of office supplies." After receiving this information, it is structured and prepared for matching with the rule set.
[0053] For each rule in the rule set, the degree of match between the transaction data and the rule is calculated. The match is calculated based on a comprehensive assessment of similarities across multiple dimensions. For example, for the transaction description "Purchase office supplies," the rule set examines which rules contain keywords such as "purchase," "office," and "supplies." If Rule A contains the keyword "Purchase office supplies" and Rule B contains the keyword "Purchase equipment," the transaction description will have a higher match with Rule A than with Rule B.
[0054] Each field in the transaction data is compared against the rule conditions. For text fields (such as transaction descriptions), a text similarity algorithm is used to calculate the match. For numeric fields (such as transaction amounts), the match is checked to see if they fall within the rule-defined range. For date fields, the match is checked to see if the time condition in the rule is met. The match levels of all these dimensions are combined to produce an overall match score.
[0055] For example, suppose you have the following three rules in your rule set: Rule 1: If the transaction description contains "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."
[0056] Rule 2: If the transaction description contains "Equipment" and the transaction amount is greater than or equal to 5,000 yuan, the expense type is "Fixed Assets," the revenue and expenditure type is "Expenditure," the transaction type is "Asset Purchase," and the accounting subject code is "1601."
[0057] Rule 3: If the counterparty includes "Technology" and the transaction description includes "Service" → the expense type is "Technical Service Fee", the income and expenditure type is "Expenditure", the business type is "Technical Support", and the accounting account code is "6602".
[0058] For the aforementioned transaction data (transaction amount is 1,000 yuan, counterparty is a certain technology company, and transaction description is "purchase office supplies"), calculate the matching degree for each rule: Matching degree with Rule 1: The description contains "office supplies" (match), the amount is less than 5,000 yuan (match), and the overall matching degree is 0.9.
[0059] Matching degree with Rule 2: The description does not contain "equipment" (no match), the amount is less than 5,000 yuan (does not meet the rule conditions), and the overall matching degree is 0.1.
[0060] Matching degree with Rule 3: The counterparty includes "technology" (match), but the description does not include "service" (mismatch), resulting in an overall matching degree of 0.4.
[0061] According to the calculation results, Rule 1 has the highest matching degree, so the system selects Rule 1 as the target rule.
[0062] Rule 1 extracts the expense type label "Office Expenses," the revenue and expenditure type label "Expenditures," the business type label "Daily Operations," and the accounting subject code "6601," representing the classification result for the transaction.
[0063] The transaction data is associated with the extracted tags and codes by creating a related record in the database, or by adding the tags and codes as new fields to the transaction data record. For example, a new record might be created in the database containing the transaction ID, expense type "office expense", income and expenditure type "expense", business type "daily operations", and accounting subject code "6601".
[0064] After establishing associations, subsequent financial analysis and report generation can be performed based on the classification information. For example, you can use expense type tags to compile statistics on various expense types, analyze the financial performance of different business activities based on business type tags, or automatically generate accounting documents and financial reports based on accounting subject codes.
[0065] In this embodiment, the rule selection mechanism based on matching degree ensures that the most appropriate rule is selected for each transaction for label mapping, thereby improving the accuracy and reliability of transaction classification. The multi-dimensional label system can comprehensively characterize the business attributes and accounting characteristics of the transaction, providing rich information support for subsequent financial analysis and business management. By establishing an association relationship between the extracted label information and conventional transaction data, automatic classification and standardized processing of transaction data are achieved. The establishment of the association relationship not only standardizes the attribute expression of transaction data, but also lays the foundation for the rapid retrieval, statistical analysis and standardized management of transaction data, significantly improving the efficiency and accuracy of financial data processing, and effectively solving the problems of low efficiency and inconsistent standards of traditional manual classification methods, providing strong technical support for the informatization and intelligentization of enterprise financial management.
[0066] In an optional embodiment, Construct a transaction traceability graph using non-routine transaction data and pending transaction data. In the transaction traceability graph, trace the funds flow forward to obtain the funds destination chain, and trace the funds source chain backward. Based on the funds destination chain and funds source chain, extract the transaction node relationships to obtain a transaction link set. Analyze the integrity of the transaction link set, mark incomplete transaction links, and output an anomaly analysis report corresponding to the incomplete transaction links. Mark the complete transaction link as valid transaction data and generate accounting vouchers, including: Transaction entities in unconventional transaction data and pending transaction data are used as nodes, and fund flow relationships are used as directed edges to construct a transaction traceability graph. The edge weights between the nodes are calculated based on transaction amount, transaction frequency, and time correlation. Extract the starting node from the transaction tracing graph, select the path with the maximum edge weight through the depth-first search algorithm, and trace forward along the capital flow to obtain the capital destination chain. Extract the ending node and trace backward to obtain the capital source chain. Based on the capital destination chain and capital source chain, extract the transaction node relationship to obtain the transaction link set. Nodes with complete fund transactions in the transaction chain are counted as valid nodes. The ratio of the number of valid nodes to the total number of nodes is calculated to obtain the node integrity score. The difference between fund income and expenditure and the maximum income and expenditure amount is calculated to obtain the amount consistency score. The transaction time interval is calculated to obtain the time sequence rationality score. A comprehensive transaction link score is calculated by weighting the node integrity score, amount consistency score, and time sequence rationality score. Transaction links with a comprehensive transaction link score below a preset threshold are marked as incomplete. The broken link location, amount difference, and time sequence anomaly are extracted to generate an anomaly analysis report. The transaction links whose comprehensive scores are greater than the preset threshold are marked as valid transaction data, the transaction subject information, transaction amount, transaction time and business type are extracted, the debit and credit accounts are determined and the accounting vouchers are generated.
[0067] Data on irregular and pending transactions is extracted from the database, including information such as the transaction subject, transaction amount, transaction time, and transaction description. For example, consider a transfer of 10,000 yuan from transaction subject A to transaction subject B, completed at 10:30:25 on June 15, 2023, with the transaction description "payment for goods." Transaction subjects A and B are treated as nodes, and the capital flow from A to B is added as a directed edge to the transaction traceability graph. For each edge, an edge weight is calculated. This calculation considers three factors: transaction amount percentage, transaction frequency, and temporal correlation. The transaction amount percentage is the ratio of the transaction amount to the total amount of all related transactions; the transaction frequency is the number of transactions between the two transaction subjects within 30 days; and the temporal correlation is a correlation indicator calculated based on the time interval between transactions. The final edge weight is determined by weighting these three factors, ranging from 0 to 1, with weights closer to 1 indicating a stronger correlation.
[0068] Identify the starting and ending nodes in the transaction traceability graph. The starting node is a node with only outflows and no inflows, while the ending node is a node with only inflows and no outflows. For starting node C, use a depth-first search algorithm for forward tracing. At each branch point, select the path with the largest edge weight and continue searching until the ending node is reached or tracing becomes impossible. For example, starting from starting node C, passing through nodes D and E, and finally reaching ending node F, form a funds destination chain C→D→E→F. Starting from ending node F, reverse tracing yields the funds source chain G→H→I→F. All forward and backward tracing paths are combined to form a complete transaction link set.
[0069] Each transaction link is evaluated across three dimensions. For the node integrity score, the ratio of the number of valid nodes (nodes with complete fund transactions) in the link to the total number of nodes is calculated. For link J→K→L→M, for example, if all nodes have complete fund transaction records, the node integrity score is 1.0. If node L is missing some transaction records, the score might be 0.75. For the amount consistency score, the system calculates the ratio of the difference between fund receipts and payments in the link to the maximum receipt and payment. If the link's total receipts are 105,000 yuan, the total expenditures are 100,000 yuan, the difference is 5,000 yuan, and the maximum receipt and payment is 105,000 yuan, the amount consistency score is 1-(5,000 / 105,000) = 0.952. For the timing rationality score, the rationality of transaction time intervals is analyzed. If all transactions are completed within reasonable business hours, the score is close to 1.0. If there are unusual time spans (such as overnight or holiday transactions), the score will be lower.
[0070] The scores of the three dimensions are weighted to produce a comprehensive transaction link score. 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, the comprehensive score is 0.8 × 0.4 + 0.9 × 0.4 + 0.7 × 0.2 = 0.82. A threshold of 0.75 is set; if the comprehensive score falls below 0.75, the transaction link is marked as incomplete. For incomplete transaction links, information such as the location of the break, monetary discrepancy, and timing anomalies is extracted to generate an anomaly analysis report. For example, "Transaction link N→O→P→Q has an anomaly: a break between nodes O and P, a difference in funds received and paid of 20,000 yuan, and an abnormal transaction time interval (72 hours)."
[0071] Transaction links with a comprehensive score greater than a preset threshold are marked as valid and automatically generated as accounting vouchers. The system extracts information about the transaction subject, transaction amount, transaction time, and business type from the transaction link, and determines the debit and credit accounts based on pre-set accounting account mapping rules. For example, for a transaction described as "Raw Materials Purchase," the debit account is set to "Raw Materials" and the credit account is set to "Accounts Payable." The generated accounting voucher includes information such as the voucher number, creation date, accounting subject, debit / credit direction, amount, and summary, and can be directly imported into the financial system for subsequent processing.
[0072] In this embodiment, the transaction representation method based on the graph structure can not only intuitively display the capital flow relationship between transaction entities, but also integrate the transaction amount, frequency and time characteristics through the calculation of edge weights, providing a reliable data basis for subsequent transaction link analysis. The two-way tracking mechanism can completely restore the flow path of funds and effectively identify the transfer process of funds 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 pays attention to the balance of capital income and expenditure and the transaction timing logic. It can more accurately judge the effectiveness and rationality of the transaction link, which not only improves the accuracy and automation level of transaction analysis, but also provides a reliable data basis for corporate compliance management and decision support.
[0073] In an optional embodiment, Extract the starting node from the transaction tracing graph, select the path with the maximum edge weight through the depth-first search algorithm, and trace forward along the capital flow to obtain the capital destination chain. Extract the ending node and trace backward to obtain the capital source chain. Based on the capital destination chain and capital source chain, extract the transaction node relationship to obtain the transaction link set including: Extract the time intervals between adjacent transactions, transaction frequency characteristics, and time series pattern characteristics of transaction nodes to obtain time dimension characteristics. Calculate the node degree, centrality, and clustering coefficient of transaction nodes to obtain space dimension characteristics. Perform tensor outer product operations on the time dimension characteristics and space dimension characteristics to obtain space-time coupling characteristics. Based on the spatiotemporal coupling feature, the edge weights of the transaction traceability graph are updated. The time decay value is calculated by multiplying the exponential decay product of the transaction time difference and the initial time. The spatial correlation is calculated by calculating the ratio of the number of common neighbors between transaction nodes to the total number of neighbors. The time decay value and spatial correlation are weighted to obtain the maximum edge weight. Extract the starting node from the transaction tracing graph, use the depth-first search algorithm with maximum edge weight to expand the path, determine the dynamic threshold based on path length and node degree, and filter low-weight paths. Trace the funds flow forward to obtain the funds destination chain, and extract the ending node for reverse tracing to obtain the funds source chain. The edge weights corresponding to the newly added transaction data are merged and updated with the funds destination chain and funds source chain. The transfer direction, transfer amount and transfer time between adjacent nodes in the funds destination chain and funds source chain are analyzed to obtain the transaction node relationship. The funds destination chain and funds source chain containing the same transaction node relationship are combined to form a transaction link set.
[0074] In a transaction traceability graph, each node represents a transaction account, and edges represent transaction relationships between accounts. The transaction traceability graph is processed, and the starting node is extracted as the entry point for analysis. To extract time dimension features, the time intervals between adjacent transactions are calculated. For example, if Account A and Account B have multiple transactions at "2023-01-01 08:00:00," "2023-01-01 15:30:00," and "2023-01-02 09:15:00," the corresponding time intervals are 7 hours and 30 minutes and 17 hours and 45 minutes. The transaction frequency feature is calculated by the number of transactions per unit time. For example, if Account A completes three transactions within 24 hours, its transaction frequency is 0.125 times / hour. Time series pattern features can be obtained by analyzing the time distribution of transactions. For example, Account C's transactions are primarily concentrated between 9:00 and 11:00 on weekdays, forming a specific time series pattern.
[0075] Spatial dimension features include node degree, centrality, and clustering coefficient. Node degree indicates the number of other accounts directly connected to an account. For example, account D is connected 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 is located on multiple shortest paths, with a betweenness centrality value of 0.35, indicating its pivotal role in capital flows. The clustering coefficient reflects the degree of connectivity between node neighbors. For example, account F has 12 out of 10 neighbors connected to each other, resulting in a clustering coefficient of 0.267 (12 divided by 45, which is the maximum number of possible connections between 10 nodes).
[0076] Spatiotemporal coupling features are obtained through tensor outer product operations. For example, for account G, its temporal feature vector is [0.8, 0.6, 0.7] (normalized time interval, frequency, and temporal pattern values), and its spatial feature vector is [0.5, 0.4, 0.3] (normalized node degree, centrality, and clustering coefficient values). This tensor outer product operation generates a 3×3 coupling feature matrix containing the interaction information between the two dimensions.
[0077] Edge weights are updated based on spatiotemporal coupling. For transaction time differences, an exponential decay function is used to calculate the time decay value. 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, and the decay coefficient is set to 0.05, then the time decay value is 0.166 (i.e., e^(-0.05 × 36)). Spatial correlation is calculated by the proportion of common neighbors. For example, if accounts H and I have 20 and 15 neighbors, respectively, and 8 of them are common neighbors, then 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 method. Assuming a time factor weight of 0.6 and a space factor weight of 0.4, the weight of edge HI is 0.166 × 0.6 + 0.296 × 0.4 = 0.218.
[0078] A depth-first search algorithm with a maximum edge weight strategy is used for path expansion. Starting from the starting node J, the highest-weighted adjacent nodes are visited sequentially. Assuming that J connects nodes K, L, and M, with corresponding edge weights of 0.8, 0.5, and 0.3, respectively, edge JK is first selected for expansion. Recursively, the highest-weighted edge among K's neighbors is selected for further 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, a threshold of 0.15 is set, and all edges with weights below this value are removed.
[0079] When tracing the funds flow chain forward, we explore along the direction of fund outflow. Assume that 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 R and S, with weights of 0.65 and 0.3, respectively, and P connects T, with a weight of 0.55, then two funds flow chains are formed: N→O→R and N→P→T.
[0080] When tracing the source chain of funds backward, start from the end nodes (such as R and T) and explore along the direction of fund inflow. 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 weight of 0.65, then the source chain of funds is formed: U→R and W→T.
[0081] During the update process, when new transaction data shows that account X transferred 100 units of currency to account Y at "2023-01-06 10:00:00", the weight of this edge is calculated (assuming it is 0.45) and compared with the existing funding chain. If Y is already in the funding destination chain, X→Y is added to the corresponding funding source chain; if X is already in the funding source chain, X→Y is added to the corresponding funding destination chain.
[0082] Analyze transaction relationships between adjacent nodes, including transfer direction, amount, and time. For example, if Z transfers 50 units of currency to AA, and AA transfers 45 units of currency to BB, with a 30-minute interval, this forms a linked transaction pattern. Combining the funds destination and source chains with the same transaction node relationship forms a complete transaction chain set, such as U→R→O→N→P→T→W, showing the complete flow path of funds.
[0083] Figure 4 This is a simulation diagram of dynamic threshold filtering and fund flow tracking for transaction links corresponding to an embodiment of the present invention, demonstrating the technical principle of applying the dynamic threshold filtering mechanism and fund flow tracking in the transaction link identification process of this technical solution.
[0084] Taking S as the starting node, multiple possible capital flow paths were unfolded, of which two main paths were successfully confirmed as complete capital flow chains after passing dynamic threshold filtering. The first main path is S→N1→N5→N9→T1, with edge weights of 0.85, 0.78, and 0.71 between nodes, respectively, ultimately reaching the terminal node T1, forming a complete capital 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, ultimately reaching the terminal node T2, forming a second complete capital flow chain with a total weight of 0.76. The figure 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 falls below the dynamic threshold of 0.35. The other type is a path that has a high initial edge weight but is truncated during subsequent extension, 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, 0.28, is lower than the threshold of 0.35, causing the path to be truncated. The figure also shows the suboptimal path N1→N6 (weight 0.34), which is also filtered because it falls 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. The final threshold of 0.35 is calculated comprehensively, effectively balancing the algorithm's accuracy and computational efficiency.
[0085] Through optimized path selection and filtering mechanisms, this technical solution can quickly identify the most likely capital flow links in complex transaction networks, providing key support for the subsequent formation of transaction link sets.
[0086] In this embodiment, the feature representation method based on spatiotemporal coupling not only captures the evolution law of transactions in time series, but also describes the topological relationship between transaction entities in cyberspace, making the description 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 not only ensures the integrity of important transaction links, but also effectively reduces the computational complexity and improves the efficiency and accuracy of transaction tracing. Through the two-way tracking strategy, it can not only fully restore the capital flow path, but also effectively identify potential abnormal transaction patterns. The link reconstruction method based on multi-dimensional transaction characteristics can accurately identify capital links with similar transaction patterns, providing a reliable data basis for subsequent transaction analysis and risk identification.
[0087] A second aspect of an embodiment of the present invention provides a system for intelligent classification and automatic accounting optimization processing of multi-source financial data, including: The first unit is used to receive multi-source enterprise financial data and perform text preprocessing to obtain transaction keyword phrases, structured transaction texts, and bill transaction texts; The second unit is used to construct a transaction scenario graph based on the semantic vectors of transaction keyword phrases, map structured transaction text and bill transaction text into the transaction scenario graph, calculate the transaction entity association, cluster transactions according to the transaction entity association to obtain transaction scenario clusters, map the transaction scenario clusters to preset financial rules to obtain a transaction classification rule set, and use the transaction classification rule set to classify transactions into regular transaction data, irregular transaction data, and pending transaction data; The third unit is used to match the expense type label, the income and expenditure type label, the business type label and the accounting subject code for the regular transaction data according to the transaction classification rule set; The fourth unit is used to construct a transaction traceability graph based on non-routine transaction data and pending transaction data. In the transaction traceability graph, the funds flow is traced forward to obtain the funds destination chain, and the funds source chain is traced backward. Transaction node relationships are extracted based on the funds destination chain and funds source chain to obtain a transaction link set. The integrity of the transaction link set is analyzed, incomplete transaction links are marked, and anomaly analysis reports corresponding to the incomplete transaction links are output. Complete transaction links are marked as valid transaction data and accounting vouchers are generated. The fifth unit is used to write the accounting voucher into the financial accounting system to complete automatic accounting.
[0088] According to a third aspect of an embodiment of the present invention, an electronic device is provided, including: A processor and a memory for storing processor-executable instructions, wherein the processor is configured to call the instructions stored in the memory to execute the aforementioned method.
[0089] According to a fourth aspect of an embodiment of the present invention, a computer-readable storage medium is provided, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the method described above is implemented.
[0090] The present invention may be a method, an apparatus, a system and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for executing various aspects of the present invention.
[0091] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements 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: Receive multi-source enterprise financial data and perform text preprocessing to obtain transaction keyword phrases, structured transaction text, and bill transaction text; A transaction scenario graph is constructed based on the semantic vectors of transaction keyword phrases. Structured transaction text and bill transaction text are mapped to the transaction scenario graph to calculate the transaction entity association. Transaction scenarios are clustered based on the transaction entity association to obtain transaction scenario clusters. The transaction scenario clusters are constrained and mapped to preset financial rules to obtain a transaction classification rule set. The transaction classification rule set is used to classify transactions into regular transaction data, irregular transaction data, and pending transaction data. Match expense type tags, revenue and expenditure type tags, business type tags, and accounting subject codes for regular transaction data based on the transaction classification rule set; Construct a transaction traceability graph using irregular transaction data and pending transaction data. In the transaction traceability graph, trace the funds flow forward to obtain the funds destination chain, and trace it backward to obtain the funds source chain. Based on the funds destination chain and funds source chain, extract the transaction node relationships to obtain a transaction link set. Analyze the integrity of the transaction link set, mark incomplete transaction links, and output an anomaly analysis report corresponding to the incomplete transaction links. Mark complete transaction links as valid transaction data and generate accounting vouchers. The accounting voucher is written into the financial accounting system to complete automatic accounting.
2. The method according to claim 1, characterized in that Receive multi-source enterprise financial data and perform text preprocessing to obtain transaction keyword phrases, structured transaction text, and bill transaction text, including: Acquiring multi-source enterprise financial data, including enterprise bank transaction data, invoice data, contract data, and image bill data; Performing word segmentation and part-of-speech tagging on the corporate bank transaction data to obtain transaction keyword phrases; Performing field parsing and format conversion on the invoice data and the contract data according to preset text structure rules to obtain a structured transaction text; Optical character recognition and layout analysis are performed on the image bill data to extract text information from key areas of the bill to obtain the bill 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 phrases. Structured transaction text and bill transaction text are mapped to the transaction scenario graph to calculate the transaction entity association. Transaction scenarios are clustered based on the transaction entity association to obtain transaction scenario clusters. The transaction scenario clusters are constrained and mapped to preset financial rules to obtain a transaction classification rule set. The transaction classification rule set is used to classify transactions to obtain regular transaction data, irregular transaction data, and pending transaction data, including: Perform semantic vectorization on transaction keyword phrases to obtain word vector representations, calculate the correlation between the word vector representations to obtain a semantic association matrix, and construct a transaction scenario graph based on the correlation values greater than a preset threshold in the semantic association matrix, where the edge weights between nodes in the transaction scenario graph are the corresponding correlation values; Extracting transaction entities from structured transaction texts and bill transaction texts as mapping nodes, calculating the association strength between the mapping nodes and nodes in the transaction scenario graph, where the association strength is a weighted combination of semantic similarity, co-occurrence frequency, and position relevance, and constructing a transaction entity association matrix based on the association strength; Decomposing the transaction entity association matrix to obtain a feature matrix, performing cluster analysis on the feature matrix to obtain transaction scenario clusters, wherein the transaction scenario clusters represent feature distributions of different types of transactions; The transaction scenario cluster is feature-matched with preset financial rules to obtain a rule mapping relationship, the rule mapping relationship is scored and screened to construct a transaction classification rule set, a transaction score is calculated according to the transaction classification rule set, and transactions are divided into regular transactions, non-routine transactions and pending transactions based on the transaction score and a preset score threshold.
4. The method according to claim 3, characterized in that Performing feature matching between the transaction scenario cluster and preset financial rules to obtain a rule mapping relationship, scoring and screening the rule mapping relationship to construct a transaction classification rule set, and calculating the transaction score based on the transaction classification rule set includes: Projecting the transaction scenario cluster feature vector and the preset financial rule feature vector into the same feature space, calculating the dot product between the transaction scenario cluster feature vector and the financial rule feature vector and dividing it by the vector modulus product to obtain feature vector similarity, and constructing an initial rule mapping relationship based on the scenario cluster and financial rule pairs whose feature vector similarity is greater than a first preset threshold; Extract the fund receipt and payment information of the transaction entities in the initial rule mapping relationship, take the transaction entities as nodes, and the fund receipt and payment relationship as directed edges. According to the direction and amount of fund flow, weight the directed edges to construct a fund flow dependency graph. Based on the time interval, co-occurrence frequency and amount correlation of the transaction entities, calculate the transaction event correlation strength. The rule mapping basic score is calculated using the initial rule mapping relationship and the rule coverage ratio. Based on the capital flow dependency graph and the correlation strength of trading events, the implicit trading patterns are determined to generate derived rules. The initial rule mapping relationship and the derived rules are combined to obtain an enhanced rule mapping relationship. The causal influence strength is obtained by taking the weighted sum of the influence strength and reliability of the causal transmission path. The rule mapping basic score and the causal influence strength are weighted and integrated according to a preset weight coefficient to obtain a rule mapping relationship score. The ratio of the number of valid nodes to the total number of nodes in the enhanced rule mapping relationship is calculated to obtain the link integrity. The transaction classification rule set is constructed based on the rules whose rule mapping relationship scores are greater than a second preset threshold and whose link integrity is greater than a third preset threshold. Calculate the matching degree between the transaction to be classified and each rule in the transaction classification rule set, and sum the matching degree with the rule weight to obtain the transaction score.
5. The method according to claim 1, wherein Matching expense type tags, revenue and expenditure type tags, business type tags, and accounting subject codes for regular transaction data based on the transaction classification rule set includes: receiving regular transaction data, calculating the degree of matching between the regular transaction data and each rule in the rule set according to the transaction classification rule set, and selecting the rule with the highest matching degree as the target rule; Extracting expense type tags, revenue and expenditure type tags, business type tags, and accounting subject codes from the target rules; Establish an association relationship between the expense type tag, the income and expenditure type tag, the business type tag and the accounting subject code and the regular transaction data.
6. The method according to claim 1, wherein Construct a transaction traceability graph using non-routine transaction data and pending transaction data. In the transaction traceability graph, trace the funds flow forward to obtain the funds destination chain, and trace the funds source chain backward. Based on the funds destination chain and funds source chain, extract the transaction node relationships to obtain a transaction link set. Analyze the integrity of the transaction link set, mark incomplete transaction links, and output an anomaly analysis report corresponding to the incomplete transaction links. Mark the complete transaction link as valid transaction data and generate accounting vouchers, including: Transaction entities in unconventional transaction data and pending transaction data are used as nodes, and fund flow relationships are used as directed edges to construct a transaction traceability graph. The edge weights between the nodes are calculated based on transaction amount, transaction frequency, and time correlation. Extract the starting node from the transaction tracing graph, select the path with the maximum edge weight through the depth-first search algorithm, and trace forward along the capital flow to obtain the capital destination chain. Extract the ending node and trace backward to obtain the capital source chain. Based on the capital destination chain and capital source chain, extract the transaction node relationship to obtain the transaction link set. Nodes with complete fund transactions in the transaction chain are counted as valid nodes. The ratio of the number of valid nodes to the total number of nodes is calculated to obtain the node integrity score. The difference between fund income and expenditure and the maximum income and expenditure amount is calculated to obtain the amount consistency score. The transaction time interval is calculated to obtain the time sequence rationality score. A comprehensive transaction link score is calculated by weighting the node integrity score, amount consistency score, and time sequence rationality score. Transaction links with a comprehensive transaction link score below a preset threshold are marked as incomplete. The broken link location, amount difference, and time sequence anomaly are extracted to generate an anomaly analysis report. The transaction links whose comprehensive scores are greater than the preset threshold are marked as valid transaction data, the transaction subject information, transaction amount, transaction time and business type are extracted, the debit and credit accounts are determined and the accounting vouchers are generated.
7. The method according to claim 6, characterized in that Extract the starting node from the transaction tracing graph, select the path with the maximum edge weight through the depth-first search algorithm, and trace forward along the capital flow to obtain the capital destination chain. Extract the ending node and trace backward to obtain the capital source chain. Based on the capital destination chain and capital source chain, extract the transaction node relationship to obtain the transaction link set including: Extract the time intervals between adjacent transactions, transaction frequency characteristics, and time series pattern characteristics of transaction nodes to obtain time dimension characteristics. Calculate the node degree, centrality, and clustering coefficient of transaction nodes to obtain space dimension characteristics. Perform tensor outer product operations on the time dimension characteristics and space dimension characteristics to obtain space-time coupling characteristics. Based on the spatiotemporal coupling feature, the edge weights of the transaction traceability graph are updated. The time decay value is calculated by multiplying the exponential decay product of the transaction time difference and the initial time. The spatial correlation is calculated by calculating the ratio of the number of common neighbors between transaction nodes to the total number of neighbors. The time decay value and spatial correlation are weighted to obtain the maximum edge weight. Extract the starting node from the transaction tracing graph, use the depth-first search algorithm with maximum edge weight to expand the path, determine the dynamic threshold based on path length and node degree, and filter low-weight paths. Trace the funds flow forward to obtain the funds destination chain, and extract the ending node for reverse tracing to obtain the funds source chain. The edge weights corresponding to the newly added transaction data are merged and updated with the funds destination chain and funds source chain. The transfer direction, transfer amount and transfer time between adjacent nodes in the funds destination chain and funds source chain are analyzed to obtain the transaction node relationship. The funds destination chain and funds 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 according to any one of claims 1 to 7, characterized in that: include: The first unit is used to receive multi-source enterprise financial data and perform text preprocessing to obtain transaction keyword phrases, structured transaction texts, and bill transaction texts; The second unit is used to construct a transaction scenario graph based on the semantic vectors of transaction keyword phrases, map structured transaction text and bill transaction text into the transaction scenario graph, calculate the transaction entity association, cluster transactions according to the transaction entity association to obtain transaction scenario clusters, map the transaction scenario clusters to preset financial rules to obtain a transaction classification rule set, and use the transaction classification rule set to classify transactions into regular transaction data, irregular transaction data, and pending transaction data; The third unit is used to match the expense type label, the income and expenditure type label, the business type label and the accounting subject code for the regular transaction data according to the transaction classification rule set; The fourth unit is used to construct a transaction traceability graph based on non-routine transaction data and pending transaction data. In the transaction traceability graph, the funds flow is traced forward to obtain the funds destination chain, and the funds source chain is traced backward. Transaction node relationships are extracted based on the funds destination chain and funds source chain to obtain a transaction link set. The integrity of the transaction link set is analyzed, incomplete transaction links are marked, and anomaly analysis reports corresponding to the incomplete transaction links are output. Complete transaction links are marked as valid transaction data and accounting vouchers are generated. The fifth unit is used to write the accounting voucher into the financial accounting system to complete automatic accounting.
9. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor is configured to call the 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 a processor, the method according to any one of claims 1 to 7 is implemented.
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
Financial transaction anomaly detection and risk assessment method and device based on artificial intelligence
CN119693111A
Cited By
Electronic certificate generation method and device, electronic equipment and storage medium
CN121414525A
Accounting file management method and system based on block chain technology and large language model
CN121542223A
Automatic engineering financial cost accounting method based on fund chain tracing
CN121544213A
Engineering financial cost automatic accounting method based on fund chain tracing
CN121544213B
Financial statement automatic generation method and system based on ERP system
CN121638190A