Method for generating financial accounting voucher through electronic invoice automatic matching based on deep learning

By constructing a field-account mapping graph using deep learning and ant colony algorithms, the problem of misclassification in invoice field matching was solved, enabling efficient and accurate generation of financial accounting vouchers and improving the level of corporate financial management.

CN121280159APending Publication Date: 2026-01-06策拉控股云南有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511458792.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-13
Publication Date
2026-01-06

AI Technical Summary

Technical Problem

Existing technologies are prone to field confusion due to template similarity when extracting invoice fields, leading to incorrect invoice classification and a high rate of account mismatch, which cannot meet the intelligent financial accounting needs of modern enterprises.

Method used

A deep learning model is used to identify invoice fields, and an ant colony algorithm is used to construct a field-account mapping graph. The matching process is optimized through multi-node path planning to generate high-quality financial accounting vouchers.

Benefits of technology

It significantly improves the efficiency of invoice processing and the accuracy of financial accounting vouchers, reduces manual intervention and errors, and enhances the accuracy and reliability of financial data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121280159A_ABST
    Figure CN121280159A_ABST
Patent Text Reader

Abstract

The invention discloses a method for generating a financial accounting voucher through automatic matching of electronic invoices based on deep learning, and relates to the technical field of financial management, and the method comprises the steps: collecting various electronic invoice samples in a financial environment of a target enterprise, and carrying out the preprocessing of the electronic invoice samples; identifying character fields in the invoices by using a deep learning model, labeling field categories, and extracting field areas and field features; and constructing an invoice field association network based on the extracted field features, and determining potential semantic and position relationships among the fields. Through the deep learning technology, the field features in the electronic invoice are rapidly and accurately extracted and recognized, the ant colony algorithm is combined to optimize the matching process of the fields and the financial subjects, manual intervention is remarkably reduced, the overall efficiency of invoice processing is improved, the input speed of invoice data is increased, and the input efficiency of the electronic invoice is improved. And errors caused by manual operation are reduced, so that the generation of the financial accounting voucher is quicker and more efficient.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of financial management technology, specifically to a method for automatically matching electronic invoices and generating financial accounting vouchers based on deep learning. Background Technology

[0002] With the rapid development of information technology, traditional accounting methods are gradually failing to meet the needs of modern enterprises, especially in data processing and management. Electronic invoices, as digital documents, can greatly improve the efficiency of invoice management and reduce errors caused by manual operations. As enterprises transform towards digitalization and intelligence, financial systems are also gradually developing towards automation and intelligence. Automated matching and generation of financial accounting vouchers not only conforms to the trend of intelligent development, but also enables more efficient integration with other enterprise resource management systems such as ERP and financial systems, thereby improving the overall level of enterprise management.

[0003] In existing technologies, invoice field extraction relies on local feature association, which can easily lead to field confusion due to template similarity, causing invoices to be misclassified due to similar fonts or positions. Therefore, how to combine deep learning and ant colony algorithms to treat invoice field matching as a multi-node path planning problem and construct a field-account mapping graph to reduce the account mismatch rate and improve the accuracy of financial accounting voucher generation is the problem that this invention aims to solve. To this end, a method for automatic matching and generation of financial accounting vouchers based on deep learning for electronic invoices is proposed. Summary of the Invention

[0004] The purpose of this invention is to provide a method for automatically matching electronic invoices and generating financial accounting vouchers based on deep learning, so as to solve the problems mentioned in the background art.

[0005] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is as follows: A deep learning-based method for automatically matching electronic invoices to generate financial accounting vouchers includes the following steps: S1. Collect various electronic invoice samples from the target company's financial environment and perform preprocessing operations on the electronic invoice samples, including grayscale conversion, noise reduction, and cropping. S2. Use a deep learning model to identify text fields in invoices, label field categories including amount, date and item, and extract field areas and field features; S3. Construct an invoice field association network based on the extracted field features to clarify the potential semantic and positional relationships between each field; S4. Transform the field matching problem into multi-node path planning, and initialize the connection paths between feature nodes of each field using the ant colony algorithm. S5. Based on the ant colony algorithm results, match the field features of the invoice with the corresponding accounts, verify the matching results, and filter out feasible paths that conform to the invoice logic and business rules. S6. Construct a field-account mapping diagram based on feasible paths, and clarify the specific financial account corresponding to each field; S7. Use the field-account mapping diagram to match the field features of electronic invoices with accounts, and automatically generate financial accounting vouchers based on the matching results to ensure the accuracy and completeness of voucher information.

[0006] A further improvement to the technical solution of the present invention is that: S1 specifically includes: Define the scope of the target company's financial environment, covering all financial business scenarios, extract diverse and representative electronic invoice samples, and record metadata such as source information, issuance date, and business type. Based on the format classification of electronic invoice samples, non-image format invoices are converted into a unified image format, and a preprocessing environment for electronic invoice samples is established, and parameter templates for the preprocessing process are set. The preprocessing process involves sequential grayscale conversion, noise reduction, and cropping of the samples. The effects are monitored in real time. Parameters are adjusted or electronic invoice samples that do not meet quality standards are reprocessed. After quality inspection, the samples are stored in a unified data warehouse.

