Bill identification method and device, configuration server and computer storage medium

By configuring the server to set up multiple requirement interfaces and external recognition service interfaces in the invoice recognition system, and selecting the most suitable service interface to process invoice recognition, the problem that the invoice recognition results in the existing technology are difficult to meet user needs is solved, and efficient and low-cost recognition result acquisition and user experience improvement are achieved.

CN113850325BActive Publication Date: 2026-01-02AISINO CORPORATION
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111123046.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-24
Publication Date
2026-01-02
Estimated Expiration
2041-09-24

AI Technical Summary

Technical Problem

Existing technologies are insufficient to efficiently obtain ticket recognition results that meet user needs. Users need to select service providers multiple times to adjust the recognition results, resulting in low efficiency.

Method used

The server is configured with multiple pre-set requirement interfaces, each corresponding to a different level of ticket recognition requirement. The most suitable service interface is selected from multiple external recognition service interfaces, and the recognition results are processed through custom fields to meet user needs.

Benefits of technology

It improves the efficiency of obtaining invoice recognition results, reduces costs, and enhances the user experience through standardized processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113850325B_ABST
    Figure CN113850325B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a bill identification method and device, a configuration server and a computer storage medium. A bill identification request sent by a gateway device is received, the bill identification request including bill picture information and an identifier of a target demand interface; the target demand interface is one of a plurality of preset demand interfaces, wherein one demand interface corresponds to one bill identification demand level; a target identification service interface is determined from a plurality of external identification service interfaces corresponding to the target demand interface based on the target demand interface, and a target identification service is called through the target identification service interface to obtain an identification result based on the bill picture information; and the identification result is returned to the gateway device. Embodiments of the present application can improve the efficiency of obtaining bill identification results.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] Embodiments of the present application relate to the technical field of image recognition, and in particular, to a bill identification method and device, a configuration server, and a computer storage medium. BACKGROUND

[0002] Bill identification technology refers to a technology of identifying text in a bill image by using text recognition technology. With the continuous development of image recognition technology, there are more and more service providers capable of providing invoice identification services.

[0003] At present, when a user performs bill identification, the user usually randomly selects a service provider to obtain an identification result. However, different service providers have different characteristics, such as different recognition rates and prices, and different users may also have different bill identification requirements. It is difficult to efficiently obtain an identification result meeting the user's requirements by using the above existing bill identification method. For example, after the user selects a service provider and obtains an identification result, if the identification result cannot meet the user's requirement for identification accuracy, the user needs to determine a service provider again until the identification result meets the requirement.

[0004] Therefore, how to efficiently obtain an identification result meeting the user's requirements is a problem to be solved. SUMMARY

[0005] The present application aims to provide a bill identification method and device, a configuration server, and a computer storage medium, to improve the efficiency of obtaining a bill identification result.

[0006] In a first aspect, embodiments of the present application provide a bill identification method applied to a configuration server in a bill identification system, the bill identification system further comprising a gateway device, and the method comprises the following steps.

[0007] receiving a bill identification request sent by the gateway device, wherein the bill identification request comprises bill image information and an identifier of a target requirement interface, the target requirement interface is one of a plurality of preset requirement interfaces, and one requirement interface corresponds to one bill identification requirement level;

[0008] determining a target identification service interface from a plurality of external identification service interfaces corresponding to the target requirement interface based on the target requirement interface, and calling a target identification service through the target identification service interface to obtain an identification result based on the bill image information;

[0009] returning the identification result to the gateway device.

[0010] Optionally, the identification result is represented by a custom field of the target identification service.

[0011] Before the returning the recognition result, the method further comprises:

[0012] determining parameter values of each standard field based on a pre-stored correspondence between custom fields and standard fields of each external recognition service;

[0013] obtaining a standard recognition result based on the parameter values of each standard field;

[0014] The returning the recognition result comprises:

[0015] returning the standard recognition result.

[0016] Optionally, the standard recognition result is in JSON data format.

[0017] Optionally, the bill recognition requirement level is classified according to recognition accuracy;

[0018] The determining the target recognition service interface from the multiple external recognition service interfaces corresponding to the target requirement interface and calling a target recognition service through the target recognition service interface to obtain a recognition result based on the bill picture information comprises:

[0019] determining an external recognition service interface with the lowest usage cost from the multiple external recognition service interfaces corresponding to the target requirement interface as the target recognition service interface;

[0020] calling a target recognition service through the target recognition service interface to perform bill recognition based on the bill picture information to obtain a preliminary recognition result;

[0021] determining the preliminary recognition result as the recognition result if the accuracy of the preliminary recognition result is greater than a recognition accuracy threshold corresponding to the target requirement interface.

[0022] Optionally, the method further comprises:

[0023] if the accuracy of the preliminary recognition result is less than or equal to the recognition accuracy threshold corresponding to the target requirement interface, selecting an external recognition service interface with the lowest usage cost from multiple unselected external recognition service interfaces corresponding to the target requirement interface as the target recognition service interface;

[0024] calling a target recognition service through the target recognition service interface to perform bill recognition based on the bill picture information to obtain a preliminary recognition result; and determining whether the accuracy of the preliminary recognition result is greater than a recognition accuracy threshold corresponding to the target requirement interface;

