Intelligent bill identification method and device, equipment and storage medium

By obtaining invoice recognition prompt templates through a preset invoice recognition model and business rule dictionary, the problem of needing to reconfigure templates and rules every time a new invoice is recognized in existing technologies is solved, thereby improving recognition efficiency and reducing costs.

CN121527792APending Publication Date: 2026-02-13CHINA MERCHANTS BANK
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511611601.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-05
Publication Date
2026-02-13

AI Technical Summary

Technical Problem

Existing invoice recognition methods require reconfiguration of templates and rules each time a new invoice is recognized, resulting in high costs and low efficiency.

Method used

The invoice type is determined by a preset invoice recognition model, and the corresponding invoice recognition prompt template is obtained from a preset business rule dictionary. Recognition is then performed based on the model and the template.

Benefits of technology

It reduces the template and rule configuration required for recognizing new invoices, thereby improving recognition efficiency and reducing costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121527792A_ABST
    Figure CN121527792A_ABST
Patent Text Reader

Abstract

The invention discloses an intelligent bill recognition method and device, equipment and a storage medium, and relates to the technical field of bill recognition, and the method comprises the steps: carrying out the format conversion of a to-be-recognized bill file, and obtaining a target bill picture; determining a target bill type corresponding to the bill in the target bill picture through a preset bill recognition model; acquiring a bill recognition prompt template corresponding to the target bill picture from a preset business rule dictionary according to the target bill type; and identifying the target bill picture based on a preset bill identification model and the bill identification prompt template to obtain a bill identification result. According to the invention, the corresponding bill identification prompt template is obtained from the preset business rule dictionary according to the target bill type corresponding to the bill, and bill identification is carried out based on the preset bill identification model and the bill identification prompt template. The technical problems of high cost and low efficiency due to the fact that templates and rules need to be reconfigured when new bills are recognized in a bill recognition method in the prior art are solved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of bill identification, and particularly to a bill intelligent identification method, device, equipment and storage medium. BACKGROUND

[0002] With the rapid development of digital technology, bill identification technology has been widely applied in the fields of finance, taxation, enterprise management, etc. The main purpose of bill identification technology is to extract key information from various bills, such as invoice code, invoice number, invoice date, amount, check code, etc., so as to facilitate subsequent financial processing, tax declaration and data analysis, etc.

[0003] At present, the traditional bill identification method relies on OCR (Optical Character Recognition) technology, which can convert the text in the bill image into editable text data through image processing and pattern recognition algorithm. However, this bill identification method usually needs to design identification templates and rules in advance for different bill types, so that the templates and rules need to be reconfigured every time a new bill is identified, which is high in cost and low in efficiency. SUMMARY

[0004] The main purpose of the present application is to provide a bill intelligent identification method, device, equipment and storage medium, which aims to solve the technical problems of high cost and low efficiency of the bill identification method in the prior art, which needs to reconfigure templates and rules every time a new bill is identified.

[0005] To achieve the above-mentioned purpose, the present application provides a bill intelligent identification method, which comprises: responding to a bill identification request, and performing format conversion on a to-be-identified bill file to obtain a target bill picture; determining a target bill type corresponding to the bill in the target bill picture through a preset bill identification model; acquiring a bill identification prompt template corresponding to the target bill picture from a preset business rule dictionary according to the target bill type; identifying the target bill picture based on the preset bill identification model and the bill identification prompt template to obtain a bill identification result.

[0006] In an embodiment, before the step of performing format conversion on the to-be-identified bill file to obtain the target bill picture, the method further comprises: determining a hash value of the to-be-identified bill file, and performing integrity verification on the to-be-identified bill file based on the hash value; if the verification is passed, acquiring metadata of the to-be-identified bill file, the metadata comprising file resolution and file size of the to-be-identified bill file; determine whether the metadata meets a preset business specification based on the file resolution and the file size; If yes, perform the step of converting the to-be-identified bill file into a target bill picture.

[0007] In an embodiment, the step of converting the to-be-identified bill file into a target bill picture includes: obtaining file format information of the to-be-identified bill file, and determining a file format of the to-be-identified bill file according to the file format information; If the file format is a non-picture format, performing format conversion on the to-be-identified bill file by a standard image conversion tool to obtain a target bill picture.

[0008] In an embodiment, the step of determining, by a preset bill identification model, a target bill type corresponding to a bill in the target bill picture includes: extracting, by a preset bill identification model, features of the target bill picture to obtain bill key features; determining a candidate bill type of the target bill picture and a type confidence corresponding to the candidate bill type according to the bill key features; determining, based on the type confidence, a target bill type corresponding to a bill in the target bill picture from the candidate bill type.

[0009] In an embodiment, the step of identifying, based on the preset bill identification model and the bill identification prompt template, the target bill picture to obtain a bill identification result includes: extracting bill identification prompt information of the target bill picture from the bill identification prompt template; analyzing, by the preset bill identification model, the target bill picture based on the bill identification prompt information to output bill element data in the target bill picture; generating a bill identification result of the to-be-identified bill file based on the bill element data.