[0007] A further improvement to the technical solution of the present invention is that: S2 specifically includes: Based on the characteristics of invoice text field recognition, a deep learning model with Transformer architecture was selected. Image data of multiple types of invoices were collected as a training set and the field categories and regions were labeled to train the deep learning model. The preprocessed electronic invoice sample is input into the trained deep learning model to extract the shape and texture features of the text, perform text recognition and classify and label the field categories, and output the field area coordinates to clarify the position of the field in the invoice. Based on the field region coordinates, the field image region is extracted from the electronic invoice sample. Further, field feature information such as font size, font style and position is extracted to comprehensively describe the field attributes, and then the field features are stored in a structured data format.

[0008] A further improvement to the technical solution of the present invention is that: S3 specifically includes: The field features extracted include text content, font size, font style, and position coordinate information. Natural language processing technology is used to perform semantic analysis on the text content, identify field categories, and extract semantic relationships between fields. At the same time, the relative positional relationship of fields in the invoice layout is analyzed in combination with position information. Based on the field feature analysis results, we mine the association rules between fields, identify common combination patterns and layout rules through statistical analysis, construct an invoice field association network, and use fields as nodes and semantic and positional associations as edges to form a directed graph structure. The invoice field association network is optimized and validated. Domain knowledge and business rules are introduced to adjust the association relationships, correct unreasonable parts, and the accuracy and reliability of the network are verified using labeled electronic invoice sample data to ensure that it can accurately reflect the potential semantic and positional relationships between fields.

[0009] A further improvement to the technical solution of the present invention is that: S4 specifically includes: The invoice field matching problem is transformed into a multi-node path planning problem, where each field feature is regarded as a node, and the node attributes include text content, category, font size, font style and position coordinates; The ant colony algorithm is used to initialize the connection paths of field nodes, and ants are assigned to the nodes. The ants select paths and change the concentration according to heuristic rules and pheromone concentration. The initial paths generated by the ant colony algorithm are evaluated. Based on the invoice business rules and logic, valid paths that meet the matching logic are selected. The pheromone concentration is updated according to the quality of the paths, strengthening high-quality paths and weakening unreasonable paths. After multiple iterations, the algorithm converges to the optimal node connection.

[0010] A further improvement to the technical solution of the present invention is that S5 specifically includes: Based on the path planning results of the ant colony algorithm, the feature nodes of the invoice fields are assigned to the corresponding financial accounts according to the optimal path, forming a preliminary field-account mapping relationship; The initial matching results are fully validated, checking the rationality of field content, logical relationships, semantic associations and positions, and filtering out matching relationships that do not conform to logic and rules; After verification, feasible paths that conform to invoice logic and business rules are selected, unreasonable matches are adjusted, the relationship between field features and financial accounts is optimized, and high-quality field-account mapping relationships are generated.

[0011] A further improvement to the technical solution of this invention lies in the following: the process of generating high-quality field-subject mapping relationships is as follows: After completing the initial matching of invoice field features with financial accounts, the path planning results generated by the ant colony algorithm are evaluated. Based on the invoice logic and business rules, feasible paths that meet the requirements are selected, and matching paths that do not conform to the logic and rules are eliminated. For unreasonable matching relationships found during the verification process, adjustments or rematches are made. For errors in field content, logical relationships, and semantic associations, the association between field features and financial accounts is re-evaluated in conjunction with the business scenario and financial rules of the invoice, and the matching between field features and financial accounts is optimized to improve the accuracy and reliability of the matching. After adjustment and optimization, a high-quality field-account mapping relationship is generated. The resulting feasible path is used as the basis to show the correspondence between each field feature and the financial account, providing an accurate basis for the generation of financial accounting vouchers and enabling the field features of electronic invoices to match the corresponding financial accounts.

[0012] A further improvement to the technical solution of the present invention is that: S6 specifically includes: Based on the selected feasible paths, and combined with the multi-dimensional attributes of the fields, such as text content, category, font size, font style, and position coordinates, the correspondence between each field and the specific financial account is clarified according to the business scenario and financial rules. Based on the established field-account association, with fields as nodes and financial accounts as target points, a field-account mapping diagram is constructed by connecting fields with their corresponding financial accounts through feasible paths. This diagram displays the correspondence between field features and accounts. By using the field-account mapping diagram, the field features of electronic invoices are matched with financial accounts, ensuring high accuracy and completeness of voucher information and improving the efficiency and quality of financial processing.

