Invoice information automatic filling method and system based on finance and taxation big language model
Through the automated filling method and system of invoice information based on the financial and taxation language model, the problems of non-compliance in invoice information filling and labor-intensive in the existing technology are solved, and the accurate and automated filling of invoice information is achieved, reducing costs and error risks, and improving operational efficiency.
Patent Information
- Application Number
- CN202411939533.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-26
- Publication Date
- 2025-05-27
AI Technical Summary
The lack of automated filling methods for invoice information based on language models in the prior art makes it difficult for enterprises to ensure the accuracy and compliance of invoice information when tax regulations change, and requires a lot of manual labor, which increases costs and error risks.
The automatic filling method and system of invoice information based on the financial and taxation language model is adopted. By obtaining the financial and taxation data set, pre-marking and review correction, voice recognition and multiple rounds of question and answer processes, the accurate extraction of user voice input information and the automatic filling of invoice information are realized.
It realizes the automatic filling of invoice information, reduces the need for manual entry, reduces labor costs and error risks, improves work efficiency and overall operational efficiency, and ensures the accuracy and compliance of invoice information.
Smart Images

Figure CN120047205A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of language processing, and in particular to an automated invoice information filling method and system based on a large financial and tax language model, Background Art
[0002] With the rapid development of information technology and the acceleration of enterprise digital transformation, the popularity of electronic invoices has made the demand for automated invoice information filling more urgent. With the continuous changes in tax regulations, enterprises need to ensure the accuracy and compliance of invoice information. Automated filling technology can be updated in real time to meet the latest regulatory requirements, helping enterprises better manage invoice information and reduce risks caused by non-compliance. At the same time, it can effectively reduce the mechanical and repetitive labor of financial personnel, reduce human errors, and effectively improve work efficiency. By introducing automated and intelligent technologies, enterprises can gradually achieve digitalization and intelligentization of financial processes, improving overall operational efficiency and management level.
[0003] The large financial and tax language model improves various core and professional financial and tax capabilities through continued pre-training and fine-tuning on an open-source base model. Compared with general language models, it shows unique professional advantages in the field of finance and accounting. Especially in key capabilities such as financial and accounting professional knowledge and invoice information extraction, the large financial and tax language model can more accurately extract relevant information from user dialogue information, ensuring high efficiency and accuracy in accounting rule compliance and electronic voucher generation, significantly improving the professional performance of digital accounting, and providing strong support for enterprises to operate steadily in a complex and changing market environment. However, there is no existing automated invoice information filling method based on a language model. Summary of the Invention
[0004] In view of the above technical problems, the present invention provides an automated invoice information filling method and system based on a large financial and tax language model, and the method includes;
[0005] Obtain relevant financial and tax data sets;
[0006] Complete pre-training and fine-tuning of the large financial and tax language model by pre-labeling and auditing and correcting the financial and tax data sets;
[0007] Convert the common voice information input by the user into text information through voice recognition;
[0008] Based on the large financial and tax language model, extract key invoice information by presetting prompt text, combining the text information, preset background information of the user, and invoice information, and complete automated filling of invoice information according to the key invoice information.
[0009] Further, the relevant financial and tax data sets include:
[0010] Financial statements, tax data, and accounting and financial laws and regulations documents.
[0011] Further, after the step of obtaining the relevant fiscal and tax data set, it further includes:
[0012] Performing desensitization processing on the data set by identifying sensitive information in the data set and processing sensitive text by replacement or masking;
[0013] Cleaning the data set, including removing special characters, removing stop words, removing extra spaces, removing typos, and text padding;
[0014] Performing data augmentation by using synonym replacement, sentence structure adjustment, inserting or deleting words.
[0015] Further, through pre-annotating and auditing and correcting the fiscal and tax data set, the pre-training and fine-tuning of the fiscal and tax large language model are completed, including:
[0016] For the element extraction task in the fiscal and tax data set, annotating key elements such as transaction objects, amounts, and subjects;
[0017] For the voucher generation task, annotating voucher elements such as subjects, amounts, and entry directions;
[0018] Having business experts audit and correct the annotated elements to complete the pre-training and fine-tuning of the fiscal and tax large language model.
[0019] Further, based on the fiscal and tax large language model, by presetting prompt text, combining the text information, the background information of the preset user, and the invoicing information, extracting key invoicing information, and completing the automatic filling of invoice information according to the key invoicing information, including:
[0020] Based on the fiscal and tax large language model, extracting key invoicing information from the voice information of the current user through preset prompt text, combining the text information, the background information of the preset user, and the invoicing information;
[0021] Determining the input-output format of the large language model and the key fields for automatic filling of invoice information;
[0022] Filling each key field according to the key invoicing information to complete the automatic filling of invoice information.
[0023] The present invention also provides an automatic invoice information filling system based on a fiscal and tax large language model, which is characterized by including:
[0024] A data set acquisition module for acquiring relevant fiscal and tax data sets;
[0025] A pre-training and fine-tuning module for pre-training and fine-tuning a large language model for finance and taxation by pre-annotating and auditing and correcting the finance and taxation data set;
[0026] A prompt text determination module for converting the common voice information input by the user into text information through speech recognition;
[0027] An automated filling module, based on the large language model for finance and taxation, extracts key invoicing information by presetting prompt text, combining the text information, the preset background information of the user and the invoicing information, and completes the automated filling of invoice information according to the key invoicing information.
[0028] Furthermore, the relevant finance and taxation data set includes:
[0029] Financial statements, tax data and accounting laws and regulations documents.
[0030] Furthermore, it also includes:
[0031] A data desensitization processing module for desensitizing the data set, by identifying sensitive information in the data set and processing sensitive text by replacement or masking;
[0032] A data cleaning module for cleaning the data set, including removing special characters, removing stop words, removing extra spaces, removing typos, and text padding;
[0033] A data augmentation module for data augmentation by using synonym replacement, sentence structure adjustment, insertion or deletion of words.
[0034] Furthermore, the pre-training and fine-tuning module includes:
[0035] A first annotation sub-module for annotating key elements such as transaction objects, amounts, and subjects for the element extraction task in the finance and taxation data set;
[0036] A second annotation sub-module for annotating voucher elements such as subjects, amounts, and voucher entry directions for the voucher generation task;
[0037] An auditing and correction sub-module for auditing and correcting the annotated elements by business experts to complete the pre-training and fine-tuning of the large language model for finance and taxation.
[0038] Furthermore, the automated filling module includes:
[0039] A key invoicing information extraction sub-module for extracting key invoicing information from the voice information of the current user through preset prompt text, combining the text information, the preset background information of the user and the invoicing information based on the large language model for finance and taxation;
[0040] A format and keyword field determination sub-module for determining the input and output formats of the large language model and the keyword fields for automatic filling of invoice information;
[0041] A text filling sub-module for filling each keyword field according to the key invoicing information to complete the automatic filling of invoice information.
[0042] An automatic invoice information filling method and system based on a large language model for finance and taxation provided by the present invention realizes accurate extraction of the user's voice input information through the extraction process from voice information to structured text and in combination with the designed multi-round question-and-answer process. The large model for finance and taxation trained based on the finance and taxation domain dataset can accurately identify and extract key information, realizing automatic extraction of invoice information. Based on the large language model for finance and taxation, the automatic extraction of invoice information reduces the need for manual entry, thereby reducing labor costs and at the same time saving additional costs caused by errors. Description of the Drawings
[0043] Figure 1 is a schematic flowchart of an automatic invoice information filling method based on a large language model for finance and taxation provided by an embodiment of the present invention;
[0044] Figure 2 is a flowchart of automatic invoice information extraction related to an embodiment of the present invention;
[0045] Figure 3 is a schematic structural diagram of an automatic invoice information filling system based on a large language model for finance and taxation provided by an embodiment of the present invention. Detailed Embodiments
[0046] Many specific details are set forth in the following description in order to provide a thorough understanding of the present invention. However, the present invention can be implemented in many other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the connotation of the present invention. Therefore, the present invention is not limited by the specific embodiments disclosed below.
[0047] An automatic invoice information filling method based on a large language model for finance and taxation provided by the present invention has a process as Figure 1 shown and mainly includes the following steps:
[0048] Step S101, obtaining relevant finance and taxation datasets.
[0049] Data is a key element of the large language model for finance and taxation. To ensure the various capabilities of the large language model for finance and taxation in the finance and taxation professional field, it is necessary to collect high-quality accounting professional data. The datasets are divided into continued pre-training and instruction fine-tuning datasets.
[0050] The collected fiscal and tax data set includes: financial statements, tax data, and financial and accounting laws and regulations documents. In combination with experts in the field of fiscal and tax accounting, ensure the diversity and accuracy of the data. Then preprocess the fiscal and tax data set, specifically including:
[0051] Perform desensitization processing on the data set by identifying sensitive information in the data set and processing sensitive text by replacement or masking;
[0052] Clean the data set, including removing special characters, removing stop words, removing extra spaces, removing typos, and text padding;
[0053] Perform data augmentation by using synonym replacement, sentence structure adjustment, inserting or deleting words.
[0054] Furthermore, for desensitization processing, use a data desensitization platform to scan the financial data, identify sensitive information therein, and process sensitive text by replacement or masking, etc., to ensure privacy and compliant use of the data. For data cleaning, it includes steps such as using a base model to remove special characters, remove stop words, remove extra spaces, remove typos, and text padding. At the same time, for specific texts, text tokenization and encoding conversion and other steps are also required. Perform data augmentation by using methods such as synonym replacement, sentence structure adjustment, inserting or deleting words, and convert it into formatted text.
[0055] Step S102, complete the pre-training and fine-tuning of the fiscal and tax large language model by pre-annotating and auditing and correcting the fiscal and tax data set.
[0056] Pre-annotate the fiscal and tax data based on prompt engineering and advanced large models such as GPT4, and then have business experts audit and correct it, so as to provide training samples for supervised learning for the model.
[0057] For the element extraction task in the fiscal and tax data set, annotate key elements such as transaction objects, amounts, and subjects; for the voucher generation task, annotate voucher elements such as subjects, amounts, and entry directions; have business experts audit and correct the annotated elements to complete the pre-training and fine-tuning of the fiscal and tax large language model. By annotating the data, the model can learn the structure and characteristics of accounting vouchers, as well as the corresponding annotation standards.
[0058] In the context of the digital transformation of the fiscal and tax industry, in order to balance the model output accuracy and the model output speed, Tongyi Qianwen large model with 14B parameters is selected as the base model, which has excellent Chinese and English understanding and generation capabilities, providing a solid foundation for applications in the fiscal and tax fields. The Tongyi Qianwen large model has rich general semantic knowledge and various general technical capabilities, but it does not yet have the ability to solve specific tasks in the fiscal and tax fields. Therefore, a fiscal and tax dataset consisting of fiscal and tax books, accounting standards, fiscal and tax knowledge data, accounting vouchers, financial statements, etc. is used for continued pre-training. By fine-tuning the large model, it can better understand and process these professional knowledge, optimize its performance in specific issues in the fiscal and tax fields, and at the same time can automatically process and analyze a large amount of tax-related data to ensure tax compliance.
[0059] Step S103, through speech recognition, convert the common voice information input by the user into text information.
[0060] Step S104, based on the fiscal and tax large language model, through preset prompt texts, combine the text information, the background information of the preset user, and the invoicing information to extract key invoicing information, and complete the automatic filling of invoice information according to the key invoicing information.
[0061] Use speech recognition technology to recognize the voice information output by the current user. Based on the fiscal and tax large language model, extract key invoicing information from the voice information of the current user through preset prompt texts, combine the text information, the background information of the preset user, and the invoicing information; determine the input-output format of the large language model and the key fields for automatic filling of invoice information; fill in each key field according to the key invoicing information to complete the automatic filling of invoice information.
[0062] Furthermore, use speech recognition technology to convert the voice information input by the user into text, and combine the background information of the user (such as basic information such as the name and tax number of the customer seller) and the invoicing information (such as the information of the purchaser, the name of the commodity, the amount, etc.). According to these information, input the specifically designed prompt text. As Figure 2 shown, the following are the specific steps and corresponding input-output examples.
[0063] 1. Construct a prompt to standardize the input-output format of large model calls.
[0064] 2. Design the content to be extracted for filling: such as key fields like invoice type, commodity amount, purchaser name, etc.
[0065] 3. Use the background information and the user input to fill in the values of each field in the json.
[0066] 4. Review the output to check the accuracy and integrity of the data.
[0067] Input:
[0068] You are a business expert in invoice information extraction. When the user gives you a query, you extract the invoice type, purchaser name... commodity unit price information
[0069] **Output**
[0070] - Do not give irrelevant content and do not output comments and explanations.
[0071] - Extract the key information and fill in the following fields in JSON format as the final output:
[0072] {
[0073] "Seller Name":,
[0074] "Seller Tax ID":,
[0075] "Purchaser Name":,
[0076] "Seller Tax ID":,
[0077] "Invoice Type":,
[0078] "Purchaser Name":,
[0079] "Invoice Amount":,
[0080] "Commodity Name":,
[0081] "Invoice Line Nature":,
[0082] "Specification Model":,
[0083] "Unit":,
[0084] "Quantity":
[0085] }}。
[0086] Background Information:
[0087] Invoice Type: Digital General Invoice,
[0088] Seller Name: ** Co., Ltd.,
[0089] Seller Tax ID: ****************
[0090] Input: Issue a 200-yuan catering invoice to Wang Ming
[0091] Output:
[0092] {
[0093] "Seller Name": "** Co., Ltd.",
[0094] "Seller Tax ID": "****************",
[0095] "Buyer Name": "Wang Ming",
[0096] "Seller Tax ID":,
[0097] "Invoice Type": "Digital General Invoice",
[0098] "Invoice Amount": "200",
[0099] "Commodity Name": "Catering",
[0100] "Invoice Line Nature": "Normal Line",
[0101] "Specification Model": "",
[0102] "Unit": "",
[0103] "Quantity": "1"
[0104] }
[0105] For the information extraction task, the business expert shall score the task completion quality based on the customer's acceptance of the extraction task. The scoring range is from 1 to 5 points. The scoring criteria are detailed in Table 1 as follows:
[0106] Table 1 Invoice Element Extraction Scoring Criteria
[0107]
[0108] When converting the user's input voice information into text or extracting information from the large model, in order to ensure the accuracy and integrity of the extraction results, multiple rounds of question-and-answer are required to improve the extraction effect. The following are the specific steps:
[0109] 1. Determine whether there are missing mandatory fields based on the mandatory items of the tax and electricity invoice and the JSON string output by the finance and taxation large model, and return the information to the user.
[0110] 2. Convert the user's voice input information into text and reconstruct the prompt by combining the JSON string output in the previous round and input it into the finance and taxation large model interface.
[0111] 3. The large model extracts key content from the input text based on each field of the JSON and returns the extraction results.
[0112] 4. Repeat multiple rounds of question-and-answer until the user confirms completion.
[0113] 5. Output electronic bills.
[0114] Based on the same inventive concept, the present invention also provides an automated invoice information filling system based on the finance and taxation large language model, asFigure 3 As shown in the figure, it includes:
[0115] A dataset acquisition module 310, configured to acquire relevant fiscal and tax datasets;
[0116] A pre-training and fine-tuning module 320, configured to complete the pre-training and fine-tuning of the fiscal and tax large language model by pre-annotating and auditing and correcting the fiscal and tax datasets;
[0117] A prompt text determination module 330, configured to convert the common voice information input by the user into text information through speech recognition;
[0118] An automatic filling module 340, based on the fiscal and tax large language model, by presetting prompt texts, combining the text information, the preset background information of the user and the invoicing information, extracting key invoicing information, and completing the automatic filling of invoice information according to the key invoicing information.
[0119] Furthermore, the relevant fiscal and tax datasets include:
[0120] Financial statements, tax data, and financial and accounting laws and regulations documents.
[0121] Furthermore, it further includes:
[0122] A data desensitization processing module, configured to desensitize the dataset, by identifying sensitive information in the dataset, and processing sensitive texts by replacement or masking;
[0123] A data cleaning module, configured to clean the dataset, including removing special characters, removing stop words, removing extra spaces, removing spelling mistakes, and text padding;
[0124] A data augmentation module, configured to perform data augmentation by synonym replacement, sentence structure adjustment, insertion or deletion of words.
[0125] Furthermore, the pre-training and fine-tuning module includes:
[0126] A first annotation sub-module, configured to annotate key elements such as transaction objects, amounts, and subjects for the element extraction task in the fiscal and tax datasets;
[0127] A second annotation sub-module, configured to annotate voucher elements such as subjects, amounts, and entry directions for the voucher generation task;
[0128] An auditing and correction sub-module, configured to have business experts audit and correct the annotated elements to complete the pre-training and fine-tuning of the fiscal and tax large language model.
[0129] Furthermore, the automatic filling module includes:
[0130] The key invoice information extraction sub-module is used to extract key invoice information from the voice information of the current user through preset prompt texts based on the fiscal and tax large language model, in combination with the text information, the background information of the preset user, and the invoice information;
[0131] The format and key field determination sub-module is used to determine the input and output format of the large language model and the key fields for automatic filling of invoice information;
[0132] The text filling sub-module is used to fill each key field according to the key invoice information to complete the automatic filling of invoice information.
[0133] A method and system for automatically filling invoice information based on a fiscal and tax large language model provided by the present invention realizes accurate extraction of the user's voice input information through the extraction process from voice information to structured text, in combination with the designed multi-round question-and-answer process. The fiscal and tax large model trained based on the fiscal and tax domain dataset can accurately identify and extract key information, realizing the automatic extraction of invoice information. Based on the fiscal and tax language large model, the automatic extraction of invoice information reduces the need for manual entry, thereby reducing labor costs and at the same time saving additional costs caused by errors.
[0134] Those skilled in the art should understand that the embodiments of the present invention can be provided as a method, a system, or a computer program product. Therefore, the present invention can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present invention can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0135] The present invention is described with reference to the flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, and the combination of processes and / or blocks in the flowchart and / or block diagram, can be realized by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing devices generate means for realizing the functions specified in Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.
[0136] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to work in a particular manner, such that the instructions stored in the computer-readable memory produce a manufacture including an instruction device that implements the functions specified in one or more processes and / or blocks Figure 1 in the process Figure 1 or processes and / or boxes
[0137] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process, so that the instructions executed on the computer or other programmable apparatus provide steps for implementing the functions specified in one or more processes and / or blocks Figure 1 in the process Figure 1 or processes and / or boxes
[0138] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit them. Although the present invention has been described in detail with reference to the above embodiments, those of ordinary skill in the art should understand that the specific implementation manners of the present invention can still be modified or equivalently replaced. Any modification or equivalent replacement without departing from the spirit and scope of the present invention shall be covered by the scope of the claims of the present invention.
Claims
1. A method for automatically filling in invoice information based on a large language model of finance and taxation, characterized in that: include: Obtain relevant financial and taxation data sets; By pre-labeling, reviewing and correcting the financial and taxation data set, pre-training and fine-tuning the financial and taxation language model are completed; Through speech recognition, the voice information input by the user is converted into text information; Based on the finance and taxation language model, by presetting prompt word text, combining the text information, preset user background information and invoicing information, key invoicing information is extracted, and the invoice information is automatically filled in according to the key invoicing information.
2. The method according to claim 1, characterized in that: Related financial and taxation data sets, including: Financial statements, tax data and accounting laws and regulations documentation.
3. The method according to claim 1, characterized in that: After obtaining relevant tax data sets, it also includes: Desensitizing the data set by identifying sensitive information in the data set and processing the sensitive text by replacing or masking; Clean the data set, including removing special characters, stop words, extra spaces, typos, and text completion; Data enhancement is performed by replacing synonyms, adjusting sentence structures, and inserting or deleting words.
4. The method according to claim 1, characterized in that: By pre-labeling, reviewing and correcting the financial and taxation dataset, the pre-training and fine-tuning of the financial and taxation language model are completed, including: For the task of extracting elements from the financial and taxation data set, mark the key elements of transaction objects, amounts, and accounts; For the voucher generation task, mark the voucher elements of the subject, amount, and entry direction; Business experts review and correct the labeled elements to complete the pre-training and fine-tuning of the finance and taxation language model.
5. The method according to claim 1, characterized in that Based on the tax language model, by presetting the prompt word text, combining the text information, the background information of the preset user and the invoicing information, the key invoicing information is extracted, and the invoice information is automatically filled in according to the key invoicing information, including: Based on the tax language model, extract key invoicing information from the current user's voice information by using preset prompt text, combined with the text information, preset user background information and invoicing information; Determine the input and output formats of the large language model and the key fields for automatic filling of invoice information; Fill in each key field according to the key invoicing information to complete the automatic filling of invoice information.
6. An automatic invoice information filling system based on the finance and taxation language model, characterized in that: include: Dataset acquisition module, used to obtain relevant financial and taxation data sets; A pre-training and fine-tuning module, used to complete the pre-training and fine-tuning of the finance and taxation large language model by pre-labeling and reviewing and correcting the finance and taxation dataset; The prompt word text determination module is used to convert the common voice information input by the user into text information through voice recognition; The automatic filling module, based on the financial and tax language model, extracts key invoicing information by presetting prompt word text, combining the text information, the preset user's background information and invoicing information, and completes the automatic filling of invoice information according to the key invoicing information.
7. The system according to claim 6, characterized in that Related financial and taxation data sets, including: Financial statements, tax data and accounting laws and regulations documentation.
8. The system according to claim 6, characterized in that Also includes: A data desensitization processing module is used to perform desensitization processing on the data set by identifying sensitive information in the data set and processing sensitive text by replacement or masking; The data cleaning module is used to clean the data set, including removing special characters, stop words, extra spaces, typos, and text completion; The data enhancement module is used to enhance data by replacing synonyms, adjusting sentence structure, and inserting or deleting words.
9. The system according to claim 6, characterized in that Pre-training and fine-tuning modules, including: The first labeling submodule is used to extract elements from the financial and taxation data set and label the transaction object, amount, and key elements of the account; The second annotation submodule is used to annotate the voucher elements of the subject, amount, and entry direction for the voucher generation task; The review and correction submodule is used by business experts to review and correct the labeled elements and complete the pre-training and fine-tuning of the financial and tax language model.
10. The system according to claim 6, characterized in that Automatic filling module, including: A key invoicing information extraction submodule is used to extract key invoicing information from the current user's voice information based on the finance and taxation language model by using preset prompt word text, combining the text information, preset user background information and invoicing information; The format and key field determination submodule is used to determine the input and output formats of the large language model and the key fields for automatic filling of invoice information; The text filling submodule is used to fill in various key fields according to the key invoicing information to complete the automatic filling of invoice information.
Citation Information
Cited By
Financial ticket and tax management service platform and construction method thereof
CN120298132A
Intelligent invoicing method and system based on AI large model
CN120450796A