Automatic verification method, system and storage medium for receipt vouchers

By obtaining field image slices of the invoice and performing confidence assessment, an invoice voucher is generated, which solves the problem of inaccurate matching in the receipt voucher verification process, realizes automatic matching of invoices and receipt vouchers, and improves the accuracy and efficiency of the verification process.

CN120543309BActive Publication Date: 2025-09-23GUANGZHOU PINGYUN CRAFTSMAN TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511038287.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-28
Publication Date
2025-09-23
Estimated Expiration
2045-07-28

AI Technical Summary

Technical Problem

In existing technologies, the receipt voucher verification process relies on manual comparison, which is inefficient and prone to errors. Automated tools lack reliability assessment, resulting in the inability to accurately match and achieve automatic verification, especially when faced with a large number of vouchers. It is difficult to ensure accuracy.

Method used

By obtaining field image slices of the invoice, extracting keyword result data, and performing confidence assessment, the invoice voucher is generated, matched based on the payee and payee information, and verified using preset ticket-payment matching rules to achieve automated matching of invoices and receipt vouchers.

Benefits of technology

It significantly improves the accuracy and reliability of invoice information extraction, reduces manual intervention, improves the accuracy and efficiency of the verification process, and reduces manual operation errors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120543309B_ABST
    Figure CN120543309B_ABST
Patent Text Reader

Abstract

The present application discloses a method, system, and storage medium for automatically reconciling receipt vouchers, relating to the technical field of automated financial processing. The method includes: obtaining a field image slice corresponding to an invoice, and extracting keyword result data of the invoice based on the field image slice; performing a confidence assessment based on the keyword result data to obtain a comprehensive confidence level of the invoice; generating an invoice voucher based on the comprehensive confidence level and the keyword result data; matching the invoice voucher with the receipt voucher according to the payee and payee information to obtain a data set to be reconciled; and reconciling the invoice voucher and receipt voucher in the data set to be reconciled based on a preset ticket-to-payment matching rule. The present application improves the extraction accuracy of invoices by obtaining field image slices. Reliable invoice vouchers are generated in combination with confidence assessment. Based on the preset reconciliation rules, an automated reconciliation process is implemented, reducing manual operation errors and improving the accuracy and efficiency of the reconciliation process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of financial automation processing, and in particular to a method, system and storage medium for automatically writing off receipt vouchers. Background Art

[0002] The current verification process for receipt vouchers relies primarily on manual comparison of invoice and receipt voucher information, which is inefficient and prone to errors. While current automated tools can extract basic invoice information, they lack reliability assessments of the extracted results, resulting in inaccurate matching and automated verification. This makes verification accuracy difficult, especially when dealing with large volumes of vouchers.

[0003] The above content is only used to assist in understanding the technical solution of this application and does not constitute an admission that the above content is prior art. Summary of the Invention

[0004] The main purpose of this application is to provide a method, system and storage medium for automatic cancellation of receipt vouchers, aiming to solve the technical problem that accurate matching cannot be achieved in the receipt voucher cancellation process to achieve automatic cancellation.

[0005] To achieve the above-mentioned purpose, an embodiment of the present application provides a method for automatically writing off a receipt voucher, the method comprising:

[0006] Obtaining a field image slice corresponding to the invoice, and extracting keyword result data of the invoice based on the field image slice;

[0007] Performing a confidence evaluation based on the keyword result data to obtain a comprehensive confidence level of the invoice;

[0008] generating an invoice voucher based on the comprehensive confidence and the keyword result data;

[0009] Match the invoice voucher with the payment voucher according to the payee and payee information to obtain a data set to be written off;

[0010] According to the preset ticket-money matching rules, the invoice voucher and the payment voucher of the to-be-written-off data set are written off.

[0011] In one embodiment, before the steps of obtaining the field image slices corresponding to the invoice and extracting the keyword result data of the invoice based on the field image slices, the automatic verification method for receipt vouchers further includes:

[0012] Extracting invoice image data corresponding to the invoice document imported by the user;

[0013] Identifying key field locations in the invoice image data using a pre-trained template matching model;

[0014] According to the key field position, a field image slice corresponding to the invoice is generated.

[0015] In one embodiment, the step of obtaining a field image slice corresponding to the invoice and extracting keyword result data of the invoice based on the field image slice includes:

[0016] Generate an extraction object array according to the field image slice, the extraction object array including the invoice code, keyword name, keyword position coordinates and keyword slice;

[0017] According to the preset field computing power weight configuration, the computing power input ratio of each keyword slice is calculated using the keyword name corresponding to each keyword slice;

[0018] Determining, based on the computing power input ratio, the field extraction object of the invoice and the object computing power input interval corresponding to the field extraction object;

[0019] Based on the field extraction object and the object computing power investment interval, keyword result data of the invoice is extracted.

[0020] In one embodiment, the step of extracting keyword result data of the invoice based on the field extraction object and the object computing power investment interval includes:

[0021] According to the object computing power input interval, the field extraction object is assigned to a corresponding priority parsing queue, wherein the priority parsing queue includes a high-weight queue, a medium-weight queue, and a low-weight queue;

[0022] Calculate the single-field parsing computing power input of each priority parsing queue according to the preset computing power allocation rule;

[0023] Based on the single-field parsing computing power input, according to the text extraction priority of each field extraction object in the priority parsing queue, image parsing and text extraction operations are performed on the field extraction objects in turn to obtain the keyword result data of the invoice.

[0024] In one embodiment, the step of calculating the single-field resolution computing power input of each priority resolution queue according to a preset computing power allocation rule includes:

[0025] Obtain the default weight of computing power allocation corresponding to each priority parsing queue and the standard parsing time of a single field;

[0026] Calculate the computing power adjustment coefficient corresponding to each priority resolution queue according to the actual single-field resolution time of each priority resolution queue and the standard single-field resolution time;

[0027] When the high-weight queue times out while parsing the field extraction object, the single-field parsing computing power input of the medium-weight queue and the low-weight queue is extracted according to the timeout duration;

[0028] When the medium-weight queue times out while parsing the field extraction object, the single-field parsing computing power input of the low-weight queue is extracted according to the timeout duration.

[0029] In one embodiment, the step of performing confidence evaluation based on the keyword result data to obtain the comprehensive confidence of the invoice includes:

[0030] Determine the field name weight and field value weight of each field in the keyword result data according to a preset field weight allocation rule;

[0031] Calculating the single field confidence of each of the fields according to the field name weight and the field value weight;

[0032] The comprehensive confidence of the invoice is determined based on the single-field confidence.

[0033] In one embodiment, the step of performing write-off processing on the invoice voucher and the payment voucher in the to-be-written-off dataset according to a preset ticket-payment matching rule includes:

[0034] Performing equal-amount matching on the invoice vouchers and the receipt vouchers in the data set to be written off, writing off the invoice vouchers and the receipt vouchers with equal amounts, removing the written-off vouchers from the data set to be written off, and updating the data set to be written off;

[0035] Arrange the invoice vouchers and the receipt vouchers in the updated data set to be written off in descending order of amount, and calculate whether the cumulative amount to be written off of all the invoice vouchers is less than or equal to the maximum amount that can be written off in the receipt vouchers;

[0036] If the accumulated amount to be written off is less than or equal to the maximum write-off amount in the receipt voucher, all the invoice vouchers will be written off to the receipt voucher corresponding to the maximum write-off amount, and the write-off amount corresponding to the receipt voucher will be updated.

[0037] In one embodiment, the step of calculating whether the accumulated amount to be written off of all the invoice vouchers is less than or equal to the maximum amount that can be written off in the receipt voucher further includes:

[0038] If the accumulated amount to be written off is less than or equal to the maximum amount that can be written off in the receipt voucher, calculate whether the maximum amount to be written off in the invoice voucher is less than or equal to the maximum amount that can be written off;

[0039] If so, the invoice voucher corresponding to the maximum amount to be written off is written off to the receipt voucher corresponding to the maximum amount that can be written off, and the write-off amount corresponding to the receipt voucher is updated;

[0040] Re-execute the steps of arranging the invoice vouchers and the receipt vouchers in the updated data set to be written off in descending order according to the amount, and calculating whether the cumulative amount to be written off of all the invoice vouchers is less than or equal to the maximum amount that can be written off in the receipt voucher, until all the invoice vouchers and the receipt vouchers are completed and written off or cannot be matched.