[0013] A further improvement to the technical solution of this invention lies in the following: the process of constructing the field-subject mapping diagram is as follows: The established field-account relationships are systematically sorted and classified. Based on the business attributes, data types, and accounting scope of the financial accounts, the relationships are divided into different categories. A visualization tool is determined, and a mapping diagram framework is created in the visualization tool. The basic styles of field nodes and financial account target points are set, covering shape, color, and size attributes to ensure that the two are clearly distinguishable visually. At the same time, the layout of nodes and target points in the diagram is planned to ensure that the overall structure is reasonable and hierarchical. Based on the established relationships, the selected visualization tools are used to connect the field nodes with the corresponding financial account target points through feasible paths. During the connection process, the accuracy and uniqueness of the paths are ensured to avoid incorrect or duplicate connections. After the path connection is completed, detailed information annotations are added to each node, target point, and connection path. The organization mobilized finance and business personnel to conduct a comprehensive review of the constructed field-account mapping diagram. The review included verifying the accuracy of the correspondence between nodes and target points, the correctness of path connections, and the completeness of information annotations. Any issues discovered during the review process were analyzed and corrected to ensure the accuracy and reliability of the field-account mapping diagram. Once the review was approved, the relationships in the field-account mapping diagram were integrated into the financial system.

[0014] A further improvement to the technical solution of the present invention is that S7 specifically includes: OCR technology is used to extract multi-dimensional field features from electronic invoices. Combined with business scenarios and financial rules, financial accounts are accurately matched based on the field-account mapping diagram, and fuzzy relationships are marked for verification and adjustment. Financial accounting vouchers are automatically generated based on the matching results of the field-account mapping diagram. Field data is accurately filled into the corresponding account positions of the financial accounting vouchers. At the same time, the voucher data, accounts and key information are verified to ensure that the data is accurate. The generated financial accounting vouchers are pushed to the finance and business personnel for review, analysis and correction of problems, optimization of field-account mapping and voucher generation logic, and final confirmation of the optimized financial accounting vouchers by the finance manager. After verification, the vouchers are archived to ensure that they meet the accounting management requirements.

[0015] Due to the adoption of the above technical solution, the technical progress achieved by this invention compared to the prior art is as follows: 1. This invention provides a method for automatically matching electronic invoices to generate financial accounting vouchers based on deep learning. Through deep learning technology, the field features in electronic invoices are extracted and identified quickly and accurately. Combined with ant colony algorithm to optimize the matching process between fields and financial subjects, it significantly reduces manual intervention and improves the overall efficiency of invoice processing. It not only speeds up the entry of invoice data, but also reduces errors caused by manual operation, making the generation of financial accounting vouchers faster and more efficient.

[0016] 2. This invention provides a method for automatically matching electronic invoices and generating financial accounting vouchers based on deep learning. It uses a deep learning model to identify and classify invoice fields, and combines ant colony optimization for path planning and optimization, which can effectively reduce the field mismatch rate. Through multi-node path planning and multiple iterations of optimization, it can accurately match fields with financial subjects, ensuring that each field feature is accurately associated with the most relevant financial subject. It performs well when handling complex invoice formats and multiple field types, and significantly improves the accuracy of financial accounting voucher generation.

[0017] 3. This invention provides a method for automatically matching electronic invoices and generating financial accounting vouchers based on deep learning. Based on the matching results of the field-account mapping diagram, it automatically generates financial accounting vouchers and strictly verifies the voucher information to ensure the accuracy and integrity of the data. It can automatically detect and correct the rationality of field content, the logical relationship between fields, and the semantic association between fields and accounts, thereby generating high-quality financial accounting vouchers. This not only improves the accuracy of financial data but also enhances the reliability of financial analysis. Attached Figure Description

[0018] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this invention. For those skilled in the art, other drawings can be obtained based on these drawings.

[0019] Figure 1 This is a schematic diagram illustrating the workflow of the deep learning-based method for automatically matching electronic invoices and generating financial accounting vouchers according to the present invention. Figure 2 This is a flowchart of the method for automatically matching and generating financial accounting vouchers based on deep learning for electronic invoices according to the present invention. Detailed Implementation