[0010] In an embodiment, the step of analyzing, by the preset bill identification model, the target bill picture based on the bill identification prompt information to output bill element data in the target bill picture includes: determining bill identification instructions and context association logic in the bill identification prompt information; extracting, by the preset bill identification model, all bill key fields in the target bill picture according to the bill identification instructions; According to the context association logic, each bill key field is checked and associated to output bill element data in the target bill picture.

[0011] In an embodiment, after the step of identifying the target bill picture based on the preset bill identification model and the bill identification prompt template to obtain a bill identification result, the method further comprises: receiving artificial correction bill data of user feedback, and determining whether there is an added bill identification rule in the artificial correction bill data; If there is, an incremental training set for bill identification is constructed based on the artificial correction bill data; updating the preset bill identification model based on the incremental training set for bill identification.

[0012] In addition, to achieve the above-mentioned purpose, the present application also provides a bill intelligent identification device, the device comprises: a file format conversion module, configured to respond to a bill identification request and perform format conversion on a bill file to be identified to obtain a target bill picture; a bill type identification module, configured to determine a target bill type corresponding to a bill in the target bill picture through a preset bill identification model; a prompt template acquisition module, configured to acquire a bill identification prompt template corresponding to the target bill picture from a preset business rule dictionary according to the target bill type; a bill identification module, configured to identify the target bill picture based on the preset bill identification model and the bill identification prompt template to obtain a bill identification result.

[0013] In addition, to achieve the above-mentioned purpose, the present application also provides a bill intelligent identification device, the device comprises: a memory, a processor and a computer program stored on the memory and executable on the processor, the computer program is configured to implement the steps of the bill intelligent identification method as described above.

[0014] In addition, to achieve the above-mentioned purpose, the present application also provides a storage medium, the storage medium is a computer readable storage medium, and the storage medium stores a computer program, the computer program is executed by a processor to implement the steps of the bill intelligent identification method as described above.

[0015] The application provides a bill intelligent identification method, and discloses the following technical solutions: in response to a bill identification request, a target bill picture is obtained by performing format conversion on a bill file to be identified; a target bill type corresponding to the bill in the target bill picture is determined through a preset bill identification model; a bill identification prompt template corresponding to the target bill picture is obtained from a preset business rule dictionary according to the target bill type; and the target bill picture is identified based on the preset bill identification model and the bill identification prompt template, so that a bill identification result is obtained. According to the application, the corresponding bill identification prompt template can be obtained from the preset business rule dictionary according to the target bill type corresponding to the bill, and the bill is identified based on the preset bill identification model and the bill identification prompt template, thereby solving the technical problem of the bill identification method in the prior art, i.e., the template and rules need to be reconfigured every time a new bill is identified, which is high in cost and low in efficiency. BRIEF DESCRIPTION OF DRAWINGS

[0016] The accompanying drawings incorporated in and forming a part of the specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the application.

