Bill information recognition method and system

By identifying the type of invoice and the extent of occlusion, and specifically repairing the occluded areas, the error problem caused by occlusion in invoice information recognition is solved, achieving efficient and accurate information extraction.

CN121305595BActive Publication Date: 2026-06-19HEBEI CAIHUA INFORMATION TECHNOLOGY CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HEBEI CAIHUA INFORMATION TECHNOLOGY CO LTD
Filing Date
2025-10-09
Publication Date
2026-06-19

AI Technical Summary

Technical Problem

Existing technologies struggle to accurately identify and extract key information when there are obscured areas in the ticket image, leading to identification errors or omissions of important data.

Method used

By identifying the type of invoice and the occlusion status, the area to be identified is determined, and targeted occlusion repair is carried out. Algorithms such as pixel filling, context inference, and model prediction are used to recover the occluded information, and OCR technology is combined to extract the target invoice information.

Benefits of technology

It improves the accuracy and completeness of invoice information recognition, reduces computing resource consumption, avoids invalid analysis and secondary interference in irrelevant areas, and ensures that the output is effective information that meets business needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121305595B_ABST
    Figure CN121305595B_ABST
Patent Text Reader

Abstract

This application provides a method and system for recognizing invoice information, belonging to the field of image processing technology. The method includes: recognizing a first image to obtain a recognition result, the recognition result including the target invoice type and whether there is an occlusion region in the first image; determining the region to be recognized of the target invoice based on the target invoice type and a pre-stored target template; responding to the existence of an occlusion region in the first image and an overlapping region with the region to be recognized, performing targeted occlusion repair on the overlapping region to obtain a second image; the second image is the repaired first image; and extracting the target invoice information from the second image based on the region to be recognized. The invoice information recognition method and system provided by this application can repair and recognize key information in invoices.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of image processing technology, and more specifically, relates to a method and system for recognizing invoice information. Background Technology

[0002] As an important financial document, invoices are widely used in various transaction scenarios, including but not limited to invoices, receipts, and checks. Accurate identification and extraction of invoice information is crucial for financial accounting, tax filing, corporate expense reimbursement, and supply chain management. However, various problems may arise during the actual use of invoices. For example, key information may be obscured in invoice images due to factors such as incorrect shooting angles, uneven lighting, or physical damage. These problems can severely affect the accuracy and efficiency of invoice information recognition. Especially when there are obscured areas on the invoice, traditional OCR technology often struggles to accurately extract key information, leading to recognition errors or the omission of important data.

[0003] Therefore, how to accurately identify and repair key information in invoices even when there are obscured areas, thereby improving the accuracy and reliability of invoice information identification, has become an urgent problem to be solved. Summary of the Invention

[0004] The purpose of this application is to provide a method and system for identifying invoice information, so as to repair and identify key information in invoices.

[0005] A first aspect of this application provides a method for identifying invoice information, including:

[0006] The first image is identified to obtain the identification result, which includes the type of the target ticket and whether there is an occluded area in the first image.

[0007] The area to be identified for the target document is determined based on the target document type and the pre-stored target template;

[0008] In response to the presence of an occluded region in the first image and the overlapping region with the region to be identified, targeted occlusion repair is performed on the overlapping region of the image to obtain a second image; the second image is the repaired first image.

[0009] The target ticket information is obtained by extracting the region to be identified from the second image.

[0010] A second aspect of this application provides a bill information recognition system, including:

[0011] The recognition module is used to recognize the first image and obtain the recognition result, which includes the target ticket type and whether there is an occlusion area in the first image.

[0012] Matching module; used to determine the region to be identified in the target document based on the target document type and a pre-stored target template;

[0013] The repair module is used to respond to the presence of an occluded area in the first image and the occluded area overlaps with the area to be identified, and to perform targeted occlusion repair on the image of the overlapping area to obtain a second image; the second image is the repaired first image;

[0014] Extraction module; used to extract target ticket information from the second image based on the region to be identified.

[0015] A third aspect of this application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor executes the computer program to implement the steps of the above-described ticket information recognition method.

[0016] A fourth aspect of this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the above-described invoice information recognition method.

[0017] A fifth aspect of this application provides a computer program product, including a computer program or computer-executable instructions, wherein when the computer program or computer-executable instructions are executed by a processor, the steps of the above-described invoice information recognition method are implemented.

[0018] The beneficial effects of the invoice information recognition method and system provided in this application are as follows: by identifying the invoice type and occlusion status, the processing premise is clarified, avoiding recognition confusion and errors caused by type confusion or neglect of occlusion; based on the invoice type matching template, the area to be identified can be located accurately, focusing on key information areas, reducing invalid analysis of irrelevant areas, saving computing resources and reducing interference; targeted repair is performed only on the overlapping parts of the occlusion and the area to be identified, which can reduce repair costs, avoid secondary interference to effective information, and accurately solve the problem of key information being occluded; finally, information is extracted from the area to be identified based on the repaired image, effectively utilizing the repair results, significantly improving the integrity and accuracy of invoice information, and ensuring that the output is effective information that meets business needs. Attached Figure Description

[0019] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0020] Figure 1A flowchart illustrating a bill information recognition method provided in an embodiment of this application;

[0021] Figure 2 A structural block diagram of a bill information recognition system provided in an embodiment of this application;

[0022] Figure 3 This is a schematic block diagram of an electronic device provided in an embodiment of this application. Detailed Implementation

[0023] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.

[0024] To make the objectives, technical solutions, and advantages of this application clearer, the following description will be provided in conjunction with the accompanying drawings and specific embodiments.

[0025] Please refer to Figure 1 , Figure 1 This is a flowchart illustrating a method for recognizing invoice information provided in an embodiment of this application. It can be executed by an electronic device, specifically a computer, server, or similar equipment. The method may include:

[0026] S101: Recognize the first image and obtain the recognition result, which includes the target ticket type and whether there is an occluded area in the first image.

[0027] In this embodiment, the first image refers to the original image of the document to be identified, which can be obtained through scanning, photography, or other methods, and is the input object for the entire identification process. The identification result is a preliminary analysis conclusion obtained after processing the first image, and serves as the decision-making basis for subsequent processes. The target document type refers to the specific type of document corresponding to the first image, determined by the document's format and characteristics. Target document types include, but are not limited to, value-added tax invoices, train tickets, bank checks, fixed-amount invoices, and receipts. The occluded area refers to the area in the first image that is covered by external objects, such as stamps or stains; it can also be an area where the original content of the document cannot be clearly displayed due to shooting angle, folding, or shadows.