[0025] If yes, the preliminary identification result is determined as the identification result; if no, a step of returning to select an external identification service interface with the lowest usage fee from a plurality of unselected external identification service interfaces corresponding to the target demand interface as a target identification service interface is performed.

[0026] Optionally, the determining the target identification service interface from the plurality of external identification service interfaces corresponding to the target demand interface comprises:

[0027] Obtaining bill type information;

[0028] Determining the target identification service interface from the plurality of external identification service interfaces corresponding to the target demand interface based on the bill type information.

[0029] Optionally, the obtaining the bill type information comprises:

[0030] Obtaining the bill type information from the bill identification request;

[0031] Alternatively,

[0032] Performing bill type identification on the bill picture to be identified based on the bill picture information to obtain the bill type information.

[0033] In a second aspect, an embodiment of the present application provides another bill identification method, applied to a gateway device in a bill identification system, the bill identification system further comprising a configuration server, and the method comprises:

[0034] Receiving a bill identification request sent by a client, the bill identification request comprising an identifier of a target user, bill picture information, and an identifier of a target demand interface;

[0035] Determining whether the target demand interface is a registered demand interface of the target user based on a pre-stored correspondence relationship between user identifiers and registered demand interface identifiers;

[0036] If yes, forwarding the bill identification request to the configuration server, so that the configuration server determines a target identification service interface from a plurality of external identification service interfaces corresponding to the target demand interface based on the target demand interface, and calls a target identification service through the target identification service interface to obtain an identification result based on the bill picture information;

[0037] Returning the identification result to the client.

[0038] In a third aspect, an embodiment of the present application provides a bill identification apparatus, located in a configuration server in a bill identification system, the bill identification system further comprising a gateway device, and the apparatus comprises:

[0039] The request receiving module is configured to receive a bill identification request sent by a gateway device, wherein the bill identification request comprises bill picture information and an identifier of a target demand interface; the target demand interface is one of a plurality of preset demand interfaces, wherein one demand interface corresponds to one bill identification demand level.

[0040] The identification result obtaining module is configured to determine a target identification service interface from a plurality of external identification service interfaces corresponding to the target demand interface based on the target demand interface, and call a target identification service through the target identification service interface to obtain an identification result based on the bill picture information.

[0041] The identification result returning module is configured to return the identification result to the gateway device.

[0042] In a fourth aspect, an embodiment of the present application provides another bill identification apparatus, which is located in a gateway device in a bill identification system, and the bill identification system further comprises a configuration server, and the apparatus comprises:

[0043] The second receiving module is configured to receive a bill identification request sent by a client, wherein the bill identification request comprises an identifier of a target user, bill picture information, and an identifier of a target demand interface.

[0044] The judging module is configured to judge whether the target demand interface is a registered demand interface of the target user based on a pre-stored correspondence between user identifiers and registered demand interface identifiers; if yes, the request forwarding module is triggered.

[0045] The forwarding module is configured to forward the bill identification request to the configuration server, so that the configuration server determines a target identification service interface from a plurality of external identification service interfaces corresponding to the target demand interface based on the target demand interface, and calls a target identification service through the target identification service interface to obtain an identification result based on the bill picture information.

[0046] The second result returning module is configured to return the identification result to the client.

[0047] In a fifth aspect, an embodiment of the present application provides a configuration server, which comprises a processor, a memory, a communication interface, and a communication bus, wherein the processor, the memory, and the communication interface perform communication with each other through the communication bus; the memory is configured to store at least one executable instruction, and the executable instruction causes the processor to execute the bill identification method in the first aspect.

[0048] In a sixth aspect, an embodiment of the present application provides a computer storage medium, which stores a computer program, and the computer program is executed by a processor to implement the bill identification method in the first aspect.

[0049] In a seventh aspect, an embodiment of the present application provides a computer program product, comprising computer instructions instructing a computing device to perform the bill identification method according to the first aspect.

[0050] The bill identification method, device, configuration server and computer storage medium provided by the embodiments of the present application, the configuration server is pre-provided with a plurality of demand interfaces corresponding to different bill identification demand levels, and each demand interface corresponds to a plurality of different external identification services. When receiving the bill identification request sent by the gateway device, the target identification service meeting the identification demand can be selected from the external identification service corresponding to the target identification interface based on the identification of the target identification interface to be called contained in the bill identification request to obtain the identification result. Compared with the prior art, the present application effectively improves the efficiency of obtaining the bill identification result. BRIEF DESCRIPTION OF DRAWINGS

[0051] Other features, objects and advantages of the present application will become more apparent from the following detailed description of non-limiting embodiments made with reference to the accompanying drawings:

[0052] Figure 1 A structural schematic diagram of a bill identification system provided by an embodiment of the present application;

[0053] Figure 2 A bill identification method provided by an embodiment of the present application is applied to Figure 1 A flowchart of a configuration server in the bill identification system shown in FIG. 1;

[0054] Figure 3 A bill identification method provided by an embodiment of the present application is applied to Figure 1 Another flowchart of a configuration server in the bill identification system shown in FIG. 1;

[0055] Figure 4 A bill identification method provided by an embodiment of the present application is applied to Figure 1 A flowchart of a gateway device in the bill identification system shown in FIG. 1;

[0056] Figure 5 A structural schematic diagram of a bill identification device provided by an embodiment of the present application;

[0057] Figure 6 A structural schematic diagram of another bill identification device provided by an embodiment of the present application;

