Reimbursement form generation method, electronic device and computer readable storage medium
By building a note type database and semantic model, combining unsupervised and supervised training technology, we automatically map the bill feature information and generate reimbursement orders, solving the problem of complex and complex existing reimbursement order generation process, and achieving efficient and accurate reimbursement order generation .
Patent Information
- Application Number
- CN202010934011.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-09-08
- Publication Date
- 2024-12-20
- Estimated Expiration
- 2040-09-08
AI Technical Summary
The existing reimbursement order generation process is complex, inefficient, prone to errors, and has high manual operation costs.
By setting up a note type database, obtaining bill information, extracting feature information, building a semantic model and rule database, using unsupervised and supervised training methods to realize the semantic understanding and mapping of bill feature information, and automatically generate reimbursement orders.
It improves the efficiency of reimbursement form generation, reduces manual operations, reduces time and labor costs, and avoids manual filling errors.
Smart Images

Figure CN112232036B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of computers, and in particular to a method for generating an expense report, an electronic device and a computer-readable storage medium. Background Art
[0002] Employees generate a large number of invoices and bills during business trips, purchases, and office work, which need to be classified and screened one by one, and entered into the reimbursement system according to corporate rules and regulations. The existing process of filling out reimbursement forms is cumbersome and complicated, and each bill must be entered into the corresponding reimbursement type, which is inefficient, time-consuming, and easy to make mistakes when filling out manually. Summary of the invention
[0003] The present invention aims to solve at least one of the above technical problems.
[0004] To this end, the first object of the present invention is to provide a method for generating an expense report.
[0005] A second object of the present invention is to provide an electronic device.
[0006] A third object of the present invention is to provide a computer-readable storage medium.
[0007] To achieve the first purpose of the present invention, an embodiment of the present invention provides a method for generating an expense report, including: setting a note type database, the note type database including note types; obtaining bill information; obtaining candidate note types; obtaining feature information of the bill based on the bill information; mapping the feature information to the note type; semantically aligning the note type with the candidate note type; and generating an expense report based on the semantically aligned note type.
[0008] Reimbursement is the process of sorting, filling out and submitting various bills generated during business trips, receptions and other affairs to the financial department for review. Different expense reports have very different fields, so different expense reports are classified into different categories and recorded as "note types". Through the note type, the original various bills are generated into expense reports, which can improve the efficiency of expense reporting, reduce manual operations, reduce time costs and labor costs, and avoid manual filling errors.
[0009] In addition, the technical solution provided by the above embodiment of the present invention may also have the following additional technical features:
[0010] In the above technical solution, according to the bill information, obtaining the characteristic information of the bill includes: extracting the information of each field of the bill to obtain the bill information;
[0011] Remove user personal information from the bill information; determine the characteristic dimensions of the bill based on the type of the bill; determine the characteristic information of the bill based on the characteristic dimensions of the bill.
[0012] The user personal information of the bill information center is removed and desensitized. While protecting the user's personal privacy, the complexity of the method is reduced and time costs are saved. Different feature dimensions are determined for different types of bills to improve the accuracy of mapping the feature information of the bill to the note type.
[0013] In any of the above technical solutions, before executing the mapping of feature information to note type, the accounting method also includes: constructing a general model, a sub-model, and a semantic model; constructing a semantic database and a rule database, the semantic database includes business data semantics and general data semantics, and the rule database includes the correspondence between semantics and note types; using the semantic database to perform unsupervised training on the semantic model; using the rule database to perform supervised training on the general model and the sub-model.
[0014] This embodiment adopts a combination of supervised and unsupervised methods to effectively enable the computer to understand business data, generate note types based on bills, generate reimbursement forms, and then achieve the effect of automatic reimbursement.
[0015] In any of the above technical solutions, mapping the feature information to the note type includes: using a semantic model to perform semantic understanding on the feature information to obtain semantics corresponding to the feature information;
[0016] The semantics corresponding to the feature information is input into the general model and sub-model, and the note type is obtained through rule matching.
[0017] The acquired feature information is input into the semantic model for semantic understanding, and the semantics corresponding to the feature information can be obtained. The semantics are then input into the general model and sub-model to map the note type corresponding to the semantics. The feature information is fully interpreted through the semantic model, and then the general model and sub-model are used to match the note type in the note type database with high accuracy.
[0018] In any of the above technical solutions, a semantic model is used to perform semantic understanding on the feature information to obtain the semantics corresponding to the feature information, including: using a semantic model to calculate the word vector, phrase vector and sentence vector of the feature information, and obtaining the semantics corresponding to the feature information through vector similarity calculation.
[0019] The purpose of the semantic model is to understand words and sentences. After obtaining the word vectors, the semantic vectors of phrases and sentences can be further calculated, and finally semantic matching can be achieved through similarity calculation.
[0020] In any of the above technical solutions, a rule database is used to perform supervised training on the general model and the sub-model, including: using a rule database, based on a data classification algorithm and a rule distribution weighted algorithm, to perform supervised training on the general model and the sub-model respectively.
[0021] Based on the data classification algorithm and rule distribution weighted algorithm, each major category of data and all data in the rule database are used to conduct supervised training on the general model and sub-model respectively, that is, to subdivide each bill type while taking into account the generality.
[0022] In any of the above technical solutions, the unsupervised training includes: for the semantic database, general data semantics use general semantic vectors, business data semantics use business semantic vectors, and unsupervised training is performed on the semantic model.
[0023] In unsupervised training, semantic word vectors are used for general semantics, business data is not segmented by words, and data granularity is large. Through the above method, semantic model recognition can be made more accurate.
[0024] In any of the above technical solutions, the reimbursement form generation method also includes: storing the semantics corresponding to the feature information and the note type after semantic alignment into a rule database; when the note type after semantic alignment does not meet the requirements, setting the note type corresponding to the feature information and storing it in the rule database; using the rule database to train the general model and sub-model.
[0025] Users can manually intervene in the results, and the results of manual intervention will be fed back to the general model and sub-models for further machine learning analysis and processing to optimize the general model and sub-models.
[0026] To achieve the second purpose of the present invention, an embodiment of the present invention provides an electronic device, including a memory storing a computer program; a processor executing the computer program; wherein, when the processor executes the computer program, it implements the steps of the reimbursement form generation method as in any embodiment of the present invention.
[0027] The electronic device provided by the embodiment of the present invention implements the steps of the method for generating an expense reimbursement form as in any embodiment of the present invention, and thus has all the beneficial effects of the method for generating an expense reimbursement form as in any embodiment of the present invention, which will not be described in detail herein.
[0028] To achieve the third purpose of the present invention, an embodiment of the present invention provides a computer-readable storage medium, which stores a computer program. When the computer program is executed, the steps of the reimbursement form generation method of any of the above embodiments are implemented.
[0029] The computer-readable storage medium provided by the embodiment of the present invention implements the steps of the method for generating an expense claim form as in any embodiment of the present invention, and thus has all the beneficial effects of the method for generating an expense claim form as in any embodiment of the present invention, which will not be described in detail herein.
[0030] Additional aspects and advantages of the present invention will become apparent from the following description or may be learned by practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] The above and / or additional aspects and advantages of the present invention will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which:
[0032] Figure 1 A flow chart of a method for generating a reimbursement form according to an embodiment of the present invention;
[0033] Figure 2 Acquiring characteristic information of a bill according to an embodiment of the present invention;
[0034] Figure 3 A flowchart of a method for training a semantic model, a general model, and a sub-model according to an embodiment of the present invention;
[0035] Figure 4 Mapping feature information to note types for one embodiment of the present invention;
[0036] Figure 5 A flowchart of a semantic method for obtaining feature information corresponding to an embodiment of the present invention;
[0037] Figure 6 A flow chart of a supervised training method according to an embodiment of the present invention;
[0038] Figure 7 A flow chart of an unsupervised training method according to an embodiment of the present invention;
[0039] Figure 8 A flow chart of a method for model training using feedback note type according to an embodiment of the present invention;
[0040] Fig. 9 A schematic diagram of the structure of an electronic device according to an embodiment of the present invention;
[0041] Fig.10 A flowchart of generating a reimbursement form according to an embodiment of the present invention;
[0042] Fig.11 This is a schematic diagram of an example of generating a reimbursement form according to an embodiment of the present invention;
[0043] Fig.12 This is a schematic diagram showing an example of bill information according to an embodiment of the present invention;
[0044] Fig.13 This is a schematic diagram of an example of information for recording a note according to an embodiment of the present invention;
[0045] Fig.14 This is a schematic diagram showing an example of information of a reimbursement form according to an embodiment of the present invention;
[0046] Fig.15A schematic diagram of a Dalian VAT electronic general invoice according to an embodiment of the present invention;
[0047] Fig.16 A schematic diagram of an air ticket according to an embodiment of the present invention;
[0048] Fig.17 A schematic diagram of a Beijing VAT general invoice according to an embodiment of the present invention;
[0049] Fig.18 A schematic diagram of a Dalian VAT general invoice according to an embodiment of the present invention;
[0050] Fig.19 A schematic diagram of a scheme design for generating detailed bills according to an embodiment of the present invention;
[0051] Fig. 20 A schematic diagram of a data preprocessing process according to an embodiment of the present invention;
[0052] Fig.21 A schematic diagram of a general model and sub-models of an embodiment of the present invention;
[0053] Fig. 22 A schematic diagram of a sub-model according to an embodiment of the present invention;
[0054] Fig.23 A general model schematic diagram of an embodiment of the present invention;
[0055] Fig.24 A schematic diagram of a semantic model according to an embodiment of the present invention;
[0056] Fig.25 A schematic diagram of semantic understanding and semantic enhancement according to an embodiment of the present invention;
[0057] Fig.26 A schematic diagram of generating a note type based on a bill according to an embodiment of the present invention;
[0058] Fig. 27 This is an example diagram of semantic alignment according to an embodiment of the present invention;
[0059] Fig.28 A schematic diagram of supervised and unsupervised acquisition of semantics according to an embodiment of the present invention;
[0060] Fig.29 The figure is a schematic diagram of the overall process of automatic reimbursement according to an embodiment of the present invention.
[0061] in, Fig. 9 The corresponding relationship between the reference numerals and the component names is as follows:
[0062] 200: electronic device, 210: memory, 220: processor. DETAILED DESCRIPTION
[0063] In order to more clearly understand the above-mentioned purpose, features and advantages of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that the embodiments of the present application and the features in the embodiments can be combined with each other without conflict.
[0064] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention may also be implemented in other ways different from those described herein. Therefore, the protection scope of the present invention is not limited to the specific embodiments disclosed below.
[0065] Refer to the following Figures 1 to 29 The invention describes a method for generating an expense report, an electronic device and a computer-readable storage medium according to some embodiments of the invention.
[0066] Embodiment 1:
[0067] like Figure 1 As shown, this embodiment provides a method for generating an expense reimbursement form, comprising the following steps:
[0068] Step S102, setting a note type database, the note type database includes note types;
[0069] Step S104, obtaining ticket information;
[0070] Step S106, obtaining candidate note types;
[0071] Step S108, obtaining feature information of the bill according to the bill information;
[0072] Step S110, mapping the characteristic information to the note type;
[0073] Step S112, semantically aligning the note type with the candidate note types;
[0074] Step S114, generating an expense reimbursement form according to the semantically aligned note type.
[0075] Specifically, the note types include: daily transportation, communication fees, long-distance transportation fees, accommodation fees, food and beverage fees, etc. The bills include: train tickets, air tickets, tolls, long-distance bus tickets, taxi machine invoices, value-added tax invoices, etc. The reimbursement forms include: travel expense reimbursement forms, transportation expense reimbursement forms, communication expense reimbursement forms, other expense reimbursement forms, etc. The bill information includes: invoice type, total price, date, invoice code, invoice number, etc. The candidate note type is the note type set according to actual needs. The characteristic information includes bill information that can reflect the type of bill.
[0076] For example, the correspondence between the bills and the reimbursement forms is that the travel expense reimbursement form includes long-distance transportation costs (high-speed rail or airplane), transportation to and from the airport / train station, transportation to the business trip destination, accommodation expenses, business trip subsidies, etc.; the transportation expense reimbursement form includes tolls, long-distance bus tickets, passenger service fees, etc.; the communication expense reimbursement form includes communication service fees, etc.; and other expense reimbursement forms include a variety of value-added tax invoices such as printed materials, conference services, etc.
[0077] According to the requirements of the finance department, the note type is matched with the expense report, and the expense report can be obtained directly based on the note type.
[0078] Reimbursement is the process of sorting, filling out and submitting various bills generated during business trips, receptions and other affairs to the financial department for review. Different expense reports have very different fields, so different expense reports are classified into different categories and recorded as "note types". Through the note type, the original various bills are generated into expense reports, which can improve the efficiency of expense reporting, reduce manual operations, reduce time costs and labor costs, and avoid manual filling errors.
[0079] There are many types of original bills and their formats are varied. This embodiment obtains the bill information, then extracts the feature information of the bill, and maps the feature information to the note type. The original bill information can be fully identified. By setting the candidate note type, the different requirements of different companies for reimbursement forms are met. The note type and the candidate note type are semantically aligned to obtain the final semantically aligned note type and generate the reimbursement form. This embodiment fully identifies and understands the information of the original bill to correctly and reasonably map it to the note type, thereby improving the efficiency of reimbursement, meeting diversity requirements, and improving the accuracy of the reimbursement form.
[0080] Since the note types in the note type database are obtained through historical data, the note types may not be consistent with the results expected by the user. Therefore, this embodiment adopts a post-processing method, and the user sets the candidate note type so that the note type mapped by the method is aligned with the note type expected by the user at the semantic level.
[0081] Embodiment 2:
[0082] like Figure 2 As shown, in addition to the technical features of the above embodiment, this embodiment further includes the following technical features:
[0083] According to the bill information, obtain the characteristic information of the bill, including:
[0084] Step S202, extracting information of each field of the bill to obtain bill information;
[0085] Step S204, removing the user's personal information from the ticket information;
[0086] Step S206, determining the characteristic dimension of the bill according to the type of the bill;
[0087] Step S208, determining characteristic information of the bill according to the characteristic dimension of the bill.
[0088] Specifically, for each type of bill, information of each field is extracted to obtain bill information including invoice type, total price, date, invoice code, invoice number, etc. According to the characteristics of different invoice types, the characteristic dimensions of the bill are determined, and the characteristic information of the bill is determined in the bill information.
[0089] In this embodiment, the user personal information of the ticket information center is removed and desensitized, which protects the user's personal privacy while reducing the complexity of the method and saving time costs.
[0090] For example, an airline ticket has the characteristics of origin, destination, and departure date. The attributes of the first two are locations, and the departure date is a time attribute. A VAT invoice has attributes such as "name of goods or taxable labor or services", information about the buyer and seller, and the sub-attributes of the buyer and seller include name, taxpayer identification number, address, phone number, bank and account number. The name is a text type, which can be further segmented and part-of-speech identified, and the taxpayer identification number is an indivisible string.
[0091] Different feature dimensions are determined for different types of bills to improve the accuracy of mapping the feature information of the bills to the note type.
[0092] Embodiment 3:
[0093] like Figure 3 As shown, in addition to the technical features of the above embodiment, this embodiment further includes the following technical features:
[0094] Before mapping the characteristic information to the note type, the reimbursement method further includes:
[0095] Step S302, constructing a general model, a sub-model, and a semantic model;
[0096] Step S304, constructing a semantic database and a rule database, wherein the semantic database includes business data semantics and general data semantics, and the rule database includes the correspondence between semantics and note types;
[0097] Step S306, using a semantic database to perform unsupervised training on the semantic model;
[0098] Step S308, using the rule database to perform supervised training on the general model and the sub-models.
[0099] Taking into account that different types of bills have strong unique characteristics, this embodiment adopts a combination of sub-models and general models.
[0100] The sub-model models each type of bill separately, including: air (air ticket), invoice, quota (quota invoice), taxi (taxi ticket), train (train ticket) and tolls (tolls, tolls).
[0101] The general model first merges different types of bill data, and then trains based on the overall data to obtain a general model.
[0102] The data in the rule database is derived from the business database and is an annotated data set, so a supervised method is used to train the sub-model and the general model. Since the supervised model is trained from historical data, the results recommended by the general model and the sub-model may not be consistent with the results expected by the user. Therefore, this embodiment also uses a post-processing method to align the recommended results with the results expected by the user at the semantic level.
[0103] Business data semantics include the semantics of professional domain vocabulary, such as invoice code, invoice type, bill type, etc. General data semantics include common phrases in life, etc.
[0104] How to understand the data information of the bill is very important. This embodiment adopts a method that combines business data semantics with general data semantics, which can effectively avoid the OOV (Out-of-vocabulary) problem in semantic understanding.
[0105] The structure of the semantic model is two-dimensional data consisting of all words as rows, and each row contains N+1 columns, where N is the word vector dimension specified when training the model. The first column is the word, which is a string or character structure; the remaining columns are floating-point values.
[0106] The purpose of building a semantic model is to understand words and sentences. With word vectors as the medium and unsupervised training methods, after obtaining the word vectors, the semantic vectors of phrases and sentences can be further calculated, and finally semantic matching can be achieved through similarity calculation. The word vectors trained with business data can fully understand the semantics of words such as invoice type and bill type, while the general semantic model can supplement the understanding of common words in life.
[0107] This embodiment adopts a combination of supervised and unsupervised methods to effectively enable the computer to understand business data, generate note types based on bills, generate reimbursement forms, and then achieve the effect of automatic reimbursement.
[0108] Embodiment 4:
[0109] like Figure 4 As shown, in addition to the technical features of the above embodiment, this embodiment further includes the following technical features:
[0110] Map feature information to note types, including:
[0111] Step S402, using a semantic model to perform semantic understanding on the feature information to obtain semantics corresponding to the feature information;
[0112] Step S404: input the semantics corresponding to the feature information into the general model and the sub-model, and obtain the note type through rule matching.
[0113] The acquired feature information is input into the semantic model for semantic understanding, and the semantics corresponding to the feature information can be obtained. The semantics are then input into the general model and sub-model to map the note type corresponding to the semantics. The feature information is fully interpreted through the semantic model, and then the general model and sub-model are used to match the note type in the note type database with high accuracy.
[0114] Embodiment 5:
[0115] like Figure 5 As shown, in addition to the technical features of the above embodiment, this embodiment further includes the following technical features:
[0116] The semantic model is used to understand the feature information semantically and obtain the semantics corresponding to the feature information, including:
[0117] Step S502, using a semantic model, calculates word vectors, phrase vectors and sentence vectors of feature information, and obtains semantics corresponding to the feature information by calculating vector similarity.
[0118] The purpose of the semantic model is to understand words and sentences. After obtaining the word vectors, the semantic vectors of phrases and sentences can be further calculated, and finally semantic matching can be achieved through similarity calculation.
[0119] Embodiment 6:
[0120] like Figure 6 As shown, in addition to the technical features of the above embodiment, this embodiment further includes the following technical features:
[0121] Use a rule database to conduct supervised training of general models and sub-models, including:
[0122] Step S602, using a rule database, based on a data classification algorithm and a rule distribution weighted algorithm, respectively, supervised training is performed on the general model and the sub-model.
[0123] Based on the data classification algorithm and rule distribution weighted algorithm, each major category of data and all data in the rule database are used to conduct supervised training on the general model and sub-model respectively, that is, to subdivide each bill type while taking into account the generality.
[0124] Embodiment 7:
[0125] like Figure 7 As shown, in addition to the technical features of the above embodiment, this embodiment further includes the following technical features:
[0126] Unsupervised training, including:
[0127] Step S702 , for the semantic database, general data semantics adopt general semantic vectors, and business data semantics adopt business semantic vectors, and unsupervised training is performed on the semantic model.
[0128] In unsupervised training, semantic word vectors are used for general semantics, business data is not segmented by words, and data granularity is large. Through the above method, semantic model recognition can be made more accurate.
[0129] Embodiment 8:
[0130] like Figure 8 As shown, in addition to the technical features of the above embodiment, this embodiment further includes the following technical features:
[0131] The reimbursement form generation method also includes:
[0132] Step S802, storing the semantics corresponding to the feature information and the note type after semantic alignment into a rule database;
[0133] Step S804: when the note type after semantic alignment does not meet the requirements, the note type corresponding to the feature information is set and stored in the rule database;
[0134] Step S806, using the rule database to train the general model and sub-models.
[0135] Users can manually intervene in the results, and the results of manual intervention will be fed back to the general model and sub-models for further machine learning analysis and processing to optimize the general model and sub-models.
[0136] Embodiment 9:
[0137] like Fig. 9 As shown, this embodiment provides an electronic device 200, including: a memory 210, storing a computer program; a processor 220, executing the computer program; wherein, when the processor 220 executes the computer program, it implements the steps of the reimbursement form generation method as in any embodiment of the present invention.
[0138] Embodiment 10:
[0139] The present embodiment provides a computer-readable storage medium, including: the computer-readable storage medium stores a computer program, and when the computer program is executed, the steps of the method for generating an expense report in any embodiment of the present invention are implemented. Specific embodiment:
[0141] This embodiment provides a method for generating a reimbursement form based on bills.
[0142] In the process of reimbursement of enterprise employees, this embodiment obtains invoice information through invoice recognition technology, uses the invoice information content, and uses intelligent algorithms to intelligently match the reimbursement type, generate and automatically fill out the reimbursement form, and reduce the workload of manual operations.
[0143] This embodiment needs to solve at least one of the following problems:
[0144] (1) Analyze invoice information based on invoice type and invoice content to determine business implications;
[0145] (2) Read the reimbursement type according to the settings in the reimbursement system and perform business meaning analysis;
[0146] (3) Analyze the user's usage habits based on historical reimbursement records, and match and convert invoice types and reimbursement types.
[0147] Reimbursement is the process of sorting, filling out and submitting various bills generated during business trips, receptions and other affairs to the financial department for review. In the process of automatic reimbursement, the original invoice can be directly generated into a reimbursement form. However, the fields filled in different reimbursement forms are very different. Fig.10 As shown, categorizing different expense reports into different "note types" can improve the efficiency of expense reporting. Fig.10 In the , note types include: daily transportation, communication expenses, long-distance transportation expenses, accommodation expenses, food and beverage expenses, etc. Invoices include: train tickets, air tickets, tolls, long-distance bus tickets, taxi machine invoices, value-added tax invoices, etc. Reimbursement forms include: travel expense reimbursement forms, transportation expense reimbursement forms, communication expense reimbursement forms, other expense reimbursement forms, etc.
[0148] The user submits the original bill (such as invoice, train ticket, air ticket, etc.) to the reimbursement system, first extracts the information of each field, then maps it to the note type according to the different types of bill information, and finally maps the note type to the reimbursement form. Fig.11 As shown, the information of the bill is as follows Fig.12 As shown, the bill details include invoice type, total price, date, invoice code, invoice number, etc. Fig.13 As shown, it includes daily transportation, communication expenses, long-distance transportation expenses, accommodation expenses, meals, etc. The information of the reimbursement form is as follows Fig.14 As shown, accommodation expenses include amount, business trip location, accommodation date, number of days, invoice type, reason, etc. Meals include amount, number of people, date, etc. Communication expenses include reimbursement amount, reimbursement quarter, start date, end date, invoice amount, etc.
[0149] There are many types of original bills, and the formats vary. For example, Dalian VAT electronic ordinary invoices are Fig.15 As shown, the ticket is Fig.16 As shown, Beijing VAT general invoice is as follows Fig.17 As shown, Dalian VAT ordinary invoice is as follows Fig.18 As shown, how to fully identify and understand the information of the original bill in order to correctly and reasonably map it to the note type is a very important link.
[0150] This embodiment solves the mapping relationship from "original bill" to "note type", thereby improving the efficiency of reimbursement and reducing manual operations.
[0151] In general, when a new business occurs, the optimal reimbursement type is matched based on the invoice data and user information contained in the new business through data classification and rule-weighted intelligent algorithms, and the results are output. Users can manually intervene in the results, and the results of manual intervention will be fed back to the intelligent algorithm for further machine learning analysis and processing to optimize the algorithm model.
[0152] Specifically, Fig.19 As shown, including:
[0153] (1) Perform invoice recognition and output the invoice information and the type of details to be selected to the intelligent algorithm;
[0154] The detail type is the note type, and the intelligent algorithm includes a general model, a sub-model, and a semantic model.
[0155] (2) The intelligent algorithm uses a data classification algorithm and a rule distribution weighted algorithm to output the best matching detail type and generate the details;
[0156] (3) Modify or save the invoice identification information and generated details to obtain a detail-invoice relationship database, a detail database, and an invoice database;
[0157] The detail-invoice relationship database stores the correspondence between details and invoices, the detail database stores the types of details, and the invoice database stores the invoice information.
[0158] (4) The intelligent algorithm is trained through the detail-invoice relationship database, the invoice information in the detail database and the invoice database, and the confirmed detail type.
[0159] Algorithm training includes rule extraction.
[0160] This embodiment collects historical data of users and performs desensitization processing, and uses supervised classification methods and unsupervised word vector training methods to build models and enhance semantic understanding, ultimately achieving the purpose of classifying the original bill into the note type.
[0161] In this embodiment, for the original data, the original data includes the original bill data and the memo invoice related data, the information of each field of the bill is extracted to obtain the bill information, and then the user personal information in the bill information is removed, and then the feature dimension of the bill is determined according to the type of the bill, and feature extraction is performed. Fig. 20 As shown, the data is preprocessed to erase the user's personal information in the original ticket information, such as name, seat number, flight number, etc., and then different dimensions are selected as features for different ticket types.
[0162] Considering that different types of bills have strong unique characteristics, this embodiment adopts a combination of sub-models and general models. Since the data is derived from the business database and is an annotated data set, a supervised method is used to train the model, such as Fig.21 As shown, a general model, sub-model and semantic model are constructed.
[0163] The data involved in model training is the bill data of the type shown in Table 1.
[0164] Table 1: Explanation of bill types
[0165] Ticket Type Note Type Explanation air Flights Invoice bill quota Fixed-amount invoice taxi Taxi Tickets train Train Tickets tolls Tolls and road fees
[0166] like Fig. 22 As shown in the figure, the sub-model models each type of bill separately. Fig.23 As shown in the figure, the general model first merges different types of bill data, and then trains based on the overall data to obtain a general model. Among them, the .bin suffix is a binary file, which is used when loading a computer program, and the .vec suffix is a text file, which can be used to manually view the word vector corresponding to each word in the model.
[0167] In this embodiment, a semantic database and a rule database are constructed. The semantic database includes business data semantics and general data semantics. The rule database includes the correspondence between semantics and note types. The semantic database is used to perform unsupervised training on the semantic model. For the semantic database, general data semantics use general semantic vectors, and business data semantics use business semantic vectors to perform unsupervised training on the semantic model.
[0168] like Fig.24As shown in the figure, the structure of the semantic model is a two-dimensional data consisting of all words as rows, each row contains N+1 columns, and N is the word vector dimension specified when training the model. The first column is the word, which is a string or character structure; the remaining columns are floating-point values.
[0169] Specifically for semantic understanding and semantic enhancement, how to understand the data information of the bill is very important. This embodiment adopts a method that combines business data semantics with general data semantics, which can effectively avoid the common OOV (Out-of-vocabulary) problem in semantic understanding. The purpose of the semantic model is to understand words and sentences, usually using word vectors as a medium, and the model can be trained using unsupervised methods. After obtaining the word vectors, the semantic vectors of phrases and sentences can be further calculated, and finally semantic matching is achieved through similarity calculations. The word vectors trained with business data can fully understand the semantics of words such as invoice type and bill type; and the general semantic model can supplement the understanding of common words in life. Such as Fig.25 As shown, the business data is provided with business word vectors, and the general corpus is provided with general word vectors. The semantic model calculates phrase vectors and sentence vectors through the business word vectors and the general word vectors, performs vector similarity calculation, and sorts them to obtain the final semantics.
[0170] like Fig.26 As shown, the user sends a request for the original ticket information and candidate note types to this embodiment, and this embodiment feeds back the recommended note types to the user in a weighted manner. The overall process includes obtaining the ticket information, selecting a set of note types, extracting features from the ticket information, calculating the semantics of the features, recommending note types, semantically comparing the recommended note types with the candidate set, reordering the ones with thicker semantics, and finally, obtaining note type recommendations.
[0171] Since the supervised model is trained from historical data, the results recommended by the model may not be consistent with the results expected by the user. Therefore, this embodiment also adopts a post-processing method to align the results recommended by the model with the results expected by the user at the semantic level. Fig. 27 As shown, the recommended note types: transportation notes, round-trip transportation fees, and transportation details are combined, and the cosine value (cosine, cosine similarity) is calculated one by one, and then sorted to obtain: dining notes, company activities, and business trip travel reimbursement.
[0172] This embodiment adopts a method that combines supervised and unsupervised methods, such as Fig.28As shown in the figure, for general semantic vectors and business data, an unsupervised method is used, where business data is not segmented, and a large granularity is used. The general semantic vector includes general semantics, and the business data includes the semantics of professional domain vocabulary, such as invoice code. With a supervised method, a general model and a sub-model are trained for each major category of data and all data, that is, each bill type is subdivided, while taking into account the generality.
[0173] In summary, this embodiment adopts a method that combines supervised and unsupervised methods to effectively enable the computer to understand business data, achieve the effect of generating note types based on bills, and then automatically reporting accounts.
[0174] The overall process of automatic reimbursement in this embodiment is as follows: Fig.29 As shown, it includes machine learning, strategy fusion, and Rest service. Specifically:
[0175] Machine learning specifically includes: obtaining the rule base, semantic base and semantic model through the business database, and training the semantic model, general model and sub-model through the model training center.
[0176] Strategy fusion specifically includes: rule matching and semantic understanding, persisting the recommendation results after matching and semantic understanding, and performing machine learning on the semantic model, general model and sub-model through the model training center.
[0177] The Rest service specifically includes: providing detail type matching service, user selection result feedback service, inputting detail type to the user, providing feedback on the user's selection result, persisting the recommendation result, and performing machine learning on the semantic model, general model and sub-model through the model training center.
[0178] Among them, (1) the best detail type is selected through natural language processing, semantic recognition, user behavior analysis and other methods. (2) The algorithm recommendation effect can be tracked in real time based on user feedback, and the model can be automatically trained and updated regularly. (3) Considering the problem of data imbalance, a fusion strategy of multiple methods based on rules and semantics is adopted. The specific algorithm uses CNN (Convolutional Neural Networks), fastText (a fast text classification method), and SVM (support vector machines). (4) In the experimental stage, the accuracy rate reached 76% (R3). (5) The service provides two interfaces: one interface is suitable for intelligent matching of details, and the other interface is suitable for tracking results.
[0179] In summary, the beneficial effects of the embodiments of the present invention are:
[0180] 1. With the traditional manual filling method, it takes an average of about 15 minutes to fill out a reimbursement form containing 10 bills. With the method of the present invention, that is, the automatic matching and automatic data substitution method using an intelligent algorithm, the filling time can be shortened to about 3 minutes, saving 80% of the manual filling workload.
[0181] 2. Categorize different expense reports into "note types". By using the note type, various original bills can be used to generate expense reports, which can improve the efficiency of accounting, reduce manual operations, reduce time and labor costs, and avoid manual filling errors.
[0182] In the present invention, the terms "first", "second", and "third" are used for descriptive purposes only and should not be understood as indicating or implying relative importance; the term "plurality" refers to two or more, unless otherwise clearly defined. The terms "installed", "connected", "connected", "fixed", etc. should be understood in a broad sense. For example, "connected" can be a fixed connection, a detachable connection, or an integral connection; "connected" can be a direct connection or an indirect connection through an intermediate medium. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0183] In the description of the present invention, it is necessary to understand that the directions or positional relationships indicated by terms such as “upper”, “lower”, “left”, “right”, “front” and “back” are based on the directions or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or unit referred to must have a specific direction, be constructed and operated in a specific orientation, and therefore, cannot be understood as a limitation on the present invention.
[0184] In the description of this specification, the description of the terms "one embodiment", "some embodiments", "specific embodiments", etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.
[0185] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for generating a reimbursement form, characterized in that: include: Setting a note type database, wherein the note type database includes note types; Get ticket information; Get candidate note types; According to the bill information, acquiring characteristic information of the bill; Mapping the characteristic information to the note type; semantically aligning the note type with the candidate note type; Generate an expense report according to the note type after the semantic alignment; Before mapping the characteristic information to the note type, the expense report generation method further includes: Build general models, sub-models, and semantic models; Constructing the sub-model includes: Model each type of note separately; Constructing the general model includes: Merging different types of bill information, training based on the overall bill information to obtain the general model; Constructing a semantic database and a rule database, wherein the semantic database includes business data semantics and general data semantics, and the rule database includes a correspondence between the semantics and the note type; Using the semantic database, performing unsupervised training on the semantic model; Using the rule database, supervised training is performed on the general model and the sub-model; The mapping the characteristic information to the note type includes: Using the semantic model, semantic understanding is performed on the feature information to obtain semantics corresponding to the feature information; The semantics corresponding to the feature information is input into the general model and the sub-model, and the note type is obtained through rule matching.
2. The method for generating a reimbursement form according to claim 1, characterized in that: The step of obtaining characteristic information of the bill according to the bill information includes: Extracting information from each field of the bill to obtain the bill information; Removing user personal information from the ticket information; Determining a characteristic dimension of the bill according to the type of the bill; According to the characteristic dimension of the bill, characteristic information of the bill is determined.
3. The method for generating a reimbursement form according to claim 1, characterized in that: The adopting the semantic model to perform semantic understanding on the feature information to obtain the semantics corresponding to the feature information includes: The semantic model is used to calculate the word vector, phrase vector and sentence vector of the feature information, and the semantics corresponding to the feature information is obtained by vector similarity calculation.
4. The method for generating a reimbursement form according to claim 1, characterized in that: The method of using the rule database to perform supervised training on the general model and the sub-model includes: The rule database is used to perform supervised training on the general model and the sub-model respectively based on a data classification algorithm and a rule distribution weighting algorithm.
5. The method for generating a reimbursement form according to claim 1, characterized in that: The unsupervised training includes: For the semantic database, the general data semantics adopts a general semantic vector, the business data semantics adopts a business semantic vector, and unsupervised training is performed on the semantic model.
6. The method for generating a reimbursement form according to claim 1, characterized in that: Also includes: The semantics corresponding to the feature information and the note type after the semantics are aligned are stored in the rule database; When the note type after semantic alignment does not meet the requirement, setting the note type corresponding to the feature information and storing it in the rule database; The general model and the sub-models are trained using the rule database.
7. An electronic device (200), characterized in that: include: A memory (210) storing a computer program; A processor (220) for executing the computer program; Wherein, when executing the computer program, the processor (220) implements the steps of the method for generating an expense report according to any one of claims 1 to 6.
8. A computer-readable storage medium, characterized in that: include: The computer-readable storage medium stores a computer program, and when the computer program is executed, the steps of the expense report generation method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Method and system for generating accounting voucher
CN105512890A
Bill generation method based on big data
CN110458675A
Bill reimbursement method and device
CN111179044A