[0041] An embodiment of the present application also provides an automatic verification system for receipt vouchers, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the automatic verification method for receipt vouchers as described above.

[0042] An embodiment of the present application also provides a storage medium, which is a computer-readable storage medium. A computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the automatic verification method of the receipt voucher are implemented as described above.

[0043] One or more technical solutions proposed in this application have at least the following technical effects:

[0044] This application obtains the field image slices corresponding to the invoice and extracts the keyword result data of the invoice based on the image slices, which significantly improves the extraction accuracy of the invoice and solves the problem of incorrect invoice information extraction due to inaccurate image recognition. Subsequently, the confidence evaluation is performed through the keyword result data to obtain the comprehensive confidence of the invoice, further ensuring the reliability of the extracted invoice information. The invoice voucher generated based on the comprehensive confidence and keyword result data is accurately matched with the receipt voucher according to the payee and payee information to obtain the data set to be cancelled, realizing the automatic matching of invoices and receipt vouchers, reducing manual intervention, and improving the accuracy and efficiency of matching. Finally, the data set to be cancelled is cancelled according to the preset ticket-to-payment matching rules. This automated cancellation process not only reduces manual operation errors, but also improves the accuracy and efficiency of the cancellation process. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] Figure 1 This is a flow chart of a first embodiment of a method for automatically writing off a payment voucher according to an embodiment of the present application;

[0046] Figure 2 This is a schematic diagram of the field position parameters of the standard invoice template of the first embodiment of the automatic cancellation method for receipt vouchers involved in the embodiment of the present application;

[0047] Figure 3 This is a flow chart of a second embodiment of the method for automatically writing off a receipt voucher according to an embodiment of the present application;

[0048] Figure 4 This is a schematic diagram of the preset field computing power weight configuration of the second embodiment of the method for automatic cancellation of payment vouchers involved in the embodiment of the present application;

[0049] Figure 5 This is a flow chart of a third embodiment of the method for automatically writing off a receipt voucher according to an embodiment of the present application;

[0050] Figure 6 This is a schematic diagram of content result rules of the third embodiment of the method for automatically writing off payment vouchers involved in the embodiment of the present application;

[0051] Figure 7 This is a schematic diagram of field weight allocation rules for the third embodiment of the method for automatic cancellation of payment vouchers involved in the embodiment of the present application;

[0052] Figure 8 This is a flow chart of a fourth embodiment of the method for automatically writing off a receipt voucher according to an embodiment of the present application;

[0053] Figure 9 This is a brief flowchart of a fourth embodiment of the method for automatically writing off a receipt voucher according to an embodiment of the present application;

[0054] Figure 10 This is a structural diagram of the automatic verification system for receipt vouchers involved in the embodiment of the present application.

[0055] The purpose, features and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0056] It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application.

[0057] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.

[0058] The current verification process for receipt vouchers relies primarily on manual comparison of invoice and receipt voucher information, which is inefficient and prone to errors. While current automated tools can extract basic invoice information, they lack reliability assessments of the extracted results, resulting in inaccurate matching and automated verification. This makes verification accuracy difficult, especially when dealing with large volumes of vouchers.

[0059] In view of the above problems, the present application proposes a method for automatic cancellation of receipt vouchers, which obtains field image slices corresponding to an invoice and extracts keyword result data of the invoice based on the field image slices; performs confidence evaluation based on the keyword result data to obtain a comprehensive confidence of the invoice; generates an invoice voucher based on the comprehensive confidence and the keyword result data; matches the invoice voucher with the receipt voucher according to the payee and payee information to obtain a data set to be cancelled; and performs cancellation processing on the invoice voucher and the receipt voucher in the data set to be cancelled according to a preset ticket-to-payment matching rule.

[0060] The present application provides a solution that significantly improves the extraction accuracy of invoices by obtaining image slices of the fields corresponding to the invoices and extracting the keyword result data of the invoices based on the image slices, thereby solving the problem of incorrect invoice information extraction due to inaccurate image recognition. Subsequently, a confidence assessment is performed using the keyword result data to obtain the comprehensive confidence of the invoice, further ensuring the reliability of the extracted invoice information. The invoice voucher generated based on the comprehensive confidence and keyword result data is accurately matched with the receipt voucher according to the payee and payee information to obtain a data set to be written off, thereby realizing the automated matching of invoices and receipt vouchers, reducing manual intervention, and improving the accuracy and efficiency of matching. Finally, the data set to be written off is written off according to the preset ticket-to-payment matching rules. This automated writing-off process not only reduces manual operation errors, but also improves the accuracy and efficiency of the writing-off process.

[0061] It should be noted that the execution entity of this embodiment may be a computing service device with data processing, network communication, and program execution capabilities, such as an enterprise financial management system, a financial processing terminal, an automatic payment voucher verification system, or an electronic device capable of implementing the aforementioned functions. This embodiment and the following embodiments will be described below using the automatic payment voucher verification system as an example.

[0062] The first embodiment of the automatic verification method of the receipt voucher proposed in this application, please refer to Figure 1 The method includes steps S10 to S50:

[0063] Step S10: obtaining a field image slice corresponding to the invoice, and extracting keyword result data of the invoice according to the field image slice.

[0064] It should be noted that field image slices refer to local image blocks containing specific fields, obtained by segmenting the invoice image according to pre-defined field regions (such as invoice number, amount, date, etc.). Keyword result data refers to key invoice field information extracted from field image slices, such as invoice code, keyword name, and keyword value.

[0065] In this embodiment, since the invoice image may have problems such as tilt, blur or background interference, the accuracy of directly recognizing the entire invoice image is low. Therefore, field image slicing can be used to optimize processing for specific areas, which can avoid error accumulation during global recognition and thus improve the accuracy of extracting key invoice information.

[0066] As a feasible implementation, optical character recognition (OCR) technology is used to process invoice images. First, an image preprocessing algorithm removes noise and enhances image quality. Then, key fields are located on the invoice image and sliced ​​into field image slices. During the extraction of key fields from the invoice, a deep learning algorithm is used to identify each field image slice and extract keyword result data.

[0067] As a feasible implementation method, the process before step S10 includes steps S01 to S03:

[0068] Step S01: extracting invoice image data corresponding to the invoice according to the invoice document imported by the user.

[0069] It should be noted that the invoice document imported by the user can be an electronic invoice file, such as a PDF invoice file, an electronic document containing the invoice content generated by scanning with a scanner, or an image file of an electronic invoice directly uploaded. Invoice image data refers to the invoice content extracted from the invoice document in the form of an image, such as the image portion of a PDF invoice extracted using specific software tools, or image data obtained by digitizing the image information in a scanned document.

[0070] In this embodiment, the system supports multiple common image formats, such as PDF, JPEG, PNG, etc., to ensure that invoice images from different sources can be processed.

[0071] As a feasible implementation method, for invoice documents in PDF format, a specialized PDF parsing library, such as PyPDF2, can be used to read the PDF file content. An OCR engine (such as Tesseract OCR) can then identify the image portion and convert it into a processable image data format (such as PNG, JPEG, etc.). For scanned invoice documents, an image reading library (such as OpenCV) can be used to read the scanned image, and then, through image format conversion and preprocessing, it can be converted into invoice image data.

[0072] Step S02: Identify the key field positions in the invoice image data using a pre-trained template matching model.

[0073] It's important to note that the template matching model is trained based on a large number of invoice samples and can identify common key fields found in invoices, such as invoice name, amount, unit price, and invoice date. The template matching model compares invoice images with pre-set templates to determine the specific locations of key fields within the invoice image. This pre-trained template matching model can adapt to invoices of varying formats, improving recognition accuracy and efficiency.

[0074] As a feasible implementation, a template matching model is constructed using deep learning object detection algorithms. First, a large dataset of invoice images with key fields labeled is prepared. The model is then trained using this dataset to learn the characteristics and location patterns of the key fields within the invoice images. In practice, the invoice images are fed into the trained template matching model, which then outputs the location information of the key fields (e.g., the coordinates of the rectangular box).