[0058] Figure 7 A structural schematic diagram of a configuration server provided by an embodiment of the present application. DETAILED DESCRIPTION

[0059] The application will be described in further detail below with reference to the drawings and embodiments. It can be understood that the specific embodiments described herein are merely configured to explain the related application, and are not a limitation on the application. In addition, it should be noted that, for ease of description, only the parts related to the application are shown in the drawings.

[0060] It should be noted that the embodiments and features in the embodiments of the present application can be combined with each other without conflict. The present application will be described in detail below with reference to the drawings and embodiments.

[0061] SUMMARY

[0062] Reference Figure 1 , Figure 1 A structure schematic diagram of a bill identification system provided by an embodiment of the present application is shown. The bill identification system 100 includes a gateway device 110 and a configuration server 120. The gateway device 110 is configured to receive a bill identification request from a client and forward the received bill identification request to the configuration server 120. The configuration server 120 is configured to determine a target identification service from a plurality of external identification services corresponding to a target demand interface based on an identification of the target demand interface in the bill identification request, so as to obtain an identification result. Then, the identification result is returned to the gateway device 110, and the gateway device 110 returns the identification result to the client.

[0063] Reference Figure 2 , Figure 2 The bill identification method provided by an embodiment of the present application is applied to a configuration server in the bill identification system shown in Figure 1 A flowchart of a bill identification method applied to a configuration server in the bill identification system shown in

[0064] Step 201: receiving a bill identification request sent by a gateway device. The bill identification request includes bill picture information and an identification of a target demand interface.

[0065] The bill picture information in the embodiment of the present application can be a bill picture to be identified, or information describing a storage location of the bill picture, and the like.

[0066] The target demand interface in this step is one of a plurality of preset demand interfaces, wherein one demand interface corresponds to one bill identification demand level.

[0067] Specifically, a plurality of demand interfaces that can be invoked by the gateway device are pre-configured in the configuration server, each demand interface corresponds to a bill identification demand level, when a demand interface is invoked, it indicates that the user wants to obtain an identification result that meets the demand level requirement of the demand interface. The bill identification demand level can be divided according to the accuracy of identification, for example: there are three demand interfaces: the first demand interface, the second demand interface and the third demand interface, wherein the first demand interface corresponds to the first bill identification demand level (the corresponding identification accuracy threshold is 95%); the second demand interface corresponds to the second bill identification demand level (the corresponding identification accuracy threshold is 90%); the third demand interface corresponds to the third bill identification demand level (the corresponding identification accuracy threshold is 80%) and so on.

[0068] In step 202, based on the target demand interface, a target identification service interface is determined from a plurality of external identification service interfaces corresponding to the target demand interface, and a target identification service is invoked through the target identification service interface to obtain an identification result based on the bill image information.

[0069] In the embodiment of the present application, for each demand interface, a plurality of different external identification service interfaces are correspondingly set, when the demand interface is invoked, a target identification service interface can be determined from a plurality of different external identification service interfaces corresponding to the demand interface, to invoke the target identification service to obtain an identification result.

[0070] In the embodiment of the present application, the external identification service interface corresponding to each demand interface can be determined according to the bill identification demand level corresponding to each demand interface, combined with the identification attribute (such as identification accuracy, identifiable bill type, etc.) of different external identification services, further, the external identification service interface corresponding to each demand interface can be selected according to the bill identification demand level corresponding to the demand interface, the interface corresponding to the external identification service with the matching identification attribute and the above identification demand level. For example, taking the first demand interface in step 201 as an example, since the identification accuracy threshold of the bill identification demand level corresponding to it is 95%, the identification service with an identification accuracy greater than 95% in the external identification service can be used as the external identification service interface corresponding to the first demand interface.

[0071] After determining the plurality of external identification service interfaces corresponding to the target demand interface, a suitable identification service interface can be selected as the target identification service interface according to a preset rule, to obtain an identification result by invoking the target identification service interface.

[0072] For example, the preset rule can be selected according to the usage fee (calling fee) of the external identification service corresponding to each external identification service interface, or can be selected according to the identification accuracy of the external identification service corresponding to each external identification service interface, or can be selected according to the identification efficiency of the external identification service corresponding to each external identification service interface, and the like. In the embodiment of the present application, the preset rule can be set according to the actual situation, and the specific content thereof is not limited here.

[0073] In step 203, the identification result is returned to the gateway device.

[0074] After obtaining the identification result by calling the external identification service interface corresponding to the target demand interface, the configuration server can return the identification result to the gateway device, so that the gateway device forwards the identification result to the client.

[0075] In the embodiment of the present application, the configuration server is pre-provided with a plurality of demand interfaces corresponding to different bill identification demand levels, and each demand interface corresponds to a plurality of different external identification services. When receiving the bill identification request sent by the gateway device, the identification result can be obtained by selecting the target identification service that meets the identification demand from the external identification service corresponding to the target identification interface based on the identification of the target identification interface included in the bill identification request. Compared with the prior art, the present application effectively improves the efficiency of obtaining the bill identification result.

[0076] Referring to Figure 3 , Figure 3 The bill identification method provided in the embodiment of the present application is applied to Figure 1 Another flowchart of the configuration server of the bill identification system is shown. The bill identification method comprises:

