Invoice classification boxing method and system, electronic equipment and medium

By decoding the invoice QR code information and querying the target invoice in the database, the problem that the existing system cannot effectively distinguish between digital invoice invoices and ordinary invoices is solved, and more efficient invoice classification and boxing is achieved, and management efficiency is improved.

CN119443131APending Publication Date: 2025-02-14北京合思信息技术有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411585096.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-07
Publication Date
2025-02-14

AI Technical Summary

Technical Problem

The existing invoice management system cannot effectively distinguish between digital invoice invoices and ordinary invoices when processing digital invoices, resulting in the impact of the accuracy of data retrieval and classification.

Method used

By obtaining the QR code image of the invoice, decoding and obtaining the QR code information, obtaining the invoice code, invoice number and invoice type based on the QR code information, query the corresponding target invoice in the preset database, and classifying and packing according to the invoice type box.

Benefits of technology

It improves the accuracy of invoice classification and boxing, ensures the accuracy and consistency of invoice information, reduces the time and cost of manual operations, and improves the efficiency of invoice management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119443131A_ABST
    Figure CN119443131A_ABST
Patent Text Reader

Abstract

The invention provides an invoice classification boxing method and system, electronic equipment and a medium, and the method comprises the steps: obtaining a two-dimensional code image of an invoice to be boxed, and decoding the two-dimensional code image to obtain two-dimensional code information; obtaining an invoice code, an invoice number and an invoice type of the to-be-boxed invoice based on the two-dimensional code information; querying a target invoice consistent with the invoice code and / or the invoice number of the to-be-boxed invoice in a preset database; and if the target invoice is queried, classifying the to-be-boxed invoices according to the invoice types of the to-be-boxed invoices, and loading the to-be-boxed invoices into corresponding first invoice boxes according to a classification result. The invoice classification boxing accuracy and the invoice management efficiency are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of invoice management, and in particular to a method, system, electronic equipment and medium for classifying and packaging invoices. Background Art

[0002] In the modern business environment, invoice management is an important part of corporate financial management. With the expansion of corporate scale and the increase in business volume, the traditional manual invoice management method can no longer meet the needs of efficient and accurate management. Especially in large enterprises or cross-regional enterprises, the number of invoices is huge and the types are diverse. How to quickly and accurately classify and box invoices has become an urgent problem to be solved.

[0003] At present, there are some QR code-based invoice management systems on the market. These systems mainly obtain invoice information by scanning the QR code on the invoice and perform corresponding data processing. However, the existing systems have certain limitations when processing digital invoices and cannot effectively distinguish between digital invoices and ordinary invoices, which affects the accuracy of data retrieval and classification. Summary of the invention

[0004] In view of this, an object of the present invention is to provide a method, system, electronic device and medium for classifying and packing invoices, so as to improve the accuracy of classifying and packing invoices and the efficiency of invoice management.

[0005] In order to achieve the above object, the technical solution adopted by the present invention is as follows:

[0006] In a first aspect, the present invention provides a method for classifying and packing invoices, comprising: obtaining a QR code image of an invoice to be packed, and decoding the QR code image to obtain QR code information; obtaining the invoice code, invoice number and invoice type of the invoice to be packed based on the QR code information; searching a preset database for a target invoice that has the same invoice code and / or invoice number as the invoice to be packed; if the target invoice is found, classifying the invoice to be packed according to the invoice type of the invoice to be packed, and packing the invoice to be packed into the corresponding first invoice box according to the classification result.

[0007] Optionally, the invoice code, invoice number and invoice type of the invoice to be packed are obtained based on the QR code information, including: format parsing the QR code information to convert the QR code information into text information; based on the text information, extracting the invoice code and invoice number of the invoice to be packed by regular expression or fixed position extraction method; comparing the format of the text information with a preset invoice format template to determine the invoice type of the invoice to be packed; wherein the invoice type includes at least: digital invoice and ordinary invoice.

[0008] Optionally, a preset database is searched for a target invoice that has the same invoice code and / or invoice number as the invoice to be packed, including: constructing a query condition based on the invoice code and / or invoice number of the invoice to be packed; and searching the preset database for a target invoice that has the same invoice code and / or invoice number as the invoice to be packed using a combination of a B+ tree index and a hash index based on the query condition.

[0009] Optionally, if the target invoice is queried, the invoices to be packed are classified according to their invoice types, and the invoices to be packed are placed into a corresponding first invoice box according to the classification results, including: comparing the invoice information of the target invoice with the invoice information of the invoice to be packed; wherein the invoice information includes at least: invoice code, invoice number, amount, date; if the comparison is consistent, the invoices to be packed are classified according to their invoice types, and the invoices to be packed are placed into a corresponding first invoice box according to the classification results; wherein the first invoice box includes: a digital invoice box and an ordinary invoice box; if the comparison is inconsistent, a re-packing prompt is triggered to prompt the operator to manually intervene.