[0075] As another feasible implementation method, pre-build standard invoice templates of various types that contain key field features. For each type of standard invoice template, mark the key fields therein and obtain the field position parameters of the key fields in the standard invoice template. Then, establish a normalized coordinate system based on the width and height of the image corresponding to the standard invoice template. In the normalized coordinate system, mark the scale values ​​of the key fields in the standard invoice template to obtain the coordinate scale values ​​and template width-to-height ratio values ​​of the coordinates corresponding to each key field in the standard invoice template. Among them, the x-axis scale value = x-axis coordinate value / standard invoice template width, the y-axis scale value = y-axis coordinate value / standard invoice template height, and the aspect ratio = standard invoice template width / standard invoice template height. Please refer to Figure 2 , Figure 2 This is a diagram showing the field position parameters of a standard invoice template.

[0076] When processing the actual invoice image, the coordinate ratio values ​​and template width-to-height ratio values ​​calculated in the standard invoice template are applied to the invoice image. Through ratio conversion, the areas in the invoice image that match the key fields in the standard invoice template are found, thereby locating the positions of the key fields in the invoice image.

[0077] For example, taking the standard template for a special value-added tax invoice, which has a width of 758mm and a height of 483mm, the x coordinate of the upper left corner of the annotation box corresponding to the "Invoice Name" field in the standard template is 280, the x coordinate of the lower right corner of the annotation box is 481, the y coordinate of the lower left corner of the annotation box is 18, and the y coordinate of the lower right corner of the annotation box is 51. Calculation shows that the x-coordinate ratios of the "Invoice Name" field are 280 / 758≈0.369 and 481 / 758≈0.635, respectively; the y-coordinate ratios are 18 / 483≈0.037 and 51 / 483≈0.106, respectively; and the template width-to-height ratio is 758 / 483≈1.569.

[0078] When processing an actual VAT invoice image, if the invoice image is 420 mm wide and 268 mm high, based on the x-coordinate ratio values ​​of 0.369 and 0.635, and the y-coordinate ratio values ​​of 0.037 and 0.106 for the "Invoice Name" field, the x-coordinate of the upper-left corner of the annotation box of the "Invoice Name" field in the actual invoice image can be calculated to be 0.369 × 420 = 155.98 mm, the y-coordinate of the upper-left corner of the annotation box is 0.037 × 268 = 9.92 mm, the x-coordinate of the lower-right corner of the annotation box is 0.635 × 420 = 266.7 mm, and the y-coordinate of the lower-right corner of the annotation box is 0.106 × 268 = 28.31 mm. Therefore, the coordinates (x, y) of the upper left corner of the annotation box of the "Invoice Name" field in the actual invoice image are (156, 10), and the coordinates (x, y) of the lower right corner of the annotation box are (267, 28). This allows us to quickly locate the area where the "Invoice Amount" field is located in the invoice image.

[0079] As a feasible implementation, deep learning-based object detection models (such as YOLOv8 or Faster R-CNN) are used to analyze invoice images. This model is pre-trained on a large amount of invoice data with keyword locations annotated, enabling it to accurately identify the field locations of different invoice types. Transfer learning or fine-tuning model parameters can be used to improve recognition accuracy for different invoice types.

[0080] Step S03: Generate field image slices corresponding to the invoice according to the key field positions.

[0081] It should be noted that step S03 refers to cutting out the area corresponding to the key field in the invoice image according to the coordinate position of the key field identified in the invoice image to form independent field image slices. Each field image slice contains only one key field so that each key field can be processed and identified separately.

[0082] As a feasible implementation method, image processing tools such as the OpenCV library are used to crop the invoice image based on the key field position information (such as the coordinates of the rectangular box) obtained in step S02, crop the area where each key field is located, and generate corresponding field image slices.

[0083] As another feasible implementation, based on the key field location information, an image segmentation algorithm (such as a semantic segmentation algorithm) is used to segment the invoice image, separate the key fields from the background, and then generate field image slices based on the segmentation results.

[0084] As another feasible implementation method, a semantic segmentation model based on deep learning (such as U-Net) is used to locate the area where the key fields are located according to the key field position information, or computer vision methods (such as edge detection combined with morphological processing) are used to divide the slice boundaries of field image slices.

[0085] During the cropping process, the slice size can be adjusted appropriately to ensure the integrity of the key field area. For example, the cropping range can be expanded to include the complete characters and excess blank areas can be removed. Furthermore, the sliced ​​image can be standardized, such as by using a geometric correction algorithm to eliminate shooting distortion, standardizing the slice size, and adjusting the contrast. This results in the final field image slice, which improves keyword recognition accuracy.

[0086] Step S20: Confidence evaluation is performed based on the keyword result data to obtain the comprehensive confidence of the invoice.

[0087] It should be noted that confidence assessment is a quantitative score for the reliability of each keyword recognition result. The comprehensive confidence is an indicator of the overall credibility of the invoice obtained by weighted aggregation of the confidence of each keyword.

[0088] As a feasible implementation, a machine learning model is used to train field features (such as field name, field value, and character clarity), outputting the confidence level of each field. The confidence level of all key fields in an invoice is then calculated using a weighted average method. Furthermore, different weights can be assigned to different fields, with key fields (such as invoice name, amount, and quantity) being given higher weights.

[0089] Step S30: Generate an invoice voucher based on the comprehensive confidence and the keyword result data.

[0090] It should be noted that the invoice voucher refers to a structured electronic document containing complete invoice information after the keyword result data is structured, and is usually stored in formats such as XML and JSON.

[0091] In this embodiment, the system determines whether an invoice can enter the payment voucher verification process based on its comprehensive confidence level. Invoices whose comprehensive confidence level does not reach the first preset threshold will undergo a secondary extraction or be directly marked as entering the manual intervention channel and abandoned for recognition.

[0092] As a feasible implementation method, keyword result data of invoices whose comprehensive confidence reaches a first preset threshold value is filled into a predefined voucher template to generate an invoice voucher that meets the specifications.

[0093] As another feasible implementation method, if the comprehensive confidence of the invoice reaches the first preset threshold, an invoice voucher corresponding to the invoice is generated and the automatic cancellation process is entered; if the comprehensive confidence of the invoice is higher than the second preset threshold and lower than the first preset threshold, the invoice voucher is generated only based on the keyword result data corresponding to the invoice, and the invoice voucher is marked as requiring manual cancellation and does not enter the automatic cancellation process; if the comprehensive confidence of the invoice is lower than the second preset threshold, invoice identification result information is generated based on the keyword result data corresponding to the invoice, and manual intervention is required to generate the corresponding invoice voucher to ensure that the generated invoice voucher information is accurate, and manual cancellation is performed on the invoice voucher generated by manual intervention.

[0094] Step S40: Match the invoice voucher with the payment voucher according to the payee and payee information to obtain a data set to be written off.

[0095] It should be noted that payee and payee information refers to key information used for matching invoice and receipt documents, such as the buyer / seller name in the invoice document and the payer / payee name and taxpayer identification number in the receipt document. The pending write-off dataset refers to the set of invoice and payment vouchers that have a write-off relationship but have not yet been written off, resulting from the matching of invoice and receipt documents based on payee and payee information.

[0096] In this embodiment, the payment flow data is read through the bank API interface, and a payment voucher is generated in the CRM (Customer Relationship Management) system. The cancellation status of the payment voucher is set to pending cancellation by default.

[0097] For example, the subject information of the "buyer and seller" in the invoice extraction result (generated invoice voucher) is extracted and name-matched with the "receiving account name" and "counterparty account name" in the receipt voucher to obtain several data sets to be reconciled, namely {buyer = receiving account name, seller = counterparty account name}.

[0098] The dataset to be reconciled includes one-to-one (a single invoice corresponds to a single payment), one-to-many (a single invoice is split into multiple payments), many-to-one (multiple invoices are combined into a single payment), and many-to-many (multiple invoices correspond to multiple payments). Any combination of invoice and payment vouchers in any of these relationships can be considered a bill-to-payment pair.

[0099] For example, a company receives a special VAT invoice for 100,000 yuan, which corresponds to two bank deposit records: the first for 60,000 yuan and the second for 40,000 yuan. Therefore, the invoice voucher corresponding to the 100,000 yuan invoice and the receipt vouchers corresponding to the two deposit records together form a one-to-many invoice-payment pair relationship, which is called a bill-payment pair.

[0100] As a feasible implementation, fuzzy matching algorithms (such as Levenshtein distance and cosine similarity) can be used to address name inconsistencies (e.g., matching abbreviations with full names). Alternatively, a knowledge graph can be constructed, using entity resolution technology to uniformly identify payees and payees.

[0101] Step S50: performing write-off processing on the invoice voucher and the payment voucher of the to-be-written-off data set according to a preset ticket-payment matching rule.