[0077] In step 301, a bill identification request sent by a gateway device is received, and the bill identification request includes bill picture information and identification of a target demand interface.

[0078] The target demand interface is one of a plurality of preset demand interfaces, wherein one demand interface corresponds to one bill identification demand level.

[0079] In step 302, the bill type information is obtained based on the target demand interface, and the target identification service interface is determined from a plurality of external identification service interfaces corresponding to the target demand interface based on the bill type information.

[0080] Currently, with the continuous development of picture processing technology, the types of bills that can be recognized by the recognition service are also increasing, such as train tickets, airplane tickets, taxi tickets, value-added tax related invoices, general machine printed invoices, and motor vehicle sales unified invoices, etc. However, different recognition services may not be the same in terms of recognition efficiency and accuracy for different types of bills.

[0081] Therefore, before determining the target recognition service interface from the corresponding plurality of external recognition service interfaces, the bill type information can be obtained first, and then the more appropriate recognition service interface is determined according to the bill type information as the target recognition service interface. In this way, based on the target recognition service corresponding to the determined target recognition service interface, the bill recognition can obtain the recognition result more efficiently and with high quality.

[0082] Optionally, in some embodiments, the way of obtaining the bill type information can include:

[0083] Obtaining the bill type information from the bill recognition request;

[0084] Or,

[0085] Based on the bill picture information, the bill type identification is performed on the bill picture to be identified to obtain the bill type information.

[0086] Specifically, when the user sends a bill recognition request to the gateway device through the client, the bill type information can be determined in advance. In this way, after the configuration server obtains the bill recognition request, the bill type information can be obtained directly to determine the target recognition service interface based on the bill type information, and then the recognition result is obtained efficiently. In some other embodiments, in order to reduce the transmission cost, the bill type information can not be included in the bill recognition request, but the configuration server can perform bill type identification on the bill picture to be identified based on the bill picture information included in the bill recognition request, thereby obtaining the bill type information. Specifically, a machine learning model can be used to pre-train the above model to obtain a trained model that can be used for bill type identification. Then, the configuration server inputs the bill picture to be identified into the above model to perform bill type identification on the bill picture to be identified through the above model, thereby obtaining the bill type information.

[0087] Optionally, in some embodiments, the bill recognition requirement level is divided according to the recognition accuracy;

[0088] The target recognition service interface is determined from the plurality of external recognition service interfaces corresponding to the target requirement interface, and the target recognition service is called through the target recognition service interface to obtain the recognition result based on the bill picture information, including:

[0089] determining, from a plurality of external identification service interfaces corresponding to the target demand interface, an external identification service interface with the lowest usage cost as a target identification service interface;

[0090] calling a target identification service through the target identification service interface to perform bill identification based on the bill picture information to obtain a preliminary identification result;

[0091] determining whether the accuracy of the preliminary identification result is greater than an identification accuracy threshold corresponding to the target demand interface; if yes, determining the preliminary identification result as the identification result.

[0092] Further, if the accuracy of the preliminary identification result is less than or equal to the identification accuracy threshold corresponding to the target demand interface, selecting an external identification service interface with the lowest usage cost from a plurality of unselected external identification service interfaces corresponding to the target demand interface as the target identification service interface;

[0093] calling a target identification service through the target identification service interface to perform bill identification based on the bill picture information to obtain a preliminary identification result; and determining whether the accuracy of the preliminary identification result is greater than an identification accuracy threshold corresponding to the target demand interface;

[0094] if yes, determining the preliminary identification result as the identification result; and if no, returning to the step of selecting an external identification service interface with the lowest usage cost from a plurality of unselected external identification service interfaces corresponding to the target demand interface as the target identification service interface.

[0095] The above method, when determining the target identification service interface from a plurality of external identification service interfaces corresponding to the target demand interface, first selects an external identification service interface with the lowest usage cost as the target identification service interface from the perspective of usage cost, and then determines whether the obtained identification result meets the identification accuracy threshold corresponding to the target demand interface. When the identification result meets the identification accuracy threshold, it means that the identification result meeting the user demand has been obtained. Thus, the identification result meeting the user demand can be obtained with the lowest usage cost, and therefore, the cost of bill identification can be effectively reduced.

[0096] In step 303, a target identification service is called through the target identification service interface to obtain an identification result based on the bill picture information, wherein the identification result is represented by a custom field of the target identification service.

[0097] Specifically, the ticket recognition result usually contains a plurality of different to-be-recognized items, such as “invoice code”, “invoice number”, “invoice date”, “check code”, “total amount”, “charge amount” and the like. In the recognition result obtained by the external recognition service, different to-be-recognized items are usually represented by different custom fields, for example, for the to-be-recognized item “invoice date”, a certain external recognition service may use the custom field “date” to represent, and therefore, in this step, the obtained recognition result is represented by the custom field of the target recognition service.

[0098] Step 304, based on the correspondence between the custom fields of each external recognition service and the standard fields, the parameter values of each standard field are determined.

[0099] Due to the differences in design habits and the like of designers, for the same to-be-recognized item, different custom fields may be used to represent it in different external recognition services, for example, for the to-be-recognized item “invoice date”, external recognition service A may use the custom field “date” to represent, while external recognition service B may use the custom field “invoice date” to represent, and the configuration server of the present application integrates a plurality of different external recognition service interfaces, in order to facilitate the reading of the client user, after obtaining the recognition result represented by the custom field of the target recognition service, the configuration server can perform standardization processing on the recognition result to obtain a standardized recognition result. Specifically, the correspondence between the custom fields of each external recognition service and the standard fields can be pre-stored, and after obtaining the recognition result by the target recognition service, the parameter values of each standard field can be obtained based on the above correspondence, and then the standard recognition result is obtained.