[0010] Optionally, the invoices to be boxed are loaded into a corresponding first invoice box according to the classification result, including: sending a classification instruction to an automated boxing device according to the classification result, so that the automated boxing device loads the invoices to be boxed into the corresponding first invoice box according to the classification instruction; after the boxing is completed, a boxing record is generated; wherein the boxing record includes at least: boxing time, box number, and operator.

[0011] Optionally, the method also includes: determining the invoice status of the invoice to be packed according to the query result of whether the target invoice is found; wherein, if the target invoice is not found, the invoice status is a newly added invoice; if the target invoice is found, the invoice status is an entered invoice; classifying the invoices to be packed according to their invoice status and invoice type, and packing the invoices to be packed into the corresponding second invoice box according to the classification result; wherein the second invoice box includes: a newly added digital invoice box, an entered digital invoice box, a newly added ordinary invoice box and an entered ordinary invoice box.

[0012] Optionally, the method also includes: real-time monitoring of the status of data retrieval and box loading operations through a preset exception detection mechanism; wherein the exception detection mechanism includes: data integrity check, operation timeout detection, and equipment status monitoring; when an exception is detected, triggering an exception handling mechanism to prompt the operator to perform manual intervention.

[0013] In a second aspect, the present invention provides a system for classifying and packing invoices, comprising: an invoice scanning module, used to obtain a QR code image of the invoice to be packed, and decode the QR code image to obtain QR code information; a data parsing and extraction module, used to obtain the invoice code, invoice number and invoice type of the invoice to be packed based on the QR code information; a data retrieval module, used to query a preset database for a target invoice that is consistent with the invoice code and / or invoice number of the invoice to be packed; a classification and packing module, used to classify the invoices to be packed according to the invoice type of the invoice to be packed if the target invoice is found, and pack the invoice to be packed into the corresponding first invoice box according to the classification result.

[0014] In a third aspect, the present invention provides an electronic device comprising a processor and a memory, wherein the memory stores computer-executable instructions that can be executed by the processor, and the processor executes the computer-executable instructions to implement the steps of any one of the methods provided in the first aspect above.

[0015] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of any one of the methods provided in the first aspect are executed.

[0016] The present invention brings the following beneficial effects:

[0017] The method, system, electronic device and medium for classifying and packing invoices provided by the present invention first obtain the two-dimensional code image of the invoice to be packed, and decode the two-dimensional code image to obtain the two-dimensional code information; then obtain the invoice code, invoice number and invoice type of the invoice to be packed based on the two-dimensional code information; then query the target invoice that is consistent with the invoice code and / or invoice number of the invoice to be packed in the preset database; if the target invoice is found, the invoice to be packed is classified according to the invoice type of the invoice to be packed, and the invoice to be packed is packed into the corresponding first invoice box according to the classification result. The above method can extract the key invoice code and invoice number from the two-dimensional code information, and identify the invoice type, and then retrieve and compare the extracted invoice code and invoice number through the preset database, so as to ensure the accuracy and consistency of the invoice information; then the invoice to be packed is automatically classified and packed according to the invoice type, which improves the accuracy of invoice classification and packing; at the same time, through the automatic classification and packing, the time and cost of manual operation are reduced, and the efficiency of invoice management is improved.

[0018] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention are realized and obtained by the structures particularly pointed out in the description, claims and drawings.

[0019] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the preferred embodiments are specifically mentioned below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0021] Figure 1 A flow chart of a method for classifying and packing invoices provided in an embodiment of the present invention;

[0022] Figure 2 A flow chart of another method for classifying and packing invoices provided by an embodiment of the present invention;

[0023] Figure 3 A schematic diagram of the structure of a system for classifying and packing invoices provided by an embodiment of the present invention;

[0024] Figure 4 A schematic structural diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0025] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0026] At present, there are some QR code-based invoice management systems on the market. These systems mainly obtain invoice information by scanning the QR code on the invoice and perform corresponding data processing. However, the existing systems have certain limitations when processing digital invoices, and cannot effectively distinguish between digital invoices and ordinary invoices, resulting in the accuracy of data retrieval and classification being affected. In addition, the existing systems also have deficiencies in exception handling and user feedback, and cannot promptly and effectively handle abnormal situations such as no data.

[0027] Based on this, the embodiments of the present invention provide a method, system, electronic device and medium for classifying and packing invoices, which can improve the accuracy of classifying and packing invoices and the efficiency of invoice management.

[0028] To facilitate understanding of this embodiment, a method for classifying and packing invoices disclosed in an embodiment of the present invention is first introduced in detail. The method can be executed by an electronic device, such as a smart phone, a computer, a tablet computer, etc. Figure 1 The flowchart of a method for classifying and packing invoices is shown, indicating that the method mainly includes the following steps S101 to S104:

[0029] Step S101: Acquire the QR code image of the invoice to be boxed, and decode the QR code image to obtain QR code information.