[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the accompanying drawings needed to be used in the embodiments or prior art description will be briefly introduced. Obviously, for those skilled in the art, other drawings can also be obtained based on these drawings without creative effort.

[0018] Figure 1 A flowchart is provided for the bill intelligent identification method embodiment one of the present application; Figure 2 A flowchart is provided for the bill intelligent identification method embodiment two of the present application; Figure 3 A flowchart is provided for the bill intelligent identification method embodiment three of the present application; Figure 4 A flowchart is provided for the bill intelligent identification method embodiment three of the present application; Figure 5 A module structure diagram is provided for the bill intelligent identification device of the present application; Figure 6 A device structure diagram is provided for the hardware running environment involved in the bill intelligent identification method of the present application.

[0019] The object implementation, functional features and advantages of the present application will be further described with reference to the embodiments and the accompanying drawings. DETAILED DESCRIPTION

[0020] It should be understood that the specific embodiments described herein are merely intended to explain the technical solutions of the present application, and are not used to limit the present application.

[0021] In order to better understand the technical solutions of the present application, the following will be described in detail in combination with the drawings of the specification and specific embodiments.

[0022] The main solution of the embodiment of the present application is: in response to a bill identification request, and performing format conversion on a to-be-identified bill file to obtain a target bill picture; determining a target bill type corresponding to the bill in the target bill picture through a preset bill identification model; obtaining a bill identification prompt template corresponding to the target bill picture from a preset business rule dictionary according to the target bill type; identifying the target bill picture based on the preset bill identification model and the bill identification prompt template to obtain a bill identification result.

[0023] Since the bill identification method in the prior art usually needs to pre-design identification templates and rules for different bill types, the templates and rules need to be reconfigured every time a new bill is identified, which is high in cost and low in efficiency.

[0024] The present application provides a solution that can obtain a corresponding bill identification prompt template from a preset business rule dictionary according to a target bill type corresponding to a bill, and perform bill identification based on a preset bill identification model and the bill identification prompt template, thereby solving the technical problem that the bill identification method in the prior art needs to reconfigure templates and rules every time a new bill is identified, which is high in cost and low in efficiency.

[0025] It should be noted that the execution subject of the present embodiment can be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device capable of realizing the above functions, a bill intelligent identification device, or a bill intelligent identification system containing a bill intelligent identification device, etc. The present embodiment and the following embodiments will be described below taking a bill intelligent identification system as an example (hereinafter referred to as system).

[0026] Based on this, the present embodiment of the present application provides a bill intelligent identification method, which is described in detail with reference to Figure 1 , Figure 1 The flowchart provided by the first embodiment of the bill intelligent identification method of the present application.

[0027] In the present embodiment, the bill intelligent identification method comprises steps S10-S40: Step S10: in response to a bill identification request, and performing format conversion on a to-be-identified bill file to obtain a target bill picture.

[0028] It can be understood that the above bill identification request can be an instruction indicating that the system identifies a specific bill file. In the present embodiment, the user can upload the bill file to be identified through an API interface or a user interface to trigger the bill identification request. After receiving the bill identification request, the system can parse the bill identification request to extract the path, file format, etc. of the bill file to be identified. Among them, the bill file to be identified can be uploaded by the user, any bill file that needs to be identified, which can be in multiple formats, such as PDF, OFD, JPG, PNG, etc., which are not limited in the present embodiment.

[0029] It should be noted that the above target bill picture can be a high-resolution PNG format image obtained by converting the bill file format. In the present embodiment, if the bill file to be identified is not in picture format, an image conversion tool can be used to convert the bill file to a high-resolution PNG format image to obtain the target bill picture.

[0030] Step S20: determining the target bill type corresponding to the bill in the target bill picture through a preset bill identification model.

[0031] It should be noted that the above preset bill identification model can be a pre-trained deep learning model for identifying the content of the bill picture. Through learning a large amount of bill image data, the model can automatically extract the features of the bill and identify the specific type of the bill according to these features. In actual application, the system can collect a large amount of bill image data, including various types of bills (such as invoices, receipts, tax documents, etc.), and label the collected bill images, including bill type, key field (such as invoice code, invoice number, invoice date, amount, etc.) and its position information, and then preprocess the labeled data, including image cropping, scaling, normalization, etc. to ensure that the images input into the model have consistent format and quality. Then, the system can select a convolutional neural network (CNN) and its variants (such as ResNet, Inception, etc.) as the basic model, and train the model using the labeled bill image data to finally obtain the preset bill identification model.

[0032] It should be noted that the above target bill type can be the specific type of the bill in the target bill picture, for example, invoice, receipt, tax document, etc., which are not limited in the present embodiment. In the present embodiment, after converting the bill file to be identified into a template bill picture, the system can call a pre-trained bill identification model, which can determine the specific type of the bill by analyzing the key features in the image (such as table structure, text layout, specific identifier, etc.).

[0033] Further, the step S20 comprises: performing feature extraction on the target bill picture by a preset bill recognition model to obtain bill key features; determining a candidate bill type of the target bill picture and a type confidence corresponding to the candidate bill type according to the bill key features; and determining a target bill type corresponding to the bill in the target bill picture from the candidate bill type based on the type confidence.

[0034] It should be understood that the above-mentioned bill key features can be features extracted from the target bill picture, which can represent the content and form of the bill. These features can include, but are not limited to, table structure, text layout, specific identifier, font style, etc.

[0035] It should be noted that the above-mentioned candidate bill type can be a bill type that the target bill picture may belong to according to the preliminary judgment of the bill key features. In this embodiment, the preset bill recognition model usually outputs multiple possible bill types and their corresponding type confidences, wherein the type confidence can be the confidence degree of the bill recognition model for each candidate bill type, which is usually represented by a probability value. In practical applications, the higher the confidence of the candidate bill type, the more confident the model is in judging the bill type.

[0036] In practical applications, after the system converts the bill file to be identified into a template bill picture, the target bill picture can be input into a preset bill recognition model. The model can perform feature extraction on the target bill picture through the feature extraction layer (such as convolution layer and pooling layer) therein to generate high-dimensional feature vectors. These feature vectors can contain key features of the bill in the target bill picture, such as table structure, text layout, specific identifier, etc. Then, the fully connected layer in the preset bill recognition model can further process the extracted feature vectors to output multiple candidate bill types and their corresponding type confidences, and select the type with the highest confidence from the candidate bill types as the target bill type corresponding to the bill in the target bill picture. In addition, if the highest confidence in the candidate bill type is lower than a preset threshold, a further verification or manual review process can be triggered to ensure the accuracy of bill type identification.

[0037] Step S30: obtaining a bill identification prompt template corresponding to the target bill picture from a preset business rule dictionary according to the target bill type.

[0038] It should be noted that the above-mentioned preset business rule dictionary can be predefined, which is a data structure for storing business rules and bill identification prompt templates corresponding to different bill types. The rules and templates therein can be used to guide the bill recognition model to extract and process key information of a specific bill type.

[0039] It should be understood that the above bill identification prompt template can be designed for a specific bill type, instructions and logic for guiding the bill identification model to extract and process key fields in the bill, which can include field extraction rules, unit conversion requirements, output format requirements, and context association logic, etc. In the present embodiment, the bill identification prompt template can be customized according to different bill types and business rules, so that the system can flexibly adapt to various bill formats and business requirements.

[0040] In practical applications, the system can extract the features of the target bill picture through the preset bill identification model, and identify the target bill type corresponding to the target bill picture through these features, then find the corresponding bill identification prompt template from the preset business rule dictionary according to the determined target bill type, and load the found bill identification prompt template into the bill identification model for subsequent extraction and processing of bill element data.

[0041] Step S40: identifying the target bill picture based on the preset bill identification model and the bill identification prompt template to obtain a bill identification result.

[0042] It can be understood that the above bill identification result can be a set of key information extracted from the target bill picture, which can include but is not limited to bill type, key fields in the bill (such as invoice code, invoice number, invoice date, amount, etc.), position information, etc., and output in a structured format (such as JSON).

[0043] Further, the step S40 further includes receiving user feedback manual correction bill data, and determining whether there is new bill identification rule in the manual correction bill data; if there is, constructing a bill identification incremental training set based on the manual correction bill data; updating the preset bill identification model based on the bill identification incremental training set.

[0044] It should be noted that the above manual correction bill data can be the data manually corrected by the user for the fields incorrectly identified or missed in the bill identification result, such as corrected field values, position information, etc. Correspondingly, the above new bill identification rule can be a new rule or new field format that the model does not cover, which is found in the manual correction bill data, such as new field extraction rules, new field verification logic, new bill types, etc. The present embodiment does not limit this.

[0045] It should be noted that the above bill recognition incremental training set can be a training data set constructed based on user feedback and artificial correction of bill data, which can include corrected bill data and corresponding correct labels, and is used to optimize the performance of the model. In this embodiment, the system can fine-tune the preset bill recognition model through the bill recognition incremental training set to adapt to new bill types, field formats or business rules, thereby improving the accuracy of subsequent bill recognition.

[0046] In practical applications, after obtaining the bill recognition result of the to-be-recognized bill file, the system can visually display the bill recognition result on the user interface and receive user feedback of artificial correction of bill data through the interface or API, such as corrected field values, position information, etc. Then, the system can parse the artificial correction of bill data to extract the corrected field values and position information, compare the corrected data with the original recognition result, and check whether there are unrecognized fields or field formats, or new field verification logic or business rules in the corrected data according to the comparison result. If there are, these fields or business rules are recorded as new bill recognition rules. Finally, the system can fuse the new bill recognition rules with the original training data to generate a bill recognition incremental training set, and fine-tune the preset bill recognition model using the bill recognition incremental training set to optimize the model performance.

[0047] The present embodiment provides a bill intelligent recognition method, which discloses responding to a bill recognition request, and performing format conversion on a to-be-recognized bill file to obtain a target bill picture; determining a target bill type corresponding to the bill in the target bill picture through a preset bill recognition model; obtaining a bill recognition prompt template corresponding to the target bill picture from a preset business rule dictionary according to the target bill type; identifying the target bill picture based on the preset bill recognition model and the bill recognition prompt template to obtain a bill recognition result; Since the present embodiment can obtain the corresponding bill recognition prompt template from the preset business rule dictionary according to the target bill type corresponding to the bill, and identify the bill based on the preset bill recognition model and the bill recognition prompt template, the technical problem of high cost and low efficiency of the prior art that the bill recognition method needs to reconfigure the template and the rule every time when identifying a new bill is solved.

[0048] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as the above embodiment one can refer to the above introduction, and the following will not be repeated. On this basis, please refer to Figure 2 , Figure 2 The flowchart of the second embodiment of the bill intelligent recognition method of the present application is provided.

[0049] In this embodiment, before step S10, the method further includes steps S01-S04: Step S01: Determine the hash value of the to-be-identified bill file, and perform integrity check on the to-be-identified bill file based on the hash value.

[0050] It should be understood that the above-mentioned hash value can be a string used to uniquely identify the content of the to-be-identified bill file. In the embodiment, the system can calculate the hash value of the to-be-identified bill file using a hash algorithm (such as MD5, SHA-256), and compare the calculated hash value with a preset hash value to verify the integrity of the to-be-identified bill file.

[0051] Step S02: If the check passes, obtain the metadata of the to-be-identified bill file, the metadata including the file resolution and file size of the to-be-identified bill file.

[0052] It can be understood that the above-mentioned metadata can be data describing the attributes of the to-be-identified bill file, for example, file format, file size, file resolution, creation time, etc., wherein the file resolution can be the pixel density of an image file; the file size can be the storage space size occupied by the file.

[0053] Step S03: Determine whether the metadata meets the preset business specification based on the file resolution and the file size.

[0054] It should be noted that the above-mentioned preset business specification can be a pre-defined file attribute standard, for example, file format, resolution range, file size range, etc., which can be used to verify whether the to-be-identified bill file meets the business requirements.

[0055] Step S04: If it meets, perform the step of converting the to-be-identified bill file to obtain the target bill picture.

[0056] In practical applications, if the hash value of the to-be-identified bill file passes the check, the metadata of the to-be-identified bill file can be read, including the file resolution and the file size, then it is checked whether the file resolution is within the resolution range set in the preset business specification, and whether the file size is within the size range set in the preset business specification, if the metadata meets the preset business specification, the subsequent processing is continued; otherwise, an error message is returned.

[0057] Further, the step S10 includes: obtaining file format information of the to-be-identified bill file, and determining the file format of the to-be-identified bill file according to the file format information; if the file format is a non-picture format, performing format conversion on the to-be-identified bill file through a standard image conversion tool to obtain a target bill picture.

[0058] It should be understood that the above file format information can be metadata describing the format of the to-be-identified bill file, for example, a file extension (such as.pdf,.jpg,.png, etc.), a file signature (such as %PDF- for a PDF file, etc.). Correspondingly, the above file format can be the type of the to-be-identified bill file, including a picture format (such as JPG, PNG) and a non-picture format (such as PDF, OFD, etc.).

[0059] It should be noted that the above standard image conversion tool can be a tool for converting a non-picture format file into an image format, for example, pdf2image (for PDF conversion), ImageMagick, etc., and the present embodiment does not make any limitation thereto.

[0060] In actual application, after receiving the to-be-identified bill file, the system can read the file extension to preliminarily determine the file format, and read the header information (file signature) of the file to finally determine the file format of the to-be-identified bill file, including a picture format (such as JPG, PNG) and a non-picture format (such as PDF, OFD). If the file format of the to-be-identified bill file is a picture format (such as JPG, PNG), subsequent processing is directly performed; if the file format of the to-be-identified bill file is a non-picture format (such as PDF, OFD), the standard image conversion tool can be used to convert the to-be-identified bill file into a high-resolution PNG format image, and the converted high-resolution PNG format image is used as the target bill picture for subsequent bill identification processing.

[0061] In the present embodiment, the hash value of the to-be-identified bill file is determined, and the integrity of the to-be-identified bill file is checked based on the hash value; if the checking is passed, the metadata of the to-be-identified bill file is obtained, the metadata including the file resolution and the file size of the to-be-identified bill file; it is determined whether the metadata conforms to the preset business specification based on the file resolution and the file size; if it conforms, the step of performing format conversion on the to-be-identified bill file to obtain the target bill picture is executed; since the present embodiment can check the integrity of the to-be-identified bill file through the hash value, the integrity and security of the to-be-identified bill file can be ensured, and meanwhile, the present embodiment can ensure that the to-be-identified bill file conforms to the business specification by checking the resolution and size of the file, thereby improving the accuracy and reliability of bill identification.

[0062] Based on the first embodiment and / or the second embodiment of the present application, in the third embodiment of the present application, the same or similar contents as those of the above embodiments can be referred to the above description, and will not be described hereinafter. On this basis, please refer to Figure 3 , Figure 3 for the flowchart provided by the third embodiment of the bill intelligent identification method of the present application.

[0063] In the present embodiment, step S40 includes steps S401-S403: Step S401: extracting bill identification prompt information of the target bill picture from the bill identification prompt template.

[0064] It should be noted that the above bill identification prompt information can be specific instructions and logic for guiding the bill identification model to extract and process key information in the target bill picture, for example, field extraction rules, unit conversion requirements, output format requirements, and context association logic, etc., which are not limited in the present embodiment.

[0065] Step S402: analyzing the target bill picture based on the bill identification prompt information by the preset bill identification model to output bill element data in the target bill picture.

[0066] It should be understood that the above bill element data can be key information extracted from the target bill picture, for example, bill type, key fields (such as invoice code, invoice number, invoice date, amount, etc.), etc.

[0067] In the present embodiment, the preset bill identification model can analyze the target bill picture through the bill identification prompt information, so that it can quickly adapt to new bill types and field formats, thereby reducing the dependence on a large amount of labeled data and improving the scalability of bill identification.

[0068] Specifically, the step S402 includes: determining bill identification instructions and context association logic in the bill identification prompt information; extracting all bill key fields in the target bill picture according to the bill identification instructions by the preset bill identification model; and checking and associating each bill key field according to the context association logic to output bill element data in the target bill picture.

[0069] It should be noted that the above bill identification instructions can be specific operation instructions for guiding the bill identification model to extract key fields from the target bill picture, which can include but not limited to position information of the field, extraction rules, field type, etc. Correspondingly, the above bill key field can be important information extracted from the target bill picture, for example, bill type, invoice code, invoice number, invoice date, amount, etc., which are not limited in the present embodiment.

[0070] It should be noted that the above context association logic can be a logical rule for checking and associating the extracted bill key field, for example, the amount field must be a number, the date field must comply with the date format, etc., which can ensure that the extracted field is reasonable and consistent in the context.

[0071] In practical applications, the system can first extract the bill identification instructions and context association logic from the bill identification prompt template corresponding to the bill picture, wherein the bill identification instructions include the position information, extraction rules, field types, etc. of the fields; the context association logic includes the field verification rules and the association relationship between the fields. Then, the system can input the target bill picture, the bill identification instructions and the context association logic into the preset bill identification model, so that the preset bill identification model can extract all bill key fields in the target bill picture according to the bill identification instructions, and verify and associate these bill key fields according to the context association logic, to ensure that the field values meet the context association logic. Finally, the model can perform structured processing on the bill key fields after verification and association, to output the bill element data.

[0072] Step S403: generating a bill identification result of the bill file to be identified based on the bill element data.

[0073] In practical applications, the system can obtain the corresponding bill identification prompt template from the preset business rule dictionary according to the target bill type corresponding to the bill in the bill file to be identified, and parse the bill identification prompt template to extract information such as field extraction rules, unit conversion requirements, output format requirements and context association logic, etc. Then, the system can input the target bill picture and the extracted bill identification prompt information into the preset bill identification model, so that the preset bill identification model can perform detailed parsing on the target bill picture according to the instructions and logic in the bill identification prompt information, extract the bill element data therefrom, and perform structured processing on the extracted bill element data to generate a bill identification result.

[0074] In specific implementation, refer to Figure 4 , Figure 4 is a flowchart of the multi-bill identification process in the bill intelligent identification method of the present application. As Figure 4As shown, after the bill recognition platform receives the to-be-identified bill file sent by the user through the interface system, the bill recognition platform can obtain the file format of the to-be-identified bill file, and determine whether the file format is a file format supported by the platform. If not, an error message is returned. If yes, file format conversion is performed, the to-be-identified bill file is converted into a target bill picture, and the bill type corresponding to the bill in the target bill picture is identified through the bill intelligent recognition model. Then, the bill intelligent recognition model is called by the business system front-end machine to process the target bill picture and the prompt, and the bill type is obtained. When the bill type identification is successful, the prompt is constructed according to the bill type, and then the bill intelligent recognition model can be called by the business system front-end based on the constructed prompt to identify the bill element information in the target bill picture. When the bill element information identification is successful, the bill recognition platform can store the analysis result and return the bill element information to the interface system. After the user confirms the identification result through the interface system, the data can be returned, so that the bill recognition platform can construct a large model training set according to the artificial feedback data, so as to fine-tune the bill intelligent recognition model based on the large model training set in the future.

[0075] In the embodiment, the bill recognition prompt information of the target bill picture is extracted from the bill recognition prompt template; the preset bill recognition model is used to analyze the target bill picture based on the bill recognition prompt information, so as to output the bill element data in the target bill picture; and the bill recognition result of the to-be-identified bill file is generated based on the bill element data. Since the bill recognition prompt information can be used to guide the preset bill recognition model to accurately extract the bill element data in the target bill picture, the accuracy and reliability of bill recognition can be improved.

[0076] It should be noted that the above examples are only used to understand the present application and do not limit the bill intelligent recognition method of the present application. More forms of simple transformation based on the technical concept are within the protection scope of the present application.

[0077] The present application also provides a bill intelligent recognition device, which is described in detail in the Figure 5 The bill intelligent recognition device comprises: A file format conversion module 10 is configured to respond to a bill recognition request and perform format conversion on a to-be-identified bill file to obtain a target bill picture. A bill type identification module 20 is configured to determine a target bill type corresponding to a bill in the target bill picture through a preset bill recognition model. A prompt template acquisition module 30 is configured to acquire a bill recognition prompt template corresponding to the target bill picture from a preset business rule dictionary according to the target bill type. The bill identification module 40 is configured to identify the target bill picture based on the preset bill identification model and the bill identification prompt template, and obtain a bill identification result.

[0078] The bill intelligent identification device provided in the present application adopts the bill intelligent identification method in the above embodiments, and can solve the technical problem of the bill identification method in the prior art, i.e., the bill identification method needs to reconfigure templates and rules every time when a new bill is identified, which is high in cost and low in efficiency. Compared with the prior art, the bill intelligent identification device provided in the present application has the same beneficial effects as the bill intelligent identification method provided in the above embodiments, and other technical features in the bill intelligent identification device are the same as the features disclosed in the above embodiments, which will not be repeated here.

[0079] The present application provides a bill intelligent identification device, which comprises at least one processor and a memory in communication connection with 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 to enable the at least one processor to execute the bill intelligent identification method in the above embodiment one.

[0080] Reference will be made to the following Figure 6 which shows a structural schematic diagram of a bill intelligent identification device suitable for implementing the embodiments of the present application. The bill intelligent identification device in the embodiments of the present application can include, but is not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (Personal Digital Assistant), PADs (Portable Application Description), PMPs (Portable Media Player), vehicle-mounted terminals (for example, vehicle-mounted navigation terminals), and the like, and fixed terminals such as digital TVs, desktop computers, and the like. Figure 6 The bill intelligent identification device shown is only an example, and should not bring any limitation to the functions and use range of the embodiments of the present application.

[0081] As Figure 6As shown, the bill intelligent recognition device can include a processing apparatus 1001 (e.g., a central processing unit, a graphics processing unit, etc.) that can perform various appropriate actions and processes according to programs stored in a read-only memory 1002 or loaded from a storage apparatus 1003 into a random access memory 1004. Various programs and data required for the bill intelligent recognition device to operate are also stored in the random access memory 1004. The processing apparatus 1001, the read-only memory 1002, and the random access memory 1004 are connected to each other by a bus 1005. An input / output interface 1006 is also connected to the bus. Generally, the following systems can be connected to the input / output interface 1006: input apparatuses 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; output apparatuses 1008 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; the storage apparatus 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication apparatus 1009. The communication apparatus 1009 can allow the bill intelligent recognition device to communicate with other devices wirelessly or by wire to exchange data. Although the bill intelligent recognition device with various systems is shown in the figure, it should be understood that all the shown systems are not required to be implemented or possessed. More or fewer systems can be alternatively implemented or possessed.

[0082] In particular, according to embodiments of the present disclosure, the processes described above with reference to the flowcharts can be implemented as a computer software program. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a computer readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network by a communication apparatus, or installed from the storage apparatus 1003, or installed from the read-only memory 1002. When the computer program is executed by the processing apparatus 1001, the above-mentioned functions defined in the methods of the embodiments of the present disclosure are performed.

[0083] The bill intelligent recognition device provided by the present disclosure adopts the bill intelligent recognition method in the above-mentioned embodiments, and can solve the technical problem of bill intelligent recognition. Compared with the prior art, the bill intelligent recognition device provided by the present disclosure has the same beneficial effects as the bill intelligent recognition method provided by the above-mentioned embodiments, and other technical features in the bill intelligent recognition device are the same as the features disclosed in the previous embodiment method, which will not be repeated here.

[0084] It should be understood that parts of the present disclosure can be realized by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.

[0085] The above merely provides the specific implementation of the present application, but the protection scope of the present application is not limited to this. Any person skilled in the art can easily think of the changes or replacements within the technical range disclosed by the present application, which should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

[0086] The present application provides a computer readable storage medium having computer readable program instructions (i.e. computer programs) stored thereon, which are used to execute the bill intelligent recognition method in the above embodiment.

[0087] The computer readable storage medium provided by the present application may, for example, be a U disk, but is not limited to an electric, magnetic, optical, electromagnetic, infrared, or semiconductor system or device, or any combination of the above. More specific examples of the computer readable storage medium can include, but are not limited to, an electric connection with one or more conductive wires, a portable computer disk, a hard disk, a random access memory (RAM), a read only memory (ROM), an erasable programmable read only memory (EPROM or flash memory), an optical fiber, a portable compact disk read only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present embodiment, the computer readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system or device. The program code contained on the computer readable storage medium can be transmitted by any suitable medium, including but not limited to an electric wire, an optical cable, an RF (Radio Frequency), etc., or any suitable combination of the above.

[0088] The above computer readable storage medium can be contained in the bill intelligent recognition device; or can exist separately without being assembled into the bill intelligent recognition device.

[0089] The computer readable storage medium carries one or more programs, when the one or more programs are executed by the bill intelligent identification device, the bill intelligent identification device is caused to respond to a bill identification request, and the bill file to be identified is format-converted to obtain a target bill picture; a target bill type corresponding to the bill in the target bill picture is determined through a preset bill identification model; a bill identification prompt template corresponding to the target bill picture is obtained from a preset business rule dictionary according to the target bill type; and the target bill picture is identified based on the preset bill identification model and the bill identification prompt template to obtain a bill identification result.

[0090] Computer program code for carrying out operations of the present application can be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider).