[0020] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0021] Example 1, such as Figure 1 , Figure 2 As shown, this invention provides a method for automatically matching electronic invoices and generating financial accounting vouchers based on deep learning, including the following steps: S1. Collect various electronic invoice samples from the target company's financial environment, perform preprocessing operations on the electronic invoice samples including grayscale conversion, noise reduction, and cropping, clarify the scope of the target company's financial environment to cover all financial business scenarios, extract diverse and representative electronic invoice samples, record metadata such as source information, issuance date, and business type, classify electronic invoice samples according to their format, convert non-image format invoices into a unified image format, establish a preprocessing environment for electronic invoice samples, set parameter templates for the preprocessing process, perform grayscale conversion, noise reduction, and cropping preprocessing operations on the samples in sequence according to the preprocessing process, monitor the effect in real time, adjust parameters or reprocess electronic invoice samples that do not meet quality standards, and store them uniformly in the data warehouse after quality inspection. The specific work content includes: defining the scope of the target company's financial environment, covering all financial business scenarios within the company; extracting various electronic invoice samples from the company's financial system, electronic invoice repository, and related business platforms to ensure the diversity and representativeness of the samples, including different types of invoices (VAT invoices, general invoices, etc.), different formats (PDF, image formats), and different sources (online issuance and offline scanning); recording metadata such as the source information, issuance date, and business type of the samples; and preparing for preprocessing the collected electronic invoice samples, specifically: classifying and processing the electronic invoice samples according to their format; for non-image format invoices (PDF), using appropriate conversion tools to convert them to a unified image format (PNG or JPEG) to ensure consistency in subsequent processing; and establishing a preprocessing working environment, configuring image processing tools and software libraries (OpenCV), and setting parameters according to preprocessing requirements. The template includes parameter configurations for grayscale conversion, denoising, and cropping operations. A standardized preprocessing workflow is established, clearly defining the specific requirements and quality standards for each step to ensure the standardization and repeatability of the preprocessing process. Following the pre-defined standardized workflow, grayscale conversion, denoising, and cropping operations are sequentially performed on the electronic invoice samples. Grayscale conversion converts color images to grayscale, reducing image data volume. Denoising removes noise points from the image using Gaussian filtering, improving image quality and reducing the impact of interference factors on subsequent recognition. Cropping removes redundant blank areas from the image based on the invoice's layout and key information areas, focusing on core fields to further improve processing efficiency and accuracy. The processing effect is monitored in real time during each operation. For electronic invoice samples that do not meet quality standards, parameters are adjusted or the samples are reprocessed. After preprocessing, the processed electronic invoice samples undergo quality checks and are then uniformly stored in the data warehouse. S2. Use a deep learning model to identify text fields in invoices, label field categories including amount, date, and item, and extract field regions and field features. Based on the characteristics of invoice text field recognition, select a deep learning model with a Transformer architecture, collect image data of multiple types of invoices as a training set, label field categories and regions, train the deep learning model, input the preprocessed electronic invoice sample into the trained deep learning model, extract the shape and texture features of the text, perform text recognition and classify and label field categories, and output field region coordinates to clarify the position of the field in the invoice. Based on the field region coordinates, extract the field image region from the electronic invoice sample, further extract field feature information such as font size, font style, and position, comprehensively describe the field attributes, and then store the field features in a structured data format. The specific work involves: based on the characteristics of invoice text field recognition, selecting a suitable deep learning model architecture for invoice text recognition, namely the Transformer architecture. This includes collecting a large amount of invoice image data as a training set, ensuring the data covers various invoice types, formats, and font styles to enhance the model's generalization ability; labeling the training data to clarify the category of each field (amount, date, item, etc.); selecting the field regions as labels for supervised learning; training the deep learning model using the labeled data; adjusting the hyperparameters (learning rate and batch size) and optimization algorithm (Adam) to achieve high accuracy on the training set; and adjusting the deep learning model using a validation set to avoid overfitting, resulting in a deep learning model that accurately recognizes and labels invoice text fields. The preprocessed electronic invoice sample is input into a trained deep learning model. Feature extraction is performed on the input electronic invoice sample to extract the shape and texture features of the text in the image. The feature information is then used for text recognition to identify the text content in the electronic invoice sample. Based on the field category labeling rules learned during training, the identified text fields are classified and labeled to clarify the category to which each field belongs. At the same time, the position information of each field in the electronic invoice sample, i.e., the field region coordinates, is output. Based on the field region coordinates output by the deep learning model, the specific image region of each field is extracted from the electronic invoice sample. For each field region, field feature information is further extracted, including font size features, font style features, and position features, to comprehensively describe the attributes of the field. The extracted field features are then stored in a structured data format. S3. Based on the extracted field features, construct an invoice field association network to clarify the potential semantic and positional relationships between fields. Analyze the extracted field features, including text content, font size, font style, and position coordinates. Use natural language processing technology to perform semantic analysis on the text content, identify field categories, and extract semantic relationships between fields. At the same time, combine position information to analyze the relative positional relationship of fields in the invoice layout. Based on the field feature analysis results, mine the association rules between fields. Identify common combination patterns and layout rules through statistical analysis, and construct an invoice field association network. Use fields as nodes and semantic and positional relationships as edges to form a directed graph structure. Optimize and verify the invoice field association network, introduce domain knowledge and business rules to adjust the association relationships, correct unreasonable parts, and use labeled electronic invoice sample data to verify the accuracy and reliability of the network to ensure that it can accurately reflect the potential semantic and positional relationships between fields. The specific work involves: comprehensively analyzing the extracted field features, including the text content, font size, font style, and position coordinates; using natural language processing (NLP) technology to perform semantic analysis on the text content, identifying the categories to which the fields belong, including amount, date, and item, and extracting semantic relationships between fields; simultaneously, combining the field position information to analyze the relative positional relationships of fields in the invoice layout, such as adjacent fields and aligned fields; based on the results of the field feature analysis, mining the association rules between fields, identifying common combination patterns and layout rules between fields through statistical analysis, and constructing an invoice field association network according to the association rules, treating fields as nodes. The semantic and positional relationships between fields are used as edges to form a directed graph structure. In the invoice field association network, the weights of the edges are assigned based on the semantic similarity between fields. The constructed invoice field association network is optimized and validated. By introducing domain knowledge and business rules, the association relationships in the invoice field association network are adjusted and optimized. The manifestation of the association rules between fields in the invoice field association network is verified, and unreasonable association relationships are corrected. At the same time, the invoice field association network is validated using labeled electronic invoice sample data to evaluate the accuracy and reliability of the network, resulting in a field association network that reflects the potential semantic and positional relationships between invoice fields. S4. Transform the field matching problem into a multi-node path planning problem. Initialize the connection paths between each field feature node using the ant colony algorithm. Treat each field feature as a node. Node attributes include text content, category, font size, font style, and position coordinates. Use the ant colony algorithm to initialize the field node connection paths. Assign ants to nodes. Ants select paths and change the concentration according to heuristic rules and pheromone concentration. Evaluate the initial paths generated by the ant colony algorithm. Based on the invoice business rules and logic, select valid paths that meet the matching logic. Update the pheromone concentration according to the path quality, strengthen good paths, and weaken unreasonable paths. After multiple iterations, converge to the optimal node connection. The specific work involves transforming the invoice field matching problem into a multi-node path planning problem. Each field feature in the invoice is considered a node, where the node's attributes include the field's text content, category, font size, font style, and position coordinates. This abstracts the invoice field matching problem into finding the optimal path in a graph composed of field nodes. The goal of path planning is to find reasonable connection paths between field nodes to achieve correct matching between fields and financial accounts. The ant colony algorithm is used to initialize the connection paths between field feature nodes. The optimal path is found by simulating the behavior of ants releasing pheromones while searching for food. In the initialization phase, a certain number of ants are assigned to each field node. Ants randomly select paths to move between nodes, determining the probability of path selection based on heuristic rules and pheromone concentration. Initially, the pheromone concentration is uniformly distributed across all possible paths. As ants move, the pheromone concentration on each path gradually changes, guiding subsequent ants' path selection. The initial paths generated by the ant colony algorithm are evaluated and optimized. Based on the business rules and logic of invoices, the validity of each path is assessed, and paths that conform to the invoice field matching logic are selected. Simultaneously, the pheromone concentration is updated based on the quality of the paths, strengthening the pheromone concentration of high-quality paths and weakening the pheromone concentration of unreasonable paths. Through multiple iterations, the ant colony algorithm gradually converges to the optimal path, achieving reasonable connections between field feature nodes. S5. Based on the ant colony algorithm results, match the field features of the invoice with the corresponding accounts, verify the matching results, and filter out feasible paths that conform to the invoice logic and business rules. S6. Construct a field-account mapping diagram based on feasible paths, and clarify the specific financial account corresponding to each field; S7. Use the field-account mapping diagram to match the field features of electronic invoices with accounts, and automatically generate financial accounting vouchers based on the matching results to ensure the accuracy and completeness of voucher information.