[0100] For example, the recognition result obtained by the target recognition service includes the custom field “date” for representing the to-be-recognized item “invoice date”, and the specific parameter value is “20210922”, assuming that the custom field “date” corresponds to the standard field “Vat_invoice_issue_date”, then in this step, the parameter value of the custom field “date” can be assigned to the standard field “Vat_invoice_issue_date”, so that the parameter value of the standard field “Vat_invoice_issue_date” can be determined as “20210922”.

[0101] Step 305, based on the parameter values of each standard field, a standard recognition result is obtained.

[0102] After obtaining the parameter values of the standard fields corresponding to the respective defined fields, the standard recognition result can be obtained based on the standard fields and the corresponding parameter values. Compared with the recognition result obtained directly by the target recognition service, the standard recognition result only contains the standard fields, and does not contain the defined fields of the target recognition service.

[0103] In step 306, the standard recognition result is returned to the gateway device.

[0104] Further, since the JSON data format has the following advantages: small bandwidth occupation, and can support multiple languages, including ActionScript, C, C#, ColdFusion, Java, JavaScript, Perl, PHP, Python, Ruby, and other server-side languages, easy to parse, and the like, in the embodiment of the application, the configuration server can return the standard recognition result to the gateway device in the JSON data format, so that the gateway device forwards the standard recognition result to the client.

[0105] In the embodiment of the application, the configuration server is pre-provided with a plurality of demand interfaces corresponding to different bill recognition demand levels, and each demand interface corresponds to a plurality of different external recognition services. When the bill recognition request sent by the gateway device is received, the target recognition service that meets the recognition demand can be selected from the external recognition services corresponding to the target recognition interface based on the identification of the target recognition interface contained in the bill recognition request, so as to obtain the recognition result. Compared with the prior art, the application effectively improves the efficiency of obtaining the bill recognition result.

[0106] In addition, in the embodiment of the application, after obtaining the recognition result represented by the custom field of the target recognition service, the configuration server performs standardization processing on the recognition result to obtain a standardized recognition result. Therefore, it is more convenient for the client user to read, and the user experience is improved.

[0107] In addition, in the embodiment of the application, the correspondence between the custom fields of each recognition service and the standard fields is pre-stored, and the above-mentioned correspondence is not involved in the program code for recognition result standardization, but is read during the running of the program code, so that the standardization of the recognition result can be realized. That is, in the embodiment of the application, the program code and the correspondence are decoupled, so that the program code is more concise and runs faster. At the same time, when the custom field of the external recognition service is updated or a new external recognition service is added, only the above-mentioned correspondence needs to be updated or added, and the above-mentioned program code for recognition result standardization does not need to be modified, so that the flexibility of bill recognition is improved, and the program development and operation and maintenance costs are saved.

[0108] Referring to Figure 4 , Figure 4 The bill identification method provided in the embodiments of the present application is applied to Figure 1 A flowchart of a gateway device in the bill identification system shown in FIG. 1, and the specific method comprises the following steps:

[0109] Step 401, receiving a bill identification request sent by a client, wherein the bill identification request comprises an identifier of a target user, bill picture information, and an identifier of a target demand interface;

[0110] Step 402, judging whether the target demand interface is a registered demand interface of the target user based on a pre-stored corresponding relationship between user identifiers and registered demand interface identifiers; if yes, executing step 403; if no, ending the flow.

[0111] Step 403, forwarding the bill identification request to a configuration server, so that the configuration server determines a target identification service interface from a plurality of external identification service interfaces corresponding to the target demand interface based on the target demand interface, and calls a target identification service through the target identification service interface to obtain an identification result based on the bill picture information.

[0112] Step 404, returning the identification result to the client.

[0113] Specifically, the client can register a demand interface corresponding to an identification demand according to the identification demand of the user before sending the bill identification request. In the embodiments of the present application, the registered demand interfaces of each user can be recorded, and the corresponding relationship between the user identifier and the registered demand interface identifier is stored, and then when the bill identification request is sent, the identifier of the target demand interface to be called can be added in the bill identification request. The gateway device judges whether the target demand interface is a registered demand interface of the target user according to the above-mentioned pre-stored corresponding relationship between the user identifier and the registered demand interface identifier, that is, the gateway device authenticates the bill identification request first to determine whether the user corresponding to the client has the permission to use the target demand interface, and only in the case of determining that the permission exists, the bill identification request is forwarded to the configuration server to obtain the identification result.

[0114] In the embodiments of the present application, only in the case of determining that the user corresponding to the client has the permission to use the target demand interface, the bill identification request is forwarded to the configuration server to obtain the identification result.

[0115] In the embodiment of the present application, the configuration server is pre-provided with a plurality of demand interfaces corresponding to different bill identification demand levels, and each demand interface corresponds to a plurality of different external identification services. When receiving the bill identification request sent by the gateway device, the target identification service that meets the identification demand can be selected from the external identification services corresponding to the target identification interface based on the identification of the target identification interface to be called contained in the bill identification request, so as to obtain the identification result. Compared with the prior art, the present application effectively improves the efficiency of obtaining the bill identification result.