[0030] In one embodiment, the QR code in the upper left corner of the invoice can be scanned by a high-precision QR code scanning device to obtain the QR code image of the invoice to be boxed. The high-precision QR code scanning device has a high-resolution optical system and fast data processing capabilities, thereby ensuring that a high-quality QR code image is obtained. In an embodiment of the present invention, the high-precision QR code scanning device may include a high-resolution camera, a light source (such as an LED light) and an image processing unit. The camera is responsible for capturing the QR code image on the invoice, the light source ensures clear imaging under different lighting conditions, and the image processing unit is responsible for preprocessing (such as noise removal and contrast adjustment, etc.) and decoding the captured QR code image.

[0031] Specifically, a two-dimensional code decoding algorithm (such as a QR code decoding algorithm) can be used to decode the two-dimensional code image to extract the information therein. The QR code decoding algorithm mainly includes the following steps:

[0032] (1) Positioning and identification:

[0033] Positioning pattern recognition: The decoder first recognizes the positioning patterns in the QR code, which help the decoder determine the direction and position of the QR code. The positioning pattern includes three large positioning patterns and one small positioning pattern, which are used to mark the size and direction of the QR code rectangle.

[0034] Second-order differential edge detection: Perform second-order differential and first-order differential on the image after motion averaging, determine the edge points through edge judgment rules, and perform edge processing.

[0035] Generate finder pattern clustering: Classify the horizontal qr_finder_line and vertical qr_finder_line, and determine the specific symbol coordinates of the QR code through quick sorting and clustering processing.

[0036] (2) Format information decoding: The format information of the QR code includes version number, error correction level, encoding mode, etc. The decoder needs to parse this information to determine the data format and decoding method.

[0037] (3) Data matrix decoding: Perform pattern recognition on the data matrix of the QR code to determine the position and color of each module, and then perform masking to improve error correction capabilities and security.

[0038] (4) Error correction code calculation: Error correction codes are added during the encoding process of the QR code. The decoder needs to calculate these error correction codes and use them to correct possible errors.

[0039] (5) Data decoding: Finally, the decoder decodes the data according to the format information and error correction code of the QR code and restores the original information.

[0040] Furthermore, the decoded QR code information may be uploaded to a background system, and the system may store the QR code information in a temporary cache, waiting for further processing.

[0041] In order to improve processing efficiency, the embodiments of the present invention also support the simultaneous processing of multiple invoices, that is, by configuring multiple scanning devices or adopting high-speed scanning mode, a large number of invoices can be processed in a short time. Each scanning device works independently without interfering with each other, thereby ensuring the stability and reliability of the system. At the same time, considering the problems that may exist in actual application scenarios, such as changes in lighting and differences in paper quality, the implementation of the present invention also has a certain degree of environmental adaptability. Through technologies such as automatic exposure adjustment and white balance correction, stable scanning performance can be maintained in different environments. In addition, manual parameter adjustment is also supported to deal with extreme situations.

[0042] Step S102: Obtain the invoice code, invoice number and invoice type of the invoice to be boxed based on the QR code information.

[0043] In one embodiment, the received QR code information may be format parsed. The QR code information is usually encoded in a specific format (such as UTF-8 or Base64), and the invoice code, invoice number and invoice type of the invoice to be boxed are obtained by parsing the encoding format of the QR code information.

[0044] Step S103: Searching a preset database for a target invoice that has the same invoice code and / or invoice number as the invoice to be boxed.

[0045] In one embodiment, a relational database (i.e., a preset database, such as MySQL or PostgreSQL) is used to store all the entered invoice information. The database design follows the third normal form (3NF) to ensure efficient storage and fast retrieval of data. The database table structure includes fields such as invoice code, invoice number, amount, date, etc., and each field has a corresponding index to improve retrieval efficiency.

[0046] Based on this, in an embodiment of the present invention, after obtaining the invoice code and invoice number of the invoice to be packed, a search can be performed in a preset database based on the invoice code and / or invoice number of the invoice to be packed to query whether there is a target invoice in the database with the same invoice code and / or invoice number as the invoice to be packed.

[0047] Step S104: if the target invoice is found, the invoices to be boxed are classified according to their invoice types, and the invoices to be boxed are packed into the corresponding first invoice box according to the classification result.

[0048] In one embodiment, if the target invoice is found in the database, the invoices to be boxed are classified according to the invoice type and packed into the corresponding first invoice box, wherein digital invoices are packed into the corresponding digital invoice box and ordinary invoices are packed into the corresponding ordinary invoice box.

[0049] The above-mentioned invoice classification and packing method provided by the present invention can extract key invoice codes and invoice numbers from the two-dimensional code information, and identify the invoice type, and then retrieve and compare the extracted invoice code and invoice number through a preset database, so as to ensure the accuracy and consistency of the invoice information; then, the invoices to be packed are automatically classified and packed according to the invoice type, thereby improving the accuracy of invoice classification and packing; at the same time, through automated classification and packing, the time and cost of manual operation are reduced, and the efficiency of invoice management is improved.