[0102] It should be noted that the bill-to-payment matching rule refers to the preset business rules used to determine whether the invoice voucher and the receipt voucher meet the cancellation conditions. It can realize the automatic cancellation of the receipt voucher based on the degree of matching of the amount.

[0103] As a feasible implementation, invoice vouchers and receipt vouchers are processed in a hierarchical manner through multi-rule matching. First, a full match is performed, matching individual invoice vouchers with equal amounts. Prioritizing the cancellation of invoice-payment pairs where the invoice amount (the amount to be cancelled corresponding to the invoice voucher) and the receipt amount (the amount available for cancellation corresponding to the receipt voucher) are equal. The cancellation status of the corresponding invoice-payment pair is simultaneously updated, and the cancelled vouchers are removed from the pending cancellation dataset. If there is still unwritten-off data in the data set to be written off, a large-amount matching will be performed. After sorting the invoice vouchers and receipt vouchers in descending order by amount, the total amount to be written off corresponding to the invoice vouchers will be matched with the receipt voucher with the largest amount that can be written off. If the conditions are met, batch writing will be performed; if not, further judgment will be made as to whether the invoice voucher with the largest amount to be written off matches the receipt voucher with the largest amount that can be written off. If the match is successful, the corresponding ticket voucher will be written off, and the remaining amount that can be written off will be recalculated and sorted again; if there is still no match, the invoice voucher with the largest amount to be written off will be removed from the data set to be written off and transferred to manual processing. The above steps will be repeated until there are no more ticket vouchers to be written off or there are ticket vouchers that cannot be matched. Finally, the remaining ticket vouchers that cannot be matched will be transferred to the manual writing queue.

[0104] This embodiment leverages image recognition and natural language processing technologies, using field image slicing to accurately locate keyword regions and avoid interference from global recognition. This significantly improves the recognition accuracy of key invoice fields and reduces manual entry errors. Simultaneously, confidence assessments are performed on invoices to ensure the accuracy of generated invoice vouchers. Furthermore, this embodiment employs an automated write-off strategy based on multiple rule matching. Through priority sorting and dynamic matching algorithms, this enables automatic write-off of receipt vouchers in complex business scenarios, such as one-to-one, many-to-one, one-to-many, and many-to-many. This significantly improves write-off efficiency and reduces manual intervention costs.

[0105] Based on the above embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the first embodiment can be referred to the above introduction and will not be described in detail later. Figure 3 In the automatic verification method for receipt vouchers, step S10 further includes steps S11 to S14:

[0106] Step S11: generating an extraction object array according to the field image slice, wherein the extraction object array includes the invoice code, keyword name, keyword position coordinates and keyword slice.

[0107] It should be noted that the extraction object array is a structured data set used to store key fields in field image slices, including the invoice code to which the key field belongs, the key field name, the position coordinates of the key field in the invoice image, and the image slice of the key field.

[0108] For example, the extracted object array can be represented as:

[0109] {"Invoice Code": 001

[0110] {"Keyword Name": Invoice Name

[0111] "Keyword position": "The coordinates of the upper left corner of the annotation box are (156, 10), and the coordinates of the lower right corner of the annotation box are (267, 28)"

[0112] "Keyword Slice": invoicename.img}

[0113] }

[0114] Among them, the invoice code is used to associate different key fields of the same invoice.

[0115] Step S12: According to the preset field computing power weight configuration, the computing power input ratio of each keyword slice is calculated using the keyword name corresponding to each keyword slice.

[0116] It's important to note that the preset field computing power weights are pre-set parameters for allocating computing power resources to different key fields in an invoice. Different key fields are assigned different weights based on their importance, recognition difficulty, and other factors, which are used in the subsequent calculation of the computing power input ratio. The computing power input ratio is calculated based on the preset field computing power weights and the keyword names corresponding to each keyword slice. The ratio of computing power resources allocated to processing each keyword slice is calculated as a percentage of the total computing power resources.

[0117] For example, please refer to Figure 4 , Figure 4 A diagram showing the configuration of the field computing power weight. Figure 4 The computing power input ratio of keyword slices can be obtained in three weight ratios: high weight (default computing power input ratio 50%), medium weight (default computing power input ratio 30%) and low weight (default computing power input ratio 20%).

[0118] As a feasible implementation method, based on a predefined field computing power weight configuration table, which records the weight ratio corresponding to each key field, the weight ratio of the corresponding key field is obtained from the field computing power weight configuration table according to the key field name corresponding to each keyword slice, thereby obtaining the computing power input ratio of the corresponding keyword slice.

[0119] As another feasible implementation method, a dynamic weight adjustment algorithm is used to adjust the weight configuration of each key field in real time based on historical recognition accuracy, current business needs and other factors, and then calculate the computing power investment ratio of the keyword slice corresponding to the key field.

[0120] Step S13: Based on the computing power input ratio, determine the field extraction object of the invoice and the object computing power input interval corresponding to the field extraction object.

[0121] It should be noted that the field extraction object refers to the key field value of the key field that ultimately needs to be identified and extracted. For example, the specific value of the invoice name can also be understood as the keyword slice corresponding to the key field name that needs to be identified and extracted. The object computing power input range is the range of available computing power resources determined for each field extraction object based on the computing power input ratio calculated in step S12.

[0122] For example, the computing power investment ratio is divided into three weight ratios: high weight, medium weight, and low weight. The corresponding object computing power investment intervals are the high weight interval (50%), medium weight interval (30%), and low weight interval (20%). Among them, the high weight interval will call dual models to extract content from keyword-sliced ​​images and cross-check the extraction results. The extraction process uses high-weight GPU real-time scheduling; the medium weight interval will call a single model to perform visual enhancement extraction on keyword-sliced ​​images and use medium-weight GPU shared scheduling; the low weight interval calls a single model to quickly scan and extract keyword-sliced ​​images and uses a low-weight CPU for batch processing. Through different computing power investment intervals, computing resources can be effectively allocated to adapt to key field extraction tasks of different complexity and importance.

[0123] Step S14: extracting keyword result data of the invoice based on the field extraction object and the object computing power input interval.

[0124] It should be noted that the keyword result data is the final valid data (i.e., the key field value) of the key field name corresponding to the keyword slice extracted after identification of the keyword slice, such as the specific name content corresponding to the invoice name field, the numerical values ​​corresponding to the amount, quantity or unit price, and the specific time of the invoice date, etc.

[0125] As a feasible implementation method, the field extraction object and object computing power input interval determined in step S13 are used, and an image recognition algorithm (such as an OCR algorithm, etc.) is adopted to identify and process the keyword slices with the support of the allocated computing power resources to extract the result data corresponding to the key field name (i.e., the key field value).

[0126] As another feasible implementation, step S14 further includes steps S141 to S143:

[0127] Step S141: allocating the field extraction object to a corresponding priority parsing queue according to the object computing power input interval, wherein the priority parsing queue includes a high-weight queue, a medium-weight queue, and a low-weight queue.

[0128] It should be noted that priority resolution queues are pre-defined queues with different processing priorities based on the proportion of computing power input. Priority resolution queues include high-weight queues, medium-weight queues, and low-weight queues. The high-weight range corresponds to the high-weight queue, the medium-weight range corresponds to the medium-weight queue, and the low-weight range corresponds to the low-weight queue.

[0129] In this embodiment, parsing queues of different priorities process the parsing tasks of keyword slices of key fields in corresponding weight intervals in parallel.

[0130] Step S142: Calculate the single-field parsing computing power input of each priority parsing queue according to a preset computing power allocation rule.

[0131] It should be noted that the computing power allocation rule refers to the pre-set computing power resource allocation standard based on the importance of the priority parsing queue. The computing power investment for single-field parsing refers to the amount of computing resources allocated to each key field extraction task.

[0132] As a feasible implementation, step S142 further includes steps S1421 to S1424:

[0133] Step S1421: Obtain the default weight of the computing power allocation corresponding to each priority resolution queue and the single-field standard resolution time.

[0134] It should be noted that priority resolution queues refer to different queues divided according to the computing power input range of the object. The default computing power allocation weight refers to the initial proportion of computing power resources allocated to different priority resolution queues. The single-field standard resolution time refers to the standard time required to resolve a single field.