[0028] In this embodiment, the overall layout and format features of the first image are first analyzed using image recognition technology to determine its type of invoice. Image recognition technology can be a deep learning model or a feature matching algorithm; the type of invoice can be determined by recognizing the invoice header, border style, specific markings, etc. Simultaneously, the system analyzes whether there are any occlusion areas in the first image that may interfere with information extraction. A visual result indicating the presence or absence of these areas can be output, which will be used to determine whether a subsequent occlusion repair process needs to be initiated.

[0029] For example, a user uploads a photo of a regular invoice as the first image. The system recognizes the words "Electronic Regular Invoice" in the upper left corner of the invoice and includes specific fields such as "Buyer's Taxpayer Identification Number" and "Seller's Taxpayer Identification Number," thus determining that the target invoice type is a "Value-Added Tax Electronic Regular Invoice." At the same time, through detection and analysis, it is found that the image is blurred in some areas due to stains on the invoice, thus determining that there are obscured areas in the first image.

[0030] S102: Determine the area to be identified for the target document based on the target document type and the pre-stored target template.

[0031] In this embodiment, the pre-stored target template refers to a standardized template pre-stored in the system that corresponds one-to-one with various types of invoices. It contains structured data such as the location coordinates, size range, and format characteristics of key information fields for that type of invoice. Key information fields are information items that have core business significance in a specific type of invoice and are used to realize the invoice's functions; they are the core content of the area to be identified, and their specific types vary depending on the invoice type. The area to be identified refers to the specific area determined from the invoice image from which valid information needs to be extracted, i.e., the corresponding position of the key information fields marked in the target template in the current invoice image.

[0032] In this embodiment, the system retrieves the corresponding target template from its pre-stored template library for the target document type. The target template pre-sets the standard positions of each key information field. The system maps these standard positions onto the current first image and fine-tunes them based on the actual size and proportion of the document image. For example, when the document image is scaled, the coordinate range is adjusted proportionally. This ultimately determines the key areas to be analyzed in the current image. Through template-based positioning, only the areas corresponding to the key information are retained, filtering out irrelevant areas such as document edges, decorative patterns, and blank spaces, reducing interference in subsequent processing.

[0033] For example, when the target invoice type is a VAT electronic general invoice, the system calls the corresponding template, which contains the location information of fields such as "buyer's name," "invoice code," and "total price including tax." Based on this information, the system locates the aforementioned areas in the scanned invoice image as the areas to be identified.

[0034] S103: In response to the presence of an occluded area in the first image and the overlapping area between the occluded area and the area to be identified, targeted occlusion repair is performed on the image of the overlapping area to obtain a second image; the second image is the repaired first image.

[0035] In this embodiment, the overlapping region refers to the part in the first image where the occluded area intersects with the area to be identified; that is, the occluded object covers the area on the ticket from which key information needs to be extracted. Targeted occlusion repair is a targeted repair process performed on the overlapping region. Depending on the type, extent, and degree of impact of the occlusion, appropriate algorithms, such as pixel filling, context inference, and model prediction, can be used to recover the occluded information and avoid invalid processing of non-occluded areas. The second image is the image generated after the first image has undergone targeted occlusion repair. It only corrects the overlapping region, preserving the original information of other areas, and serves as the basis for subsequent extraction of the target ticket information.

[0036] In this embodiment, repair is only initiated when both conditions are met simultaneously: the first image contains an occluded area, and the occluded area overlaps with the area to be identified. If the occluded area does not cover the area to be identified, for example, if it occludes a blank area at the edge of a ticket, no repair is needed, and the process proceeds directly to the information extraction stage. Repair is performed only on the overlapping area, rather than on the entire image.

[0037] Furthermore, different repair strategies are selected based on the characteristics of the overlapping areas. In this embodiment, one way to select different repair strategies is as follows: if the occlusion is a light shadow or slight occlusion, it can be repaired by contrast enhancement and shadow removal algorithms; if the occlusion is a stamp cover or complex occlusion, it can be repaired by distinguishing the stamp from the text layer through an image separation algorithm or by using a character prediction model based on similar tickets; if the occlusion is a local pixel loss, it can be filled by neighboring pixel interpolation.

[0038] S104: Extract the target ticket information from the second image based on the region to be identified.

[0039] In this embodiment, the target invoice information refers to the key information with practical business value finally extracted from the restored second image, which is the final result of invoice recognition. This information corresponds to the area to be recognized and is usually structured data, which can be text, numbers, dates, etc., with the specific content depending on the type of invoice.

[0040] In this embodiment, based on the determined regions to be identified, which may include the location coordinates and range of key information fields, these regions are relocated in the second image. Since the second image only repairs overlapping areas, and other areas are consistent with the first image, the positions of the regions to be identified do not need to be recalculated. For each region to be identified, OCR technology or a specific field extraction algorithm is used to convert the visual information in the image into editable text information. At this time, because the second image has repaired the information loss caused by occlusion, the extraction process can more accurately capture the complete content.

[0041] Furthermore, the extracted information can be formatted, such as whether the date conforms to the format and whether the amount includes a decimal point, and then organized according to a preset structured template to finally form the target invoice information. If there are individual areas where the extraction is blurry due to incomplete repair, the credibility of that information will be marked.

[0042] For example, the area to be identified in the second image can be the buyer's name, invoice code, invoice date, and total price including tax. OCR recognition is used to extract the text of the corresponding information, and it is also necessary to verify whether the length of the invoice code, the date format, the amount format, etc. are correct.

[0043] As can be seen from the above, identifying the document type and occlusion status clarifies the processing prerequisites, avoiding confusion and errors caused by type misidentification or neglect of occlusion; locating the area to be identified based on the document type matching template allows for precise focus on key information areas, reducing invalid analysis of irrelevant areas, saving computational resources and reducing interference; targeted repair of only the overlapping parts of the occluded and identified areas reduces repair costs, avoids secondary interference with valid information, and accurately solves the problem of key information being occluded; finally, information is extracted from the area to be identified based on the repaired image, effectively utilizing the repair results, significantly improving the completeness and accuracy of document information, and ensuring that the output of valid information meets business requirements.

