Payment bill voucher image data extraction method, device, equipment and storage medium
By converting file formats and extracting payment voucher pictures, the problem of low manual recognition efficiency is solved, and more efficient and accurate data extraction is achieved.
Patent Information
- Application Number
- CN202411896773.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-20
- Publication Date
- 2025-04-04
AI Technical Summary
In the prior art, manual identification of payment document voucher pictures is inefficient and it is difficult to process a large amount of data.
By obtaining payment bill voucher pictures, converting the file format, converting the picture into editable text files using optical character recognition technology or LibreOffice software, and then pre-processing, feature extraction, analysis and data extraction of the files, extracting key information such as payment account, receipt account and transaction date.
It improves the efficiency of image recognition of payment receipt voucher, avoids data inaccuracy caused by image pixels and shooting angles, and reduces the dependence on manual recognition.
Smart Images

Figure CN119763137A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and in particular to a method, device, equipment and storage medium for extracting payment bill voucher image data. Background Art
[0002] Financial management is a vital part of the daily business activities of an enterprise. Payment vouchers are important documents that record the company's payments, such as check stubs, bank transfer receipts, etc. The accuracy and completeness of their contents are directly related to the quality and efficiency of the company's financial management. Therefore, accurately identifying the contents of payment vouchers is a basic and key task in financial management.
[0003] However, the existing technology generally uses manual recognition of payment bill voucher images to determine the information in the payment bill voucher images. However, when faced with a large number of payment bill voucher images, the use of manual recognition methods will lead to the problem of low efficiency in payment bill voucher image recognition. Summary of the invention
[0004] Based on the above problems, the present application provides a method, device, equipment and storage medium for extracting payment bill voucher image data, the purpose of which is to improve the efficiency of payment bill voucher image recognition.
[0005] The embodiments of the present application disclose the following technical solutions:
[0006] The first aspect of the present application provides a method for extracting payment bill voucher image data, the method comprising:
[0007] Get the payment receipt image;
[0008] Convert the payment bill voucher image into a file format to obtain a file corresponding to the payment bill voucher image;
[0009] Data is extracted from the file corresponding to the payment bill voucher image to obtain key information of the payment bill voucher image; the key information includes the payment account number, the receiving account number and the transaction date.
[0010] Optionally, the converting the payment bill voucher image into a file format to obtain a file corresponding to the payment bill voucher image specifically includes:
[0011] Optical character recognition technology is used to convert the file format of the payment bill voucher image to obtain a file corresponding to the payment bill voucher image.
[0012] Optionally, extracting data from a file corresponding to the payment bill voucher image to obtain key information of the payment bill voucher image specifically includes:
[0013] Preprocessing the file corresponding to the payment bill voucher image to obtain a preprocessed file; the preprocessing includes deleting redundant symbols in the file; the symbols include spaces and line breaks;
[0014] Performing feature extraction on the preprocessed file to obtain a bank key field; the bank key field includes a bank name;
[0015] Determining a parsing method for the preprocessed file based on the bank key field, and parsing the preprocessed file based on the parsing method to obtain a parsed file;
[0016] Data is extracted from the parsed file to obtain key information of the payment bill voucher image.
[0017] Optionally, preprocessing the file corresponding to the payment bill voucher image to obtain the preprocessed file specifically includes:
[0018] The spire.PDF toolkit is used to preprocess the file corresponding to the payment bill voucher image to obtain a preprocessed file.
[0019] The second aspect of the present application provides a payment bill voucher image data extraction device, the device comprising:
[0020] An acquisition unit, used to acquire a payment bill voucher image;
[0021] A conversion unit, used to convert the file format of the payment bill voucher image to obtain a file corresponding to the payment bill voucher image;
[0022] The extraction unit is used to extract data from the file corresponding to the payment bill voucher image to obtain key information of the payment bill voucher image; the key information includes the payment account number, the collection account number and the transaction date.
[0023] Optionally, the conversion unit is specifically used to:
[0024] Optical character recognition technology is used to convert the file format of the payment bill voucher image to obtain a file corresponding to the payment bill voucher image.
[0025] Optionally, the extraction unit specifically includes:
[0026] A preprocessing module, used to preprocess the file corresponding to the payment bill voucher image to obtain a preprocessed file; the preprocessing includes deleting redundant symbols in the file; the symbols include spaces and line breaks;
[0027] A key field extraction module is used to extract features from the preprocessed file to obtain a bank key field; the bank key field includes a bank name;
[0028] A parsing module, used for determining a parsing method of the preprocessed file based on the bank key field, and parsing the preprocessed file based on the parsing method to obtain a parsed file;
[0029] The key information determination module is used to extract data from the parsed file to obtain the key information of the payment bill voucher image.
[0030] Optionally, the preprocessing module is specifically used to:
[0031] The spire.PDF toolkit is used to preprocess the file corresponding to the payment bill voucher image to obtain a preprocessed file.
[0032] The third aspect of the present application provides a computer device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the payment bill voucher image data extraction method provided in the first aspect.
[0033] The fourth aspect of the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the method for extracting payment bill voucher image data provided in the first aspect is implemented.
[0034] Compared with the prior art, this application has the following beneficial effects:
[0035] This application first obtains a payment bill voucher image, and then converts the file format of the payment bill voucher image to obtain a file corresponding to the payment bill voucher image. This is to improve the accuracy of subsequent data extraction. If data is extracted directly from the payment bill voucher image, the data may be inaccurate due to problems such as the pixels and shooting angle of the payment bill voucher image. However, if the file format of the payment bill voucher image is converted first, the problems caused by the image pixels and shooting angle can be overcome.
[0036] Finally, data is extracted from the file corresponding to the payment bill voucher image to obtain the payment account, receipt account and transaction date of the payment bill voucher image. This application abandons the method of manually identifying the payment bill voucher image in the prior art, and instead adopts the method of first converting the file format of the payment bill voucher image and then extracting data from the converted file, thereby avoiding the problem of low efficiency of manual identification. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0038] Figure 1 A flowchart of a method for extracting payment bill voucher image data provided in an embodiment of the present application;
[0039] Figure 2 A flowchart of a parsing process of a preprocessed file provided in an embodiment of the present application;
[0040] Figure 3 A structural diagram of a payment bill voucher image data extraction device provided in an embodiment of the present application;
[0041] Figure 4 A structural diagram of the extraction unit provided in an embodiment of the present application. DETAILED DESCRIPTION
[0042] As described above, the prior art discloses the use of manual identification of payment bill voucher images to determine the information in the payment bill voucher images, but the use of manual identification methods in the face of a large number of payment bill voucher images will lead to the problem of low efficiency in payment bill voucher image recognition. After research, the inventors found that the problems existing in the prior art can be effectively avoided by first converting the file format of the payment bill voucher images and then extracting data from the converted files.
[0043] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0044] See now Figure 1 The flowchart of a method for extracting payment bill voucher picture data is shown to illustrate the method for extracting payment bill voucher picture data:
[0045] S101, obtaining a payment bill voucher image.
[0046] In an embodiment of the present application, the payment bill voucher is photographed horizontally and vertically, and the payment bill voucher image is saved in multiple image formats such as jpg, png and jpeg. However, the integrity of the image needs to be guaranteed. For example, the payment bill voucher image requires visible borders on all four sides, no other text outside the border that affects recognition, and it is placed horizontally in the direction of the text. The photo content is required to be clear and the photo must not have watermarks or other factors that affect recognition.
[0047] In the embodiment of the present application, after obtaining the payment bill voucher image, it is also necessary to identify the photographed payment bill voucher image to determine whether the photographed payment bill voucher image meets the above-mentioned requirements for image integrity.
[0048] If the photographed payment bill voucher image meets the above requirements, the process proceeds to S102.
[0049] If the photographed payment bill voucher picture does not meet the above requirements, the process returns to S101 to take a photo of the payment bill voucher again.
[0050] S102: Convert the file format of the payment bill voucher image to obtain a file corresponding to the payment bill voucher image.
[0051] Optical Character Recognition (OCR) technology is widely used in the recognition and processing of financial bills. OCR technology converts the text information in paper bills or electronic bills into editable text by scanning them, which greatly improves the efficiency and accuracy of bill processing. For payment vouchers, OCR technology can automatically recognize and extract key information, such as payment date, payer, payee, payment amount, etc., thereby reducing the workload of financial personnel and improving the level of financial management while ensuring the accuracy of the information on the supplementary payment voucher.
[0052] The present application can use OCR technology to convert the format of the payment bill voucher image. The present application proposes that the file format conversion of the payment bill voucher image can be realized by using LibreOffice software.
[0053] LibreOffice is an open source office software suite, similar to Microsoft Office, providing word processing, spreadsheets, presentations and other functions. It is a derivative of the OpenOffice.org office suite, also using the free and open source approach, distributing source code under the Mozilla Public License V2.0. LibreOffice has added many features compared to OpenOffice, and supports multiple file formats, including direct import of PDF documents, Microsoft Word (.doc files), Lotus Word, etc., and also supports major OpenXML formats.
[0054] The components of LibreOffice include:
[0055] Writer: Used for word processing and can create text documents.
[0056] Calc: Advanced spreadsheet program with over 300 financial / statistical and mathematical functions.
[0057] Impress: Provides multimedia presentation tools that are compatible with the Microsoft PowerPoint file format.
[0058] Draw: A vector drawing tool that can be used to create charts, flow charts, etc.
[0059] Base: Database management tool that supports daily database operations.
[0060] Math: Formula / equation editor that supports the creation of complex formulas.
[0061] LibreOffice is not only feature-rich, but also cross-platform, supporting Windows, Mac, and other Linux distributions, ensuring wide compatibility and ease of use. In addition, LibreOffice is simple and practical in design, has low system configuration requirements, and occupies few resources, making it perform well even on devices with limited resources.
[0062] After obtaining the file corresponding to the payment bill voucher image through OCR technology, it is necessary to extract data from the file corresponding to the payment bill voucher image to obtain key information in the payment bill voucher image. The data extraction process of the file corresponding to the payment bill voucher image is now described:
[0063] S103: extract data from the file corresponding to the payment bill voucher image to obtain key information of the payment bill voucher image.
[0064] The key information includes the payment account number, the receiving account number and the transaction date.
[0065] In order to ensure the neatness of the file corresponding to the payment bill voucher image, the present application proposes to preprocess the file corresponding to the payment bill voucher image to obtain a preprocessed file. The preprocessed file removes redundant content in the file corresponding to the payment bill voucher image.
[0066] In practical applications, the spire.PDF toolkit may be used to preprocess the file corresponding to the payment bill voucher image to obtain a preprocessed file.
[0067] The spire.PDF toolkit can identify the file corresponding to the payment bill voucher image line by line and remove redundant symbols in the file corresponding to the payment bill voucher image.
[0068] The spire.PDF toolkit is a professional PDF document control component based on the .NET platform. It allows developers to create, read, write and manipulate PDF documents using .NET applications without using Adobe Acrobat and other external controls. The spire.PDF toolkit is rich in functions. In addition to basic functions such as drawing various graphics and pictures, creating form fields, inserting headers and footers, inputting data tables, and automatically paging large tables, the spire.PDF toolkit also supports PDF digital signatures, converting HTML to PDF format, extracting text information and pictures from PDF documents, etc.
[0069] Feature extraction is performed on the preprocessed file to obtain a bank key field, wherein the bank key field includes a bank name.
[0070] The parsing method of the preprocessed file is determined based on the bank key field, and the preprocessed file is parsed based on the parsing method to obtain a parsed file.
[0071] Data is extracted from the parsed file to obtain key information of the payment bill voucher image.
[0072] For easier understanding, the following describes the file parsing process using several different parsing examples. Figure 2 The flowchart of the parsing process of the preprocessed file is shown in FIG. Figure 2 Explanation of the parsing method:
[0073] In one example, if the bank key field is China Construction Bank's corporate customer receipt (CCBHandler), data parsing is performed through the China Construction Bank payment voucher specific style. And if the bank keyword is China Construction Bank's corporate customer receipt, data is extracted from the file corresponding to the payment bill voucher image, and the account opening bank can also be obtained.
[0074] In another example, if the bank key field is ICBC online banking electronic receipt (ICBCHandler), data parsing is performed through the ICBC payment voucher specific format. And if the bank keyword is ICBC online banking electronic receipt, data is extracted from the file corresponding to the payment bill voucher image, and the account opening bank can also be obtained.
[0075] In another example, if the bank key field is Beijing Bank Electronic Receipt (BOBHandler), data parsing is performed through the Beijing Bank payment voucher specific style. And if the bank keyword is Beijing Bank Electronic Receipt, data is extracted from the file corresponding to the payment bill voucher image, and the account number can also be obtained.
[0076] Accurate payment voucher information can help enterprises discover potential financial risks and problems in a timely manner, so as to take corresponding measures to prevent and control them; payment voucher content recognition can not only be applied to internal financial management of enterprises, but can also be gradually expanded to multiple fields such as supply chain management and tax accounting. For example, in supply chain management, by identifying supplier information and payment amounts in payment vouchers, enterprises can optimize supply chain management processes and improve the transparency and efficiency of the supply chain. In tax accounting, accurate payment voucher information can help enterprises accurately calculate taxes and fees, ensuring the accuracy and compliance of tax declarations.
[0077] Figure 3 This is the structural diagram of the payment bill voucher image data extraction device. Figure 3 The function of each unit in the payment bill voucher image data extraction device is explained.
[0078] A payment bill voucher image data extraction device comprises: an acquisition unit, a conversion unit and an extraction unit.
[0079] The acquisition unit is used to acquire the payment bill voucher image.
[0080] The conversion unit is used to convert the file format of the payment bill voucher image to obtain a file corresponding to the payment bill voucher image.
[0081] Conversion unit, specifically used for:
[0082] Optical character recognition technology is used to convert the file format of the payment bill voucher image to obtain a file corresponding to the payment bill voucher image.
[0083] The extraction unit is used to extract data from the file corresponding to the payment bill voucher image to obtain key information of the payment bill voucher image; the key information includes the payment account number, the collection account number and the transaction date.
[0084] This application first obtains a payment bill voucher image, and then converts the file format of the payment bill voucher image to obtain a file corresponding to the payment bill voucher image. This is to improve the accuracy of subsequent data extraction. If data is extracted directly from the payment bill voucher image, the data may be inaccurate due to problems such as the pixels and shooting angle of the payment bill voucher image. However, if the file format of the payment bill voucher image is converted first, the problems caused by the image pixels and shooting angle can be overcome.
[0085] Finally, data is extracted from the file corresponding to the payment bill voucher image to obtain the payment account, receipt account and transaction date of the payment bill voucher image. This application abandons the method of manually identifying the payment bill voucher image in the prior art, and instead adopts the method of first converting the file format of the payment bill voucher image and then extracting data from the converted file, thereby avoiding the problem of low efficiency of manual identification.
[0086] Now combined Figure 4 The structure diagram of the extraction unit shown in the figure explains the function of each module in the extraction unit:
[0087] The preprocessing module is used to preprocess the file corresponding to the payment bill voucher image to obtain a preprocessed file. The preprocessing includes deleting redundant symbols in the file. Symbols include spaces and line breaks.
[0088] In specific implementation, as a possible implementation method, the preprocessing module can be specifically used to preprocess the file corresponding to the payment bill voucher image using the spire.PDF toolkit to obtain the preprocessed file.
[0089] The key field extraction module is used to extract features from the preprocessed file to obtain a bank key field, wherein the bank key field includes the bank name.
[0090] The parsing module is used to determine a parsing method for the preprocessed file based on the bank key field, and parse the preprocessed file based on the parsing method to obtain a parsed file.
[0091] The key information determination module is used to extract data from the parsed file to obtain the key information of the payment bill voucher image.
[0092] In addition, the present application also provides a computer device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement a method for extracting payment bill voucher image data.
[0093] The present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, a method for extracting payment bill voucher image data is implemented.
[0094] It should be noted that each embodiment in this specification is described in a progressive manner, and the same and similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device and equipment embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments. The device and equipment embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components indicated as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. A person of ordinary skill in the art can understand and implement it without paying creative labor.
[0095] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A method for extracting payment bill voucher image data, characterized in that: The payment bill voucher picture data extraction method comprises: Get the payment receipt image; Convert the payment bill voucher image into a file format to obtain a file corresponding to the payment bill voucher image; Data is extracted from the file corresponding to the payment bill voucher image to obtain key information of the payment bill voucher image; the key information includes the payment account number, the receiving account number and the transaction date.
2. The method for extracting payment bill voucher image data according to claim 1, characterized in that: The step of converting the file format of the payment bill voucher image to obtain a file corresponding to the payment bill voucher image specifically includes: Optical character recognition technology is used to convert the file format of the payment bill voucher image to obtain a file corresponding to the payment bill voucher image.
3. The method for extracting payment bill voucher image data according to claim 1, characterized in that: The data extraction of the file corresponding to the payment bill voucher image to obtain key information of the payment bill voucher image specifically includes: Preprocessing the file corresponding to the payment bill voucher image to obtain a preprocessed file; the preprocessing includes deleting redundant symbols in the file; the symbols include spaces and line breaks; Performing feature extraction on the preprocessed file to obtain a bank key field; the bank key field includes a bank name; Determining a parsing method for the preprocessed file based on the bank key field, and parsing the preprocessed file based on the parsing method to obtain a parsed file; Data is extracted from the parsed file to obtain key information of the payment bill voucher image.
4. The method for extracting payment bill voucher image data according to claim 3, characterized in that: The preprocessing of the file corresponding to the payment bill voucher image to obtain the preprocessed file specifically includes: The spire.PDF toolkit is used to preprocess the file corresponding to the payment bill voucher image to obtain a preprocessed file.
5. A payment bill voucher image data extraction device, characterized in that: The payment bill voucher picture data extraction device comprises: An acquisition unit, used to acquire a payment bill voucher image; A conversion unit, used to convert the file format of the payment bill voucher image to obtain a file corresponding to the payment bill voucher image; The extraction unit is used to extract data from the file corresponding to the payment bill voucher image to obtain key information of the payment bill voucher image; the key information includes the payment account number, the collection account number and the transaction date.
6. The device for extracting payment bill voucher image data according to claim 5, characterized in that: The conversion unit is specifically used for: Optical character recognition technology is used to convert the file format of the payment bill voucher image to obtain a file corresponding to the payment bill voucher image.
7. The device for extracting payment bill voucher image data according to claim 5, characterized in that: The extraction unit specifically comprises: A preprocessing module, used to preprocess the file corresponding to the payment bill voucher image to obtain a preprocessed file; the preprocessing includes deleting redundant symbols in the file; the symbols include spaces and line breaks; A key field extraction module is used to extract features from the preprocessed file to obtain a bank key field; the bank key field includes a bank name; A parsing module, used for determining a parsing method of the preprocessed file based on the bank key field, and parsing the preprocessed file based on the parsing method to obtain a parsed file; The key information determination module is used to extract data from the parsed file to obtain the key information of the payment bill voucher image.
8. The device for extracting payment bill voucher image data according to claim 7, characterized in that: The preprocessing module is specifically used for: The spire.PDF toolkit is used to preprocess the file corresponding to the payment bill voucher image to obtain a preprocessed file.
9. A computer device comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the payment note voucher image data extraction method according to any one of claims 1 to 4.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for extracting payment bill voucher image data described in any one of claims 1 to 4 is implemented.