[0135] In this embodiment, standard parsing times for individual key fields are predefined for high-weight intervals and medium-weight intervals, respectively. These standard parsing times serve as a reference for determining whether single-field parsing by the corresponding priority queue has timed out, thereby optimizing the parsing process. Standard parsing times for individual key fields in the low-weight interval do not need to be defined.

[0136] Specifically, by setting a standard parsing time for each key field in the corresponding priority parsing queue, the parsing efficiency of each key field can be quantitatively evaluated. If the actual parsing time for a key field exceeds the preset standard parsing time, the system can identify potential issues in the parsing process, such as insufficient resource allocation, inefficient algorithms, or unexpected data complexity. This allows the system to promptly adjust computing resource allocation strategies and optimize algorithm parameters to ensure efficient and stable operation of the entire parsing process.

[0137] Step S1422: Calculate the computing power adjustment coefficient corresponding to each priority parsing queue according to the actual single-field parsing time of each priority parsing queue and the single-field standard parsing time.

[0138] It should be noted that the computing power adjustment coefficient is a coefficient that adjusts the computing power allocation based on the difference between the actual parsing time and the standard parsing time. It can help the system dynamically adjust the computing power resources used when executing parsing tasks in parsing queues of different priorities.

[0139] In this embodiment, in the high-weight queue and the medium-weight queue, a single key field is defined to dynamically extract the computing power adjustment coefficient of the computing power resources in other priority resolution queues when the resolution timeout occurs. The expression is:

[0140] The computing power adjustment coefficient = 1 - (standard single-field parsing time / actual single-field parsing time). Note that if the result is a negative number, the computing power adjustment coefficient is meaningless and is set to 0.

[0141] It should be noted that the expression for this computing power adjustment coefficient means that when three fields in multiple weight intervals are parsed concurrently in corresponding priority parsing queues, if a key field in a high-weight or medium-weight interval times out while parsing its corresponding keyword slice, computing power resources from other parsing queues are dynamically drawn based on the timeout duration. The timeout duration is positively correlated with the amount of computing power drawn.

[0142] Step S1423: When the high-weight queue times out while parsing the field extraction object, the single-field parsing computing power input of the medium-weight queue and the low-weight queue is extracted according to the timeout duration.

[0143] In this embodiment, when a high-weight queue times out, the system needs to extract computing resources from other priority parsing queues (medium-weight queue and low-weight queue) to ensure the completion of the key field extraction task in the high-weight queue.

[0144] In this embodiment, as a feasible implementation method, when different priority parsing queues process the parsing tasks of keyword slices of key fields in corresponding weight intervals in parallel, if other priority parsing queues complete the parsing tasks ahead of time, the default weight of the parsed queue is directly added to the computing power resource input of the high-weight queue and / or the medium-weight queue. In this way, the remaining computing power of the priority parsing queue that has completed the parsing task can be fully utilized to improve resource utilization and speed up the completion of the parsing tasks in the high-weight queue and / or the medium-weight queue.

[0145] In this embodiment, the expression for the single-field parsing computing power input of the high-weight queue is:

[0146] The computing power invested in single-field parsing of the high-weight queue = total computing power * (default weight + default weight of the parsed queue) + computing power adjustment coefficient * total computing power invested by the queue to be completed.

[0147] The computing power adjustment coefficient is 1-(standard single-field parsing time / actual single-field parsing time). The total computing power invested by the pending queue is the sum of the computing power invested by the medium-weight queue and the low-weight queue.

[0148] It should be noted that the expression for single-field parsing computing power investment in high-weight queues takes the following factors into consideration:

[0149] (1) When the parsing tasks of other weighted queues are completed, the computing power resources released by the parsing queue will be injected into the high-weight queue first by default;

[0150] (2) When the parsing of a keyword slice in a high-weight queue times out, the remaining computing power of other priority parsing queues is dynamically extracted based on the timeout ratio to increase the computing power input for parsing the keyword slice that timed out. When the single field is parsed, the timeout duration of the next key field is recalculated, and so on.

[0151] It should be noted that the "single field parsing" mentioned in this embodiment actually refers to the parsing task of a single keyword slice. Whether referred to as "single field parsing," "single field parsing," "keyword slice parsing," or "key field extraction task," the description refers to the image recognition and text extraction operations performed on the field extraction objects in the extraction object array.

[0152] Step S1424: When the medium-weight queue times out while parsing the field extraction object, the single-field parsing computing power input of the low-weight queue is extracted according to the timeout duration.

[0153] In this embodiment, when a parsing timeout occurs in the medium-weight queue, the system needs to extract computing resources from the low-weight queue to ensure the completion of the key field extraction task in the medium-weight queue.

[0154] In this embodiment, the expression for the single-field parsing computing power input of the medium-weight queue is:

[0155] The computing power invested in single-field parsing of the medium-weight queue = total computing power * (default weight + default weight of the parsed queue) * (1 - computing power extraction coefficient of the high-weight queue) + computing power adjustment coefficient * total computing power invested by the low-weight queue.

[0156] It should be noted that the expression for single-field parsing computing power investment in the medium-weight queue takes the following factors into consideration:

[0157] (1) When the parsing task of the high-weight queue is completed, the computing power resources released by the parsing queue will be given priority to the medium-weight queue by default.

[0158] (2) If the parsing of a keyword slice in a weighted queue times out, the remaining computing power of the low-weight queue will be dynamically extracted based on the timeout ratio (computing power resources of the high-weight queue cannot be extracted) to increase the computing power input for parsing the timed-out keyword slice. When the single-field parsing is completed, the timeout duration of the next key field will be recalculated, and so on.

[0159] (3) Since the computing power resources of its own queue may be extracted by the high-weight queue, when calculating the single-field resolution computing power input of the medium-weight queue, it is necessary to subtract the extracted computing power input to obtain the actual single-field resolution computing power input of the medium-weight queue.

[0160] As a feasible implementation method, the default input computing power of the medium-weight queue can be 50% of the total computing power.

[0161] Step S143: Based on the single-field parsing computing power input, according to the text extraction priority of each field extraction object in the priority parsing queue, image parsing and text extraction operations are performed on the field extraction objects in turn to obtain the keyword result data of the invoice.

[0162] It should be noted that text extraction priority refers to the processing order of field extraction objects within the same computing power input range, which is determined based on the importance of each key field.

[0163] In this embodiment, the text extraction priority of each key field in each computing power investment interval is preset, and the priority parsing queue will perform image parsing and text extraction operations on each key field one by one according to the priority of each key field in the corresponding computing power investment interval.

[0164] Based on the above embodiments of the present application, in the third embodiment of the present application, the same or similar contents as those in the above embodiments can be referred to the above introduction and will not be described in detail later. Figure 5 The automatic verification method of the receipt voucher, step S20 includes steps S21 to S23:

[0165] Step S21: Determine the field name weight and field value weight of each field in the keyword result data according to a preset field weight allocation rule.

[0166] It's important to note that field name weights and field value weights refer to the degree to which different key field names and key field values ​​influence the final write-off decision during the write-off process. Field name weights reflect the importance of the key field, while field value weights reflect the credibility of the key field value.

[0167] As a feasible implementation, field weight assignment rules can be preset through historical data analysis and expert knowledge. Alternatively, a machine learning algorithm can be used to automatically learn and adjust field weight assignments based on a large amount of historical write-off data.

[0168] Step S22: Calculate the single field confidence of each field according to the field name weight and the field value weight.

[0169] It should be noted that the single-field confidence is a quantitative indicator of the credibility of a single key field calculated based on the field name weight and field value weight.

[0170] As a feasible implementation method, the confidence of a single field can be calculated by a weighted average method, that is, the weighted sum of the field name weight and the field value weight.

[0171] As another feasible implementation, step S22 includes: after extracting the keyword result data of the invoice, obtaining the keyword name in the keyword result data, and performing a content matching evaluation on the keyword name. The content matching evaluation includes character-level comparison and semantic-level comparison. Among them, the character-level comparison result can only be 0 or 1, that is, when the similarity ratio is equal to 1, the single-field confidence of the corresponding keyword name is 1, and when the similarity ratio is not equal to 1, the single-field confidence of the corresponding keyword name is 0; the semantic-level comparison result can also only be 0 or 1, that is, when the semantics match, the single-field confidence of the corresponding keyword name is 1, and when the semantics do not match, the single-field confidence of the corresponding keyword name is 0. The content matching result includes the character-level comparison result or the semantic-level comparison result.