[0044] In one embodiment of this application, if there is an occluded area in the first image, the recognition result further includes a first confidence level; including:

[0045] The first confidence level is used to characterize the degree of interference of the occluded area on the recognition of ticket information; the first image is an image of the target ticket;

[0046] When the first confidence level is greater than the preset first value range, there is no need to perform occlusion repair;

[0047] When the first confidence level is less than or equal to the preset first value range and the first confidence level is greater than the preset second value range, occlusion repair needs to be performed to correct the first ticket information;

[0048] When the first confidence level is less than or equal to the preset second value range, the user is prompted to check the ticket, and the ticket recognition process is terminated.

[0049] In this embodiment, the first confidence level is a quantitative index generated by comprehensively considering the transparency and size of the occluded area, ranging from 0 to 1, used to accurately characterize the degree of interference of occlusion on the recognition of key information on the document. The higher the value, the smaller the interference; the lower the value, the greater the interference. The preset first value range is a first confidence level upper limit threshold preset by the system, used to define the boundary of slight occlusion interference. When the first confidence level is higher than this value, the impact of occlusion on information recognition is considered negligible. The preset second value range is a first confidence level lower limit threshold preset by the system, used to define the boundary of severe occlusion interference. When the first confidence level is lower than or equal to this value, the occlusion is considered to have caused the key information to be unrecoverable by technical means. The first document information, initially extracted from the first image before occlusion repair, may have missing or incorrect information due to occlusion, and is the raw data for subsequent repair processes. That is, the first document information is the document information extracted from the first image.

[0050] In this embodiment, one calculation logic for the first confidence level can be: if the transparency of the occluding object is higher than a set value range, its occlusion of information is weak, and its weight value is high; if the transparency of the occluding object is lower than the set value range, its weight value is low. The smaller the proportion of the occluded area to the total area on the ticket, the higher the weight; the larger the proportion, the lower the weight. The transparency weight plus the size weight are calculated together, and the value directly reflects the degree of interference of the occlusion on the recognition.

[0051] In this embodiment, the decision-making process is divided into three levels based on the first confidence level:

[0052] 1. No repair is needed, i.e., the first confidence level is greater than the preset first value range. The transparency of the occlusion is high, such as slight reflection, and the overlapping area is small. The first ticket information is already complete enough, so the repair process can be skipped directly.

[0053] 2. Repair is needed, i.e., the preset second value range < first confidence level ≤ preset first value range. The transparency of the occlusion is moderate, such as a semi-transparent red seal or a moderate overlapping area. There is a risk of errors due to some fields being blurred or missing in the first invoice information. It needs to be repaired and corrected before extraction.

[0054] 3. Termination of the process: The first confidence level is less than or equal to the preset second value range. Opacity or lack of transparency. For example, dark ink stains or opaque tape with a large overlapping area, almost completely obscuring the key fields of the first document information. Even if repair is performed, the information cannot be effectively recovered. The system terminates the recognition process and prompts the user to check the document, remove the obstruction, and re-upload.

[0055] For example, let the preset first value range be 0.7 and the preset second value range be 0.3. For instance, a general VAT invoice might have slight overall obstruction, such as a light-colored reflection with high transparency that only covers 5% of the area. After assessing the overall obstruction interference, the system's first confidence level is 0.8. In this case, core fields such as "Buyer's Name," "Total Price (including tax)," and "Invoice Date" are clearly visible, and the first piece of invoice information is complete and unambiguous, allowing the system to skip the repair process. Another example is a train ticket with moderate overall obstruction, where the "Seat Number" area is covered by a semi-transparent blue stamp with moderate transparency (weight 0.2) and the stamp covering 30% of the area (weight 0.3). After assessing the overall obstruction interference, the system's first confidence level is 0.5. In this case, the first piece of invoice information is at risk of error and needs to be repaired using a stamp separation algorithm to extract complete information. Another scenario involves a bank check that is severely obscured, with its front side covered by opaque black ink. The ink has low transparency (weight 0.1), and covers 70% of the area, resulting in a large overlap (weight 0.1). After assessing the overall obscuration interference, the system assigns a first confidence level of 0.2. In this case, the check's key information is almost completely obscured, making it impossible to extract the core information. The system then terminates the recognition process, displaying the message "The core area of ​​the check is severely obscured."

[0056] As can be seen from the above, by quantifying the transparency and size of the occluded area, minor occlusions can be skipped for repair, reducing unnecessary computational resource consumption and accelerating recognition. Severe occlusions can be terminated promptly to avoid errors caused by forced repairs, reducing risks to downstream operations. Repair is only initiated for occlusions with moderate interference, allowing complex repair algorithms to be invoked on demand, balancing processing costs and effectiveness. Clearly defined thresholds ensure users only participate when necessary, reducing invalid interactions. Compared to subjective judgments about the need for repair, the first confidence level based on the quantification of occluded area transparency and size provides interpretable and reproducible quantitative evidence, improving the consistency of system decisions.

[0057] In one embodiment of this application, if the overlapping area is larger than a preset area, an occlusion flag is output; the occlusion flag includes second ticket information and a second confidence level; the second ticket information is the occluded area in the first ticket information.

[0058] In this embodiment, the preset area is a pre-defined area threshold set by the system to determine whether the size of the overlapping area requires triggering the output of an occlusion flag. When the area of ​​the overlapping area exceeds this threshold, it is considered that the occlusion covers a large area of ​​key information and requires further marking. The occlusion flag is a structured flag output by the system when the overlapping area is larger than the preset area. It is used to clearly mark the occluded key information and its degree of impact, providing a basis for subsequent repair or manual intervention. The second document information is the specific content corresponding to the occluded area in the first document information, which is usually a vague, missing, or potentially erroneous field. The second confidence level is an indicator that quantifies the coverage strength of the overlapping area on the second document information. The higher the value, the lighter the coverage of the field; the lower the value, the heavier the coverage.