[0022] Example 2, as Figure 1 , Figure 2 As shown, based on Embodiment 1, the present invention provides a technical solution: S5 specifically includes: according to the path planning results of the ant colony algorithm, the invoice field feature nodes are assigned to the corresponding financial accounts according to the optimal path to form a preliminary field-account mapping relationship; the preliminary matching results are fully verified, and the rationality, logical relationship, semantic association and position of the field content are checked; matching relationships that do not conform to logic and rules are filtered out; after the verification is completed, feasible paths that conform to invoice logic and business rules are filtered out; unreasonable matching is adjusted; the association relationship between field features and financial accounts is optimized; and a high-quality field-account mapping relationship is generated. Furthermore, the process of generating high-quality field-account mapping relationships is as follows: After completing the initial matching of invoice field features with financial accounts, the path planning results generated by the ant colony algorithm are evaluated. Based on invoice logic and business rules, feasible paths that meet the requirements are selected. This includes checking the rationality of field content and format, verifying the logical relationship between fields, and analyzing the semantic association between fields and financial accounts. At the same time, combined with the layout and format of the invoice, the field positions are evaluated to see if they conform to common patterns. Matching paths that do not conform to logic and rules are eliminated. For unreasonable matching relationships found during the verification process, adjustments or rematches are made. For errors in field content, logical relationship, and semantic association, the association between field features and financial accounts is re-evaluated in combination with the business scenario and financial rules of the invoice. The matching of field features and financial accounts is optimized to improve the accuracy and reliability of the matching. After adjustment and optimization, high-quality field-account mapping relationships are generated. The final feasible paths are used as the basis to show the correspondence between each field feature and financial account, providing an accurate basis for the generation of financial accounting vouchers. This ensures that the field features of electronic invoices are matched with the corresponding financial accounts, and that the generation of financial accounting vouchers has high accuracy and completeness. The specific work involves: Based on the path planning results generated by the ant colony algorithm, performing preliminary matching of invoice field features with financial accounts. Each field feature node is assigned to its corresponding financial account according to the optimal path determined by the ant colony algorithm, ensuring that each field feature can establish a preliminary association with the most relevant financial account, forming a preliminary field-account mapping relationship. The preliminary matching results are then thoroughly validated to verify whether the matching of field features and financial accounts conforms to invoice logic and business rules. This validation process includes checking the rationality of field content (whether the amount field is numeric, whether the date field conforms to the date format), the logical relationship between fields (whether the invoice amount matches the detailed amount), and the field... The semantic association between the project name and the account is verified (whether the project name matches the expense account). At the same time, the layout and format of the invoice are considered to verify whether the field position conforms to common patterns (the amount field is usually located in the lower right corner of the invoice). Matches that do not conform to logic and rules are filtered out. After the verification is completed, feasible paths that conform to the invoice logic and business rules are filtered out. For unreasonable matches found in the verification, adjustments or rematches are made. By optimizing the association between field features and financial accounts, the accuracy of the final matching results is ensured, thereby generating a high-quality field-account mapping relationship. The final feasible path is used as the basis for constructing the field-account mapping diagram to ensure the accuracy and completeness of the generated financial accounting vouchers. S6 specifically includes: based on the selected feasible paths, combined with the multi-dimensional attributes of the field's text content, category, font size, font style, and position coordinates, and according to business scenarios and financial rules, clarifying the correspondence between each field and specific financial accounts; based on the determined field-account association relationship, using fields as nodes and financial accounts as target points, connecting fields with corresponding financial accounts through feasible paths to construct a field-account mapping diagram, showing the correspondence between field features and accounts; and using the field-account mapping diagram to match the field features of electronic invoices with financial accounts, ensuring high accuracy and completeness of voucher information, and improving the efficiency and quality of financial processing. Furthermore, the process of constructing a field-account mapping diagram involves: systematically sorting and classifying the established field-account relationships; dividing the relationships into different categories based on the business attributes, data types, and accounting scope of the financial accounts; determining visualization tools, such as professional drawing software or programming libraries with graphic drawing capabilities; creating a mapping diagram framework within the visualization tool; setting the basic styles of field nodes and financial account target points, covering shape, color, and size attributes to ensure clear visual distinction; planning the layout of nodes and target points in the diagram to ensure a reasonable overall structure and clear hierarchy; and using the selected visualization tool to connect field nodes and corresponding financial account target points through feasible paths based on the sorted relationships. During the connection process, ensuring the accuracy and uniqueness of the paths and avoiding incorrect or duplicate connections is crucial. After establishing the path connections, detailed information annotations are added to each node, target point, and connection path. Node annotations include the field name, category, and data characteristics; target points include the financial account code, name, and accounting content; and connection paths include the matching basis and business scenario description. These annotations make the correspondences in the mapping diagram clearer and more explicit. Financial and business personnel conduct a comprehensive review of the constructed field-account mapping diagram. The review includes verifying the accuracy of the correspondence between nodes and target points, the correctness of the path connections, and the completeness of the information annotations. Problems discovered during the review are analyzed and corrected to ensure the accuracy and reliability of the field-account mapping diagram. After approval, the relationships in the field-account mapping diagram are integrated into the financial system. Data testing is conducted during the integration process to verify that the system can accurately generate financial accounting vouchers based on the mapping relationships. The specific work involves: based on the selected feasible paths, analyzing the relationship between field features and financial accounts within those paths; clarifying the correspondence between each field feature and a specific financial account based on the multi-dimensional attributes of the field's text content, category, font size, font style, and position coordinates, combined with business scenarios and financial rules; further verifying and adjusting any ambiguous or uncertain relationships to ensure accurate matching between fields and financial accounts; constructing a field-account mapping graph based on the determined field-account relationships, using fields as nodes and financial accounts as target points, and connecting fields with their corresponding financial accounts through feasible paths to form a clear mapping graph; displaying the correspondence between each field feature and a specific financial account in the mapping graph to ensure high accuracy and completeness in the generation of financial accounting vouchers, achieving efficient and accurate matching between electronic invoice field features and financial accounts; S7 specifically includes: using OCR technology to extract multi-dimensional field features of electronic invoices, combining business scenarios and financial rules, accurately matching financial accounts based on the field-account mapping diagram, marking fuzzy relationships for verification and adjustment, automatically generating financial accounting vouchers based on the matching results of the field-account mapping diagram, accurately filling field data into the corresponding account positions of the financial accounting vouchers, verifying voucher data, accounts, and key information to ensure data accuracy, pushing the generated financial accounting vouchers to the financial personnel and business personnel for review, analyzing and correcting problems, optimizing the field-account mapping diagram and voucher generation logic, and having the financial manager make final confirmation of the optimized financial accounting vouchers. After verification, the vouchers are archived to ensure that they meet accounting management requirements. The specific work involves: Utilizing OCR (Optical Character Recognition) technology to extract field features from electronic invoices, including multi-dimensional information such as text content, category, font size, font style, and position coordinates. Based on a field-account mapping diagram, the extracted field features are accurately matched with financial accounts. During the matching process, business scenarios and financial rules are considered to ensure an accurate association between each field feature and the most relevant financial account. For ambiguous or uncertain associations, they are marked for further verification and adjustment to ensure the accuracy and reliability of the matching results. Based on the matching results of the field-account mapping diagram, financial accounting vouchers are automatically generated. According to the matched field-account correspondence, the field data is accurately filled into the corresponding account positions on the financial accounting voucher, generating complete accounting voucher content. Simultaneously, the generated voucher information is processed... Verification is performed to ensure the accuracy of data in the vouchers, the clarity of account correspondences, and that key information such as amounts and dates comply with financial regulations. The generated accounting vouchers are then pushed to both finance and business personnel for further review. This review checks the accuracy of information, the rationality of account matching, and the completeness of data. Issues discovered during the review process are analyzed and corrected, and the field-account mapping diagram and voucher generation logic are optimized. For fields with frequent matching errors, their correspondences in the mapping diagram are adjusted. For problems in the voucher generation process, the generation algorithm is improved. After review and correction, the finance manager conducts a final confirmation of the optimized accounting vouchers. Once confirmed, the accounting vouchers are archived to ensure the accuracy of the final generated accounting vouchers and compliance with financial accounting and management requirements.