[0050] In one embodiment, the aforementioned step S102, i.e., obtaining the invoice code, invoice number and invoice type of the invoice to be packed based on the QR code information, can be implemented in the following ways including but not limited to:

[0051] First, the format of the QR code information is parsed and converted into text information.

[0052] In the specific implementation, the received QR code information is format parsed, and the original binary data is converted into readable text information by parsing the encoding format. During the parsing process, the integrity and consistency of the data will be checked to ensure that no data is lost or damaged.

[0053] Then, based on the text information, the invoice code and invoice number of the invoice to be boxed are extracted by regular expression or fixed position extraction method.

[0054] In specific implementation, after the format parsing is completed, the key invoice code and invoice number can be extracted according to the preset rules. Among them, the invoice code and invoice number are usually located at the beginning or end of the QR code information. In the embodiment of the present invention, the invoice code and invoice number can be quickly located and extracted by regular expression or fixed position extraction method. In the process of information extraction, irrelevant characters and redundant information can be removed by data cleaning.

[0055] Finally, the text information is compared with the preset invoice format template to determine the invoice type of the invoice to be boxed; wherein the invoice type includes at least: digital invoice and ordinary invoice.

[0056] In specific implementation, the type of invoice can be automatically identified based on the format of the QR code. The QR code format of digital invoices is different from that of ordinary invoices. By comparing the preset invoice format template, the invoice type can be automatically determined. For digital invoices, only the invoice number is used for subsequent operations, while for ordinary invoices, both the invoice code and the invoice number are used.

[0057] Furthermore, the extracted key information (invoice code, invoice number and invoice type) can be stored in a database for subsequent retrieval and verification. The database uses a relational database (such as MySQL or PostgreSQL) to ensure efficient storage and fast retrieval of data. At the same time, it also supports data backup and recovery to ensure data security and reliability.

[0058] In one embodiment, the aforementioned step S103, i.e., searching the preset database for a target invoice that has the same invoice code and / or invoice number as the invoice to be boxed, can be implemented in the following ways including but not limited to:

[0059] First, construct a query based on the invoice code and / or invoice number of the invoice to be boxed.

[0060] Then, according to the query conditions, a target invoice that is consistent with the invoice code and / or invoice number of the invoice to be boxed is searched in a preset database by combining B+ tree index and hash index.

[0061] In specific implementation, the database can be searched through SQL query statements. During the search process, query conditions are constructed based on the extracted invoice code and / or invoice number to quickly locate the target invoice. In the embodiment of the present invention, the search algorithm can use a combination of B+ tree index and hash index to ensure that the target record is quickly found in a large amount of data.

[0062] Specifically, hash index is used for invoice code, which is usually of fixed length and suitable as the key of hash index. Hash index can quickly locate the record set corresponding to the invoice code. B+ tree index is used for invoice number, which may be a range or sequence-related value, suitable for range query and sorting using B+ tree index. Create a hash index on the invoice code field and a B+ tree index on the invoice number field, and query the target invoice using two conditions (invoice code and invoice number) through SQL statements.

[0063] In order to improve the retrieval efficiency, a cache mechanism can be used in the embodiment of the present invention to store frequently retrieved data in the memory. The cache mechanism adopts the LRU (Least Recently Used) algorithm to ensure the timeliness and hit rate of the cached data. In addition, it also supports database sharding and read-write separation to further improve the performance and scalability of the system.

[0064] Furthermore, during the data retrieval and verification process, log information of all operations can be recorded to facilitate subsequent auditing and troubleshooting. Log information includes retrieval conditions, retrieval results, comparison results, etc., to ensure the traceability of operations. At the same time, logs can also be backed up and cleaned up regularly to ensure the security and manageability of log data.

[0065] In one embodiment, for the aforementioned step S104, that is, if the target invoice is found, the invoices to be packed are classified according to their invoice types, and the invoices to be packed are placed into the corresponding first invoice box according to the classification results. The following methods may be used, including but not limited to: comparing the invoice information of the target invoice with the invoice information of the invoice to be packed; wherein the invoice information includes at least: invoice code, invoice number, amount, date; if the comparison is consistent, the invoices to be packed are classified according to their invoice types, and the invoices to be packed are placed into the corresponding first invoice box according to the classification results; wherein the first invoice box includes: a digital invoice box and an ordinary invoice box; if the comparison is inconsistent, a re-packing prompt is triggered to prompt the operator to perform manual intervention.

[0066] In specific implementation, after the target invoice is retrieved, the invoice information of the target invoice can be compared with the invoice information of the current invoice to be boxed. During the comparison process, key fields such as invoice code, invoice number, amount, date, etc. can be checked one by one to ensure their consistency. If the comparison is consistent, the invoice to be boxed is classified according to the invoice type of the invoice to be boxed, and the invoice to be boxed is placed in the corresponding first invoice box according to the classification result; if inconsistency is found, a re-boxing prompt will be triggered, and the operator will be prompted to manually intervene through the user interface.