[0059] In this embodiment, when the overlap between the occlusion and the area to be identified is too large, the occluded information and its degree of impact are accurately marked using an occlusion marker. An occlusion marker is only output when the area of ​​the overlapping region is greater than a preset area. If the overlapping region is smaller than or equal to the preset area, no marking is required, and the information can be directly extracted to obtain the target invoice information. Alternatively, the normal repair process can proceed directly. The preset area can be set according to the importance of key fields of the invoice type. For example, the preset area for the "amount" field on an invoice might be set to 30%, while the preset area for the "remarks" field might be set to 50%. The second invoice information clearly marks the specific occluded area in the first invoice information, preventing the omission of key missing items in subsequent processing. The second confidence level quantifies the coverage strength of the occlusion on the occluded field through numerical values, providing a basis for selecting a repair strategy.

[0060] For example, suppose the "invoice code" of a VAT invoice is the area to be identified, and the preset area is 30% of this area. When the "invoice code" area is obscured by a semi-transparent stamp in the first image, the overlapping area is calculated to be 40px. 2 , greater than 30px 2 This triggers the output of the occlusion flag. The occlusion flag output of the first ticket information initially marks the area that needs targeted repair, and at the same time gives a second confidence level of 0.4, indicating that the occlusion covers the core part of the character and the coverage strength is high.

[0061] As can be seen from the above, clearly marking the specific obscured fields through the second invoice information avoids invalid processing of irrelevant areas during repair, allowing repair resources to focus on key missing items. The second confidence level quantifies the obscuration coverage strength, providing a basis for subsequent repair and balancing repair effectiveness and cost. Obscuration identification makes the system processing process interpretable, reducing doubts about the identification results. When errors still exist after repair, obscuration identification can guide manual review to prioritize fields with low second confidence levels, improving the efficiency of manual verification.

[0062] In one embodiment of this application, the second confidence level is used to characterize the coverage strength of the occluded area on the target information field, and the invoice information recognition method includes:

[0063] When the second confidence level is greater than the preset third value range, the basic repair mode is adopted to correct the first ticket information and obtain the second image;

[0064] When the second confidence level is less than or equal to the preset third value range, the first model is used to correct the first ticket information to obtain the second image;

[0065] The processing intensity of the basic repair mode is less than that of the first model.

[0066] In this embodiment, the second confidence level is the key basis for the system to select different repair methods. The target information field refers to the specific information item with core business value in the area to be identified on the ticket; it is crucial for the ticket's functionality and is also the content that needs to be prioritized for information extraction. Coverage intensity describes the degree to which the occlusion area obstructs the target information field, comprehensively considering the transparency of the obstruction, the importance of the obstructed target information field, and the proportion of the obstructed area to the total area of ​​the target information field. The basic repair mode can be a low-intensity occlusion repair method based on simple algorithms, such as contrast enhancement, neighbor pixel interpolation, and basic shadow removal algorithms. Its characteristics include fast processing speed and low computational resource consumption, making it suitable for scenarios with light occlusion coverage. The first model can be a high-intensity occlusion repair model, such as a complex deep learning model. Compared to the basic repair mode, it can handle more severe occlusion and has higher repair accuracy, but it consumes more computational resources and takes longer to process. Processing intensity is a comprehensive indicator measuring the resource input and complexity during the repair process, including the complexity of the repair algorithm, the computational power and memory consumed, and the processing time. The preset third value range is a pre-defined second confidence threshold value used to classify the intensity of occlusion coverage. When the second confidence level is higher than this value, it is judged as light coverage; when it is lower than or equal to this value, it is judged as heavy coverage. This is the quantitative standard for selecting the repair mode. The second image is the repaired image generated after correcting the occluded area corresponding to the first ticket information using the basic repair mode or the first model. It serves as the basis for subsequent extraction of target ticket information, repairing only the occluded area while retaining the original information of the unoccluded area.

[0067] In this embodiment, the appropriate repair method is selected based on the coverage intensity of the occlusion on the target information field according to the second confidence level, and finally the repaired second image is generated. The direct goal of the repair is to correct the occlusion interference in the first ticket information and finally produce the second image. The core criterion for judging the repair method is the comparison between the second confidence level and the preset third value range. First, the second confidence level is used to determine whether the occlusion is mild or severe, and then the corresponding repair method is matched.

[0068] When the second confidence level exceeds the preset third value range, it indicates that the occlusion covers the target information field only slightly. In this case, the occlusion could be a slight shadow or a semi-transparent stamp, requiring no complex model. A simple algorithm can be used to locally correct the occluded area in the first document information, such as using contrast enhancement to eliminate light shadows or using interpolation to fill in a few missing pixels. The corrected image is then output as the second image, fixing only the occluded area while retaining the original information of the first image in the unoccluded areas, ensuring fast processing speed and low resource consumption.

[0069] When the second confidence level is less than or equal to the preset third value range, it indicates that the occlusion covers the target information field deeply. For example, opaque ink stains may cover the core of the field, or a large area of ​​stamp may cover the field, and basic repair cannot recover the complete information. The first model is called to perform depth correction on the occluded area in the first document information. The corrected image is output as the second image. The complex model ensures that the key content of the target information field is recovered, meeting the accuracy requirements of subsequent information extraction. The processing intensity of the basic repair mode is lower than that of the first model. The choice between the two strictly corresponds to the occlusion coverage intensity, avoiding the waste of computing power caused by using the complex model to handle mild occlusion, or the insufficient repair caused by using the basic mode to handle severe occlusion.

[0070] As can be concluded from the above, a low-intensity basic repair mode is used for mild occlusion to avoid wasting computational power on complex models; only the high-consumption first model is called for severe occlusion, allowing computing resources to focus on the truly needed scenarios and reducing the overall operating cost of the system. This hierarchical strategy ensures that mild occlusion is not overlooked and severe occlusion is repaired effectively. Basic repair quickly resolves simple occlusions, while the first model accurately handles complex occlusions. Both methods can generate a second image with complete target information fields, providing high-quality input for subsequent extraction of target document information and avoiding recognition errors caused by incomplete repair. The selection of repair methods is based on clear quantitative indicators, rather than subjective judgment. If errors exist in the second image later, the rationality of the repair method selection can be verified by backtracking the second confidence value, facilitating problem investigation and process optimization. Whether using basic repair or the first model, only the occluded areas in the first document information are corrected; the original image information of the unoccluded areas is preserved, avoiding secondary distortion of the unoccluded areas caused by full-image repair and ensuring the accuracy of other irrelevant information on the document.