[0023] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A method for automatically matching and generating financial accounting vouchers based on deep learning of electronic invoices, characterized in that, The method comprises the following steps: S1, collecting various electronic invoice samples in the financial environment of the target enterprise, and performing preprocessing operations on the electronic invoice samples; S2, using a deep learning model to identify the text fields in the invoice, label the field categories, and extract the field features; S3, constructing an invoice field association network based on the extracted field features, and clearly defining the potential semantic and positional relationships between the fields; S4, converting the field matching problem into a multi-node path planning, and initializing the connection paths between the field feature nodes using an ant colony algorithm; S5, according to the ant colony algorithm result, matching the field features of the invoice with the corresponding subjects, and verifying the matching results to filter out the feasible paths that meet the invoice logic and business rules; S6, constructing a field-subject mapping graph based on the feasible paths, and clearly defining the specific financial subjects corresponding to each field; S7, using the field-subject mapping graph to match the field features of the electronic invoice with the subjects, and automatically generating financial accounting vouchers according to the matching results.

2. The deep learning based electronic invoice automatic matching to generate financial accounting voucher method according to claim 1, characterized in that: The S1 specifically comprises: Defining the scope of the target enterprise financial environment, covering all financial business scenarios, extracting a variety of representative electronic invoice samples, and recording metadata such as source information, issuance date and business type; According to the format classification of the electronic invoice samples, converting the non-image format invoices into a unified image format, and establishing a preprocessing environment for the electronic invoice samples, setting the parameter templates of the preprocessing process; According to the preprocessing process, the samples are sequentially preprocessed by gray scale, denoising and cropping, the effect is monitored in real time, the parameters are adjusted or the electronic invoice samples that do not meet the quality standards are reprocessed, and after quality inspection, they are stored uniformly in the data warehouse. 3.The deep learning based electronic invoice automatic matching to generate financial accounting voucher method of claim 1, wherein: The S2 specifically comprises: According to the characteristics of invoice text field recognition, select a deep learning model with Transformer architecture, collect multiple types of invoice image data as training set and label field categories and regions, and train the deep learning model; Input the preprocessed electronic invoice samples into the trained deep learning model, extract the shape and texture features of the text, perform text recognition and classification, label the field categories, and output the field region coordinates to clearly define the position of the field in the invoice; According to the field region coordinates, extract the field image region from the electronic invoice sample, further extract the field feature information of font size, font style and position, and then store the field features in a structured data format.