[0172] Specifically, character-level matching refers to calculating the similarity ratio between the keyword names in the keyword result data and the keyword names marked in the standard invoice template.

[0173]

[0174] in, It refers to the character length of the keyword name in the keyword result data. The character length of the keyword name noted in the standard invoice template.

[0175] It should be noted that the character-level comparison method focuses on the differences at the character level of the text, and evaluates the similarity between the identified keyword names and the keyword names marked in the standard invoice template by quantifying the similarity of character lengths.

[0176] For example, the character length of the keyword name "invoice date" in the keyword result data is 2, and the character length of the keyword name "invoice date" marked in the standard invoice template is 4, then If the content matching result (i.e., character-level comparison result) of the current keyword name is not equal to 1, that is, if there is a difference, the single-field confidence of the key field will be set to 0, indicating that the recognition result of this key field is not trusted.

[0177] Specifically, semantic comparison checks whether the keyword names in the keyword result data match the keyword names marked in the standard invoice template. For example, if "invoice date" and "invoice date" are semantically matched, the single-field confidence of this key field is 1. If the keyword names in the keyword result data do not match the keyword names marked in the standard invoice template, the single-field confidence of this key field is 0.

[0178] As another possible implementation, please refer to Figure 6 , Figure 6 The content result rule diagram is shown in Figure 1. The content result rule verification is used to verify the key field values ​​of the recognition results and generate the confidence level of the field recognition results.

[0179] It should be noted that the recognition result refers to the keyword name in the identified keyword result data. The key field value refers to the value corresponding to the identified keyword name. For example, if the keyword name is "Invoice Name", the key field value is "VAT Special Invoice", or if the keyword name is "Invoice Date", the key field value is "2025-05-15". The field recognition result confidence refers to the confidence level of the single field corresponding to the keyword name in the identified keyword result data.

[0180] Step S23: Determine the comprehensive confidence of the invoice based on the single-field confidence.

[0181] It should be noted that the comprehensive confidence level is the overall credibility assessment result of the invoice formed by aggregating the confidence levels of all single fields under the same invoice (or invoice code) to reflect the credibility of the entire invoice.

[0182] As a feasible implementation method, the comprehensive confidence is calculated by a weighted average method, that is, the weighted sum of the single-field confidences of all key fields.

[0183] This embodiment achieves a quantitative assessment of invoice information from the local to the overall level by calculating single-field confidence and comprehensive confidence, providing a reliable basis for the automatic cancellation of receipt vouchers, improving the accuracy and efficiency of cancellation, and reducing the financial risks caused by incorrect invoice information.

[0184] For example, to help understand the implementation process of the single field confidence and comprehensive confidence of the automatic verification method of the receipt voucher in this embodiment, please refer to Figure 7 , Figure 7 This is a diagram of the field weight assignment rules. Specifically:

[0185] In the field weight setting and confidence assessment model, the weight allocation rules can divide the field name weight and field value weight corresponding to each key field based on preset requirements.

[0186] For example, the field name weight The weight range can be 0.05~0.1 based on the importance of the business, and the confidence level of the field name It can be set to 0 or 1 based on the content matching result. , the weight range can be divided into 0.1~0.2 based on the data integrity requirements, and the field value confidence The confidence level of the field recognition result obtained based on the content result rule verification can be set to 0 or 1.

[0187] Therefore, a weighted summation method is used to evaluate the confidence of a single field. The expression of the confidence of a single field is as follows: .

[0188] In this way, the importance of field names and field values ​​as well as the matching verification results are comprehensively considered to achieve a quantitative assessment of the credibility of a single field, providing a basis for calculating the comprehensive confidence of the invoice.

[0189] Furthermore, the comprehensive confidence of the current invoice recognition is calculated. The expression of the comprehensive confidence is as follows:

[0190]

[0191] If the comprehensive confidence level = 1, the invoice voucher will be automatically generated and the automatic verification process will be initiated.

[0192] If 0.9≤comprehensive confidence<1, only the invoice voucher will be automatically generated and the automatic write-off process will not be entered. Manual intervention in the write-off process is required.

[0193] If the comprehensive confidence level is less than 0.9, the invoice recognition result information is generated, and manual intervention is required to generate the invoice voucher and then manually verify it.

[0194] It should be noted that the threshold determination of the comprehensive confidence in this embodiment is only one of the optional solutions and does not constitute a limitation on the thresholds in the comprehensive confidence. In actual application, it can be adjusted according to business needs.

[0195] Based on the above embodiments of the present application, in the fourth embodiment of the present application, the same or similar contents as those in the above embodiments can be referred to the above introduction and will not be described in detail later. Figure 8 The automatic verification method of the receipt voucher, step S50 includes steps S51 to S53:

[0196] Step S51: performing equal-amount matching on the invoice vouchers and the receipt vouchers in the data set to be written off, writing off the invoice vouchers and the receipt vouchers with equal amounts, removing the written-off vouchers from the data set to be written off, and updating the data set to be written off.

[0197] It should be noted that equal-amount matching refers to pairing invoices and receipts with the same amount during the write-off process to achieve financial balance. Write-off vouchers are those that have been successfully matched and processed (including invoices and receipts). They will be removed from the pending write-off dataset to update the pending write-off quantity.

[0198] In this embodiment, the complete matching strategy can ensure that tickets with the same amount are written off first, thus avoiding manual misjudgment.

[0199] Step S52: Arrange the invoice vouchers and the receipt vouchers in the updated data set to be written off in descending order of amount, and calculate whether the cumulative amount to be written off of all the invoice vouchers is less than or equal to the maximum amount that can be written off in the receipt vouchers.

[0200] It should be noted that sorting by amount in descending order means sorting invoices and receipts by their respective amounts from largest to smallest, prioritizing larger amounts. The cumulative amount pending write-off is the total amount of all invoices pending write-off. The maximum write-off amount is the maximum amount that can be written off for a single receipt among all receipts.

[0201] As a feasible implementation, step S52 may further include steps S521 to S523:

[0202] Step S521: If the accumulated amount to be written off is less than or equal to the maximum amount that can be written off in the receipt voucher, calculate whether the maximum amount to be written off in the invoice voucher is less than or equal to the maximum amount that can be written off.

[0203] As a feasible implementation method, by traversing the invoice vouchers to be written off, the cumulative amount to be written off is calculated, and the maximum amount to be written off in the invoice voucher and the maximum amount to be written off in the receipt voucher are obtained using a database query statement, and the maximum amount to be written off is compared with the maximum amount to be written off.

[0204] Step S522: If yes, the invoice voucher corresponding to the maximum amount to be written off is written off to the receipt voucher corresponding to the maximum amount that can be written off, and the write-off amount corresponding to the receipt voucher is updated.

[0205] As a feasible implementation method, the invoice and receipt voucher records to be written off can be locked through database transaction operations, the write-off amount update statement can be executed, and the write-off log can be recorded.

[0206] Step S523: re-execute the step of arranging the updated invoice vouchers and the receipt vouchers in the to-be-written-off data set in descending order of amount, and calculating whether the cumulative to-be-written-off amount of all the invoice vouchers is less than or equal to the maximum write-off amount in the receipt voucher, until all the invoice vouchers and the receipt vouchers are written off or cannot be matched.

[0207] As a feasible implementation method, a loop algorithm may be used to encapsulate the sorting and comparison logic, and after each loop, it is checked whether the data set to be written off is empty or whether there is a matching amount.

[0208] In the implementation of steps S521 to S523 above, the pending write-off dataset is continuously updated and the cumulative pending write-off amount is recalculated until all invoice vouchers and receipt vouchers are written off or no matching vouchers are found. As a feasible implementation, this iterative process can be implemented using loops and conditional judgments.

[0209] Step S53: If the accumulated amount to be written off is less than or equal to the maximum write-off amount in the receipt voucher, all the invoice vouchers are written off to the receipt voucher corresponding to the maximum write-off amount, and the write-off amount corresponding to the receipt voucher is updated.

[0210] It should be noted that when the accumulated amount to be written off exceeds the maximum amount that can be written off in the receipt voucher, all invoice vouchers in the updated data set to be written off need to be written off to the receipt voucher corresponding to the maximum amount that can be written off to ensure financial balance.