[0071] In one embodiment of this application, the first model is a target random forest model; the first model is used to modify the first ticket information to obtain target ticket information, including:

[0072] The occlusion marker and the first confidence level are input into the target random forest model to obtain a set of target image processing parameters;

[0073] The first ticket information is corrected based on the set of target image processing parameters to obtain the second image.

[0074] In this embodiment, the target random forest model refers to a specific random forest model used to correct the first invoice information under severe occlusion. It consists of multiple independent decision trees and outputs target image processing parameters through a voting mechanism. Its core advantage is that it can make decisions by comprehensively considering the occlusion marker and the first confidence level, has strong anti-interference ability, and is suitable for scenarios with complex features such as invoice occlusion. The occlusion marker refers to the structured marker output by the system when the overlap area between the occluded area and the area to be identified is greater than a preset area. It includes the second invoice information and the second confidence level, used to clarify the object to be repaired and the severity of occlusion. The target image processing parameters are a specific set of parameters output by the target random forest model to correct the first invoice information. They may include sharpening parameters, grayscale parameters, brightness and contrast adjustment parameters, noise removal parameters, and color space and tone parameters, etc., which can be dynamically adjusted according to the invoice occlusion features to ensure that the repaired image meets the information extraction requirements.

[0075] Furthermore, the sharpening parameter enhances the clarity of text edges in the document image. Its core function is to improve the sharpness of occluded or blurred text and sharpen the radius. Higher intensity results in clearer text edges but may amplify noise. The grayscale parameter converts the color image of the document to a grayscale image. Its core function is to simplify image information, facilitating subsequent text extraction. A threshold can be set to divide pixel brightness into black and white values, highlighting the difference between text and background. The noise removal parameter can be the Gaussian blur kernel size, used to remove Gaussian noise. The parameter is an odd number; a larger kernel results in a stronger blurring effect, requiring a balance between noise removal and detail preservation. It can also be the median filter window size, used to remove salt-and-pepper noise. The parameter is an odd number; a larger window improves the removal of isolated noise. It can also be a bilateral filter parameter, including both spatial and grayscale domains, which can preserve edge details while removing noise. Higher parameter values ​​result in stronger smoothing / edge preservation effects. The brightness and contrast adjustment parameters control the overall brightness of the image, correcting overly dark or bright images, and controlling the difference between bright and dark areas to enhance detail differentiation or reduce the harshness of the image.

[0076] In this embodiment, when the occlusion coverage intensity is high and the first model is required, the occlusion identifier and the first confidence level are input to allow the model to output accurate image processing parameters. The parameters are then used to correct the first ticket information to finally obtain the second image.

[0077] The input to the objective random forest model contains two key types of information:

[0078] The occlusion indicator provides details of partial occlusion, identifies which field is occluded through the second invoice information, and clarifies the severity of the occlusion through the second confidence level.

[0079] The first confidence level provides a clear indication of the impact of overall occlusion interference on the recognition of the entire ticket, preventing the model from focusing only on the local and ignoring the overall scene.

[0080] The target random forest model generates parameters through voting among multiple decision trees. Each decision tree, based on historical training data, judges the input occlusion marker and initial confidence level, outputting a set of preliminary image processing parameters. The historical training data includes the occlusion features and corresponding repair parameters of similar historical tickets. The model statistically analyzes the parameters of all decision trees to ultimately determine a set of target image processing parameters suitable for the current occlusion scenario. This ensures that the parameters are both universal and specific, conforming to the repair patterns of similar occlusions while also adapting to the specific characteristics of the current ticket. Based on the target image processing parameters, the first ticket information is targeted and corrected to obtain a second image, where the region to be matched in the second image is free of occlusion.

[0081] For example, a user uploads an electronic general VAT invoice, in which the total price including tax in the area to be identified is obscured. It is determined that the first model needs to be activated for repair. The 16 decision trees within the model each output preliminary parameters based on training data showing historical instances of stamps covering the total price including tax; after voting and statistical analysis, the final output is the target image processing parameters. These parameters are used to remove residual blur and noise from the stamp, ensuring the numbers are free of jagged edges. In the final corrected second image, the total price including tax area is fully displayed as 8560.00 yuan, without any obstruction or interference.

[0082] As can be seen from the above, the Target Random Forest model, by comprehensively judging through multiple decision trees, avoids parameter bias caused by a single model, and its repair accuracy is significantly higher than that of fixed parameter repair. The parameter output of the Target Random Forest model is based on the occlusion features and parameter correspondences of historical training data. If errors still exist after correction, the input occlusion label, the first confidence level, and the model voting process can be traced back to locate the root cause of the problem, facilitating algorithm optimization. The model simultaneously inputs occlusion labels representing local occlusion details and the first confidence level representing the overall interference level, avoiding focusing only on the local while ignoring the overall scene, ensuring the stability of the overall image quality after repair, rather than just repairing a single field. The Target Random Forest model can be trained on occlusion features and parameter data of different ticket types to adapt to various scenarios, eliminating the need to develop separate repair algorithms for each type of ticket.

[0083] In one embodiment of this application, the occlusion identifier and the first confidence level are input into the target random forest model to obtain a set of target image processing parameters, including:

[0084] The first confidence level, the second ticket information, and the second confidence level are input into the target random forest model to obtain N voting results; each voting result contains a set of image processing parameters; each set of image processing parameters contains multiple parameter categories; the voting results correspond one-to-one with the decision trees in the target random forest model;

[0085] Determine the weighted calculation weight for each voting result;

[0086] For each of the N voting results belonging to the same parameter category, a weighted calculation is performed to obtain the target image processing parameters corresponding to that parameter category;

[0087] A set of target image processing parameters is obtained based on the target image processing parameters corresponding to each parameter category.

[0088] In this embodiment, the N voting results are the preliminary results output by the N independent decision trees in the target random forest model. Each decision tree corresponds to one voting result, containing a set of image processing parameters adapted to the current occlusion scene. The number of N is determined by the total number of decision trees set during model training. Parameter categories are classifications of image processing parameters according to their functions. Parameters of the same category serve the same restoration needs. Parameter categories can include sharpening parameters, grayscale parameters, and noise removal parameters, etc. Weighted calculation refers to the calculation method of weighted averaging or weighted voting for all parameters of the same parameter category in the N voting results, combined with their respective weighted calculation weights, to finally obtain a unique target value for that parameter category, ensuring that the result takes into account the opinions of decision trees with high credibility.