4. The deep learning based electronic invoice automatic matching for generating financial accounting document method according to claim 1, characterized in that: The S3 specifically comprises: Analyze the extracted field features including text content, font size, font style and position coordinate information, use natural language processing technology to perform semantic analysis on the text content, identify the field categories, and extract the semantic associations between the fields, and analyze the relative position relationship of the fields in the invoice layout based on the position information; Based on the analysis results of the field features, mine the association rules between the fields, identify common combination patterns and layout rules through statistical analysis, construct an invoice field association network, take the fields as nodes, the semantic associations and positional associations as edges, and form a directed graph structure; Optimize and verify the invoice field association network, introduce domain knowledge and business rule adjustment association, correct unreasonable parts, and verify the accuracy and reliability of the network using annotated electronic invoice sample data.

5. The deep learning based electronic invoice automatic matching for generating financial accounting document method according to claim 1, characterized in that: The S4 specifically includes: Convert the invoice field matching problem into a multi-node path planning problem, treat each field feature as a node, and the node attributes include text content, category, font size, font style, and position coordinates; Use the ant colony algorithm to initialize the field node connection path, assign ants to the nodes, and the ants select paths and change the concentration according to the heuristic rules and pheromone concentration; Evaluate the initial path generated by the ant colony algorithm, filter out the effective path that meets the matching logic according to the invoice business rules and logic, and update the pheromone concentration according to the path quality, strengthen the high-quality path, and weaken the unreasonable path, and after multiple iterations, converge to the optimal implementation of node connection. 6.The deep learning based electronic invoice automatic matching for generating financial accounting document method of claim 1, wherein: The S5 specifically includes: According to the path planning results of the ant colony algorithm, assign the invoice field feature nodes to the corresponding financial subjects according to the optimal path to form a preliminary field-subject mapping relationship; Comprehensively check the preliminary matching results, check the field content rationality, logical relationship, semantic association, and position, and filter out the matching relationship that does not meet the logic and rules; After completing the verification, filter out the feasible path that meets the invoice logic and business rules, adjust the unreasonable matching, optimize the association between the field features and the financial subjects, and generate high-quality field-subject mapping relationships.

