Method and device for generating reimbursement document, and medium
By building a document template library and neural network model, the generation and review of billing documents is automatically solved, and the problem of inefficiency of existing tools is achieved, and more efficient and accurate document generation is achieved to meet the complex financial management needs of enterprises.
Patent Information
- Application Number
- CN202411145388.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-20
- Publication Date
- 2024-11-22
AI Technical Summary
The existing billing receipt generation tools are inefficient, rely on manual operations, are prone to errors, and cannot completely replace the ability to generate complex reports, and cannot adapt to the growing financial management needs of enterprises.
By building a document template library and neural network model, accounting data is automatically obtained, mapped to the target document template, verify and risk identification, and automatic generation and auditing are realized, and manual intervention is reduced.
It improves the efficiency and accuracy of billing receipt generation, reduces the error rate, and meets the company's needs for fast, accurate and flexible processing of billing receipts.
Smart Images

Figure CN119005158A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method, device and medium for generating a billing document. Background Art
[0002] The generation and processing of reimbursement documents has always been a tedious and time-consuming process. Automatic report generation tools are constantly evolving. However, although existing automatic report generation tools can achieve a certain degree of automation, they still have some limitations. Due to the computational logic relationship between the complex reimbursement document data and the document data, it is not simply copying the reimbursement data content to the document. The document data may be obtained by performing complex calculations on the reimbursement data. Therefore, the current ability to generate complex reports is limited and cannot completely replace manual operations.
[0003] Therefore, faced with large and complex billing document generation scenarios, the current method of billing document generation still relies mainly on manual operations, which requires manual filling of a large amount of document information and going through multi-level review and approval processes. This is not only inefficient and prone to errors, but also difficult to adapt to the company's growing financial management needs. Summary of the invention
[0004] The embodiments of the present application provide a method, device and medium for generating billing documents, which are used to solve the problem of low efficiency and accuracy in generating billing documents.
[0005] The present application embodiment adopts the following technical solutions:
[0006] On the one hand, an embodiment of the present application provides a method for generating a reimbursement document, the method comprising: obtaining reimbursement data of a document to be generated; determining a target document template identifier of the reimbursement data; retrieving the target document template identifier in a template database to obtain a target document template; mapping the reimbursement data to the target document template according to a pre-constructed document generation model to obtain an initial document; verifying the initial document according to a pre-constructed document risk identification model; when the verification passes, determining the initial document as the target document of the reimbursement data.
[0007] In one example, determining the target document template identifier of the reimbursement data specifically includes: receiving a document generation request for the reimbursement data, parsing the document generation request to obtain a document type and a login account; determining a list of template identifiers to which the user has authority based on the document type and the login account; and in the template identifier list, determining the document template identifier selected by the user as the target document template identifier for the reimbursement data.
[0008] In one example, the reimbursement data is filled into the target document template according to a pre-built document generation model, and before the initial document is obtained, the method also includes: displaying the target document template on the client interface to determine whether the target document template needs to be customized and updated; if so, updating the target document template by opening the customization permission of the target document template.
[0009] In one example, after the target document template is updated by opening the customization permission of the target document template, the method also includes: when saving the updated target document template, determining whether the target document template needs to be overwritten; if so, replacing the target document template with the updated target document template in the template database; if not, generating a unique identifier corresponding to the updated target document template to save the updated target document template to the template database.
[0010] In one example, the reimbursement data is mapped to the target document template according to a pre-built document generation model to obtain an initial document, which specifically includes: obtaining sample reimbursement data, a sample target document template and a sample initial document; using the sample reimbursement data and the sample target document template as sample inputs, and the sample initial document as a sample label, training the neural network architecture of the document generation model to obtain the document generation model; inputting the reimbursement data and the target document template into the document generation model to obtain an initial document.
[0011] In one example, the initial document is verified according to a pre-built document risk identification model, specifically including: obtaining a sample initial document and a risk type of the sample initial document; taking the sample initial document as a sample input and the risk type as a sample label, training the neural network architecture of the document risk identification model to obtain a document risk identification model; inputting the initial document into the document risk identification model to obtain a risk identification result of the initial document; if the risk identification result is that there is no potential risk, determining that the initial document has passed the verification; if the risk identification result is that there is a potential risk, performing an abnormality analysis on the initial document according to the risk identification result.
[0012] In one example, the abnormal analysis of the initial document based on the risk identification result specifically includes: determining the potential risk data of the initial document based on the risk identification result; comparing the potential risk data with a preset critical interval; when the potential risk data is not in the preset critical interval, determining that the initial document verification has failed, and generating a reason for the failure to generate the initial document; when the potential risk data is in the preset critical interval, determining that the initial document verification has passed.
[0013] In one example, obtaining the reimbursement data for the document to be generated specifically includes: receiving uploaded original reimbursement data; when the original reimbursement data has missing values, determining whether the column where the missing values are located has an average value; if so, filling the missing values with the average value; formatting and normalizing the original reimbursement data to obtain the reimbursement data for the document to be generated.
[0014] On the other hand, an embodiment of the present application provides a billing document generation device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute a billing document generation method described in any one of the above items.
[0015] On the other hand, an embodiment of the present application provides a non-volatile computer storage medium for generating billing documents, which stores computer executable instructions, and the computer executable instructions can execute any of the above-mentioned methods for generating billing documents.
[0016] At least one of the above technical solutions adopted in the embodiments of the present application can achieve the following beneficial effects:
[0017] By building a document template library, standard document templates that meet the reimbursement type can be generated in advance, which improves the flexibility of template management, so that the target document template can be automatically called during the process of generating reimbursement documents by the user. Furthermore, the reimbursement data can be automatically mapped to the target document template through the document generation model, and the initial document can be quickly generated, which improves the efficiency and accuracy of document generation. The initial document can be verified through the document risk identification model, which can automatically and quickly identify possible abnormal data, avoid the subsequent risk consequences caused by abnormal data in advance, and reduce the document error rate, thereby providing a more efficient, accurate and flexible document generation solution, especially for the scenario of generating a large number of reimbursement documents, which can meet the needs of enterprises for fast, accurate and flexible processing of reimbursement documents. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solution of the present application, some embodiments of the present application will be described in detail below in conjunction with the accompanying drawings, in which:
[0019] Figure 1 A flowchart of a method for generating a billing document provided in an embodiment of the present application;
[0020] Figure 2 A schematic diagram of the structure of a billing document generating device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0021] In order to make the purpose, technical solution and advantages of the present application clearer, the technical solution of the present application will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.
[0022] Some embodiments of the present application are described in detail below with reference to the accompanying drawings.
[0023] Figure 1 A flowchart of a method for generating a billing document provided in an embodiment of the present application. The method can be applied to different business fields, such as the Internet financial business field, the e-commerce business field, the instant messaging business field, the game business field, the official business field, etc. Certain input parameters or intermediate results in the process allow manual intervention and adjustment to help improve accuracy.
[0024] The analysis method involved in the embodiments of the present application can be implemented by a terminal device or a server, and the present application does not impose any special restrictions on this. For the convenience of understanding and description, the following embodiments are described in detail by taking a server as an example.
[0025] It should be noted that the server may be a single device or a system consisting of multiple devices, that is, a distributed server, and this application does not make any specific limitation on this.
[0026] Figure 1 The process in includes the following steps:
[0027] S101: Obtain the reimbursement data for the document to be generated.
[0028] In some embodiments of the present application, the user uploads the original reimbursement data in the operation interface. The original reimbursement data can be in the form of an HTML document. Among them, the Python programming language can be used to parse the HTML document using libraries such as BeautifulSoup to extract the required data elements. For complex web page structures, XPath or CSS selectors can be used for positioning.
[0029] In addition, since the original reimbursement data may have missing values, the format may be inconsistent with the document format, or the data quantification range may be inconsistent, the original reimbursement data needs to be preprocessed.
[0030] Based on this, the uploaded original reimbursement data is received. When the original reimbursement data has missing values, it is determined whether the column where the missing value is located has an average value. If so, the missing value is filled with the average value. Then, the original reimbursement data is formatted and normalized to obtain the reimbursement data for the document to be generated.
[0031] It should be noted that you can also use specific values, such as the median and mode to fill missing values. For missing values that cannot be filled, you can consider deleting the corresponding data rows or columns. You can also use methods such as the interquartile range to detect outliers and replace them, such as replacing or deleting them with the median. When converting data to a unified format, such as date and time format, currency format, etc., if the data contains non-ASCII characters, encoding conversion is required, such as UTF-8 to GBK. In addition, use methods such as normalization and scaling to convert data to a unified dimension and range.
[0032] S102: Determine the target document template identifier of the reimbursement data.
[0033] In some embodiments of the present application, a template database needs to be pre-built. During the construction process, first, a series of templates need to be defined. These document templates can be designed according to business requirements and data structures. Templates can include layouts, styles, fields, etc. Each template should have a unique identifier ID for subsequent selection and reference.
[0034] In some embodiments of the present application, different users have different template permissions, so that they can select a corresponding document template from a list of templates with permissions.
[0035] Based on this, when receiving a document generation request for reimbursement data, the document generation request is parsed to obtain the document type and login account. Then, according to the document type and login account, a list of template identifiers to which the user has authority is determined. Finally, in the list of template identifiers, the document template identifier selected by the user is determined as the target document template identifier for the reimbursement data.
[0036] The template selector is a user interface component that allows users to select a template from a predefined list of templates. It can be customized according to different business scenarios and user needs. For example, the displayed template list can be filtered according to user permissions, data types and other conditions.
[0037] Furthermore, since there are scenarios where users need to make adaptive adjustments to document templates in the database, adjustment permissions are opened to users.
[0038] Based on this, the target document template is displayed on the client interface to determine whether the target document template needs to be customized and updated. For example, an option to indicate whether an update is needed is popped up on the client interface.
[0039] If so, update the target document template by opening the customization permission of the target document template.
[0040] After opening the customization permissions for the target document template, users can be allowed to add, delete, and modify fields and styles in the template in the interface.
[0041] After opening the customization permission of the target document template, the updated target document template is obtained. When saving the updated target document template, it is determined whether the target document template needs to be overwritten.
[0042] If so, the target document template is replaced by the updated target document template in the template database.
[0043] If not, a unique identifier corresponding to the updated target document template is generated to save the updated target document template to the template database.
[0044] That is, template customization can be done through the user interface, allowing users to add, delete, and modify fields, styles, etc. in the template. The customized template can be saved as a new template version or it can overwrite the original template.
[0045] S103: Searching the target document template identifier in the template database to obtain the target document template.
[0046] S104: According to the pre-built document generation model, the reimbursement data is mapped to the target document template to obtain an initial document.
[0047] In some embodiments of the present application, it is necessary to pre-build a document generation model, and the process is as follows: obtain sample reimbursement data, sample target document templates, and sample initial documents. Then, the sample reimbursement data and the sample target document template are used as sample inputs, and the sample initial document is used as a sample label to train the neural network architecture of the document generation model to obtain the document generation model.
[0048] Based on this, the reimbursement data and the target document template are input into the document generation model to obtain the initial document.
[0049] It is understandable that in the mapping process, not only the mapping between field contents needs to be processed, but also the formatting and conversion of data needs to be processed to ensure that the reimbursement data can be correctly displayed in the template.
[0050] It should be noted that the sample reimbursement data is historical reimbursement data. The document generation model will learn how to extract key information from the sample reimbursement data and map the key information to the corresponding part of the reimbursement document. After mapping the data, the initial reimbursement document will be automatically formatted and laid out according to the preset reimbursement document template and format rules.
[0051] It should be noted that some field contents of the reimbursement document template may be calculated from multiple field data in the reimbursement data.
[0052] S105: Verify the initial document according to the pre-built document risk identification model.
[0053] In some embodiments of the present application, it is necessary to pre-build a document risk identification model, and the process is as follows: First, obtain a sample initial document and the risk type of the sample initial document. Then, use the sample initial document as a sample input, use the risk type as a sample label, train the neural network architecture of the document risk identification model, and obtain the document risk identification model.
[0054] Based on this, the initial document is input into the document risk identification model to obtain the risk identification result of the initial document.
[0055] If the risk identification result is that there is no potential risk, the initial document verification is confirmed to have passed.
[0056] If the risk identification result is that there is potential risk, an abnormal analysis will be conducted on the initial document based on the risk identification result.
[0057] After the initial potential risks are quickly and accurately screened out through the document risk identification model, the potential risks are further verified for a second time. When performing abnormal analysis, first, the potential risk data of the initial document is determined based on the risk identification results. Then, the potential risk data is compared with the preset critical interval. Then, when the potential risk data is not within the preset critical interval, it is determined that the initial document verification has failed, and the reason for the failure to generate the initial document is generated. When the potential risk data is within the preset critical interval, it is determined that the initial document verification has passed.
[0058] S106: When the verification is passed, the initial document is determined as the target document of the reimbursement data.
[0059] In some embodiments of the present application, the target document is exported and sent. A variety of export formats are supported, such as PDF, Excel, CSV, etc., to meet the needs of different users and devices. At the same time, electronic signature and encryption functions are supported to ensure the security and credibility of the document. In addition, print and send functions are provided to facilitate users to print documents directly or send them to relevant parties via email or other means.
[0060] In summary, compared with the prior art, there is a lack of complete and comprehensive intelligent design, and there is a lack of intelligent parsing, automatic filling, formatting and other functions. The existing methods lack a modular design concept, and cannot be flexibly configured and expanded for different business needs and scenarios, resulting in insufficient system scalability and flexibility. Relying only on simple rule matching or manual review, the efficiency is low and error-prone. This application can automatically obtain data related to reimbursement from inside and outside the enterprise. The collected data is cleaned, classified and labeled to provide an accurate data basis for the subsequent generation of reimbursement documents. Provide a wealth of preset templates for users to choose from, and support user-defined templates to meet different needs. Based on the processed data and the selected template, use artificial intelligence algorithms to quickly generate reimbursement documents. Perform intelligent review of the generated reimbursement documents to ensure the accuracy and compliance of the documents. Export the approved reimbursement documents to the required format, and support printing or electronic sending.
[0061] It can be seen that the advantages lie in its efficiency, accuracy and flexibility. Through automated processing and intelligent algorithms, it is possible to quickly generate billing documents that meet the requirements, thereby improving work efficiency; intelligent review and document risk identification ensure the accuracy and compliance of documents and reduce the error rate. At the same time, the flexible template management function enables this system to adapt to the personalized needs of different enterprises, departments or projects.
[0062] It should be noted that although the embodiments of the present application are based on Figure 1 Steps S101 to S106 are described in sequence, but this does not mean that steps S101 to S106 must be performed in a strict order. Figure 1 The order shown in the figure is to introduce and explain step S101 to step S106 in sequence, in order to facilitate those skilled in the art to understand the technical solution of the embodiment of the present application. In other words, in the embodiment of the present application, the order between step S101 to step S106 can be appropriately adjusted according to actual needs.
[0063] pass Figure 1The method can generate standard document templates that meet the reimbursement type in advance by building a document template library, thereby improving the flexibility of template management, so that the target document template can be automatically called during the process of generating reimbursement documents by the user. Furthermore, the reimbursement data can be automatically mapped to the target document template through the document generation model, and the initial document can be quickly generated, thereby improving the efficiency and accuracy of document generation. The initial document can be verified through the document risk identification model, and possible abnormal data can be automatically and quickly identified, so as to avoid the subsequent risk consequences caused by abnormal data in advance and reduce the document error rate, thereby providing a more efficient, accurate and flexible document generation solution to meet the needs of enterprises for fast, accurate and flexible processing of reimbursement documents.
[0064] Based on the same idea, some embodiments of the present application also provide devices and non-volatile computer storage media corresponding to the above methods.
[0065] Figure 2 A schematic diagram of a billing document generating device provided in an embodiment of the present application includes:
[0066] at least one processor; and,
[0067] a memory communicatively connected to the at least one processor; wherein,
[0068] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute any one of the above-mentioned methods for generating a billing document.
[0069] Some embodiments of the present application provide a non-volatile computer storage medium for generating a billing document, which stores computer executable instructions, and the computer executable instructions can execute any of the above-mentioned methods for generating a billing document.
[0070] Each embodiment in this application is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device and medium embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.
[0071] The devices and media provided in the embodiments of the present application correspond one-to-one to the methods. Therefore, the devices and media also have similar beneficial technical effects as the corresponding methods. Since the beneficial technical effects of the methods have been described in detail above, the beneficial technical effects of the devices and media will not be repeated here.
[0072] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may 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.
[0073] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0074] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0075] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0076] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0077] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0078] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0079] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0080] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the technical principle of the present application should all fall within the protection scope of the present application.
Claims
1. A method for generating billing documents, It is characterized in that The method comprises: Obtain the reimbursement data for the document to be generated; Determine the target document template identifier of the reimbursement data; In the template database, the target document template identifier is searched to obtain the target document template; According to a pre-built document generation model, the reimbursement data is mapped to the target document template to obtain an initial document; Verifying the initial document according to a pre-built document risk identification model; When the verification is passed, the initial document is determined as the target document of the reimbursement data.
2. The method according to claim 1, It is characterized in that The target document template identifier for determining the reimbursement data specifically includes: Receiving a document generation request for reimbursement data, parsing the document generation request, and obtaining a document type and a login account; Determine a list of template identifiers to which the user has authority based on the document type and the login account; In the template identification list, the document template identification selected by the user is determined as the target document template identification of the reimbursement data.
3. The method according to claim 1, It is characterized in that Before filling the target document template with the reimbursement data according to the pre-built document generation model to obtain the initial document, the method further includes: Displaying the target document template on the client interface to determine whether the target document template needs to be customized and updated; If so, the target document template is updated by opening the customization permission of the target document template.
4. The method according to claim 3, It is characterized in that After updating the target document template by opening the customization permission of the target document template, the method further includes: When saving the updated target document template, determining whether the target document template needs to be overwritten; If so, in the template database, the target document template is replaced by the updated target document template; If not, a unique identifier corresponding to the updated target document template is generated to save the updated target document template to the template database.
5. The method according to claim 1, It is characterized in that The step of mapping the reimbursement data to the target document template according to the pre-built document generation model to obtain the initial document specifically includes: Obtain sample reimbursement data, sample target document templates, and sample initial documents; The sample reimbursement data and the sample target document template are used as sample inputs, the sample initial document is used as a sample label, and a neural network architecture of a document generation model is trained to obtain a document generation model; The reimbursement data and the target document template are input into the document generation model to obtain an initial document.
6. The method according to claim 1, It is characterized in that The verifying of the initial document according to the pre-built document risk identification model specifically includes: Obtaining sample initial documents and risk types of the sample initial documents; Taking the sample initial document as sample input and the risk type as sample label, training the neural network architecture of the document risk identification model to obtain the document risk identification model; Inputting the initial document into the document risk identification model to obtain a risk identification result of the initial document; If the risk identification result is that there is no potential risk, then it is determined that the initial document verification has passed; If the risk identification result is that there is a potential risk, an abnormality analysis is performed on the initial document based on the risk identification result.
7. The method according to claim 6, It is characterized in that The abnormality analysis of the initial document according to the risk identification result specifically includes: Determining potential risk data of the initial document according to the risk identification result; Comparing the potential risk data with a preset critical interval; When the potential risk data is not within the preset critical interval, determining that the initial document verification fails, and generating a reason for the failure to generate the initial document; When the potential risk data is within the preset critical interval, it is determined that the initial document verification has passed.
8. The method according to claim 1, It is characterized in that The obtaining of the reimbursement data of the document to be generated specifically includes: Receive the uploaded original reimbursement data; When the original reimbursement data has missing values, determining whether the column where the missing values are located has an average value; If so, fill the missing value with the mean value; The original reimbursement data is formatted and normalized to obtain the reimbursement data for the document to be generated.
9. A billing document generating device, It is characterized in that include: at least one processor; as well as, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method for generating a billing document as described in any one of claims 1 to 8.
10. A non-volatile computer storage medium for generating a billing document, storing computer executable instructions, It is characterized in that The computer executable instructions can execute a method for generating billing documents as described in any one of claims 1 to 8.
Citation Information
Cited By
Financial data processing method, device and equipment and storage medium thereof
CN119762251A
Document automatic generation method based on document identification
CN120449854A
A method for automatic document generation based on document recognition
CN120449854B