[0067] In one embodiment, when the invoices to be boxed are packed into the corresponding first invoice box according to the classification result, the following methods may be adopted, including but not limited to:

[0068] First, a classification instruction is sent to the automatic boxing device according to the classification result, so that the automatic boxing device packs the invoices to be boxed into the corresponding first invoice box according to the classification instruction.

[0069] In specific implementation, classification rules can be set according to the invoice type. For example, digital invoices and ordinary invoices are put into different boxes, and the classification rules are stored through configuration files or database tables to facilitate subsequent modification and expansion.

[0070] In the embodiment of the present invention, an automated boxing device (such as a robotic arm or a conveyor belt) can be used to perform the classification boxing operation. The automated boxing device receives the classification instruction through the communication interface with the central processing unit, and packs the invoice into the corresponding first invoice box according to the classification instruction. The boxing device in this embodiment has high-precision positioning and grasping capabilities, so as to ensure the accurate boxing of the invoice.

[0071] Then, after the boxing is completed, a boxing record is generated; wherein the boxing record at least includes: boxing time, box number, and operator.

[0072] In specific implementation, after the boxing operation is completed, a corresponding boxing record can be generated to record the boxing time, box number, operator and other information of the invoice. The boxing record is stored in the database for subsequent audit and query; at the same time, the boxing record can also be exported and printed to meet the needs of different scenarios.

[0073] In the embodiment of the present invention, an intuitive and easy-to-understand user interface can be provided for operators. During the boxing process, operators can monitor the progress and status of the boxing operation through the interface. The interface displays the invoice information, box status, abnormal prompts, etc. of the current boxing, ensuring that operators can understand the system operation status in a timely manner. The operation process design is concise and clear, reducing the training cost and operation difficulty of operators.

[0074] In order to further improve the accuracy of invoice classification and packaging, in the embodiment of the present invention, classification and packaging can also be performed according to invoice status and invoice type. Based on this, the above method also includes:

[0075] First, the invoice status of the invoice to be boxed is determined based on the query result of whether the target invoice is found.

[0076] In specific implementation, when performing data retrieval, the invoice status of the invoice to be boxed can be determined based on whether the target invoice is found. If the target invoice is not found, the invoice status is a newly added invoice; if the target invoice is found, the invoice status is an entered invoice.

[0077] Then, the invoices to be boxed are classified according to their invoice status and invoice type, and the invoices to be boxed are packed into the corresponding second invoice box according to the classification result.

[0078] In specific implementation, classification rules can be set according to invoice type and invoice status. For example, digital invoices and ordinary invoices are put into different boxes, and newly added invoices and recorded invoices are also put into different boxes. Based on this, the second invoice box includes: a newly added digital invoice box, an recorded digital invoice box, a newly added ordinary invoice box, and an recorded ordinary invoice box.

[0079] Specifically, if the invoice status of the invoice to be packed is a newly added invoice, the invoice to be packed will be loaded into the newly added electronic invoice box or the newly added ordinary invoice box according to the invoice type of the invoice to be packed; if the invoice status of the invoice to be packed is an entered invoice, the invoice information of the target invoice will be compared with the invoice information of the invoice to be packed, and when the comparison is consistent, the invoice to be packed will be loaded into the entered electronic invoice box or the entered ordinary invoice box according to the invoice type of the invoice to be packed.

[0080] In order to prompt the operator to perform manual intervention in time and ensure the continuity and reliability of invoice management, the above method provided by the embodiment of the present invention also includes: real-time monitoring of the status of data retrieval and boxing operations through a preset anomaly detection mechanism; wherein the anomaly detection mechanism includes: data integrity check, operation timeout detection, and equipment status monitoring; when an anomaly is detected, the anomaly handling mechanism is triggered to prompt the operator to perform manual intervention.

[0081] In specific implementation, the data integrity check is to check the integrity and consistency of the parsed data when parsing the encoding format of the QR code and extracting key information to ensure that no data is lost or damaged; if an abnormal situation is encountered during the parsing or extraction process (such as incorrect data format or missing key information), the exception handling mechanism will be triggered, the abnormal information will be recorded, and the operator will be prompted to manually intervene through the user interface.

[0082] Operation timeout detection and device status monitoring detect the device operation time and device status during the box loading operation. If an abnormal situation is found (such as the box is full or the device is faulty), the abnormal handling mechanism will be triggered and the operator will be prompted to intervene manually through the user interface. The operator can take corresponding measures according to the prompt information, such as replacing the box or repairing the device.

[0083] After an abnormal situation is detected, the abnormal information can be recorded and a corresponding log can be generated. The abnormal information includes the abnormal type, occurrence time, related invoice information, etc., to ensure the traceability of the abnormal situation. The log information is stored in the database for subsequent auditing and troubleshooting.

[0084] In this embodiment, the user interface prompts the operator to perform manual intervention. The interface displays abnormal prompt information, operation suggestions, relevant invoice information, etc., to ensure that the operator can quickly understand the abnormal situation and take corresponding measures. The interface design is concise and clear, reducing the cognitive burden of the operator.