[0211] It's important to note that during the automatic write-off process, if the pending write-off amount or the cumulative pending write-off amount is less than or equal to the receivable amount of a receipt voucher, this indicates that the receivable amount of the receipt voucher may not have been fully utilized, and there may be remaining receivable amount. Only when the receivable amount of a receipt voucher has been fully utilized to zero will the receivable status of the receipt voucher be updated to "Approved." If the receivable amount corresponding to a receipt voucher has not been fully utilized, the receipt voucher will remain in the updated pending write-off dataset, but the receivable amount of the receipt voucher will be updated (i.e., the original receivable amount of the receipt voucher, minus the pending write-off amount or cumulative pending write-off amount corresponding to one or more invoice vouchers successfully matched during the write-off process) to facilitate subsequent processing in the write-off process and ensure that the receivable amount corresponding to all receipt vouchers is fully utilized. This approach aims to optimize the write-off process and ensure efficient resource utilization.

[0212] For example, in order to help understand the automatic verification process of the receipt voucher in the automatic verification method of the receipt voucher in this embodiment, specifically:

[0213] First, extract the principal information of the "buyer and seller" in the invoice voucher, and match it with the "receiving account name" and "counterparty account name" in the receipt voucher to obtain several data sets to be written off with {buyer = receiving account name, seller = counterparty account name}.

[0214] Then, based on the verification data set, the bill payment vouchers (including invoice vouchers and receipt vouchers) in the multiple data sets to be verified are matched against multiple rules. When the matching conditions meet the preset requirements, the verification record is automatically generated.

[0215] (1) First, execute the complete match rule:

[0216] Match the "Amount to be written off" with the "Amount available for writing off" of each ticket voucher to be written off in the data set to be written off;

[0217] The bills with equal amounts will be written off first, and the write-off status of the corresponding bill vouchers of the data set to be written off will be updated at the same time, and the amount of data to be written off will be reduced.

[0218] (2) Then, secondary rule matching is performed, that is, large-amount matching is performed based on the fully matched (updated) data set to be written off:

[0219] Sort the invoice vouchers and receipt vouchers in the updated pending write-off dataset in descending order by amount. Calculate whether the cumulative pending write-off amount of all invoice vouchers is less than or equal to the maximum write-off amount for a single receipt voucher in the updated pending write-off dataset. If so, write all invoice vouchers to the receipt voucher with the maximum write-off amount.

[0220] Otherwise, a secondary check is performed to determine whether the maximum pending write-off amount corresponding to a single invoice voucher is less than or equal to the maximum write-off amount in a single receipt voucher. If so, the invoice voucher corresponding to the maximum pending write-off amount is written off to the receipt voucher corresponding to the maximum write-off amount. The pending write-off quantity on the payment voucher and the write-off amount on the receipt voucher are updated, and the pending write-off invoice vouchers and receipt vouchers are reordered by amount. This algorithm is repeated until the secondary check rule is no longer met.

[0221] If not (i.e., the maximum pending write-off amount corresponding to a single invoice voucher is greater than the maximum write-off amount in a single receipt voucher), the invoice voucher corresponding to the maximum pending write-off amount will be removed from the updated pending write-off dataset by default and transferred to the manual write-off dataset. The updated pending write-off dataset will then be re-sorted by amount for the pending invoices and receipts, and this algorithm will be repeated until the updated pending write-off dataset is empty or there are no matching invoice-payment pairs to write off.

[0222] This embodiment first uses a large-amount matching recursive write-off strategy to compare the "cumulative amount to be written off" with the "maximum amount that can be written off" based on the principle of descending amount, to prioritize batch write-offs of invoice vouchers. When the conditions for batch write-offs are not met, the "maximum amount to be written off" of a single invoice voucher is compared with the "maximum amount to be written off" of a single receipt voucher to prioritize single invoice voucher write-offs. When the conditions for single invoice voucher write-offs are not met, the invoice vouchers corresponding to the "maximum amount to be written off" that do not meet the conditions are removed, and the updated data set to be written off is re-sorted by amount, and the write-offs are cyclically compared. This embodiment adheres to the large-amount limit rule, reducing the risk of large-amount write-offs being missed. After each round of write-offs, the amount to be written off corresponding to the receipt voucher and the write-off status of each invoice voucher are automatically updated to avoid duplicate write-offs and omissions. In addition, by moving unmatched invoice vouchers to the manual write-off data set, the algorithm is prevented from falling into an infinite loop and invalid operations are also reduced.

[0223] Through all the above implementation schemes, this application realizes automatic write-offs in a variety of complex business scenarios. It not only supports one-to-one write-offs, but also can realize the write-off of multiple invoices with a single receipt (such as total amount matching), or splitting a single invoice into multiple receipts, etc. In addition, by dynamically updating the write-off amount of the receipt, such as processing partial payments (such as the receipt amount only covers part of the invoice amount) and balance carryforwards (traditional algorithms require manual calculation of the remaining write-off amount), partial write-offs and automated balance processing are achieved.

[0224] For example, in order to help understand the implementation process of the automatic cancellation method of the receipt voucher obtained by combining this embodiment with the above embodiments, please refer to Figure 9 , Figure 9 A brief flowchart of the automatic cancellation method for receipt vouchers is provided, specifically:

[0225] The system extracts keywords from sales invoice information and our payment information. These keywords include the buyer's header, buyer's account, seller's header, seller's account, counterparty account name, counterparty account, receiving account name, and receiving account number. The system then matches these keywords to check whether a bill-to-payment pair exists that matches all keywords exactly. If a match is found, the bill-to-payment pair enters the automatic sales invoice queue for automatic reconciliation. If the principal information of either party does not match—for example, the buyer's header and buyer's account do not match the seller's header and selling account, or the counterparty account name and counterparty account do not match the receiving account name and receiving account number—the system then further matches the buyer's or seller's affiliated company information, such as group companies or subsidiaries. If the affiliated company information matches successfully and an identical bill-to-payment pair exists, the corresponding bill-to-payment pair also enters the automatic reconciliation queue. If the affiliated company matching fails or an identical bill-to-payment pair does not exist, the corresponding bill-to-payment pair enters the manual reconciliation queue for further manual review and processing. If the principal information on both parties does not match, the voucher will not be placed in the verification queue. Instead, the system will place the voucher in the pending verification data set and process it after it meets the requirements. This entire process ensures the accuracy and consistency of the voucher, reducing the possibility of errors and omissions.

[0226] An embodiment of the present application provides an automatic verification system for receipt vouchers, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the automatic verification method for receipt vouchers in the above-mentioned embodiment one.

[0227] Reference below Figure 10 , which shows a schematic diagram of the structure of the automatic verification system for receipt vouchers suitable for implementing the embodiment of the present application. The automatic verification system for receipt vouchers in the embodiment of the present application may include various hardware and software components for implementing the automatic verification method for receipt vouchers. Figure 10 The automatic verification system for receipt vouchers shown is merely an example and should not impose any limitations on the functions and scope of use of the embodiments of the present application.

[0228] like Figure 10As shown, the automatic payment voucher verification system may include a processing device 1001 (e.g., a central processing unit, graphics processing unit, etc.), which can perform various appropriate actions and processes based on programs stored in a read-only memory (ROM) 1002 or programs loaded from a storage device 1003 into a random access memory (RAM) 1004. RAM 1004 also stores various programs and data required for the operation of the automatic payment voucher verification system. Processing device 1001, ROM 1002, and RAM 1004 are interconnected via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems may be connected to I / O interface 1006: input devices 1007, such as a touchscreen, touchpad, or keyboard; output devices 1008, such as a liquid crystal display (LCD), speaker, or vibrator; storage device 1003, such as a magnetic tape or hard disk; and communication device 1009. The communication device 1009 can allow the automatic payment voucher verification system to communicate wirelessly or wired with other devices to exchange data. Although the figure shows an automatic payment voucher verification system with various systems, it should be understood that it is not required to implement or have all of the systems shown. More or fewer systems can be implemented or have alternatively.

[0229] In particular, according to the embodiments disclosed in the present application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, the embodiments disclosed in the present application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program comprising program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via a communication device, or installed from a storage device 1003, or installed from a read-only memory 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are performed.

[0230] The automatic verification system for receipt vouchers provided in this application utilizes the automatic verification method for receipt vouchers in the aforementioned embodiment, resolving the technical issue of the inability to accurately match receipt vouchers for automatic verification within the verification process. Compared to the prior art, the automatic verification system for receipt vouchers provided in this application achieves the same beneficial effects as the automatic verification method for receipt vouchers provided in the aforementioned embodiment. Other technical features of the automatic verification system for receipt vouchers are the same as those disclosed in the aforementioned embodiment and are not further elaborated upon here.