[0091] The flow diagrams and the block diagrams in the drawings are illustrations of architectures, functionalities, and operations of possible implementations of systems, methods, and computer program products according to various embodiments of present application. In this regard, each block in the flow diagrams or block diagrams can represent a module, a segment, or a portion of code, which comprises one or more executable instructions for implementing the specified logical functions. It should also be noted that in some alternative implementations, the functions noted in the blocks can occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and / or flow diagrams, and combinations of blocks in the block diagrams and / or flow diagrams, can be implemented by special purpose hardware-based systems that perform the specified functions or operations, or combinations of special purpose hardware and computer instructions.

[0092] The modules described in the embodiments of the present application can be implemented in the form of software or in the form of hardware. In some cases, the name of the module does not constitute a limitation on the module itself.

[0093] The readable storage medium provided by the present application is a computer readable storage medium, which stores computer readable program instructions (i.e. computer programs) for executing the above-mentioned bill intelligent identification method, and can solve the technical problems of the prior art, i.e. the bill identification method needs to reconfigure templates and rules every time a new bill is identified, which is high in cost and low in efficiency. Compared with the prior art, the beneficial effects of the computer readable storage medium provided by the present application are the same as those of the bill intelligent identification method provided by the above-mentioned embodiments, and will not be repeated here.