[0085] Operators can perform manual intervention according to the interface prompts. The manual intervention process includes rescanning invoices, manually entering invoice information, changing boxes, etc. The system can provide detailed operation guides and help documents to ensure that operators can successfully complete manual intervention.

[0086] After the operator completes the manual intervention, the normal operation process can be automatically restored and the intervention results can be recorded. At the same time, it also supports a feedback mechanism for abnormal situations. Operators can submit feedback information through the interface to help the system improve and optimize the abnormal handling mechanism.

[0087] The above method provided by the embodiment of the present invention realizes the automatic identification and classification of digital electronic invoices and ordinary invoices by introducing high-precision two-dimensional code scanning technology and intelligent data analysis algorithm. At the same time, the present invention can ensure that the operator can be prompted to perform manual intervention in a timely manner in abnormal situations such as no data, thereby improving the accuracy and efficiency of invoice management through a perfect exception handling mechanism and user feedback system.

[0088] For ease of understanding, the present invention also provides an automatic invoice classification and packaging method, which is applied to an automatic invoice classification and packaging system, see Figure 2 As shown, it mainly includes:

[0089] (1) Scan the invoice QR code

[0090] Invoice QR code scanning is the starting point of the entire automation system. Its core lies in the rapid and accurate recognition of the QR code on the invoice through high-precision QR code scanning equipment. Specifically, the QR code on the upper left corner of the invoice is scanned by a high-precision QR code scanning device. The QR code contains key information such as the invoice code, invoice number, amount, date, etc. The scanning device transmits the acquired QR code information to the background for further processing.

[0091] (2) Data analysis and extraction

[0092] Data parsing and extraction is one of the core steps of the system. Its purpose is to extract the key invoice code and invoice number from the QR code information and automatically identify the invoice type according to the format of the QR code. Specifically. Parse the received QR code information and extract the invoice code and invoice number. According to the format of the QR code, the system can automatically identify the invoice type, such as digital invoice and ordinary invoice. For digital invoice, the system only uses the invoice number for subsequent operations.

[0093] (3) Data retrieval and verification

[0094] Data retrieval and verification is a key step for the system to ensure the accuracy and consistency of invoice information. Its purpose is to retrieve and compare the extracted invoice information through the preset database. Specifically, after extracting the invoice code and invoice number, data retrieval is performed through the preset database. The database stores all the entered invoice information, and the retrieved data is compared with the current invoice information to verify its accuracy and consistency. If the retrieval result does not match the current invoice information, a repacking prompt will be triggered.

[0095] (4) Classification and boxing operation

[0096] The ultimate goal of the system is to automatically classify and box invoices according to their type and status to ensure the integrity and traceability of invoices. Specifically, after data verification, the invoices are classified and boxed according to their type and status. For newly added invoices, they will be packed into specific boxes to ensure the integrity and traceability of the invoices. At the same time, corresponding boxing records will be generated to facilitate subsequent audits and inquiries.

[0097] (5) Exception handling and feedback

[0098] Exception handling and feedback are important links to ensure the stable operation of the system. Its purpose is to prompt operators to manually intervene in time when there are abnormal situations such as no data, so as to ensure the continuity and reliability of invoice management. Specifically, during the data retrieval process, if no data is found, the exception handling mechanism will be triggered immediately. The system will record the abnormal situation and prompt the operator to intervene manually through the user interface. The operator can take corresponding measures according to the prompt information, such as rescanning or manually entering the invoice information.

[0099] The above method provided by the embodiment of the present invention has the following beneficial effects:

[0100] (1) Improved efficiency of invoice management: Through automated scanning and classification, the time and cost of manual operations are reduced, thus improving the overall efficiency of invoice management.

[0101] (2) Improved the accuracy of invoice management: Through intelligent data analysis and verification, the accuracy and consistency of invoice information are ensured, avoiding human errors.

[0102] (3) Meeting project acceptance requirements: By adding a new method of packaging invoices separately, the integrity and traceability of invoices are ensured, meeting the relevant requirements of project acceptance.

[0103] (4) Improved the exception handling mechanism: In abnormal situations such as no data, the operator can be prompted to perform manual intervention in a timely manner, ensuring the continuity and reliability of invoice management.

[0104] (5) User-friendly operation interface: Through the intuitive and easy-to-understand user interface, operators can quickly get started, reducing training costs and operation difficulties.

[0105] For the method for classifying and packing invoices provided in the above embodiment, the present invention also provides a system for classifying and packing invoices, see Figure 3 The schematic diagram of the structure of a system for sorting and packing invoices is shown, indicating that the system mainly includes the following parts:

[0106] The invoice scanning module 301 is used to obtain the QR code image of the invoice to be boxed, and decode the QR code image to obtain the QR code information;

[0107] The data parsing and extraction module 302 is used to obtain the invoice code, invoice number and invoice type of the invoice to be boxed based on the QR code information;