[0116] Referring to Figure 5 , Figure 5 A structural schematic diagram of a bill identification device provided by the embodiment of the present application is provided. The bill identification device is located in a configuration server in a bill identification system, and the bill identification system further includes a gateway device. The above device includes:

[0117] The first receiving module 501 is configured to receive the bill identification request sent by the gateway device. The bill identification request includes bill picture information and identification of a target demand interface. The target demand interface is one of a plurality of preset demand interfaces, wherein one demand interface corresponds to one bill identification demand level.

[0118] The identification result obtaining module 502 is configured to determine a target identification service interface from a plurality of external identification service interfaces corresponding to the target demand interface based on the target demand interface, and call the target identification service through the target identification service interface to obtain an identification result based on the bill picture information.

[0119] The first result returning module 503 is configured to return the identification result to the gateway device.

[0120] Optionally, the identification result is represented by a custom field of the target identification service. The device includes:

[0121] The standard identification result obtaining module is configured to determine parameter values of each standard field based on a pre-stored corresponding relationship between the custom field of each external identification service and the standard field before the identification result is returned to the gateway device. The standard identification result is obtained based on the parameter values of each standard field.

[0122] The first result returning module 503 is specifically configured to return the standard identification result to the gateway device.

[0123] Optionally, the standard identification result is in JSON data format.

[0124] Optionally, the bill identification requirement level is classified according to identification accuracy; the identification result obtaining module 502, when performing the steps of determining a target identification service interface from a plurality of external identification service interfaces corresponding to the target requirement interface, and calling a target identification service through the target identification service interface to obtain an identification result based on the bill picture information, is specifically used for:

[0125] determining, from a plurality of external identification service interfaces corresponding to the target requirement interface, an external identification service interface with the lowest usage cost as the target identification service interface; calling a target identification service through the target identification service interface to perform bill identification based on the bill picture information, and obtaining a preliminary identification result; and determining, if the accuracy of the preliminary identification result is greater than an identification accuracy threshold corresponding to the target requirement interface, the preliminary identification result as the identification result.

[0126] Optionally, the identification result obtaining module 502 is further used for, if the accuracy of the preliminary identification result is less than or equal to the identification accuracy threshold corresponding to the target requirement interface, selecting, from a plurality of unselected external identification service interfaces corresponding to the target requirement interface, an external identification service interface with the lowest usage cost as the target identification service interface; calling a target identification service through the target identification service interface to perform bill identification based on the bill picture information, and obtaining a preliminary identification result; determining, if the accuracy of the preliminary identification result is greater than the identification accuracy threshold corresponding to the target requirement interface, the preliminary identification result as the identification result; and if not, returning to the step of selecting, from a plurality of unselected external identification service interfaces corresponding to the target requirement interface, an external identification service interface with the lowest usage cost as the target identification service interface.

[0127] Optionally, the identification result obtaining module 502, when performing the step of determining a target identification service interface from a plurality of external identification service interfaces corresponding to the target requirement interface, is specifically used for:

[0128] obtaining bill type information; and determining, based on the bill type information, a target identification service interface from a plurality of external identification service interfaces corresponding to the target requirement interface.

[0129] Optionally, the identification result obtaining module 502, when performing the step of obtaining bill type information, is specifically used for: obtaining bill type information from the bill identification request; or performing bill type identification on a bill picture to be identified based on the bill picture information, and obtaining bill type information.

[0130] The bill identification apparatus of the embodiment of the present application is used for implementing the foregoing method Figure 2 or Figure 3The bill identification method and the bill identification device have the beneficial effects of the corresponding method embodiments, which will not be repeated here. In addition, the functions of each module in the bill identification device of the embodiments of the present application can be implemented by referring to the description of the corresponding part in the foregoing method embodiments, which will not be repeated here.

[0131] Referring to Figure 6 , Figure 6 Another bill identification device provided by the embodiments of the present application is shown in a structural schematic diagram. The bill identification device is located in a gateway device in a bill identification system, and the bill identification system further includes a configuration server. The above device includes:

[0132] The second receiving module 601 is configured to receive a bill identification request sent by a client, and the bill identification request includes an identifier of a target user, bill picture information, and an identifier of a target demand interface.

[0133] The judgment module 602 is configured to judge whether the target demand interface is a registered demand interface of the target user based on a pre-stored corresponding relationship between the user identifier and the registered demand interface identifier. If yes, the request forwarding module is triggered.

[0134] The forwarding module 603 is configured to forward the bill identification request to the configuration server, so that the configuration server determines a target identification service interface from a plurality of external identification service interfaces corresponding to the target demand interface based on the target demand interface, and calls a target identification service through the target identification service interface to obtain an identification result based on the bill picture information.

[0135] The second result returning module 604 is configured to return the identification result to the client.

[0136] The bill identification device of the embodiments of the present application is used to implement the foregoing method Figure 4 The bill identification method and the bill identification device have the beneficial effects of the corresponding method embodiments, which will not be repeated here. In addition, the functions of each module in the bill identification device of the embodiments of the present application can be implemented by referring to the description of the corresponding part in the foregoing method embodiments, which will not be repeated here.

