Big model-based invoice PDF (Portable Document Format) dynamic generation method, system and equipment and medium
Through the dynamic generation method of invoice PDF based on large-models, the problems of invoice generation efficiency and inflexible template design in the prior art are solved, and efficient and automated invoice generation are achieved to ensure data consistency and reduce labor costs.
Patent Information
- Application Number
- CN202411304375.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-19
- Publication Date
- 2025-06-03
AI Technical Summary
The existing invoice generation method based on deep learning has problems such as insufficient model training data and inflexible template design, which is difficult to meet the needs of large-scale and high-frequency invoice generation.
The dynamic generation method of invoice PDF based on large models is adopted, and the invoice PDF is automatically parsed through steps such as data preprocessing, model training, designing invoice templates and optimization verification to generate invoice PDFs that meet the specifications.
Improve the efficiency and automation of invoice generation, ensure consistency and traceability of invoice data, reduce labor costs, and enhance the flexibility and scalability of the system.
Smart Images

Figure CN120087346A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence and automation technology, and in particular to a method, system, device and medium for dynamically generating an invoice PDF based on a large model. Background Art
[0002] With the rapid development of information technology and e-commerce, invoices are important vouchers for transactions, and their generation and management efficiency directly affects the operational efficiency and customer experience of enterprises. Traditional invoice generation methods usually rely on manual filling or simple template replacement, which is not only inefficient but also prone to errors and cannot meet the needs of large-scale and high-frequency invoice generation.
[0003] In recent years, the rapid development of artificial intelligence technologies such as deep learning has provided new solutions for invoice generation. By training deep learning models, it is possible to automatically parse and format user input, and then generate a standardized invoice PDF file in combination with a preset invoice template. However, the existing invoice generation methods based on deep learning still have some problems, such as insufficient model training data and inflexible template design, which limit their promotion and use in practical applications.
[0004] Therefore, how to automatically parse user input, quickly generate invoice PDFs that meet specifications, reduce reliance on hot operations, reduce labor costs and improve work efficiency is a technical problem that needs to be solved urgently. Summary of the invention
[0005] The technical task of the present invention is to provide a method, system, device and medium for dynamically generating invoice PDF based on a large model to solve the problem of how to automatically parse user input, quickly generate invoice PDF that meets the specifications, reduce dependence on hot operations, reduce labor costs and improve work efficiency.
[0006] The technical task of the present invention is achieved in the following way: a method for dynamically generating invoice PDF based on a large model, the method is as follows:
[0007] Data preprocessing: Collect historical invoice data, build an invoice data set, and preprocess the invoice data to obtain the preprocessed invoice data set;
[0008] Model training: Use the preprocessed invoice data set to train the big model and obtain the trained big model, so that the trained big model can accurately predict the demand and trend of data transmission;
[0009] Design invoice template: Design an invoice template that complies with the specifications; the invoice template includes the title, header, body and signature;
[0010] Generate invoices: Using the large model and invoice templates trained, generate corresponding invoice PDFs according to the information input by the user;
[0011] Optimization and verification: Adopt model optimization techniques, invoice automatic verification mechanisms and user feedback mechanisms to optimize and verify the generated invoice PDFs, improving the accuracy and efficiency of invoice generation.
[0012] Preferably, the data preprocessing is as follows:
[0013] Collect historical invoice data; among them, the historical invoice data includes invoice headers, commodity information and amounts;
[0014] Clean, standardize and annotate the historical invoice data to construct an invoice dataset; among them, the cleaning process includes removing duplicate data, missing data and abnormal data; the standardization process is to convert the data into a unified format and unit; the annotation process is to add labels or classification information to the data for subsequent model training and use.
[0015] Preferably, the model training is as follows:
[0016] Optimize the large model according to the actual application scenario to improve the prediction accuracy and generalization ability;
[0017] Train the large model with multi-batch data to reduce the sensitivity of the large model to data sample differences, identify and reduce the impact of abnormal data, use the validation set in the invoice dataset to test the trained large model, extract the key invoice information, and check whether the extracted invoice information indicators are within the acceptable range, and perform multiple simulation validations to improve the accuracy.
[0018] Preferably, the invoice template design is as follows:
[0019] Adopt an extensible template design language to enable users to customize the template style and layout according to actual needs, improving the flexibility and customizability of the template; among them, the extended template design languages are XML and LaTeX;
[0020] Convert the template into an editable format (such as PDF) for convenient merging with the model output.
[0021] Preferably, the invoice generation is as follows:
[0022] When the user needs to generate an invoice, input the invoice information through the interface, and the trained model can be automatically called to parse and format the user input; among them, the invoice information includes customer name, commodity list and price;
[0023] Merge the output of the large model with the preset invoice template to generate complete invoice data;
[0024] Use a PDF generation library to convert invoice data into PDF format and output it to the user; among them, the PDF production library includes iText and PDFBox.
[0025] Preferably, the optimization and verification are as follows:
[0026] During the model training process, data augmentation techniques are adopted to increase the generalization ability and robustness of the model; among them, the data augmentation techniques include random perturbation and data augmentation;
[0027] During the invoice generation process, an automatic verification mechanism (such as rule verification, format check, etc.) is adopted to ensure that the generated invoice complies with tax regulations and format requirements; among them, the automatic verification mechanism includes rule verification and format check;
[0028] Adopt a user feedback mechanism (such as questionnaire surveys, online customer service, etc.) to collect user feedback in a timely manner and conduct iterative optimization.
[0029] An invoice PDF dynamic generation system based on a large model, the system includes:
[0030] A data preprocessing module, used to collect historical invoice data, construct an invoice data set, and preprocess the invoice data to obtain a preprocessed invoice data set;
[0031] A model training module, used to train a large model using the preprocessed invoice data set to obtain a trained large model, so that the trained large model can accurately predict the requirements and trends of data transmission;
[0032] An invoice template design module, used to design a compliant invoice template; among them, the invoice template includes a title, a header, a body, and a signature;
[0033] An invoice generation module, used to generate a corresponding invoice PDF according to the information input by the user through the trained large model and the invoice template;
[0034] An optimization and verification module, used to optimize and verify the generated invoice PDF by adopting model optimization techniques, invoice automatic verification mechanisms, and user feedback mechanisms to improve the accuracy and efficiency of invoice generation.
[0035] Preferably, the data preprocessing module includes:
[0036] A collection sub-module, used to collect historical invoice data; among them, the historical invoice data includes invoice headers, commodity information, and amounts;
[0037] The cleaning, standardization, and annotation sub-module is used to clean, standardize, and annotate historical invoice data to construct an invoice dataset. Among them, the cleaning process includes removing duplicate data, missing data, and abnormal data. The standardization process is to convert the data into a unified format and unit. The annotation process is to add tags or classification information to the data to facilitate the training and use of subsequent models.
[0038] The model training module tunes the large model according to the actual application scenario to improve prediction accuracy and generalization ability. At the same time, it trains the large model with multi-batch data to reduce the sensitivity of the large model to data sample differences, identify and reduce the impact of abnormal data, uses the validation set in the invoice dataset to test the trained large model, extracts key invoice information, and checks whether the extracted invoice information indicators are within the acceptable range, and conducts multiple simulation validations to improve the accuracy.
[0039] The invoice template design module uses an extensible template design language, enabling users to customize the template style and layout according to actual needs, improving the flexibility and customizability of the template. Among them, the extended template design languages are XML and LaTeX. And it converts the template into an editable format (such as PDF) for convenient merging with the model output.
[0040] The invoice generation module includes:
[0041] The input sub-module is used to automatically call the trained model to parse and format the user input when the user needs to generate an invoice. The invoice information includes the customer name, product list, and price.
[0042] The merging sub-module is used to merge the output of the large model with the preset invoice template to generate complete invoice data.
[0043] The conversion and output sub-module is used to convert the invoice data into PDF format and output it to the user using a PDF generation library. Among them, the PDF production libraries include iText and PDFBox.
[0044] The optimization and validation module includes:
[0045] The data augmentation sub-module is used to adopt data augmentation techniques during model training to increase the generalization ability and robustness of the model. Among them, the data augmentation techniques include random perturbation and data expansion.
[0046] The validation sub-module is used to adopt an automatic verification mechanism during invoice generation to ensure that the generated invoice complies with tax regulations and format requirements. Among them, the automatic verification mechanism includes rule verification and format check.
[0047] An optimization sub-module for collecting user feedback in a timely manner through a user feedback mechanism (such as questionnaires, online customer service, etc.) and performing iterative optimization.
[0048] An electronic device, comprising: a memory and at least one processor;
[0049] Wherein, the memory stores computer-executable instructions;
[0050] The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the method for dynamically generating invoice PDFs based on a large model as described above.
[0051] A computer-readable storage medium stores computer-executable instructions, and when the processor executes the computer, the method for dynamically generating invoice PDFs based on a large model as described above is implemented.
[0052] The method, system, device and medium for dynamically generating invoice PDFs based on a large model of the present invention have the following advantages:
[0053] (1) The present invention improves efficiency and automation level: The traditional invoice generation process often requires manual filling or relies on simple template replacement, which is inefficient and error-prone. The present invention uses a large model for dynamic generation, which can automatically parse user input and quickly generate accurate and standardized invoice PDFs, significantly improving work efficiency and automation level;
[0054] (2) The present invention has data consistency and traceability: By automating the invoice generation process, the consistency and traceability of all invoice data can be ensured, which helps enterprises better manage invoice data, improves financial transparency, and reduces audit risks;
[0055] (3) The present invention has confidentiality and scalability: Based on deep learning technology, it has strong scalability and maintainability. Enterprises can add new invoice types, adjust model parameters, etc. according to needs to meet the changing business requirements;
[0056] (4) The present invention is trained and optimized through a deep learning model, which can ensure that the generated invoice information is accurate. The large model is trained with a large amount of data and can identify and correct possible input errors, reducing errors caused by human factors;
[0057] (5) The present invention reduces the dependence on manual operations and reduces labor costs; at the same time, through automated processing, additional costs and risks caused by errors can also be reduced. Description of the Drawings
[0058] The present invention will be further described below with reference to the accompanying drawings.
[0059] Appendix Figure 1 It is a flowchart of a method for dynamically generating invoice PDFs based on large models. Specific implementation manners
[0060] The method, system, device and medium for dynamically generating invoice PDFs based on large models of the present invention will be described in detail below with reference to the accompanying drawings of the specification and specific embodiments.
[0061] Embodiment 1:
[0062] As shown in the appendix Figure 1 This embodiment provides a method for dynamically generating invoice PDFs based on large models, and the method is as follows:
[0063] S1. Data preprocessing: Collect historical invoice data, construct an invoice data set, and preprocess the invoice data to obtain a preprocessed invoice data set;
[0064] S2. Model training: Use the preprocessed invoice data set to train a large model to obtain a trained large model, so that the trained large model can accurately predict the requirements and trends of data transmission;
[0065] S3. Design an invoice template: Design an invoice template that complies with the specifications; among them, the invoice template includes a title, a header, a body, and a signature;
[0066] S4. Generate an invoice: Generate a corresponding invoice PDF according to the information input by the user through the trained large model and the invoice template;
[0067] S5. Optimization and verification: Adopt model optimization techniques, invoice automatic verification mechanisms, and user feedback mechanisms to optimize and verify the generated invoice PDFs to improve the accuracy and efficiency of invoice generation.
[0068] The data preprocessing in step S1 of this embodiment is specifically as follows:
[0069] S101. Collect historical invoice data; among them, the historical invoice data includes invoice headers, commodity information, and amounts;
[0070] S102. Clean, standardize, and annotate the historical invoice data to construct an invoice data set; among them, the cleaning process includes removing duplicate data, missing data, and abnormal data; the standardization process is to convert the data into a unified format and unit; the annotation process is to add tags or classification information to the data for subsequent model training and use.
[0071] The model training in step S2 of this embodiment is specifically as follows:
[0072] S201. Optimize the large model according to the actual application scenario to improve the prediction accuracy and generalization ability;
[0073] S202. Train the large model with multi-batch data to reduce the sensitivity of the large model to data sample differences, identify and reduce the impact of abnormal data. Use the validation set in the invoice dataset to test the trained large model, extract the key invoice information, and check whether the extracted invoice information indicators are within the acceptable range. Conduct multiple simulation validations to improve the accuracy.
[0074] The specific design of the invoice template in step S3 of this embodiment is as follows:
[0075] S301. Adopt an extensible template design language to enable users to customize the template style and layout according to actual needs, improving the flexibility and customizability of the template; among them, the extended template design languages are XML and LaTeX;
[0076] S302. Convert the template into an editable format (such as PDF) for convenient merging with the model output.
[0077] The specific generation of the invoice in step S4 of this embodiment is as follows:
[0078] S401. When the user needs to generate an invoice, input the invoice information through the interface, and the trained model can be automatically called to parse and format the user input; among them, the invoice information includes the customer name, commodity list, and price;
[0079] S402. Merge the output of the large model with the preset invoice template to generate complete invoice data;
[0080] S403. Use the PDF generation library to convert the invoice data into PDF format and output it to the user; among them, the PDF production libraries include iText and PDFBox.
[0081] The specific optimization and verification in step S5 of this embodiment are as follows:
[0082] S501. Adopt data augmentation techniques during the model training process to enhance the generalization ability and robustness of the model; among them, the data augmentation techniques include random perturbation and data expansion;
[0083] S502. Adopt an automatic verification mechanism (such as rule verification, format check, etc.) during the invoice generation process to ensure that the generated invoice complies with tax regulations and format requirements; among them, the automatic verification mechanism includes rule verification and format check;
[0084] S503. Adopt a user feedback mechanism (such as questionnaires, online customer service, etc.) to collect user feedback in a timely manner and conduct iterative optimization.
[0085] Example 2:
[0086] This embodiment provides an invoice PDF dynamic generation system based on a large model. The system includes:
[0087] A data preprocessing module for collecting historical invoice data, constructing an invoice dataset, and preprocessing the invoice data to obtain a preprocessed invoice dataset;
[0088] A model training module for training the large model using the preprocessed invoice dataset to obtain a trained large model, enabling the trained large model to accurately predict the requirements and trends of data transmission;
[0089] An invoice template design module for designing a compliant invoice template; wherein, the invoice template includes a title, a header, a body, and a signature;
[0090] An invoice generation module for generating a corresponding invoice PDF according to the information input by the user through the trained large model and the invoice template;
[0091] An optimization and verification module for optimizing and verifying the generated invoice PDF using model optimization techniques, an invoice automatic verification mechanism, and a user feedback mechanism to improve the accuracy and efficiency of invoice generation.
[0092] The data preprocessing module in this embodiment includes:
[0093] A collection sub-module for collecting historical invoice data; wherein, the historical invoice data includes invoice headers, commodity information, and amounts;
[0094] A cleaning, standardization, and annotation sub-module for cleaning, standardizing, and annotating the historical invoice data to construct an invoice dataset; wherein, the cleaning process includes removing duplicate data, missing data, and abnormal data; the standardization process is to convert the data into a unified format and unit; the annotation process is to add labels or classification information to the data for subsequent model training and use.
[0095] The model training module in this embodiment tunes the large model according to the actual application scenario to improve the prediction accuracy and generalization ability; at the same time, trains the large model with multiple batches of data to reduce the sensitivity of the large model to data sample differences, identify and reduce the impact of abnormal data, uses the validation set in the invoice dataset to test the trained large model, extracts the key invoice information, and checks whether the extracted invoice information indicators are within an acceptable range, and conducts multiple simulation validations to improve the accuracy.
[0096] In this embodiment, the invoice template design module uses an extensible template design language, enabling users to customize the template style and layout according to actual needs, thereby enhancing the flexibility and customizability of the template. Among them, the extended template design languages are XML and LaTeX. And the template is converted into an editable format (such as PDF) for convenient merging with the model output.
[0097] The invoice generation module in this embodiment includes:
[0098] An input sub-module, which is used to automatically call the trained model to parse and format the user input when the user needs to generate an invoice by entering invoice information through the interface. Among them, the invoice information includes the customer name, commodity list, and price.
[0099] A merging sub-module, which is used to merge the output of the large model with the preset invoice template to generate complete invoice data.
[0100] A conversion and output sub-module, which is used to convert the invoice data into PDF format and output it to the user using a PDF generation library. Among them, the PDF production libraries include iText and PDFBox.
[0101] The optimization and verification module in this embodiment includes:
[0102] A data augmentation sub-module, which is used to adopt data augmentation techniques during model training to enhance the generalization ability and robustness of the model. Among them, the data augmentation techniques include random perturbation and data expansion.
[0103] A verification sub-module, which is used to adopt an automatic verification mechanism during invoice generation to ensure that the generated invoice complies with tax regulations and format requirements. Among them, the automatic verification mechanism includes rule verification and format check.
[0104] An optimization sub-module, which is used to collect user feedback in a timely manner through a user feedback mechanism (such as questionnaires, online customer service, etc.) and perform iterative optimization.
[0105] The working process of this system is specifically as follows:
[0106] (1) The user provides the basic information required for the invoice. Among them, the basic information includes but is not limited to the invoice title, taxpayer identification number, invoicing date, name of goods or services, quantity, unit price, tax rate, tax amount, etc.
[0107] (2) Use the pre-trained large model to parse and process the basic information and extract the key invoice information. Among them, the large model uses deep learning techniques, including but not limited to model structures such as recurrent neural network (RNN), long short-term memory network (LSTM), and Transformer.
[0108] (3) Dynamically generate an invoice PDF file according to the extracted key invoice information in combination with a preset invoice template;
[0109] (4) Output the generated invoice PDF file to a display device or a storage device for saving or printing;
[0110] (5) A step of verifying the generated invoice PDF file to ensure the accuracy and integrity of the invoice information.
[0111] Embodiment 3:
[0112] This embodiment also provides an electronic device, including: a memory and at least one processor;
[0113] Wherein, the memory stores computer execution instructions;
[0114] The at least one processor executes the computer execution instructions stored in the memory, so that the at least one processor executes the method for dynamically generating an invoice PDF based on a large model according to any one of the present inventions.
[0115] The processor may be a central processing unit (CPU), or may also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), off-the-shelf programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0116] The memory can be used to store computer programs and / or modules. The processor realizes various functions of the electronic device by running or executing the computer programs and / or modules stored in the memory, and calling the data stored in the memory. The memory mainly includes a program storage area and a data storage area. Among them, the program storage area can store an operating system, application programs required for at least one function, etc.; the data storage area can store data created according to the use of the terminal, etc. In addition, the memory may further include a high-speed random access memory, and may also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash memory card, at least one magnetic disk storage period, a flash memory device, or other volatile solid-state storage devices.
[0117] Embodiment 4:
[0118] This embodiment also provides a computer-readable storage medium storing multiple instructions that are loaded by a processor to cause the processor to execute the method for dynamically generating invoice PDFs based on large models according to any embodiment of the present invention. Specifically, a system or device equipped with a storage medium can be provided, on which software program code for implementing the functions of any one of the above embodiments is stored, and the computer (or CPU or MPU) of the system or device is caused to read and execute the program code stored in the storage medium.
[0119] In this case, the program code read from the storage medium itself can implement the functions of any one of the above embodiments, so the program code and the storage medium storing the program code constitute a part of the present invention.
[0120] Examples of storage media for providing program code include floppy disks, hard disks, magneto-optical disks, optical disks (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD+RW), magnetic tapes, non-volatile memory cards, and ROMs. Optionally, the program code can be downloaded from a server computer via a communication network.
[0121] Furthermore, it should be clear that not only can the functions of any one of the above embodiments be achieved by executing the program code read by the computer, but also by causing an operating system or the like operating on the computer based on the instructions of the program code to complete part or all of the actual operations.
[0122] In addition, it can be understood that the program code read from the storage medium is written into a memory provided in an expansion board inserted into the computer or a memory provided in an expansion unit connected to the computer, and then based on the instructions of the program code, a CPU or the like installed on the expansion board or expansion unit is caused to execute part and all of the actual operations, thereby implementing the functions of any one of the above embodiments.
[0123] 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 foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some or all of the technical features. However, such modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for dynamically generating invoice PDF based on a large model, characterized in that: The method is as follows: Data preprocessing: Collect historical invoice data, build an invoice data set, and preprocess the invoice data to obtain the preprocessed invoice data set; Model training: Use the preprocessed invoice data set to train the big model and obtain the trained big model, so that the trained big model can accurately predict the demand and trend of data transmission; Design invoice template: Design an invoice template that complies with the specifications; the invoice template includes the title, header, body and signature; Generate invoices: Generate the corresponding invoice PDF based on the information entered by the user through the trained large model and invoice template; Optimization and Verification: Model optimization technology, automatic invoice verification mechanism and user feedback mechanism are used to optimize and verify the generated invoice PDF, thereby improving the accuracy and efficiency of invoice generation.
2. The method for dynamically generating invoice PDF based on a large model according to claim 1 is characterized in that: The data preprocessing is as follows: Collect historical invoice data; the historical invoice data includes the invoice title, product information and amount; The historical invoice data is cleaned, standardized and labeled to construct an invoice dataset. The cleaning process includes removing duplicate data, missing data and abnormal data. The standardization process is to convert the data into a unified format and unit. The labeling process is to add labels or classification information to the data to facilitate the training and use of subsequent models.
3. The method for dynamically generating invoice PDF based on a large model according to claim 1 is characterized in that: The model training is as follows: Tune the large model according to the actual application scenario to improve prediction accuracy and generalization ability; Use multiple batches of data to train the large model, reduce the sensitivity of the large model to data sample differences, identify and reduce the impact of abnormal data, use the verification set in the invoice data set to test the trained large model, extract key invoice information, and check whether the extracted invoice information indicators are within an acceptable range. Perform multiple simulation verifications to improve accuracy.
4. The method for dynamically generating invoice PDF based on a large model according to claim 1 is characterized in that: Design the invoice template as follows: The use of an extensible template design language allows users to customize the template style and layout according to actual needs, improving the flexibility and customizability of the template; the extensible template design language is XML and LaTeX; Convert templates into an editable format for easy merging with model output.
5. The method for dynamically generating invoice PDF based on a large model according to claim 1 is characterized in that: Generate an invoice as follows: When a user needs to generate an invoice, they input the invoice information through the interface, and the trained model will be automatically called to parse and format the user input; the invoice information includes the customer name, product list and price; Merge the large model output with the preset invoice template to generate complete invoice data; Use PDF generation libraries to convert invoice data into PDF format and output it to users; PDF production libraries include iText and PDFBox.
6. The method for dynamically generating invoice PDF based on a large model according to any one of claims 1 to 5, characterized in that: The optimization and verification are as follows: Data enhancement techniques are used during model training to increase the generalization and robustness of the model. Data enhancement techniques include random perturbations and data expansion. Automatic verification mechanisms are used during the invoice generation process to ensure that the generated invoices comply with tax regulations and format requirements; the automatic verification mechanisms include rule verification and format checking; Adopt user feedback mechanism to collect user feedback in time and perform iterative optimization.
7. A dynamic invoice PDF generation system based on a large model, characterized in that: The system includes: The data preprocessing module is used to collect historical invoice data, construct an invoice data set, and preprocess the invoice data to obtain the preprocessed invoice data set; The model training module is used to train the big model using the preprocessed invoice data set to obtain the trained big model, so that the trained big model can accurately predict the demand and trend of data transmission; The invoice template design module is used to design an invoice template that complies with the specifications; the invoice template includes a title, a header, a body and a signature; The invoice generation module is used to generate the corresponding invoice PDF according to the information entered by the user through the trained large model and invoice template; The optimization and verification module is used to optimize and verify the generated invoice PDF using model optimization technology, automatic invoice verification mechanism and user feedback mechanism, so as to improve the accuracy and efficiency of invoice generation.
8. The invoice PDF dynamic generation system based on a large model according to claim 7 is characterized in that: The data preprocessing module comprises: The collection submodule is used to collect historical invoice data; the historical invoice data includes the invoice title, product information and amount; The cleaning, standardization and annotation submodule is used to clean, standardize and annotate historical invoice data to construct an invoice data set. The cleaning process includes removing duplicate data, missing data and abnormal data. The standardization process is to convert the data into a unified format and unit. The annotation process is to add labels or classification information to the data to facilitate the training and use of subsequent models. The model training module tunes the large model according to the actual application scenario to improve the prediction accuracy and generalization ability; at the same time, multiple batches of data are used to train the large model to reduce the sensitivity of the large model to data sample differences, identify and reduce the impact of abnormal data, and use the verification set in the invoice data set to test the trained large model, extract key invoice information, and check whether the extracted invoice information indicators are within an acceptable range. Multiple simulation verifications improve the accuracy; The invoice template design module adopts an extensible template design language, allowing users to customize the template style and layout according to actual needs, thereby improving the flexibility and customizability of the template; wherein the extensible template design language is XML and LaTeX; and the template is converted into an editable format, which is convenient for merging with the model output; The invoice generation module includes: The input submodule is used when the user needs to generate an invoice. When the user enters the invoice information through the interface, the trained model will be automatically called to parse and format the user input; the invoice information includes the customer name, product list and price; The merging submodule is used to merge the large model output with the preset invoice template to generate complete invoice data; The conversion and output submodule is used to convert the invoice data into PDF format using the PDF generation library and output it to the user; the PDF production library includes iText and PDFBox; The optimization and verification module includes: The data enhancement submodule is used to adopt data enhancement technology in the model training process to increase the generalization ability and robustness of the model; data enhancement technology includes random perturbation and data expansion; The verification submodule is used to adopt an automatic verification mechanism during the invoice generation process to ensure that the generated invoices comply with tax regulations and format requirements; the automatic verification mechanism includes rule verification and format checking; The optimization submodule is used to collect user feedback in a timely manner and perform iterative optimization using a user feedback mechanism.
9. An electronic device, characterized in that: include: memory and at least one processor; Wherein, the memory stores computer-executable instructions; The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the method for dynamically generating invoice PDF based on a large model as described in any one of claims 1 to 6.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and when the processor executes the computer-executable instructions, the method for dynamically generating invoice PDF based on a large model as described in any one of claims 1 to 6 is implemented.