[0108] A data retrieval module 303 is used to search a preset database for a target invoice that has the same invoice code and / or invoice number as the invoice to be boxed;

[0109] The classification and boxing module 304 is used to classify the invoices to be boxed according to their invoice types if the target invoice is found, and to pack the invoices to be boxed into the corresponding first invoice box according to the classification result.

[0110] The above-mentioned invoice classification and packing system provided by the present invention can extract key invoice codes and invoice numbers from the QR code information, and identify the invoice type, and then retrieve and compare the extracted invoice code and invoice number through a preset database, so as to ensure the accuracy and consistency of the invoice information; then, the invoices to be packed are automatically classified and packed according to the invoice type, thereby improving the accuracy of invoice classification and packing; at the same time, through automated classification and packing, the time and cost of manual operation are reduced, and the efficiency of invoice management is improved.

[0111] In one embodiment, the data parsing and extraction module 302 is specifically used to: perform format parsing on the QR code information and convert the QR code information into text information; based on the text information, extract the invoice code and invoice number of the invoice to be boxed by regular expression or fixed position extraction method; compare the format of the text information with the preset invoice format template to determine the invoice type of the invoice to be boxed; wherein the invoice type includes at least: digital invoice and ordinary invoice.

[0112] In one embodiment, the data retrieval module 303 is specifically used to: construct query conditions based on the invoice code and / or invoice number of the invoice to be boxed; and query the target invoice that is consistent with the invoice code and / or invoice number of the invoice to be boxed in a preset database using a combination of B+ tree index and hash index based on the query conditions.

[0113] In one embodiment, the classification and boxing module 304 is specifically used to: compare the invoice information of the target invoice with the invoice information of the invoice to be boxed; wherein the invoice information at least includes: invoice code, invoice number, amount, date; if the comparison is consistent, the invoice to be boxed is classified according to the invoice type of the invoice to be boxed, and the invoice to be boxed is loaded into the corresponding first invoice box according to the classification result; wherein the first invoice box includes: digital invoice box and ordinary invoice box; if the comparison is inconsistent, a re-boxing prompt is triggered to prompt the operator to manually intervene.

[0114] In one embodiment, the classification and boxing module 304 is specifically used to: send classification instructions to the automatic boxing equipment according to the classification results, so that the automatic boxing equipment puts the invoices to be boxed into the corresponding first invoice box according to the classification instructions; after the boxing is completed, generate a boxing record; wherein the boxing record at least includes: boxing time, box number, and operator.

[0115] In one embodiment, the classification and packing module 304 is also used to: determine the invoice status of the invoice to be packed according to the query result of whether the target invoice is found; if the target invoice is not found, the invoice status is a newly added invoice; if the target invoice is found, the invoice status is an entered invoice; classify the invoices to be packed according to their invoice status and invoice type, and pack the invoices to be packed into the corresponding second invoice box according to the classification results; the second invoice box includes: a newly added digital invoice box, an entered digital invoice box, a newly added ordinary invoice box and an entered ordinary invoice box.

[0116] In one embodiment, the above system also includes: an exception handling and feedback module, which is used to monitor the status of data retrieval and box loading operations in real time through a preset exception detection mechanism; wherein the exception detection mechanism includes: data integrity check, operation timeout detection, and equipment status monitoring; when an abnormality is detected, the exception handling mechanism is triggered to prompt the operator to perform manual intervention.

[0117] It should be noted that the implementation principle and technical effects of the system provided in the embodiment of the present invention are the same as those of the aforementioned method embodiment. For the sake of brief description, for matters not mentioned in the system embodiment, reference may be made to the corresponding contents in the aforementioned method embodiment.

[0118] An embodiment of the present invention further provides an electronic device. Specifically, the electronic device includes a processor and a storage device. The storage device stores a computer program, and when the computer program is executed by the processor, it executes the method described in any one of the above implementation methods.

[0119] Figure 4 A structural diagram of an electronic device provided in an embodiment of the present invention, the electronic device 100 includes: a processor 40, a memory 41, a bus 42 and a communication interface 43, wherein the processor 40, the communication interface 43 and the memory 41 are connected via the bus 42; the processor 40 is used to execute an executable module stored in the memory 41, such as a computer program.

[0120] The memory 41 may include a high-speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk memory. The communication connection between the system network element and at least one other network element is realized through at least one communication interface 43 (which may be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. may be used.

[0121] The bus 42 may be an ISA bus, a PCI bus, or an EISA bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 4 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0122] Among them, the memory 41 is used to store programs, and the processor 40 executes the program after receiving the execution instruction. The method executed by the device for flow process definition disclosed in any embodiment of the above-mentioned embodiment of the present invention can be applied to the processor 40 or implemented by the processor 40.

[0123] The processor 40 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 40. The above processor 40 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present invention can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method disclosed in the embodiments of the present invention can be directly embodied as a hardware decoding processor to execute, or can be executed by a combination of hardware and software modules in the decoding processor. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 41, and the processor 40 reads the information in the memory 41 and completes the steps of the above method in combination with its hardware.