[0094] The above only describes some embodiments of the present application, and does not limit the patent scope of the present application. Any equivalent structural transformation made by using the content of the present application specification and drawings, or direct / indirect application in other related technical fields is included in the patent protection scope of the present application.

Claims

1. A method for intelligent recognition of a ticket, characterized in that, The method comprises: in response to a bill identification request, and format conversion is carried out on the to-be-identified bill file to obtain a target bill picture; determine the target bill type corresponding to the bill in the target bill picture through a preset bill identification model; obtain the bill identification prompt template corresponding to the target bill picture from the preset business rule dictionary according to the target bill type; based on the preset bill identification model and the bill identification prompt template, identify the target bill picture to obtain a bill identification result.

2. The method of claim 1, wherein, Before the step of format conversion is carried out on the to-be-identified bill file to obtain a target bill picture, it further comprises: determine the hash value of the to-be-identified bill file, and perform integrity check on the to-be-identified bill file based on the hash value; if the check is passed, obtain the metadata of the to-be-identified bill file, the metadata including the file resolution and file size of the to-be-identified bill file; determine whether the metadata meets the preset business specification based on the file resolution and the file size; if it meets, execute the step of format conversion is carried out on the to-be-identified bill file to obtain a target bill picture.

3. The method of claim 2, wherein, The step of format conversion is carried out on the to-be-identified bill file to obtain a target bill picture, comprising: obtain the file format information of the to-be-identified bill file, and determine the file format of the to-be-identified bill file according to the file format information; if the file format is a non-picture format, format conversion is carried out on the to-be-identified bill file through a standard image conversion tool to obtain a target bill picture.