[0089] In this embodiment, after receiving three types of inputs—first confidence level, second ticket information, and second confidence level—the target random forest model independently judges based on its own training data: each decision tree outputs a complete set of image processing parameters based on the occlusion details of the input, forming one voting result; ultimately, N voting results are obtained, each containing parameters of all categories, ensuring coverage of all repair needs. Weights are assigned to each voting result, resulting in a unique weighted calculation weight for each voting result, with a total weight of 1. For parameters belonging to the same parameter category among the N voting results, a weighted calculation is performed based on their respective weights to obtain the target parameters for that category. The target values ​​of all parameter categories are integrated to form a complete set of target image processing parameters. This parameter set simultaneously satisfies the needs of local occlusion repair and overall image quality, and can be directly used to correct the first ticket information.

[0090] For example, taking the scenario where the "total price and tax" of a VAT invoice is obscured by a semi-transparent red stamp as an example, the target random forest model contains 5 decision trees, N=5. It first receives three types of input: a first confidence level of 0.45, a second input containing partially obscured information on the invoice, and a third input with a second confidence level of 0.38. Then, based on historical training data of similar scenarios, the 5 decision trees output voting results containing parameters for sharpening, grayscale conversion, and noise removal. Weights are then assigned according to the historical repair accuracy of the decision trees. Subsequently, weighted calculations are performed on similar parameters. Finally, the target image processing parameters are integrated to obtain "sharpening intensity 1.3, grayscale threshold 150, and noise removal Gaussian kernel 3×3". After correcting the first invoice information with these parameters, the total price and tax in the second image is fully displayed as "3680.00 yuan", without any remaining obscuration.

[0091] As can be seen from the above, weighted calculation highlights the opinions of high-confidence decision trees, avoiding the bias of single decision trees or interference from low-precision decision trees. The model simultaneously inputs local occlusion details and overall interference. During weighted calculation, it prioritizes decision tree parameters that highly match the current scene, ensuring that the parameters address local occlusion without compromising overall image quality. The final value of each parameter can be traced back to the contribution of a specific decision tree; if errors persist after repair, the root cause can be quickly located. Simultaneously, a standardized parameter generation process avoids designing separate parameter generation logic for different ticket types, reducing model maintenance costs and ensuring consistency of parameter output across different scenarios.

[0092] In one embodiment of this application, determining the weighted calculation weight corresponding to each voting result includes:

[0093] Calculate the average similarity between the first confidence level, the second ticket information, the second confidence level, and the training dataset of the decision tree, and determine the first weighted calculation weight of the voting result corresponding to the decision tree;

[0094] Determine the repair accuracy of each decision tree in each parameter category, and determine the second weighted calculation weight of the voting results corresponding to the decision tree;

[0095] The weighted calculation weight corresponding to each voting result is determined based on the first weighted calculation weight and the second weighted calculation weight.

[0096] In this embodiment, the training dataset of the decision tree refers to the historical data set used by an independent decision tree in the target random forest model during the training phase. Specifically, it contains a large number of mapping relationships between the "first confidence level, second ticket information, and second confidence level" of similar tickets and the corresponding "parameter category repair results," which is the core basis for judging the fit between the current input scene and the tree. The average similarity is the similarity calculated by comparing the "first confidence level, second ticket information, and second confidence level" of the current input with the corresponding features in the "training dataset of the decision tree." It is used to measure the degree of fit between the current occluded scene and the training data of the tree, and can be quantified by cosine similarity, Euclidean distance, etc. The first weighted calculation weight is a weight value determined based on the average similarity. The higher the average similarity, the closer the training data of the decision tree is to the current scene, and the higher the credibility of its output voting results and image processing parameters, the larger the first weight value. The repair accuracy of the decision tree in each parameter category is the proportion of occluded information that can be effectively restored by the parameters output by a decision tree for different parameter categories in historical repair tasks. The second weighted calculation weight is a weight value determined based on the repair accuracy of the decision tree in each parameter category. It takes the individual accuracy rate of a specific parameter category; the higher the accuracy rate, the better the tree performs on that parameter, and the larger the second weight value. The weighted calculation weight corresponding to each voting result is the final weight obtained by combining the first and second weighted calculation weights. This weight is the core basis for measuring the contribution ratio of the corresponding decision tree voting result when subsequently calculating the target value for that parameter category.

[0097] In this embodiment, the similarity between the currently input "first confidence level, second ticket information, and second confidence level" and "the decision tree training dataset" is first calculated. According to the system's preset mapping rules, the first weighted calculation weight of the tree is mapped, prioritizing the opinions of decision trees highly similar to the current occlusion scene. The historical repair records of the decision tree are retrieved, and their accuracy in each parameter category is calculated. According to the system's preset mapping rules, the second weighted calculation weight of the tree is mapped, prioritizing the opinions of decision trees that perform better in specific parameter categories. Finally, the weights are merged to obtain a unique weight value for each voting result.

[0098] For example, in a random forest model with five decision trees, tree T2 is assigned a higher first weighting (e.g., 0.3) because its training data has a high similarity to the current scene (average similarity 0.933). Furthermore, tree T2's sharpening parameters have a historical accuracy rate of 97%, so it is assigned a higher second weighting (e.g., 0.35). The sharpening parameters in the voting results are calculated using both the first and second weightings. The second weighting is calculated separately for each parameter category, allowing decision trees that excel at repairing a particular parameter to receive higher weight in the voting for that parameter. This ensures that the final result for each parameter category fully incorporates the opinions of the optimal decision tree, improving parameter repair accuracy.

[0099] As can be seen from the above, by comprehensively considering the matching degree between the current scene and the decision tree training data, as well as the historical performance of the decision tree on specific parameters, the weights can reflect both the degree of adaptation of the decision tree to the current occluded scene and its professional ability in repairing specific parameters, avoiding weight bias caused by single-dimensional judgment. Through scientific weight allocation, the final generated target image processing parameters can accurately adapt to the current occluded scene, effectively recover the occluded key information, reduce the problem of incomplete or over-repaired repair caused by unreasonable parameters, and provide a high-quality image foundation for subsequent information extraction.