[0231] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any one or more embodiments or examples in a suitable manner.

[0232] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.

[0233] An embodiment of the present application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, and the computer-readable program instructions are used to execute the automatic cancellation method for receipt vouchers in the above embodiment.

[0234] The computer-readable storage medium provided herein may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems, or devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to, an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including, but not limited to, wires, optical cables, radio frequency (RF), etc., or any suitable combination thereof.

[0235] The computer-readable storage medium may be included in the automatic verification system for receipt vouchers; or it may exist independently without being assembled into the automatic verification system for receipt vouchers.

[0236] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by the automatic verification system for receipt vouchers, the automatic verification system for receipt vouchers: obtains a field image slice corresponding to an invoice, and extracts keyword result data of the invoice based on the field image slice; performs a confidence assessment based on the keyword result data to obtain a comprehensive confidence of the invoice; generates an invoice voucher based on the comprehensive confidence and the keyword result data; matches the invoice voucher with the receipt voucher according to the payee and payee information to obtain a data set to be verified; and performs verification processing on the invoice voucher and the receipt voucher in the data set to be verified according to a preset ticket-to-payment matching rule.

[0237] Computer program code for performing the operations of the present application may be written in one or more programming languages, or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0238] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, program segment or a part of code, and the module, program segment or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of the boxes in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system that performs the specified function or operation, or can be implemented by a combination of dedicated hardware and computer instructions.

[0239] The modules described in the embodiments of the present application may be implemented in software or hardware, wherein the name of a module does not necessarily limit the unit itself.

[0240] The computer-readable storage medium provided in this application stores computer-readable program instructions (i.e., a computer program) for executing the aforementioned automatic verification method for receipt vouchers. This computer-readable storage medium can address the technical issue of the inability to accurately match receipt vouchers for automatic verification within the verification process. Compared to the prior art, the beneficial effects of the computer-readable storage medium provided in this application are similar to those of the automatic verification method for receipt vouchers provided in the aforementioned embodiments, and are not further elaborated here.

[0241] An embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of the above-mentioned method for automatic cancellation of receipt vouchers.

[0242] The computer program product provided in this application can solve the technical problem of the inability to accurately match and automatically cancel receipt vouchers during the verification process. Compared with the prior art, the beneficial effects of the computer program product provided in the embodiments of this application are the same as those of the automatic verification method for receipt vouchers provided in the above embodiments, and will not be elaborated here.

[0243] The above are only preferred embodiments of the present application and do not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent processing scope of the present application.

[0244] It should be noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or system comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or system. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or system comprising the element.

[0245] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above embodiment methods can be implemented by means of software plus the necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method.

[0246] The above are only preferred embodiments of the present application and do not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A method for automatically writing off receipt vouchers, characterized in that: The automatic cancellation method for the receipt voucher includes: Obtaining a field image slice corresponding to the invoice, and extracting keyword result data of the invoice based on the field image slice; Performing a confidence evaluation based on the keyword result data to obtain a comprehensive confidence level of the invoice; generating an invoice voucher based on the comprehensive confidence and the keyword result data; Match the invoice voucher with the payment voucher according to the payee and payee information to obtain a data set to be written off; According to the preset ticket-payment matching rules, the invoice voucher and the payment voucher in the to-be-written-off data set are written off; The steps of obtaining the field image slices corresponding to the invoice and extracting the keyword result data of the invoice according to the field image slices include: Generate an extraction object array according to the field image slice, the extraction object array including the invoice code, keyword name, keyword position coordinates and keyword slice; According to the preset field computing power weight configuration, the computing power input ratio of each keyword slice is calculated using the keyword name corresponding to each keyword slice; Determining, based on the computing power input ratio, the field extraction object of the invoice and the object computing power input interval corresponding to the field extraction object; Extracting keyword result data of the invoice based on the field extraction object and the object computing power investment interval; The step of extracting keyword result data of the invoice based on the field extraction object and the object computing power investment interval includes: According to the object computing power input interval, the field extraction object is assigned to a corresponding priority parsing queue, wherein the priority parsing queue includes a high-weight queue, a medium-weight queue, and a low-weight queue; Calculate the single-field parsing computing power input of each priority parsing queue according to the preset computing power allocation rule; Based on the single-field parsing computing power input, image parsing and text extraction operations are sequentially performed on the field extraction objects according to the text extraction priority of each field extraction object in the priority parsing queue to obtain keyword result data of the invoice; The step of calculating the single-field resolution computing power input of each priority resolution queue according to the preset computing power allocation rule includes: Obtain the default weight of computing power allocation corresponding to each priority parsing queue and the standard parsing time of a single field; Calculate the computing power adjustment coefficient corresponding to each priority resolution queue according to the actual single-field resolution time of each priority resolution queue and the standard single-field resolution time; When the high-weight queue times out while parsing the field extraction object, the single-field parsing computing power input of the medium-weight queue and the low-weight queue is extracted according to the timeout duration; When the medium-weight queue times out while parsing the field extraction object, the single-field parsing computing power input of the low-weight queue is extracted according to the timeout duration.

2. The automatic cancellation method for receipt vouchers according to claim 1, characterized in that: Before the steps of obtaining the field image slices corresponding to the invoice and extracting the keyword result data of the invoice based on the field image slices, the automatic verification method for the receipt voucher further includes: Extracting invoice image data corresponding to the invoice document imported by the user; Identifying key field locations in the invoice image data using a pre-trained template matching model; According to the key field position, a field image slice corresponding to the invoice is generated.

3. The automatic cancellation method for receipt vouchers according to claim 1, characterized in that: The step of performing confidence evaluation based on the keyword result data to obtain the comprehensive confidence of the invoice includes: Determine the field name weight and field value weight of each field in the keyword result data according to a preset field weight allocation rule; Calculating the single field confidence of each of the fields according to the field name weight and the field value weight; The comprehensive confidence of the invoice is determined based on the single-field confidence.

4. The automatic cancellation method for receipt vouchers according to claim 1, characterized in that: The step of performing write-off processing on the invoice voucher and the payment voucher in the to-be-written-off data set according to the preset ticket-payment matching rule includes: Performing equal-amount matching on the invoice vouchers and the receipt vouchers in the data set to be written off, writing off the invoice vouchers and the receipt vouchers with equal amounts, removing the written-off vouchers from the data set to be written off, and updating the data set to be written off; Arrange the invoice vouchers and the receipt vouchers in the updated data set to be written off in descending order of amount, and calculate whether the cumulative amount to be written off of all the invoice vouchers is less than or equal to the maximum amount that can be written off in the receipt vouchers; If the accumulated amount to be written off is less than or equal to the maximum write-off amount in the receipt voucher, all the invoice vouchers will be written off to the receipt voucher corresponding to the maximum write-off amount, and the write-off amount corresponding to the receipt voucher will be updated.

5. The automatic cancellation method for receipt vouchers according to claim 4, characterized in that: The step of calculating whether the accumulated amount to be written off of all the invoice vouchers is less than or equal to the maximum amount that can be written off in the receipt voucher further includes: If the accumulated amount to be written off is less than or equal to the maximum amount that can be written off in the receipt voucher, calculate whether the maximum amount to be written off in the invoice voucher is less than or equal to the maximum amount that can be written off; If so, the invoice voucher corresponding to the maximum amount to be written off is written off to the receipt voucher corresponding to the maximum amount that can be written off, and the write-off amount corresponding to the receipt voucher is updated; Re-execute the steps of arranging the invoice vouchers and the receipt vouchers in the updated data set to be written off in descending order according to the amount, and calculating whether the cumulative amount to be written off of all the invoice vouchers is less than or equal to the maximum amount that can be written off in the receipt voucher, until all the invoice vouchers and the receipt vouchers are completed and written off or cannot be matched.

6. A system for automatically writing off receipt vouchers, characterized in that: The automatic cancellation system for receipt vouchers includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the automatic cancellation method for receipt vouchers as described in any one of claims 1 to 5.

7. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the automatic cancellation method of the receipt voucher as described in any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Invoice analysis method and device, reimbursement system and equipment and storage medium

    CN114429393A

  • Image feature information extraction processing method and device

    CN119007219A