[0124] The computer program product of the readable storage medium provided in the embodiment of the present invention includes a computer-readable storage medium storing program code, and the instructions included in the program code can be used to execute the methods described in the previous method embodiments. The specific implementation can be referred to the previous method embodiments, which will not be repeated here.

[0125] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., which can store program codes.

[0126] Finally, it should be noted that the above-described embodiments are only specific implementations of the present invention, which are used to illustrate the technical solutions of the present invention, rather than to limit them. The protection scope of the present invention is not limited thereto. Although the present invention is described in detail with reference to the above-mentioned embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-mentioned embodiments within the technical scope disclosed by the present invention, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.

Claims

1. A method for classifying and packing invoices, characterized in that: include: Obtaining a QR code image of the invoice to be boxed, and decoding the QR code image to obtain QR code information; Obtaining the invoice code, invoice number and invoice type of the invoice to be boxed based on the QR code information; Searching a preset database for a target invoice that has the same invoice code and / or invoice number as the invoice to be boxed; If the target invoice is found, the invoice to be packed is classified according to its type, and the invoice to be packed is packed into the corresponding first invoice box according to the classification result.

2. The method according to claim 1, characterized in that The invoice code, invoice number and invoice type of the invoice to be boxed are obtained based on the QR code information, including: Performing format analysis on the two-dimensional code information and converting the two-dimensional code information into text information; Based on the text information, extract the invoice code and invoice number of the invoice to be boxed by using a regular expression or a fixed position extraction method; The text information is compared with a preset invoice format template to determine the invoice type of the invoice to be boxed; wherein the invoice type includes at least: digital invoice and ordinary invoice.

3. The method according to claim 1, characterized in that Searching a preset database for a target invoice that has the same invoice code and / or invoice number as the invoice to be boxed includes: Construct query conditions based on the invoice code and / or invoice number of the invoice to be boxed; According to the query conditions, a target invoice that is consistent with the invoice code and / or invoice number of the invoice to be boxed is searched in a preset database by combining B+ tree index and hash index.

4. The method according to claim 1, characterized in that If the target invoice is found, the invoice to be packed is classified according to the invoice type of the invoice to be packed, and the invoice to be packed is packed into the corresponding first invoice box according to the classification result, including: Compare the invoice information of the target invoice with the invoice information of the invoice to be boxed; wherein the invoice information at least includes: invoice code, invoice number, amount, date; If the comparison is consistent, the invoices to be packed are classified according to the invoice type of the invoices to be packed, and the invoices to be packed are packed into the corresponding first invoice box according to the classification result; wherein the first invoice box includes: a digital invoice box and a common invoice box; If the comparison is inconsistent, a repacking prompt is triggered to prompt the operator to intervene manually.

5. The method according to claim 1, characterized in that: The method of packing the invoice to be boxed into a corresponding first invoice box according to the classification result includes: Sending a classification instruction to the automatic boxing device according to the classification result, so that the automatic boxing device packs the invoice to be boxed into the corresponding first invoice box according to the classification instruction; After the boxing is completed, a boxing record is generated; wherein the boxing record at least includes: boxing time, box number, and operator.

6. The method according to claim 1, characterized in that Also includes: The invoice status of the invoice to be boxed is determined according to the query result of whether the target invoice is found; if the target invoice is not found, the invoice status is a newly added invoice; if the target invoice is found, the invoice status is an entered invoice; The invoices to be packed are classified according to their invoice status and invoice type, and the invoices to be packed are packed into corresponding second invoice boxes according to the classification results; wherein the second invoice box includes: a newly added digital invoice box, an entered digital invoice box, a newly added ordinary invoice box and an entered ordinary invoice box.

7. The method according to claim 1, characterized in that Also includes: Real-time monitoring of the status of data retrieval and boxing operations through a preset anomaly detection mechanism; the anomaly detection mechanism includes: data integrity check, operation timeout detection, and device status monitoring; When an anomaly is detected, the exception handling mechanism is triggered to prompt the operator to perform manual intervention.

8. A system for sorting and packing invoices, characterized in that: include: An invoice scanning module is used to obtain a QR code image of the invoice to be boxed and decode the QR code image to obtain QR code information; A data parsing and extraction module, used for obtaining the invoice code, invoice number and invoice type of the invoice to be boxed based on the QR code information; A data retrieval module, used to search a preset database for a target invoice that has the same invoice code and / or invoice number as the invoice to be boxed; The classification and boxing module is used to classify the invoices to be boxed according to their invoice types if the target invoice is found, and to pack the invoices to be boxed into the corresponding first invoice box according to the classification result.

9. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores computer executable instructions that can be executed by the processor, and the processor executes the computer executable instructions to implement the steps of the method according to any one of claims 1 to 7.

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 steps of the method according to any one of claims 1 to 7 are performed.