[0100] Corresponding to the invoice information recognition method in the above embodiments, Figure 2 This is a structural block diagram of a ticket information recognition system provided according to an embodiment of this application. For ease of explanation, only the parts relevant to the embodiment of this application are shown. References Figure 2 The invoice information recognition system 20 includes: recognition module 21, matching module 22, repair module 23 and extraction module 24.

[0101] The recognition module 21 is used to recognize the first image and obtain a recognition result, which includes the target ticket type and whether there is an occlusion area in the first image.

[0102] Matching module 22; used to determine the region to be identified of the target document based on the target document type and the pre-stored target template;

[0103] Repair module 23 is used to respond to the presence of an occluded area in the first image and an overlapping area between the occluded area and the area to be identified, and to perform targeted occlusion repair on the overlapping area of ​​the image to obtain a second image; the second image is the repaired first image;

[0104] Extraction module 24 is used to extract the target ticket information from the second image based on the region to be identified.

[0105] In one embodiment of this application, when there is an occluded area in the first image, the recognition module 21 is specifically used for:

[0106] If there is an occluded area in the first image, the recognition result also includes the first confidence level;

[0107] The first confidence level is used to characterize the degree of interference of the occluded area on the recognition of ticket information; the first image is an image of the target ticket;

[0108] When the first confidence level is greater than the preset first value range, there is no need to perform occlusion repair;

[0109] When the first confidence level is less than or equal to the preset first value range and the first confidence level is greater than the preset second value range, occlusion repair needs to be performed to correct the first ticket information;

[0110] When the first confidence level is less than or equal to the preset second value range, the user is prompted to check the ticket, and the ticket recognition process is terminated.

[0111] In one embodiment of this application, the repair module 23, when confirming the overlapping area, is specifically used for:

[0112] If the overlapping area is larger than the preset area, an occlusion flag is output; the occlusion flag includes the second ticket information and the second confidence level; the second ticket information is the occluded area in the first ticket information.

[0113] In one embodiment of this application, the repair module 23, when determining a targeted occlusion repair method for the overlapping area, is specifically used for:

[0114] When the second confidence level is greater than the preset third value range, the basic repair mode is adopted to correct the first invoice information and obtain the target invoice information.

[0115] When the second confidence level is less than or equal to the preset third value range, the first model is used to correct the first invoice information to obtain the target invoice information;

[0116] The processing intensity of the basic repair mode is less than that of the first model.

[0117] In one embodiment of this application, when the repair module 23 performs targeted occlusion repair on the image of the overlapping region using the first model, it is specifically used for:

[0118] The occlusion marker and the first confidence level are input into the target random forest model to obtain a set of target image processing parameters;

[0119] Based on the set of target image processing parameters, the first ticket information is corrected to obtain the target ticket information.

[0120] In one embodiment of this application, when the repair module 23 inputs the occlusion identifier and the first confidence level into the target random forest model to obtain a set of target image processing parameters, it is specifically used for:

[0121] The first confidence level, the second ticket information, and the second confidence level are input into the target random forest model to obtain N voting results; each voting result contains a set of image processing parameters; each set of image processing parameters contains multiple parameter categories; the voting results correspond one-to-one with the decision trees in the target random forest model;

[0122] Determine the weighted calculation weight for each voting result;

[0123] For each of the N voting results belonging to the same parameter category, a weighted calculation is performed to obtain the target image processing parameters corresponding to that parameter category;

[0124] A set of target image processing parameters is obtained based on the target image processing parameters corresponding to each parameter category.

[0125] In one embodiment of this application, the repair module 23, when determining the weighted calculation weight corresponding to each voting result, is specifically used for:

[0126] Calculate the average similarity between the first confidence level, the second ticket information, the second confidence level, and the training dataset of the decision tree, and determine the first weighted calculation weight of the voting result corresponding to the decision tree;

[0127] Determine the repair accuracy of each decision tree in each parameter category, and determine the second weighted calculation weight of the voting results corresponding to the decision tree;

[0128] The weighted calculation weight corresponding to each voting result is determined based on the first weighted calculation weight and the second weighted calculation weight.

[0129] See Figure 3 , Figure 3 This is a schematic block diagram of an electronic device provided according to an embodiment of this application. Figure 3 The electronic device 300 in this embodiment may include one or more processors 301, one or more input devices 302, one or more output devices 303, and one or more memories 304. The processors 301, input devices 302, output devices 303, and memories 304 communicate with each other via a communication bus 305. The memories 304 store computer programs, including program instructions. The processors 301 execute the program instructions stored in the memories 304. Specifically, the processors 301 are configured to invoke the program instructions to perform the functions of each module / unit in the above-described device embodiments, for example... Figure 2 The functions of the identification module 21, matching module 22, repair module 23, and extraction module 24 are shown.

[0130] It should be understood that, in the embodiments of this application, the processor 301 may be a central processing unit (CPU), or it may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.

[0131] Input device 302 may include a touchpad, a fingerprint sensor (for collecting the user's fingerprint information and fingerprint orientation information), a microphone, etc., and output device 303 may include a display (LCD, etc.), a speaker, etc.

[0132] The memory 304 may include read-only memory and random access memory, and provides instructions and data to the processor 301. A portion of the memory 304 may also include non-volatile random access memory. For example, the memory 304 may also store device type information.

[0133] In specific implementations, the processor 301, input device 302, and output device 303 described in the embodiments of this application can execute the implementation method described in the invoice information recognition method provided in the embodiments of this application, or they can execute the implementation method of the electronic device described in the embodiments of this application, which will not be repeated here.

[0134] In another embodiment of this application, a computer-readable storage medium is provided. This computer-readable storage medium stores a computer program, which includes program instructions. When executed by a processor, the program instructions implement all or part of the processes in the methods described above. Alternatively, the computer program can instruct related hardware to complete the process. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include any entity or device capable of carrying computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium, etc.

[0135] The computer-readable storage medium can be an internal storage unit of the electronic device in any of the foregoing embodiments, such as a hard disk or memory of the electronic device. The computer-readable storage medium can also be an external storage device of the electronic device, such as a plug-in hard disk, smart media card (SMC), secure digital card (SD), flash card, etc., provided on the electronic device. Furthermore, the computer-readable storage medium can include both internal and external storage units of the electronic device. The computer-readable storage medium is used to store computer programs and other programs and data required by the electronic device. The computer-readable storage medium can also be used to temporarily store data that has been output or will be output.

[0136] This application provides a computer program product, which includes computer-executable instructions or a computer program. The computer-executable instructions or computer program are stored in a computer-readable storage medium. The processor of an electronic device reads the computer-executable instructions from the computer-readable storage medium and executes the computer-executable instructions, causing the electronic device to perform the invoice information recognition method described in this application.

[0137] Those skilled in the art will recognize that the modules / units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this application.

[0138] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the electronic devices and units described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0139] In the several embodiments provided in this application, it should be understood that the disclosed electronic devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For instance, the division of modules / units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules, units, or components may be combined or integrated into another system, or some features may be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces or modules / units, or it may be an electrical, mechanical, or other form of connection.