[0137] It should be noted that, according to the needs of implementation, each component / step described in the embodiments of the present application can be split into more components / steps, or two or more components / steps or part of the operations of the components / steps can be combined into a new component / step, to achieve the purpose of the embodiments of the present application.

[0138] The above-described methods according to embodiments of the present application can be implemented in hardware, firmware, or software, or any combination thereof, and can be stored in a recording medium such as CD ROM, RAM, floppy disk, hard disk, or magneto-optical disk, or be downloaded by network from a remote recording medium or non-transitory machine-readable medium originally stored in a remote recording medium or non-transitory machine-readable medium and to be stored in a local recording medium, so that such software implementing the methods described herein can be stored in a recording medium on a general-use computer, a special-purpose processor, or programmable or special-purpose hardware (such as ASIC or FPGA). It can be understood that the computer, processor, microprocessor controller, or programmable hardware includes a storage component (e.g., RAM, ROM, flash memory, etc.) that can store or receive software or computer code, when the software or computer code is accessed and executed by the computer, processor, or hardware, the verification code generation method described herein is implemented. Furthermore, when a general-purpose computer accesses code for implementing the bill identification method shown herein, the execution of the code will convert the general-purpose computer into a special-purpose computer for executing the bill identification method shown herein.

[0139] Those skilled in the art can understand that the units and method steps of the examples described in combination with the embodiments disclosed herein can be realized in electronic hardware or a combination of computer software and electronic hardware. Whether the functions are realized in hardware or software depends on the specific application and design constraints of the technical solution. A person skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the embodiments of the present application.

[0140] The above embodiments are only used to illustrate but not limit the embodiments of the present application, and a person of ordinary skill in the art can make various changes and modifications without departing from the spirit and scope of the embodiments of the present application, therefore all equivalent technical solutions belong to the scope of the embodiments of the present application, and the patent protection scope of the embodiments of the present application should be defined by the claims.

Claims

1. A method of document identification, characterized by, The application discloses a configuration server applied to a bill identification system, and the bill identification system further comprises a gateway device. Receiving a bill identification request sent by the gateway device, wherein the bill identification request comprises bill picture information and the identification of a target demand interface; the target demand interface is one of a plurality of preset demand interfaces, wherein one demand interface corresponds to one bill identification demand level; the bill identification demand level is divided according to the identification accuracy rate; Determining the external identification service interface with the lowest use cost from a plurality of external identification service interfaces corresponding to the target demand interface as a target identification service interface; calling a target identification service through the target identification service interface to perform bill identification based on the bill picture information to obtain a preliminary identification result; judging whether the accuracy rate of the preliminary identification result is greater than the identification accuracy rate threshold corresponding to the target demand interface; if yes, determining the preliminary identification result as an identification result; if the accuracy rate of the preliminary identification result is less than or equal to the identification accuracy rate threshold corresponding to the target demand interface, selecting the external identification service interface with the lowest use cost from a plurality of unselected external identification service interfaces corresponding to the target demand interface as a target identification service interface; calling a target identification service through the target identification service interface to perform bill identification based on the bill picture information to obtain a preliminary identification result; and judging whether the accuracy rate of the preliminary identification result is greater than the identification accuracy rate threshold corresponding to the target demand interface; if yes, determining the preliminary identification result as an identification result; if no, returning to the step of selecting the external identification service interface with the lowest use cost from the plurality of unselected external identification service interfaces corresponding to the target demand interface as a target identification service interface; Returning the identification result to the gateway device.

2. The method of claim 1, wherein, The identification result is represented by a custom field of the target identification service; Before the step of returning the identification result to the gateway device, the method further comprises: Determining the parameter value of each standard field based on the corresponding relationship between the custom field of each external identification service and the standard field; Obtaining a standard identification result based on the parameter value of each standard field; The step of returning the identification result to the gateway device comprises: Returning the standard identification result to the gateway device.

3. The method of claim 2, wherein, The standard identification result is in JSON data format.

4. The method of claim 1, wherein, The step of determining the target identification service interface from the plurality of external identification service interfaces corresponding to the target demand interface comprises: Obtaining bill type information; Determining the target identification service interface from the plurality of external identification service interfaces corresponding to the target demand interface based on the bill type information.

5. The method of claim 4, wherein, The step of obtaining bill type information comprises: Obtaining bill type information from the bill identification request; Or, Performing bill type identification on the bill picture to be identified based on the bill picture information to obtain bill type information.

6. A method of identifying a document, characterized by, The application discloses a gateway device applied to a bill identification system, and the bill identification system further comprises a configuration server. The bill identification request sent by the client includes: identification of a target user, bill picture information, and identification of a target demand interface; Based on the correspondence between the pre-stored user identification and the registered demand interface identification, it is judged whether the target demand interface is the registered demand interface of the target user; the target demand interface is one of a plurality of preset demand interfaces, wherein one demand interface corresponds to one bill identification demand level, and the bill identification demand level is divided according to the identification accuracy rate; If yes, the external identification service interface with the lowest use cost is determined as the target identification service interface from a plurality of external identification service interfaces corresponding to the target demand interface; the target identification service is called through the target identification service interface to perform bill identification based on the bill picture information to obtain a preliminary identification result; it is judged whether the accuracy rate of the preliminary identification result is greater than the identification accuracy rate threshold corresponding to the target demand interface; if yes, the preliminary identification result is determined as the identification result; if the accuracy rate of the preliminary identification result is less than or equal to the identification accuracy rate threshold corresponding to the target demand interface, the external identification service interface with the lowest use cost is selected as the target identification service interface from a plurality of unselected external identification service interfaces corresponding to the target demand interface; the target identification service is called through the target identification service interface to perform bill identification based on the bill picture information to obtain a preliminary identification result; and it is judged whether the accuracy rate of the preliminary identification result is greater than the identification accuracy rate threshold corresponding to the target demand interface; if yes, the preliminary identification result is determined as the identification result; if not, the step of selecting the external identification service interface with the lowest use cost as the target identification service interface from the plurality of unselected external identification service interfaces corresponding to the target demand interface is returned; The identification result is returned to the client.