7. The deep learning based electronic invoice automatic matching to generate financial accounting voucher method according to claim 6, characterized in that: The process of generating high-quality field-subject mapping relationships is: After completing the preliminary matching of the invoice field features and the financial subjects, evaluate the path planning results generated by the ant colony algorithm, filter out the feasible path that meets the requirements according to the invoice logic and business rules, and eliminate the matching path that does not meet the logic and rules; For the unreasonable matching relationship found in the verification process, adjust or rematch, correct the errors in the field content, logical relationship, and semantic association, re-evaluate the association between the field features and the financial subjects according to the business scenarios and financial rules of the invoice, and optimize the matching between the field features and the financial subjects; After adjustment and optimization, generate high-quality field-subject mapping relationships, and use the final feasible path as the basis to display the corresponding relationship between each field feature and the financial subject, so that the field features of the electronic invoice are matched to the corresponding financial subjects. 8.The deep learning based electronic invoice automatic matching for generating financial accounting document method of claim 1, wherein: The S6 specifically includes: Based on the filtered feasible path, combine the multi-dimensional attributes of the field text content, category, font size, font style, and position coordinates, and according to the business scenarios and financial rules, determine the corresponding relationship between each field and the specific financial subject; According to the determined field-subject association relationship, take the field as the node and the financial subject as the target point, connect the field with the corresponding financial subject through the feasible path, construct a field-subject mapping graph, display the corresponding relationship between the field features and the subjects, and match the field features of the electronic invoice with the financial subjects through the field-subject mapping graph. 9.The deep learning based electronic invoice automatic matching to generate financial accounting voucher method of claim 8, wherein: The process of constructing the field-subject mapping graph is: The determined field-subject association relationship is systematically combed and classified, the association relationship is divided into different categories according to the business attributes, data types and accounting categories of the fields, the visualization tool is determined, the mapping diagram framework is created in the visualization tool, the basic style of the field node and the financial subject target point is set, the shape, color and size attributes are covered, and the layout of the node and the target point in the diagram is planned; According to the combed association relationship, the field node and the corresponding financial subject target point are connected through a feasible path using the selected visualization tool. After completing the path connection, detailed information labels are added to each node, target point and connection path; The financial personnel and business personnel conduct a comprehensive audit on the constructed field-subject mapping diagram, the audit content includes whether the corresponding relationship of the node and the target point is accurate, whether the path connection is correct and whether the information label is complete. According to the problems found in the audit process, analysis and correction are carried out. After the audit is passed, the association relationship in the field-subject mapping diagram is integrated into the financial system. 10.The deep learning based electronic invoice automatic matching for generating financial accounting voucher method according to claim 1, characterized in that: The S7 specifically includes: Multi-dimensional field features of electronic invoices are extracted by using OCR technology, business scenarios and financial rules are combined, financial subjects are accurately matched according to the field-subject mapping diagram, and fuzzy association relationships are marked for verification and adjustment; Based on the matching results of the field-subject mapping diagram, financial accounting vouchers are automatically generated, field data is accurately filled into the corresponding subject position of the financial accounting voucher, and the voucher data, subject and key information are verified; The generated financial accounting vouchers are pushed to the financial personnel end and the business personnel end for auditing, problem analysis and correction, optimization of the field-subject mapping diagram and voucher generation logic, and final confirmation of the optimized financial accounting vouchers by the financial responsible person. After no error is found, the vouchers are archived.