[0140] The modules / units described as separate components may or may not be physically separate. Similarly, the components shown as modules / units may or may not be physical modules / units; they may be located in one place or distributed across multiple network modules / units. Some or all of the modules / units can be selected to achieve the purpose of the embodiments of this application, depending on actual needs.

[0141] Furthermore, the functional modules / units in the various embodiments of this application can be integrated into one processing module / unit, or each module / unit can exist physically separately, or two or more modules / units can be integrated into one module / unit. The integrated modules / units described above can be implemented in hardware or in the form of software functional modules / units.

[0142] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A method of identifying information on a document, characterized by, include: The first image is identified to obtain an identification result, which includes the target ticket type and whether there is an occluded area in the first image; The area to be identified for the target ticket is determined based on the target ticket type and the pre-stored target template; In response to the presence of an occluded area in the first image and the overlapping area between the occluded area and the area to be identified, targeted occlusion repair is performed on the overlapping area of ​​the image to obtain a second image; the second image is the repaired first image. Based on the region to be identified, the second image is extracted to obtain the target ticket information; If the overlapping area is larger than a preset area, an occlusion flag is output; the occlusion flag includes second ticket information and a second confidence level; the second ticket information is the occluded area in the first ticket information; the first ticket information is the ticket information extracted from the first image; the second confidence level is used to characterize the coverage strength of the occluded area on the target information field; The process of performing targeted occlusion repair on the overlapping areas of the image to obtain a second image includes: When the second confidence level is greater than the preset third value range, the basic repair mode is adopted to correct the first ticket information and obtain the second image; When the second confidence level is less than or equal to the preset third value range, the first model is used to correct the first ticket information to obtain the second image; The processing intensity of the basic repair mode is less than that of the first model.

2. The bill information recognizing method according to claim 1, wherein If there is an occluded area in the first image, the recognition result also includes a first confidence level; including: The first confidence level is used to characterize the degree of interference of the occluded area on the recognition of ticket information; the first image is an image of the target ticket; When the first confidence level is greater than the preset first value range, there is no need to perform occlusion repair; When the first confidence level is less than or equal to the preset first value range and greater than the preset second value range, occlusion repair needs to be performed to correct the first ticket information; when the first confidence level is less than or equal to the preset second value range, the user is prompted to check the ticket and the ticket recognition process is terminated.

3. The bill information recognizing method according to claim 2, wherein The first model is a target random forest model; the step of using the first model to correct the first ticket information to obtain the second image includes: The occlusion identifier and the first confidence score are input into the target random forest model to obtain a set of target image processing parameters; The first ticket information is corrected based on the set of target image processing parameters to obtain the second image.

4. The bill information recognizing method according to claim 3, wherein The occlusion identifier and the first confidence score are input into the target random forest model to obtain a set of target image processing parameters, including: The first confidence level, the second ticket information, and the second confidence level are input into the target random forest model to obtain N voting results; each voting result contains a set of image processing parameters; each set of image processing parameters contains multiple parameter categories; the voting results correspond one-to-one with the decision trees in the target random forest model; Determine the weighted calculation weight for each voting result; For each of the N voting results belonging to the same parameter category, a weighted calculation is performed to obtain the target image processing parameters corresponding to that parameter category; A set of target image processing parameters is obtained based on the target image processing parameters corresponding to each parameter category.

5. The method of claim 4, wherein the step of identifying the type of the bill comprises the steps of: identifying the type of the bill based on the color of the bill. The determination of the weighted calculation weight corresponding to each voting result includes: Calculate the average similarity between the first confidence level, the second ticket information, the second confidence level, and the training dataset of the decision tree, and determine the first weighted calculation weight of the voting result corresponding to the decision tree; Determine the repair accuracy of each decision tree in each parameter category, and determine the second weighted calculation weight of the voting results corresponding to the decision tree; The weighted calculation weight corresponding to each voting result is determined based on the first weighted calculation weight and the second weighted calculation weight.

6. A ticket information recognition system, characterized in that, include: Recognition module; Used to identify the first image and obtain the identification result, the identification result including the target ticket type and whether there is an occluded area in the first image; Matching module; Used to determine the area to be identified for the target ticket based on the target ticket type and the pre-stored target template; The repair module is used to respond to the presence of an occluded area in the first image and the occluded area overlaps with the area to be identified, and to perform targeted occlusion repair on the image of the overlapping area to obtain a second image; the second image is the repaired first image; Extraction module; Used to extract target ticket information from the second image based on the region to be identified; When confirming the overlapping area, the repair module is specifically used to: if the overlapping area is larger than the preset area, output an occlusion flag; the occlusion flag includes second ticket information and second confidence level; the second ticket information is the occluded area in the first ticket information; The first ticket information is the ticket information extracted from the first image; The second confidence level is used to characterize the coverage strength of the occluded area on the target information field; When the second confidence level is greater than the preset third value range, the basic repair mode is adopted to correct the first ticket information and obtain the second image; When the second confidence level is less than or equal to the preset third value range, the first model is used to correct the first ticket information to obtain the second image; The processing intensity of the basic repair mode is less than that of the first model.

7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method as described in any one of claims 1 to 5.

8. A computer-readable storage medium storing a computer program, the computer-readable storage medium comprising: When the computer program is executed by a processor, it implements the steps of the method as described in any one of claims 1 to 5.