7. A document recognition apparatus, characterized by comprising: A configuration server located in a bill identification system, the bill identification system further comprising: a gateway device, the device comprising: A first receiving module for receiving a bill identification request sent by the gateway device, the bill identification request including: bill picture information, identification of a target demand interface; the target demand interface is one of a plurality of preset demand interfaces, wherein one demand interface corresponds to one bill identification demand level; the bill identification demand level is divided according to the identification accuracy rate; An identification result obtaining module for determining a target identification service interface from a plurality of external identification service interfaces corresponding to the target demand interface based on the target demand interface, and calling a target identification service through the target identification service interface to obtain an identification result based on the bill picture information; A first result returning module for returning the identification result to the gateway device; The identification result obtaining module is further configured to determine, from a plurality of external identification service interfaces corresponding to the target demand interface, an external identification service interface with the lowest usage cost as a target identification service interface, call a target identification service through the target identification service interface to perform bill identification based on the bill picture information, and obtain a preliminary identification result; determine whether an accuracy of the preliminary identification result is greater than an identification accuracy threshold corresponding to the target demand interface; if yes, determine the preliminary identification result as the identification result; if the accuracy of the preliminary identification result is less than or equal to the identification accuracy threshold corresponding to the target demand interface, select, from a plurality of unselected external identification service interfaces corresponding to the target demand interface, an external identification service interface with the lowest usage cost as a target identification service interface; call a target identification service through the target identification service interface to perform bill identification based on the bill picture information, obtain a preliminary identification result, and determine whether an accuracy of the preliminary identification result is greater than an identification accuracy threshold corresponding to the target demand interface; if yes, determine the preliminary identification result as the identification result; and if no, return to the step of selecting, from a plurality of unselected external identification service interfaces corresponding to the target demand interface, an external identification service interface with the lowest usage cost as a target identification service interface.

8. A document identification apparatus, characterized by comprising: A gateway device located in a bill identification system, the bill identification system further comprising: a configuration server, the device comprising: A second receiving module configured to receive a bill identification request sent by a client, the bill identification request comprising an identifier of a target user, bill picture information, and an identifier of a target demand interface; A determining module configured to determine, based on a pre-stored correspondence between user identifiers and registered demand interface identifiers, whether the target demand interface is a registered demand interface of the target user; if yes, trigger a request forwarding module; the target demand interface is one of a plurality of preset demand interfaces, wherein one demand interface corresponds to one bill identification demand level, and the bill identification demand level is divided according to identification accuracy; A forwarding module configured to forward the bill identification request to the configuration server, so that the configuration server determines, based on the target demand interface, a target identification service interface from a plurality of external identification service interfaces corresponding to the target demand interface, and calls a target identification service through the target identification service interface to obtain an identification result based on the bill picture information; A second result returning module configured to return the identification result to the client; and A second result returning module configured to return the identification result to the client; and The forwarding module is further configured to determine, from a plurality of external identification service interfaces corresponding to the target demand interface, an external identification service interface with the lowest usage cost as a target identification service interface; invoke a target identification service through the target identification service interface to perform bill identification based on the bill picture information, and obtain a preliminary identification result; determine whether an accuracy of the preliminary identification result is greater than an identification accuracy threshold corresponding to the target demand interface; if yes, determine the preliminary identification result as the identification result; if the accuracy of the preliminary identification result is less than or equal to the identification accuracy threshold corresponding to the target demand interface, select, from a plurality of unselected external identification service interfaces corresponding to the target demand interface, an external identification service interface with the lowest usage cost as a target identification service interface; invoke a target identification service through the target identification service interface to perform bill identification based on the bill picture information, and obtain a preliminary identification result; determine whether an accuracy of the preliminary identification result is greater than an identification accuracy threshold corresponding to the target demand interface; if yes, determine the preliminary identification result as the identification result; and if no, return to the step of selecting, from a plurality of unselected external identification service interfaces corresponding to the target demand interface, an external identification service interface with the lowest usage cost as a target identification service interface.

9. A configuration server, characterized by Comprise: a processor, a memory, a communication interface and a communication bus, the processor, the memory and the communication interface complete the communication among each other through the communication bus; The memory is used to store at least one executable instruction, and the executable instruction makes the processor execute the operation corresponding to the bill identification method in any one of claims 1-6.

10. A computer storage medium having a computer program stored thereon, the computer program being executed by a processor to implement the bill identification method in any one of claims 1-6.

Citation Information

Patent Citations

  • Bill collection method and system, computer equipment and storage medium

    CN111242115A