4. The method of claim 1, wherein, The step of determining the target bill type corresponding to the bill in the target bill picture through a preset bill identification model, comprising: extract the bill key features from the target bill picture through a preset bill identification model to obtain the bill key features; determine the candidate bill type of the target bill picture and the type confidence corresponding to the candidate bill type according to the bill key features; determine the target bill type corresponding to the bill in the target bill picture from the candidate bill type based on the type confidence.

5. The method of any one of claims 1 to 4, wherein, The step of identifying the target bill picture based on the preset bill identification model and the bill identification prompt template to obtain a bill identification result, comprising: extract the bill identification prompt information of the target bill picture from the bill identification prompt template; analyze the target bill picture based on the bill identification prompt information through the preset bill identification model to output the bill element data in the target bill picture; generate the bill identification result of the to-be-identified bill file based on the bill element data.

6. The method of claim 5, wherein, The step of analyzing the target bill picture based on the bill identification prompt information through the preset bill identification model to output the bill element data in the target bill picture, comprising: determine the bill identification instruction and context association logic in the bill identification prompt information; extract all bill key fields in the target bill picture according to the bill identification instruction through the preset bill identification model; According to the context association logic, each bill key field is checked and associated to output bill element data in the target bill picture.

7. The method of any one of claims 1 to 5, wherein, After the step of identifying the target bill picture based on the preset bill identification model and the bill identification prompt template to obtain a bill identification result, the method further includes: Receiving artificial correction bill data fed back by a user and determining whether there is a new bill identification rule in the artificial correction bill data; If there is, constructing a bill identification incremental training set based on the artificial correction bill data; Updating the preset bill identification model based on the bill identification incremental training set.

8. A smart ticket recognition device, characterized in that, The apparatus includes: A file format conversion module configured to convert a format of a bill file to be identified in response to a bill identification request to obtain a target bill picture; A bill type identification module configured to determine a target bill type corresponding to a bill in the target bill picture by using a preset bill identification model; A prompt template acquisition module configured to acquire a bill identification prompt template corresponding to the target bill picture from a preset business rule dictionary according to the target bill type; A bill identification module configured to identify the target bill picture based on the preset bill identification model and the bill identification prompt template to obtain a bill identification result.

9. A ticket intelligent recognition device, characterized in that, The device includes a memory, a processor, and a computer program stored on the memory and executable on the processor, and the computer program is configured to implement the steps of the bill intelligent identification method according to any one of claims 1 to 7.

10. A storage medium, characterized by The storage medium is a computer readable storage medium, and the storage medium stores a computer program. When the computer program is executed by the processor, the steps of the bill intelligent identification method according to any one of claims 1 to 7 are implemented.