Intelligent Tax Data Collection Method and Device
Through intelligent scanning and classification processing of tax vouchers, building page model elements, and realizing automatic binding of tax vouchers, solving the problem of low efficiency of traditional manual processing and improving the efficiency of tax vouchers processing and search efficiency.
Patent Information
- Application Number
- CN202510467130.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-15
- Publication Date
- 2025-07-25
- Estimated Expiration
- 2045-04-15
AI Technical Summary
Traditional tax voucher processing methods rely on manual processing, resulting in low work efficiency and it is difficult to cope with the need for rapid processing of a large number of vouchers.
The intelligent scanning module obtains voucher data, builds page model elements, uses the crawling module to classify tax vouchers into the instant or delayed binding area, and adjusts the placement position through the position detection module, determines the slot position based on the binding area information, and realizes automated processing.
It improves the efficiency of tax voucher data processing, ensures the standardization and neatness of binding, facilitates and quickly finds tax vouchers, and improves overall work efficiency.
Smart Images

Figure CN120070556B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to image processing technology, and in particular, to an intelligent tax data acquisition method and device. Background Art
[0002] With the increasing number of various vouchers generated in tax work, the traditional tax voucher processing method has been difficult to cope with the increasingly large data processing requirements. The traditional tax voucher processing method mainly relies on manual processing of a large number of tax vouchers. For example, in the traditional tax voucher processing process, staff often need to classify and sort the vouchers according to their contents first, and then bind the tax vouchers. In this process, a large amount of time is often consumed, resulting in low work efficiency when manually processing tax vouchers, and it may be difficult to cope with the rapid processing requirements of a large number of vouchers.
[0003] Therefore, how to achieve automated processing of tax voucher data and improve the efficiency of processing tax voucher data has become an urgent problem to be solved. Summary of the Invention
[0004] The present invention provides an intelligent tax data acquisition method and device, which can achieve automated processing of tax voucher data and improve the efficiency of processing tax voucher data.
[0005] In a first aspect of the present invention, an intelligent tax data acquisition method is provided, including:
[0006] Obtain the voucher data collected by the scanning module for each tax voucher, and construct page model elements corresponding to each tax voucher according to the voucher data;
[0007] According to the voucher data, control the grabbing module to position the tax vouchers that meet the immediate binding condition to the binding area, and control the grabbing module to position the tax vouchers that meet the delayed binding condition to the waiting area;
[0008] Based on the batch completion information in the binding area, control the grabbing module to move the tax vouchers in the waiting area to the binding area, and adjust the placement position of the tax vouchers according to the offset warning information of the position detection module;
[0009] Determine the slot positions of each tax voucher according to the operation completion information in the binding area, adjust the layout of the page model elements based on the slot positions to obtain a tax display model, and bind the tax vouchers and the tax display model.
[0010] Optionally, in a possible implementation manner of the first aspect, obtaining the voucher data collected by the scanning module for each tax voucher, and constructing page model elements corresponding to each tax voucher according to the voucher data, includes:
[0011] Extract the text information corresponding to the tax voucher according to the scanning module, and obtain the voucher data based on the text information;
[0012] Determine the voucher type corresponding to the tax voucher based on the voucher data, and retrieve the preset template corresponding to the voucher type;
[0013] Determine the sub-text corresponding to each preset keyword in the preset template in the voucher data, and fill the sub-text into the preset slot corresponding to the corresponding preset keyword to obtain the page model element corresponding to the corresponding tax voucher.
[0014] Optionally, in a possible implementation manner of the first aspect, controlling the grabbing module according to the voucher data to position the tax vouchers that meet the immediate binding condition to the binding area, and controlling the grabbing module to position the tax vouchers that meet the delayed binding condition to the waiting area includes:
[0015] Receive the binding order information of the target user, and determine that the voucher type of the currently bound voucher is the first target type according to the binding order information;
[0016] If the voucher type of the tax voucher is equal to the first target type, it is determined that the tax voucher meets the immediate binding condition;
[0017] Obtain the current voucher image of the tax voucher, and determine the angle adjustment data of the tax voucher according to the inclination angle of the voucher contour in the current voucher image;
[0018] Control the rotating platform to adjust the angle of the tax voucher based on the angle adjustment data, and control the grabbing module to position the adjusted tax voucher to the binding area;
[0019] If the voucher type of the tax voucher is not equal to the first target type, it is determined that the tax voucher meets the delayed binding condition, and control the grabbing module to position the tax voucher to the waiting area.
[0020] Optionally, in a possible implementation manner of the first aspect, obtaining the current voucher image of the tax voucher, and determining the angle adjustment data of the tax voucher according to the inclination angle of the voucher contour in the current voucher image includes:
[0021] Obtain the contour area of the voucher contour, and retrieve the standard angle template whose area difference from the contour area is less than the difference threshold;
[0022] Calculate the first similarity between the voucher contour and the standard angle template, determine the coarse angle step based on the first similarity, rotate the standard angle template based on the coarse angle step, and determine the reduced angle range according to the second similarity between the rotated standard angle template and the voucher contour;
[0023] Determine a fine angle step based on the value range width of the reduced angle range, rotate the standard angle template based on the fine angle step and the reduced angle range, and determine the inclination angle of the voucher contour according to the third similarity between the rotated standard angle template and the voucher contour;
[0024] Obtain the angle difference between the inclination angle and the standard angle of the standard angle template. When the angle difference is less than a preset constant, determine that the adjustment direction of the tax voucher is the reverse direction;
[0025] When the angle difference is greater than the preset constant, determine that the adjustment direction of the tax voucher is the forward direction, obtain direction adjustment data according to the reverse direction or the forward direction, and determine the angle adjustment data of the tax voucher according to the direction adjustment data and the inclination angle.
[0026] Optionally, in a possible implementation manner of the first aspect, obtaining the current voucher image of the tax voucher and determining the angle adjustment data of the tax voucher according to the inclination angle of the voucher contour in the current voucher image includes:
[0027] Obtain the corner points of the voucher contour, determine the contour edges corresponding to adjacent corner points, and determine the edge types of the contour edges according to the side lengths of the contour edges. The edge types include long edge types and short edge types;
[0028] Determine the inclination angle of the voucher contour according to the angle between the contour edge of the long edge type and the horizontal axis;
[0029] Obtain the angle difference between the inclination angle and the standard angle of the standard angle template. When the angle difference is less than a preset constant, determine that the adjustment direction of the tax voucher is the reverse direction;
[0030] When the angle difference is greater than the preset constant, determine that the adjustment direction of the tax voucher is the forward direction, obtain direction adjustment data according to the reverse direction or the forward direction, and determine the angle adjustment data of the tax voucher according to the direction adjustment data and the inclination angle.
[0031] Optionally, in a possible implementation manner of the first aspect, calculate the first similarity between the voucher contour and the standard angle template, determine a coarse angle step according to the first similarity, rotate the standard angle template based on the coarse angle step, and determine the reduced angle range according to the second similarity between the rotated standard angle template and the voucher contour, including:
[0032] Align the center points of the voucher contour and the standard angle template, and count the number of first pixel points where the voucher contour and the standard angle template coincide;
[0033] Obtain the total number of pixel points corresponding to the standard angle template, and obtain the first similarity according to the ratio of the first number of pixel points to the total number of pixel points;
[0034] Traverse multiple similarity intervals according to the first similarity, and determine that the preset angle step corresponding to the similarity interval where the first similarity is located is the coarse angle step;
[0035] Control the standard angle template to rotate according to the preset rotation direction based on the coarse angle step, and obtain the second similarity between the rotated standard angle template and the voucher contour each time;
[0036] Obtain the rotation angle when the second similarity is greater than or equal to the coarse similarity threshold, and determine the angle interval corresponding to the rotation angle as the reduced angle range.
[0037] Optionally, in a possible implementation manner of the first aspect, determining the inclination angle of the voucher contour by the third similarity between the standard angle template and the voucher contour includes:
[0038] Obtain the step adjustment coefficient based on the ratio of the reduced angle range to the standard angle range, perform weighted processing on the product of the step adjustment coefficient and the standard number of steps to obtain the search number of steps, and obtain the fine angle step according to the ratio of the reduced angle range to the search number of steps;
[0039] Obtain the second similarity corresponding to each interval extreme value of the reduced angle range, and determine that the direction from the interval extreme value with a large value to the interval extreme value with a small value is the traversal direction;
[0040] Control the standard angle template to rotate within the reduced angle range based on the traversal direction and the fine angle step, and obtain the third similarity between the rotated standard angle template and the voucher contour each time;
[0041] Determine that the rotation angle when the third similarity is greater than or equal to the fine similarity threshold and the third similarity is the largest is the inclination angle of the voucher contour.
[0042] Optionally, in a possible implementation manner of the first aspect, controlling the grasping module to move the tax vouchers in the waiting area to the binding area based on the batch completion information of the binding area, and adjusting the placement position of the tax vouchers according to the offset warning information of the position detection module, includes:
[0043] Successively determine the voucher type after the first target type as the second target type according to the batch completion information, and control the grasping module to move the tax vouchers of the second target type in the waiting area to the binding area;
[0044] Receive the detection signal of the position detection module, and when the detection signal is outside the normal signal threshold interval, respond to the offset warning information;
[0045] Obtain the current calibration image collected by the downward shooting module for the binding area, and identify the voucher contour at the uppermost position in the current calibration image as the calibration voucher contour;
[0046] Determine the offset angle and offset position of the calibration voucher contour, determine the position calibration parameters of the corresponding tax voucher according to the offset angle and offset position, and adjust the placement position of the corresponding tax voucher based on the position calibration parameters.
[0047] Optionally, in a possible implementation manner of the first aspect, controlling the grasping module to move the tax vouchers of the second target type in the waiting area to the binding area includes:
[0048] Determine the sub-region where the second target type is located in the waiting area, and control the grasping module to move the tax vouchers in the sub-region to the designated hovering position in the binding area;
[0049] Obtain the acquisition image taken by the upward shooting module for the tax vouchers at the designated hovering position, and extract the current voucher contour in the acquisition image;
[0050] Determine the current tilt angle of the current voucher contour, and determine the current adjustment direction of the tax voucher according to the difference between the current tilt angle and the standard angle;
[0051] Control the grasping module to adjust the angle of the tax voucher based on the current adjustment direction and the current tilt angle, and position the adjusted tax voucher at the binding position in the binding area.
[0052] Optionally, in a possible implementation manner of the first aspect, determining the offset angle and offset position of the calibration voucher contour, determining the position calibration parameters of the corresponding tax voucher according to the offset angle and offset position, and adjusting the placement position of the corresponding tax voucher based on the position calibration parameters includes:
[0053] Obtain the center point of the calibration voucher contour, determine the point-to-point distance between the binding point and the center point. If the point-to-point distance is less than the error threshold, respond to the angle correction information, and determine the tilt angle of the calibration voucher contour as the offset angle according to the angle correction information;
[0054] If the point-to-point distance is greater than or equal to the error threshold, respond to the comprehensive correction information, determine the tilt angle of the calibration voucher contour as the offset angle according to the comprehensive correction information, and determine the center point of the calibration voucher contour as the offset position;
[0055] Determine the angle calibration direction of the corresponding tax voucher according to the difference between the offset angle and the standard angle, and obtain the angle calibration parameter based on the angle calibration direction and the offset angle;
[0056] Determine the direction from the offset position to the binding point as the displacement calibration direction, obtain the distance from the offset position to the binding point as the calibration distance, and obtain the displacement calibration parameter according to the position calibration direction and the calibration distance;
[0057] Obtain the position calibration parameter according to the angle calibration parameter and the displacement calibration parameter, and control the grasping module to adjust the placement position of the corresponding tax voucher based on the position calibration parameter.
[0058] Optionally, in a possible implementation manner of the first aspect, determine the slot positions of each tax voucher according to the operation completion information of the binding area, perform layout adjustment on the page model elements based on the slot positions to obtain a tax display model, and bind the tax voucher and the tax display model, including:
[0059] Obtain the binding time of each tax voucher, and arrange each tax voucher from front to back according to the binding time to obtain a voucher sequence;
[0060] Determine the corresponding slot position according to the arrangement serial number of each tax voucher in the voucher sequence, and stack and arrange each page model element from bottom to top in sequence based on the slot position to obtain a tax display model;
[0061] Construct voucher nodes corresponding to each tax voucher, connect the voucher nodes according to the voucher sequence to obtain a voucher display structure, and bind the tax display model and the voucher display structure.
[0062] Optionally, in a possible implementation manner of the first aspect, construct voucher nodes corresponding to each tax voucher, and connect the voucher nodes according to the voucher sequence to obtain a voucher display structure, including:
[0063] Obtain the association type corresponding to the tax voucher with associated factors, and update the corresponding voucher node according to the preset pixel value corresponding to the association type;
[0064] Connect the updated voucher nodes in sequence according to the voucher sequence to obtain a voucher display structure, and obtain the association strength between adjacent voucher nodes;
[0065] Determine the line segment feature corresponding to the association strength, and update the connection line between the corresponding voucher nodes according to the line segment feature.
[0066] In the second aspect of the present invention, there is provided a tax data intelligent acquisition device, including:
[0067] A construction module, configured to obtain voucher data collected by a scanning module for each tax voucher, and construct page model elements corresponding to each tax voucher according to the voucher data;
[0068] A control module, configured to control a grabbing module to position tax vouchers that meet the immediate binding condition to the binding area according to the voucher data, and control the grabbing module to position tax vouchers that meet the delayed binding condition to the waiting area;
[0069] An adjustment module, configured to control the grabbing module to move the tax vouchers in the waiting area to the binding area based on the batch completion information in the binding area, and adjust the placement position of the tax vouchers according to the offset warning information of the position detection module;
[0070] A binding module, configured to determine the slot positions of each tax voucher according to the operation completion information in the binding area, perform layout adjustment on the page model elements based on the slot positions to obtain a tax display model, and bind the tax vouchers and the tax display model.
[0071] The beneficial effects of the present invention are as follows:
[0072] 1. The present invention can perform data scanning on tax vouchers through an intelligent scanning module, quickly and comprehensively collect voucher data corresponding to tax vouchers, improve the efficiency during tax data collection, and the present invention can construct page model elements for each tax voucher according to the collected voucher data. Through the page model elements, the binding positions corresponding to the tax vouchers during the binding process can be quickly and accurately determined, improving the efficiency when searching for tax vouchers subsequently.
[0073] 2. The present invention can, according to the voucher data collected by the scanning module, control the grabbing module to perform classification processing on tax vouchers for immediate binding or delayed binding, move tax vouchers that meet the immediate binding condition to the binding area, move tax vouchers that meet the delayed binding condition to the waiting area, and reasonably schedule the tax vouchers waiting to be bound in the waiting area based on the binding completion information of the tax vouchers immediately bound in the binding area, realizing the automated processing of tax voucher data and improving the efficiency when binding tax vouchers.
[0074] 3. Before moving the scanned tax vouchers to the binding area, the present invention can obtain the current voucher image of the tax vouchers, determine the angle adjustment data for adjusting the tax vouchers with an angular tilt by analyzing the tilt angle of the voucher contour corresponding to the tax vouchers in the current voucher image, and use a rotating platform to adjust the angle of the tax vouchers, ensuring that each tax voucher can be closely attached and neatly arranged during binding, thereby ensuring the standardization and neatness of the binding work.
[0075] 4. The present invention can be configured with a position detection module in the binding area. Through the position detection module, the placement position of tax vouchers can be detected in real time and accurately throughout the entire binding process. When it is detected that the placement position of the tax vouchers is offset, a warning message can be sent in a timely manner and the grasping module can be controlled to make corresponding adjustments to the tax vouchers, thereby effectively ensuring the standardization and neatness of the binding work and making the arranged tax vouchers after binding regular.
[0076] 5. After the tax vouchers in the binding area are bound, the present invention can determine the slot positions corresponding to each tax voucher according to the operation completion information in the binding area. According to the slot positions corresponding to each tax voucher, corresponding layout adjustments are made to the page model elements corresponding to each tax voucher, and the adjusted page model elements are stacked in sequence to obtain the corresponding tax display model. The target user can quickly locate the specific position of the tax voucher to be searched in the bound volume through the tax display model, improving the efficiency of searching for tax vouchers. BRIEF DESCRIPTION OF THE DRAWINGS
[0077] Figure 1 is a schematic flow chart of a method for intelligent collection of tax data provided by an embodiment of the present invention;
[0078] Figure 2 is a schematic diagram when rotating a standard angle template according to a coarse angle step provided by an embodiment of the present invention;
[0079] Figure 3 is a schematic diagram for determining the adjustment direction of tax vouchers provided by an embodiment of the present invention;
[0080] Figure 4 is a schematic structural diagram of a tax data intelligent collection device provided by an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0081] The technical solutions of the present invention will be described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments.
[0082] Refer to Figure 1 , which is a schematic diagram of a method for intelligent collection of tax data provided by an embodiment of the present invention, Figure 1The execution subject of the method shown can be a software and / or hardware device. The execution subject of this application can include, but is not limited to, at least one of the following: user equipment, network equipment, etc. Among them, the user equipment can include, but is not limited to, computers, smart phones, personal digital assistants (Personal Digital Assistant, abbreviated as: PDA), and the electronic devices mentioned above. The network equipment can include, but is not limited to, a single network server, a server group composed of multiple network servers, or a cloud composed of a large number of computers or network servers based on cloud computing. Among them, cloud computing is a type of distributed computing, which consists of a group of loosely coupled computers to form a super virtual computer. This embodiment does not limit this. It includes steps S1 to S4, specifically as follows:
[0083] S1. Obtain the voucher data collected by the scanning module for each tax voucher, and construct page model elements corresponding to each tax voucher according to the voucher data.
[0084] Among them, the scanning module refers to a module that can be used to collect invoice information. For example, it can be an intelligent scanning device that also has an automatic transmission function. The tax voucher can be an invoice. The voucher data refers to the data obtained by scanning the tax voucher through the scanning module, including the type of tax voucher, the code and number of the tax voucher, etc. The page model element refers to a model containing the voucher data corresponding to each tax voucher. Each tax voucher has its corresponding page model element.
[0085] This solution can perform data scanning on tax vouchers through an intelligent scanning module, which can improve the efficiency during tax data collection. Moreover, this solution can, according to the voucher data collected by the scanning module, control the capture module to perform classification processing of immediate binding or delayed binding of tax vouchers, and reasonably schedule the tax vouchers waiting to be bound based on the binding completion information of the immediately bound tax vouchers, realizing intelligent and refined management of the binding process, improving the flexibility and efficiency of the binding work. During the binding process, this solution can make corresponding adjustments to the placement position of tax vouchers to ensure the accuracy and standardization of tax vouchers during the binding process. Therefore, this solution can achieve automated processing of tax data and generate a model for displaying tax data, facilitating quick search for tax vouchers and improving the overall work efficiency when processing tax data.
[0086] Specifically, each invoice, i.e., tax voucher, can be scanned by a scanning module. The scanning module has a powerful function of collecting invoice information and can keenly capture various key information on the tax voucher, so as to obtain data such as the code and number, type, and invoicing date of the tax voucher, that is, voucher data. According to the collected voucher data, a corresponding page model element can be constructed for each tax voucher. The reason for constructing the page model element is that in the actual work scenario, the number of tax vouchers is often extremely large. After binding a large number of tax vouchers into a book, it will be very difficult to find a specific tax voucher. For example, if 50 tax vouchers are bound in total, when one of them needs to be found, due to the lack of effective positioning means, it may take a lot of time and effort to flip through page by page, and there may even be cases of finding the wrong one or not finding it at all. By constructing a corresponding page model element for each tax voucher, it is equivalent to establishing a dedicated "coordinate" for each tax voucher in the virtual digital world. These page model elements contain the voucher data corresponding to the tax voucher and can be associated with the actual position of the tax voucher during binding. Through the page model element corresponding to the tax voucher, the specific position corresponding to a certain tax voucher during binding can be quickly and accurately determined, thereby improving the search efficiency of tax vouchers.
[0087] In some embodiments, step S1 includes S11 to S13, specifically as follows:
[0088] S11, extract the text information corresponding to the tax voucher according to the scanning module, and obtain the voucher data based on the text information.
[0089] Specifically, by scanning the tax voucher with the scanning module, text information such as the invoice type, invoice code, and number corresponding to the tax voucher can be extracted from the tax voucher. According to the extracted text information, the voucher data corresponding to the tax voucher can be obtained. Among them, the text information refers to the literal information such as the invoice type, invoice code, and number corresponding to the tax voucher extracted from the tax voucher.
[0090] S12, determine the voucher type corresponding to the tax voucher based on the voucher data, and retrieve the preset template corresponding to the voucher type.
[0091] During the process of processing tax vouchers, different business scenarios or transaction types may generate different types of tax vouchers. For example, special VAT invoices, ordinary invoices, receipts, tax control invoices, etc. all belong to different voucher types. According to the voucher data corresponding to the obtained tax voucher, the voucher type corresponding to the tax voucher can be determined. For example, when the voucher data contains the words "special VAT invoice", it can be determined that the voucher type of the currently scanned tax voucher is a special VAT invoice. And different voucher types have corresponding pre-configured templates, that is, preset templates. For example, for a special VAT invoice, the preset template may include columns for seller information, buyer information, goods or taxable services information, etc. The preset template corresponding to the voucher type of the tax voucher can be retrieved, and subsequently, the preset template can be filled accordingly based on the voucher data corresponding to the tax voucher to obtain the page model elements corresponding to the tax voucher. Among them, the voucher type refers to the type of tax voucher, and the preset template refers to the template pre-configured for different types of tax vouchers.
[0092] S13. Determine the sub-texts corresponding to each preset keyword in the preset template in the voucher data, and fill the sub-texts into the preset slots corresponding to the respective preset keywords to obtain the page model elements corresponding to the respective tax vouchers.
[0093] Specifically, a series of preset keywords can be predefined in the preset template. The preset keywords can be used to identify the types of information to be filled, such as keywords like "invoice code", "invoice number", "issuing date", etc. The sub-texts corresponding to the preset keywords can be retrieved from the voucher data. For example, when the preset keyword is "invoice code", a string of numbers that conforms to the invoice code format can be searched in the voucher data and determined as the sub-text corresponding to "invoice code" in the voucher data. After determining the sub-texts corresponding to the preset keywords, the sub-texts corresponding to each preset keyword can be accurately filled into the preset slots corresponding to the respective preset keywords in the preset template. After filling is completed, the page model elements corresponding to the tax voucher can be obtained. The page model elements can present the key information of the tax voucher, which is convenient for subsequent association with the actual binding position of the tax voucher and for quick positioning when the tax voucher needs to be searched.
[0094] Among them, the preset keyword refers to the specific text predefined in the preset template and used to identify the type of information to be filled. The sub-text refers to the specific information text corresponding to the preset keyword in the voucher data. The preset slot refers to the slot pre-configured in the preset template for placing the specific information corresponding to the preset keyword.
[0095] Through the above implementation methods, the efficiency of subsequent searching for tax vouchers can be improved.
[0096] S2. According to the voucher data, control the grabbing module to locate the tax vouchers that meet the immediate binding condition to the binding area, and control the grabbing module to locate the tax vouchers that meet the delayed binding condition to the waiting area.
[0097] Among them, the grabbing module refers to a module that can grab tax vouchers. For example, it can be a suction cup type grabbing device, which can grab tax vouchers by adsorbing the surface of tax vouchers. The immediate binding condition means that the voucher type of the tax voucher is the type currently being bound. The binding area refers to the area where tax vouchers are bound. The delayed binding condition means that the voucher type of the tax voucher is not the type currently being bound. The waiting area refers to the placement area corresponding to the tax vouchers waiting to be bound.
[0098] In practical applications, the binding of tax vouchers is an important and meticulous task. Due to various factors such as work habits and audit requirements of different financial personnel, it is usually expected to bind tax vouchers in a specific order. For example, in the tax audit scenario, when an enterprise is undergoing a tax audit, in order to facilitate auditors to quickly and centrally view the business related to value-added tax special invoices, financial personnel will preferentially choose to bind value-added tax special invoices. However, in actual operation, the collection and scanning of tax vouchers face many challenges. Since tax vouchers come from a wide range of sources, covering various departments within the enterprise, such as purchase invoices obtained by the procurement department and sales invoices issued by the sales department, the time and method of submitting vouchers by different departments and units vary greatly. Some departments may submit them regularly and centrally, while some provide them randomly according to their own business rhythms. This leads to randomness in the scanning order of tax vouchers. For example, in the scanning work of the scanning module, several value-added tax ordinary invoices from the sales department may be scanned first, and then value-added tax special invoices submitted by the procurement department may be scanned, rather than scanning all tax vouchers of a certain voucher type before scanning another type.
[0099] The randomness of the scanning order may cause tax vouchers of the same type to be scattered in different batches, bringing chaos to the binding work. For example, value-added tax special invoices may be mixed with other types of invoices, making it difficult to quickly screen and sort them. This not only increases the time cost of binding but also easily leads to binding errors such as missed binding and misbinding. To solve the contradiction between the random scanning order and the specific binding order, this solution can control the pre-configured grabbing module to perform precise classification processing on tax vouchers according to the scanned voucher data.
[0100] Specifically, each tax voucher captured by the capture module can be analyzed, and based on the voucher data, it can be determined whether it meets the immediate binding condition. If the voucher type of the tax voucher captured by the capture module is the type to be bound currently, it can be considered that the corresponding tax voucher meets the immediate binding condition, and the capture module can be controlled to place the tax vouchers that meet the immediate binding condition in the binding area. If the voucher type of the tax voucher captured by the capture module is not the type to be bound currently, it can be considered that the corresponding tax voucher meets the deferred binding condition, and the capture module can be controlled to place the tax vouchers that meet the deferred binding condition in the waiting area. After the tax vouchers of the voucher type currently being bound in the binding area are bound, the tax vouchers in the waiting area can be bound.
[0101] Based on the above embodiments, the specific implementation manner of step S2 can be:
[0102] S21, receive the binding sequence information of the target user, and determine that the voucher type currently being bound is the first target type according to the binding sequence information.
[0103] In practical applications, in the financial work process of an enterprise, there are various types of tax vouchers, such as common ones like special VAT invoices and ordinary VAT invoices. Different types of tax vouchers have differences in business nature, uses, and management requirements. The target user, such as a financial person, often hopes to bind these tax vouchers in a specific order according to factors such as work habits, audit requirements, or archiving rules. For example, when an enterprise conducts a tax audit, it may need to first centrally view the relevant operations of special VAT invoices, so it will hope to bind special VAT invoices first.
[0104] Specifically, when the target user wants to bind different voucher types in sequence, for example, if the target user wants to first bind the tax vouchers of the voucher type of special VAT invoices and then bind the tax vouchers of other voucher types such as ordinary VAT invoices, then the target user can send the corresponding binding sequence information according to their own needs. After receiving the binding sequence information of the target user, the voucher type currently being bound can be determined as the first target type according to the binding sequence information. For example, when the received binding sequence information of the target user is: special VAT invoice, ordinary VAT invoice, unified invoice for motor vehicle sales, then it can be determined that the first target type to be bound currently is "special VAT invoice", and subsequently, the tax vouchers of the special VAT invoice type can be bound first.
[0105] Among them, the target user can be a financial person, the binding sequence information refers to the information provided by the target user for indicating the binding sequence of tax vouchers, and the first target type refers to the tax voucher type currently being bound determined according to the binding sequence information.
[0106] S22. If the document type of the tax document is equal to the first target type, it is determined that the tax document meets the immediate binding condition.
[0107] Specifically, if the document type of the tax document is equal to the first target type, it may be considered that the corresponding tax document is the document being bound currently, and it can be determined that the corresponding tax document meets the timely binding condition.
[0108] S23. Obtain the current document image of the tax document, and determine the angle adjustment data of the tax document according to the inclination angle of the document contour in the current document image.
[0109] In practical applications, before binding tax documents, it is first necessary to scan them through a scanning module. Since the scanning module can be an intelligent scanning device with a transmission function, the scanned tax documents can be transmitted to a transfer area, which is an area for placing the scanned tax documents. And an acquisition device capable of image acquisition can be configured above the transfer area, such as a camera. The grabbing device can classify the scanned tax documents in the transfer area. Every time a tax document is transmitted to the transfer area, the grabbing device can quickly classify it. When the tax document is transmitted to the transfer area, due to the influence of vibration during the transmission process, when the tax document reaches the transfer area, it may be inclined to a certain extent. If the tax document is directly moved to the binding area without angle adjustment, it may cause the stacked tax documents to be uneven, affecting the stability and aesthetics of the stack, and also being unfavorable for subsequent operations. For example, if the tax documents are stacked obliquely, they may gradually shift during the stacking process, making the whole stack loose, and may directly affect the standardization and neatness of the subsequent binding work. To ensure that the binding work can meet the standard of being regular and tidy, the acquisition device located above the transfer area can be controlled to acquire an image of the tax document in the transfer area to obtain the corresponding current document image of the tax document. The document contour corresponding to the tax document can be extracted from the current document image, that is, the document contour. By analyzing the document contour, the inclination angle of the document contour can be determined. According to the inclination angle of the document contour, the angle adjustment data corresponding to the tax document can be determined. Through the angle adjustment data, the angle of the tax document during binding can be adjusted in advance, so as to ensure that each tax document can be closely attached and neatly arranged when stacked.
[0110] Among them, the current document image refers to the image corresponding to the tax document after scanning. The document contour is the contour corresponding to the tax document in the current document image. The inclination angle is the angle that can be used to describe the inclination degree of the document contour. The angle adjustment data refers to the direction and angle data for adjusting the tax document.
[0111] In some embodiments, the specific implementation of step S23 may be as follows:
[0112] S231. Obtain the contour area of the voucher contour, and retrieve a standard angle template whose area difference from the contour area is less than a difference threshold.
[0113] When determining the angle adjustment data corresponding to a tax voucher, it is first necessary to determine the inclination angle corresponding to the voucher contour in the current voucher image. To ensure that the inclination angle corresponding to the voucher contour can be determined quickly and accurately, the inclination angle corresponding to the voucher contour can be determined by means of hierarchical search for angles. The hierarchical search is mainly divided into a rough search stage and a fine search stage. The main purpose of the rough search stage is to quickly locate the possible correct angle range within a large angle range, reduce the unnecessary search range, and provide a relatively accurate starting range for the subsequent fine search stage, thereby greatly improving the overall search efficiency. When dealing with the angle adjustment problem of tax vouchers, the tax vouchers may have a large range of inclination angles. If a fine full-range search is directly performed, it will consume a large amount of computing resources and time. The rough search stage can quickly exclude most impossible angles and focus on a smaller area that may contain the correct inclination angle. The smaller angle range selected by the rough search stage provides an accurate starting range for the subsequent fine search stage. The fine search stage can perform a more refined search within these smaller ranges, thereby improving the search accuracy. At the same time, since the search range has been greatly reduced, the calculation amount in the fine search stage will also be correspondingly reduced, further improving the overall search efficiency.
[0114] Specifically, the contour area corresponding to the voucher contour can be obtained. A series of standard angle templates with different areas are pre-configured in the database. By comparing the contour area of the voucher contour with the areas of each standard angle template, a standard angle template with an area difference less than the difference threshold is retrieved. Among them, the contour area refers to the area of the voucher contour, and the difference threshold is a pre-set value used to measure the similarity between the retrieved standard angle template and the voucher contour area, ensuring that the selected template has a high degree of matching with the current voucher contour. The standard angle template refers to a pre-configured angle template.
[0115] S232. Calculate the first similarity between the voucher contour and the standard angle template, determine a rough angle step based on the first similarity, rotate the standard angle template based on the rough angle step, and determine a reduced angle range according to the second similarity between the rotated standard angle template and the voucher contour.
[0116] Specifically, the similarity degree between the voucher contour and the standard angle template can be calculated, which is the first similarity degree. The first similarity degree can reflect the initial matching situation between the voucher contour and the standard angle template in terms of angle. According to the magnitude of the first similarity degree, the rough angle step size can be determined. The higher the first similarity degree, the higher the initial matching degree between the voucher contour and the standard angle template, and the relatively smaller the rough angle step size can be. On the contrary, the rough angle step size is larger. The rough angle step size is used to quickly search for possible inclination angles within a large range. Taking the rough angle step size as the interval, the standard angle template is rotated. After each rotation, the similarity degree between the rotated standard angle template and the voucher contour can be calculated, which is the second similarity degree. By comparing the second similarity degrees at different rotation angles, the interval corresponding to the rotation angle with a higher similarity degree can be found, and this interval can be determined as the narrowed angle range, thereby greatly narrowing the range for searching the inclination angle and improving the efficiency and accuracy of subsequent determination of the inclination angle.
[0117] Among them, the first similarity degree refers to the initial similarity degree between the voucher contour and the standard angle template. The rough angle step size refers to the angle interval used when quickly searching for possible inclination angles within a large range. The second similarity degree refers to the similarity degree between the rotated standard angle template and the voucher contour after rotating the standard angle template at intervals of the rough angle step size. The narrowed angle range refers to the range corresponding to the rotation angle with a higher similarity degree determined after comparing the second similarity degrees at different rotation angles.
[0118] Based on the above embodiments, the specific implementation manner of step S232 can be:
[0119] S2321, align the center points of the voucher contour and the standard angle template, and count the number of first pixel points where the voucher contour and the standard angle template coincide.
[0120] Specifically, when calculating the first similarity degree between the voucher contour and the standard angle template, the center point of the voucher contour can be aligned with the center point of the standard angle template. After aligning the two center points, the pixel points on the standard angle template and the pixel points on the voucher contour are traversed respectively. If a pixel point is both on the standard angle template and on the voucher contour, it can be considered that this pixel point is a pixel point where the voucher contour and the standard angle template coincide, and it can be determined as the first pixel point. Thus, the number of first pixel points, that is, the number of first pixel points, can be counted. Among them, the number of first pixel points refers to the number of pixel points where the voucher contour and the standard angle template coincide.
[0121] S2322, obtain the total number of pixel points corresponding to the standard angle template, and obtain the first similarity degree according to the ratio of the number of first pixel points to the total number of pixel points.
[0122] Specifically, the total number of pixel points corresponding to the standard angle template, i.e., the total number of pixel points, can be obtained. By calculating the ratio of the first number of pixel points to the total number of pixel points, the first similarity can be obtained. The total number of pixel points refers to the total number of pixel points corresponding to the standard angle template.
[0123] S2323. Traverse multiple similarity intervals according to the first similarity, and determine that the preset angle step corresponding to the similarity interval where the first similarity is located is the coarse angle step.
[0124] Specifically, when determining the coarse angle step, the pre-configured angle step correspondence table can be retrieved. There are multiple similarity intervals in the angle step correspondence table, and each similarity interval has a corresponding preset angle step. Multiple similarity intervals can be traversed according to the first similarity, and the preset angle step corresponding to the similarity interval where the first similarity is located is determined as the coarse angle step. The similarity interval refers to the pre-configured interval containing multiple similarities, and the preset angle step refers to the angle step corresponding to the similarity interval where the first similarity is located.
[0125] S2324. Control the standard angle template to rotate according to the coarse angle step in the preset rotation direction, and obtain the second similarity between the standard angle template and the voucher contour after each rotation.
[0126] Specifically, with the coarse angle step as the angle interval, rotate the standard angle template in the pre-configured rotation direction, i.e., the preset rotation direction. Refer to Figure 2 which is a schematic diagram of rotating the standard angle template according to the coarse angle step provided by an embodiment of the present invention. As shown in Figure 2 , in the current voucher image, the voucher contour is obviously inclined. When the preset rotation direction is the counterclockwise direction, the standard angle template can be rotated in the counterclockwise direction at an interval of the coarse angle step. After each rotation, the number of pixel points where the voucher contour coincides with the rotated standard angle template can be obtained, and the ratio of it to the total number of pixel points corresponding to the standard angle template can be calculated to obtain the similarity degree between the rotated standard angle template and the voucher contour, i.e., the second similarity. The preset rotation direction refers to the direction for rotating the standard angle template pre-configured.
[0127] S2325. Obtain the rotation angle whose second similarity is greater than or equal to the coarse similarity threshold, and determine the angle interval corresponding to the rotation angle as the reduced angle range.
[0128] Specifically, when the second similarity is greater than or equal to the rough similarity threshold, the corresponding rotation angle can be obtained, and the angle range corresponding to the rotation angle is determined as the narrowed angle range. For example, when the rough angle step is 30° and the preset rotation direction is counterclockwise, after the first rotation of the standard angle template, the angle range corresponding to the rotation angle is 0° - 30°. After the second rotation of the standard angle template, the angle range corresponding to the rotation angle is 30° - 60°. If, after the second rotation of the standard angle template, the corresponding second similarity is greater than or equal to the rough similarity threshold, the angle range corresponding to the rotation angle during the second rotation can be obtained, that is, 30° - 60°, and this angle range can be determined as the narrowed angle range. Among them, the rotation angle refers to the inclination angle corresponding to the standard angle template after the standard angle template is rotated. The rough similarity threshold is a threshold that can be used to determine whether the similarity between the standard angle template and the voucher contour is high enough during the rough retrieval stage to decide whether to further narrow the search range.
[0129] S233. Determine the fine angle step according to the value range width of the narrowed angle range, rotate the standard angle template based on the fine angle step and the narrowed angle range, and determine the inclination angle of the voucher contour according to the third similarity between the rotated standard angle template and the voucher contour.
[0130] Specifically, after obtaining the narrowed angle range, the value range width of the narrowed angle range can reflect the span corresponding to the possible inclination angles within this range. According to this span, the fine angle step can be determined. The smaller the value range width, the smaller the fine angle step. The fine angle step is used for a more refined search within the narrowed angle range. Within the narrowed angle range, the standard angle template is rotated at intervals of the fine angle step. After each rotation, the third similarity between the rotated standard angle template and the voucher contour is calculated. By comparing the third similarities at each rotation angle, the rotation angle corresponding to the highest third similarity is determined, and this angle is the inclination angle of the voucher contour.
[0131] Among them, the value range width refers to the span that can reflect the possible inclination angles within the narrowed angle range. The smaller the value range width, the narrower the potential matching angle range. Therefore, when conducting a more refined search, a smaller step can be used. The fine angle step refers to the angle interval used for a more refined search within the narrowed angle range. The third similarity refers to the similarity between the rotated standard angle template and the voucher contour after the standard angle template is rotated at intervals of the fine angle step.
[0132] In some embodiments, the specific implementation manner of step S233 may be:
[0133] S2331. Obtain a step adjustment coefficient based on the ratio of the reduced angle range to the standard angle range, perform a weighting process on the product of the step adjustment coefficient and the standard number of steps to obtain the search number of steps, and obtain a fine angle step size according to the ratio of the reduced angle range to the search number of steps.
[0134] Specifically, when obtaining the fine angle step size, it can be calculated by taking the ratio of the reduced angle range to the pre-configured standard angle range. For example, it can be calculated by taking the ratio of the value range width of the reduced angle range to the corresponding value range width of the pre-configured standard angle range, and the corresponding step adjustment coefficient can be obtained. By multiplying the step adjustment coefficient by the pre-configured standard number of steps and performing a weighting process on the data obtained after the multiplication, the corresponding search number of steps can be obtained. By taking the ratio of the reduced angle range to the search number of steps, the angle interval when the standard angle template is rotated each time during the fine search of the tilt angle can be obtained, that is, the fine angle step size.
[0135] Among them, the standard angle range refers to the angle range in the pre-configured standard situation, the step adjustment coefficient refers to the ratio of the reduced angle range to the standard angle range, the standard number of steps refers to the preset standard number of steps in the fine search stage, and the search number of steps refers to the number of times the standard angle template is rotated during the fine search.
[0136] S2332. Obtain the second similarity corresponding to each interval extreme value of the reduced angle range, and determine the direction from the interval extreme value with a large value to the interval extreme value with a small value as the traversal direction.
[0137] Specifically, for the reduced angle range, there are corresponding interval extreme values. For example, when the reduced angle range is 30° - 60°, the corresponding interval extreme values are 30° and 60°, and each interval extreme value has a corresponding second similarity. If the second similarity of the interval extreme value of 30° is greater than the second similarity of the interval extreme value of 60°, then the direction from 30° to 60° can be determined as the traversal direction. Among them, the interval extreme value refers to the maximum and minimum values of the angle interval corresponding to the reduced angle range, and the traversal direction refers to the direction when traversing the tilt angle of the voucher contour within the reduced angle range.
[0138] S2333. Control the standard angle template to rotate within the reduced angle range based on the traversal direction and the fine angle step size, and obtain the third similarity between the rotated standard angle template and the voucher contour each time.
[0139] Specifically, after obtaining the search steps and traversal direction, the standard angle template can be controlled to rotate in the traversal direction according to the fine angle step size. And after each rotation, the number of pixel points where the voucher contour coincides with the rotated standard angle template can be obtained, and the ratio is calculated with the total number of pixel points corresponding to the standard angle template, and the corresponding third similarity can be obtained.
[0140] S2334. Determine that the rotation angle with the third similarity greater than or equal to the fine similarity threshold and the maximum third similarity is the inclination angle of the voucher contour.
[0141] Specifically, if the third similarity is greater than or equal to the fine similarity threshold and the third similarity is the largest, it can be considered that the corresponding rotation angle is the inclination angle of the voucher contour. For example, when the rotation angle is 60°, the corresponding third similarity is greater than or equal to the fine similarity threshold and the corresponding third similarity is the largest, it can be considered that the inclination angle of the voucher contour is 60°.
[0142] S234. Obtain the angle difference between the inclination angle and the standard angle of the standard angle template. When the angle difference is less than the preset constant, determine that the adjustment direction of the tax voucher is the reverse direction.
[0143] Among them, the standard angle refers to the angle corresponding to the standard angle template, which can be 0° for example. The angle difference refers to the difference between the inclination angle and the standard angle. The preset constant can be 0. The adjustment direction refers to the direction when adjusting the angle of the tax voucher, and the reverse direction refers to the counterclockwise rotation direction.
[0144] Specifically, the difference between the inclination angle and the standard angle corresponding to the standard angle template can be obtained, that is, the angle difference. If the angle difference is less than 0, it can be considered that the included angle between the voucher contour and the standard angle template is a negative angle. See Figure 3 , which is a schematic diagram for determining the adjustment direction of a tax voucher provided by an embodiment of the present invention. As can be seen from the left figure in Figure 3 , when the standard angle corresponding to the standard angle template is 0°, the inclination angle corresponding to the voucher contour is a negative angle, and the angle difference between the inclination angle corresponding to the voucher contour and the standard angle is less than 0. When adjusting the tax voucher, in order to rotate the tax voucher to correspond to the standard angle template, the tax voucher needs to be rotated counterclockwise. Therefore, the counterclockwise rotation direction, that is, the reverse direction, can be determined as the adjustment direction of the tax voucher.
[0145] S235. When the angle difference is greater than the preset constant, determine that the adjustment direction of the tax voucher is the forward direction. Obtain the direction adjustment data according to the reverse direction or the forward direction, and determine the angle adjustment data of the tax voucher according to the direction adjustment data and the inclination angle.
[0146] Specifically, refer to Figure 3 As shown in the right figure in Figure 3 , when the standard angle of the standard angle template is 0°, the inclination angle corresponding to the voucher contour is a positive angle, and the angle difference between the inclination angle corresponding to the voucher contour and the standard angle is greater than 0. When adjusting the tax voucher, in order to rotate the tax voucher to correspond to the standard angle template, the tax voucher needs to be rotated clockwise. Therefore, the clockwise rotation direction, that is, the forward direction, can be determined as the adjustment direction of the tax voucher. According to the determined reverse direction or forward direction, the direction adjustment data for adjusting the tax voucher can be obtained. Combining the direction adjustment data with the inclination angle can form the complete angle adjustment data corresponding to the tax voucher. This data can be used to control the subsequent angle adjustment operation of the tax voucher to ensure that the tax voucher is in a standard angle state before binding. Among them, the direction adjustment data refers to the rotation direction data for adjusting the tax voucher.
[0147] Through the above implementation manners, the efficiency and accuracy in determining the inclination angle corresponding to the voucher contour can be improved.
[0148] In some other embodiments, the specific implementation manner of step S23 may also be:
[0149] S236. Obtain the corner points of the voucher contour, determine the contour edges corresponding to adjacent corner points, and determine the edge type of the contour edges according to the side lengths of the contour edges. The edge type includes a long edge type and a short edge type.
[0150] In some other embodiments, by detecting multiple corner points corresponding to the voucher contour, the contour edges between adjacent corner points can be obtained. Since the tax voucher is usually rectangular, the lengths of the contour edges between adjacent corner points may be different, and four contour edges can be obtained. The side lengths of the determined contour edges can be obtained, and the edge type corresponding to the contour edges can be determined according to the side lengths. If the side length of the obtained contour edge is longer, the edge type of the corresponding contour edge can be determined as the long edge type. Among them, the corner point refers to the inflection point on the voucher contour, the contour edge refers to the edge on the voucher contour, the edge type refers to the type corresponding to the contour edge, the long edge type refers to the type corresponding to the longer contour edge, and the short edge type refers to the type corresponding to the shorter contour edge.
[0151] S237. Determine the inclination angle of the voucher contour according to the included angle between the contour edge of the long edge type and the horizontal axis.
[0152] Specifically, when the edge type corresponding to the contour edge is the long edge type, the included angle between the contour edge of the long edge type and the horizontal axis can be obtained, and this included angle can be determined as the inclination angle corresponding to the voucher contour. Among them, the horizontal axis refers to the axis segment in the horizontal direction.
[0153] S238. Obtain the angular difference between the inclination angle and the standard angle of the standard angle template. When the angular difference is less than a preset constant, determine that the adjustment direction of the tax certificate is the reverse direction.
[0154] Specifically, the difference between the inclination angle and the standard angle corresponding to the standard angle template can be obtained, that is, the angular difference. If the angular difference is less than 0, it can be considered that the included angle between the certificate contour and the standard angle template is a negative angle. When the standard angle corresponding to the standard angle template is 0°, the angular difference between the inclination angle corresponding to the certificate contour and the standard angle is less than 0. When adjusting the tax certificate, in order to rotate the tax certificate to correspond to the standard angle template, it is necessary to rotate the tax certificate counterclockwise. Therefore, the counterclockwise rotation direction, that is, the reverse direction, can be determined as the adjustment direction of the tax certificate.
[0155] S239. When the angular difference is greater than the preset constant, determine that the adjustment direction of the tax certificate is the forward direction. Obtain the direction adjustment data according to the reverse direction or the forward direction, and determine the angle adjustment data of the tax certificate according to the direction adjustment data and the inclination angle.
[0156] Specifically, when the angular difference is greater than 0, it can be considered that the inclination angle corresponding to the certificate contour is a positive angle. When the standard angle corresponding to the standard angle template is 0°, when adjusting the tax certificate, in order to rotate the tax certificate to correspond to the standard angle template, it is necessary to rotate the tax certificate clockwise. Therefore, the clockwise rotation direction, that is, the forward direction, can be determined as the adjustment direction of the tax certificate. According to the determined reverse direction or forward direction, the direction adjustment data for adjusting the tax certificate can be obtained. Combining the direction adjustment data with the inclination angle can form the complete angle adjustment data corresponding to the tax certificate. This data can be used to control the subsequent angle adjustment operation of the tax certificate to ensure that the tax certificate is in the standard angle state before binding.
[0157] S24. Control the rotating platform to adjust the angle of the tax certificate based on the angle adjustment data, and control the grasping module to position the adjusted tax certificate to the binding area.
[0158] In practical applications, a rotating platform can be configured in the transfer area. By controlling the rotation angle of the rotating platform, the angle of the tax certificate in the transfer area can be adjusted accordingly. After obtaining the angle adjustment data corresponding to the tax certificate, the rotating platform can be controlled to adjust the angle of the tax certificate according to the corresponding angle adjustment data, and then the grasping module can be controlled to move the adjusted tax certificate into the binding area. Among them, the rotating platform refers to a platform that can rotate.
[0159] S25. If the document type of the tax document is not equal to the first target type, it is determined that the tax document meets the condition for delayed binding, and the grabbing module is controlled to locate the tax document in the waiting area.
[0160] Specifically, if the document type of the tax document is not equal to the first target type, it can be considered that the tax document is not the document to be bound currently, it can be considered that the corresponding tax document meets the condition for delayed binding, and the grabbing module can be controlled to place the tax document in the waiting area corresponding to the tax document to be bound.
[0161] Through the above implementation, the efficiency of binding tax documents can be improved.
[0162] S3. Based on the batch completion information in the binding area, control the grabbing module to move the tax documents in the waiting area to the binding area, and adjust the placement position of the tax documents according to the offset warning information of the position detection module.
[0163] Among them, the batch completion information refers to the information that the tax documents corresponding to the document type currently being bound are completed. The position detection module can be an optoelectronic sensor. The offset warning information refers to the information that warns of the offset situation of the tax documents. The placement position refers to the position where the tax documents are located.
[0164] When all the tax documents corresponding to the document type currently being bound in the binding area are bound, the corresponding batch completion information can be responded to. After receiving the batch completion information, according to the binding sequence information of the target user, control the grabbing module to move to the waiting area to grab the tax documents corresponding to the next document type to be bound, move the corresponding tax documents into the binding area, and perform the binding operation of the next batch of tax documents. In the actual binding process, due to the influence of various factors, the position of the tax documents may shift. In order to ensure that the binding work can meet the standards of being standardized and regular, a module capable of detecting the position of the tax documents, that is, the position detection module, can be configured in the binding area. For example, it can be an optoelectronic sensor. During the whole process of binding, the position detection module can detect the placement position of the tax documents in real time and accurately.
[0165] Specifically, an optoelectronic sensor can be installed at the edge of the binding area. When the tax documents being bound are stacked neatly, the light can emit and receive signals normally. If the tax documents exceed or do not reach the set position, it may block or change the path of the light, causing the signal received by the optoelectronic sensor to change, and thus may emit offset warning information. According to the offset warning information, the placement position of the tax documents can be adjusted in time.
[0166] Based on the above embodiments, the specific implementation manner of step S3 can be:
[0167] S31. Determine the voucher type after the first target type as the second target type in sequence according to the batch completion information, and control the grasping module to move the tax vouchers of the second target type in the waiting area to the binding area.
[0168] Specifically, according to the batch completion information of the binding area, the voucher type after the first target type can be determined as the second target type in sequence, and the grasping module can be controlled to move the tax vouchers of the second target type in the waiting area into the binding area for binding. Among them, the second target type refers to the voucher type after the first target type.
[0169] In some embodiments, "controlling the grasping module to move the tax vouchers of the second target type in the waiting area to the binding area" in step S31 includes the following steps:
[0170] S311. Determine the sub-region where the second target type is located in the waiting area, and control the grasping module to move the tax vouchers in the sub-region to the designated hovering position in the binding area.
[0171] Specifically, since there may be tax vouchers of multiple voucher types waiting for binding in the waiting area, and each voucher type has a corresponding sub-region in the waiting area, the sub-region corresponding to the second target type in the waiting area can be determined, and the grasping module can be controlled to move the tax vouchers in the sub-region to the pre-configured position above the binding area, that is, the designated hovering position. Among them, the sub-region refers to the area where the tax vouchers of each voucher type are placed in the waiting area, and the designated hovering position refers to the corresponding hovering position when the grasping module moves the tax vouchers in the sub-region above the binding area.
[0172] S312. Obtain the acquisition image taken by the upward shooting module of the tax vouchers at the designated hovering position, and extract the current voucher contour in the acquisition image.
[0173] Specifically, after the grasping module moves the tax vouchers in the sub-region to the designated hovering position above the binding area, the upward shooting module pre-configured in the binding area that can perform upward shooting can be controlled to collect images of the tax vouchers at the designated hovering position to obtain the corresponding acquisition image. From the acquisition image, through contour extraction technology, for example, the contour corresponding to the tax vouchers in the acquisition image, that is, the current voucher contour, can be extracted through edge detection technology. Among them, the upward shooting module refers to the module pre-configured to be able to perform upward shooting, such as a camera capable of performing upward shooting, the acquisition image refers to the image obtained by the upward shooting module shooting the tax vouchers grasped by the grasping module, and the current voucher contour refers to the contour corresponding to the tax vouchers in the acquisition image.
[0174] S313. Determine the current tilt angle of the current voucher contour, and determine the current adjustment direction of the tax voucher according to the difference between the current tilt angle and the standard angle.
[0175] Specifically, the standard angle template corresponding to the current voucher contour can be retrieved, and the tilt angle corresponding to the current voucher contour, that is, the current tilt angle, can be determined according to the standard angle template. The implementation manner of determining the current tilt angle is the same as the implementation manner of determining the tilt angle of the voucher contour above, which will not be elaborated here. And according to the difference between the current tilt angle and the standard angle, the adjustment direction when adjusting the tax voucher, that is, the current adjustment direction, can be determined. For example, if the difference between the current tilt angle and the standard angle of 0° is greater than 0, it can be determined that the current adjustment direction of the tax voucher corresponding to the current voucher contour is the clockwise direction. If the difference between the current tilt angle and the standard angle is less than 0, it can be determined that the current adjustment direction of the tax voucher corresponding to the current voucher contour is the counterclockwise direction. Herein, the current tilt angle refers to the tilt angle corresponding to the current voucher contour, and the current adjustment direction refers to the direction when adjusting the angle of the tax voucher corresponding to the current voucher contour.
[0176] S314. Control the grasping module to adjust the angle of the tax voucher based on the current adjustment direction and the current tilt angle, and position the adjusted tax voucher at the binding position in the binding area.
[0177] Specifically, after obtaining the current adjustment direction and the current tilt angle, the grasping module can be controlled to rotate the current tilt angle in the current adjustment direction to perform corresponding angle adjustment on the tax voucher, and the adjusted tax voucher can be positioned at the corresponding binding position in the binding area. Herein, the binding position refers to the position where the binding area is located.
[0178] S32. Receive the detection signal of the position detection module, and respond to the offset warning information when the detection signal is outside the normal signal threshold range.
[0179] Specifically, the detection signal of the position detection module can be received. If the detection signal is outside the normal signal threshold range, it can be considered that the signal sent by the position detection module may be blocked by the tax voucher. Therefore, it can be considered that the position of the tax voucher is very likely to have shifted. At this time, the position detection module can respond to the offset warning information. Herein, the detection signal refers to the signal sent by the position detection module, and the normal signal threshold range is a preset range interval used to judge whether the detection signal sent by the position detection module is normal. If the value of the detection signal falls within this interval, it can be considered that the position of the tax voucher is in a normal state. On the contrary, if the value of the detection signal exceeds this interval, it may mean that the position of the tax voucher has shifted.
[0180] S33. Obtain the current calibration image collected by the overhead shooting module for the binding area, and identify the voucher contour at the uppermost position in the current calibration image as the calibration voucher contour.
[0181] Specifically, after receiving the offset warning information sent by the position detection module, the overhead shooting module configured above the binding area can be controlled. For example, it can be a high-definition camera to collect images of the binding area to obtain the corresponding current calibration image. From the current calibration image, the voucher contour at the uppermost position can be identified and determined as the calibration voucher contour. The reason for determining the voucher contour at the uppermost position as the calibration voucher contour is that the placement positions of the tax vouchers below have been adjusted accordingly and will not block the signals sent by the position detection module. Therefore, there is a high possibility that the placement position of the tax voucher at the uppermost position has shifted. Thus, the voucher contour at the uppermost position is determined as the calibration voucher contour.
[0182] In practical applications, the reason for first detecting whether the tax vouchers have a position shift through the photoelectric sensor, i.e., the position detection module, and then obtaining the calibration image to identify and calibrate the positions of the tax vouchers is that the photoelectric sensor can quickly and preliminarily determine whether there is an obvious position shift of the tax vouchers and can quickly send signals for obvious shift situations. Only when the photoelectric sensor detects that the general position of the tax vouchers is normal but there may be slight irregularities, the image recognition is started to perform fine calibration on them, which can reduce the processing volume of image recognition and improve the overall detection efficiency.
[0183] Among them, the overhead shooting module refers to a module configured above the binding area that can perform overhead shooting. For example, it can be a camera for shooting at an overhead angle. The current calibration image refers to the image obtained after the overhead shooting module collects images of the binding area. The calibration voucher contour refers to the contour of the tax voucher at the uppermost position identified from the current calibration image.
[0184] S34. Determine the offset angle and offset position of the calibration voucher contour, determine the position calibration parameters of the corresponding tax voucher according to the offset angle and offset position, and adjust the placement position of the corresponding tax voucher based on the position calibration parameters.
[0185] Specifically, by analyzing the calibration voucher profile, the offset angle and offset position corresponding to the calibration voucher profile can be obtained. Based on the offset angle and offset position, the calibration parameters for adjusting the position of the corresponding tax voucher, that is, the position calibration parameters, can be determined. According to the position calibration parameters, the placement position of the corresponding tax voucher can be adjusted. Among them, the offset angle refers to the angle by which the calibration voucher profile deviates from the corresponding standard angle template, and the offset position refers to the position where the calibration voucher profile can be located, such as the center point of the calibration voucher profile. The position calibration parameter refers to the parameter for adjusting the position of the tax voucher corresponding to the calibration voucher profile.
[0186] In some embodiments, the specific implementation manner of step S34 may be:
[0187] S341. Obtain the center point of the calibration voucher profile, determine the point position distance between the binding point and the center point. If the point position distance is less than the error threshold, then respond to the angle correction information, and determine the tilt angle of the calibration voucher profile as the offset angle according to the angle correction information.
[0188] Specifically, the center point corresponding to the calibration voucher profile can be obtained, and the preset point position corresponding to the binding position, that is, the binding point, can be pre-configured. For example, it can be the center point corresponding to the binding area. The interval distance between the binding point and the center point of the calibration voucher profile, that is, the point position distance, can be obtained. If the point position distance is less than the error threshold, it can be considered that the tax voucher corresponding to the calibration voucher profile only has an angular offset in the binding area and the position has not shifted. At this time, the angle correction information for adjusting the angle can be responded to, and the tilt angle corresponding to the calibration voucher profile can be determined as the offset angle according to the angle correction information. Among them, the binding point refers to the preset point position corresponding to the binding position, the point position distance refers to the distance between the binding point and the center point of the calibration voucher profile, the error threshold refers to the threshold that can be used to judge whether the tax voucher corresponding to the calibration voucher profile has a position shift. If the point position distance is less than the error threshold, it can be considered that the position of the tax voucher corresponding to the calibration voucher profile in the binding area has not shifted, and the angle correction information refers to the information for adjusting the angle of the tax voucher corresponding to the calibration voucher profile.
[0189] S342. If the point position distance is greater than or equal to the error threshold, then respond to the comprehensive correction information, determine the tilt angle of the calibration voucher profile as the offset angle according to the comprehensive correction information, and determine the center point of the calibration voucher profile as the offset position.
[0190] Specifically, if the distance between points is greater than or equal to the error threshold, it can be considered that the tax voucher corresponding to the calibration voucher contour not only has an angular offset but also a positional offset within the binding area. At this time, the information for comprehensive adjustment of the angle and position can be responded to, that is, the comprehensive adjustment information. According to the comprehensive adjustment information, the inclination angle corresponding to the calibration voucher contour can be determined as the offset angle, and the center point of the calibration voucher contour can be determined as the offset position. Among them, the comprehensive correction information refers to the information for comprehensively adjusting the angle and position of the tax voucher corresponding to the calibration voucher contour.
[0191] S343. Determine the angle calibration direction of the corresponding tax voucher according to the difference between the offset angle and the standard angle, and obtain the angle calibration parameter based on the angle calibration direction and the offset angle.
[0192] Specifically, according to the difference between the offset angle and the standard angle, the adjustment direction when adjusting the angle of the tax voucher corresponding to the calibration voucher contour can be determined, that is, the angle calibration direction. For example, if the difference between the offset angle and the standard angle of 0° is greater than 0, it can be determined that the angle calibration direction of the tax voucher corresponding to the calibration voucher contour is the clockwise direction. If the difference between the offset angle and the standard angle is less than 0, it can be determined that the angle calibration direction of the tax voucher corresponding to the calibration voucher contour is the counterclockwise direction. According to the angle calibration direction and the offset angle corresponding to the calibration voucher contour, the angle calibration parameter when adjusting the angle of the corresponding tax voucher can be obtained. Among them, the angle calibration parameter refers to the parameter when adjusting the angle of the tax voucher corresponding to the calibration voucher contour.
[0193] S344. Determine the direction from the offset position to the binding point as the displacement calibration direction, obtain the distance from the offset position to the binding point as the calibration distance, and obtain the displacement calibration parameter according to the position calibration direction and the calibration distance.
[0194] Specifically, the direction pointing from the offset position to the binding point can be determined as the displacement calibration direction, calculate the interval distance between the offset position and the binding point, and determine it as the calibration distance. According to the position calibration direction and the calibration distance, the displacement calibration parameter when calibrating the displacement between the calibration voucher contour and the binding point can be obtained. Among them, the displacement calibration direction refers to the direction when adjusting the position of the calibration voucher contour, the calibration distance refers to the interval distance between the offset position and the binding point, and the displacement calibration parameter refers to the parameter when calibrating the displacement between the calibration voucher contour and the binding point.
[0195] S345. Obtain the position calibration parameter according to the angle calibration parameter and the displacement calibration parameter, and control the grasping module to adjust the placement position of the corresponding tax voucher based on the position calibration parameter.
[0196] Specifically, according to the angle calibration parameter and the displacement calibration parameter, the corresponding position calibration parameter can be obtained, and the position calibration parameter is sent to the grasping module. The grasping module can adjust the placement position of the tax voucher corresponding to the calibration voucher contour accordingly according to the position calibration parameter.
[0197] Through the above implementation manners, the standardization and neatness of the binding work can be effectively ensured, and the tax vouchers after binding are arranged regularly.
[0198] S4. Determine the slot positions of each tax voucher according to the operation completion information of the binding area, perform layout adjustment on the page model elements based on the slot positions to obtain a tax display model, and bind the tax voucher and the tax display model.
[0199] Among them, the operation completion information refers to the information generated after all tax voucher binding operations in the binding area are completed. The slot position refers to the position allocated for the tax voucher. The tax display model refers to the model obtained by performing layout adjustment on the page model elements according to the slot positions.
[0200] In order to quickly determine the binding position corresponding to the tax voucher, corresponding layout adjustment can be performed on the page model elements corresponding to each tax voucher to obtain the corresponding tax display model. Through the tax display model, the position of the tax voucher in the bound volume after binding can be quickly determined. Specifically, when all tax vouchers in the binding area are bound, the corresponding operation completion information can be responded to. According to the operation completion information of the binding area, the slot positions corresponding to each tax voucher can be determined. According to the slot positions corresponding to each tax voucher, corresponding layout adjustment can be performed on the page model elements corresponding to each tax voucher to obtain the corresponding tax display model. And in order to be able to associate the tax voucher with the corresponding page model element in the tax display model, the tax voucher can be bound to the corresponding tax display model.
[0201] Based on the above embodiments, the specific implementation manner of step S4 may be:
[0202] S41. Obtain the binding time of each tax voucher, and arrange each tax voucher from front to back according to the binding time to obtain a voucher sequence.
[0203] Specifically, the time information when each tax voucher is bound, that is, the binding time, can be obtained. Since usually, the tax vouchers bound first are located at the bottom of the bound volume, and the tax vouchers bound later are located at the top of the bound volume, so they can be arranged in the order from front to back according to the binding time, and a binding sequence can be obtained. Among them, the binding time refers to the time when each tax voucher is bound, and the voucher sequence refers to the sequence obtained by arranging each tax voucher according to the binding time.
[0204] S42. Determine the corresponding slot positions of each tax voucher according to the arrangement serial numbers of the tax vouchers in the voucher sequence, and stack and arrange each page model element from bottom to top based on the slot positions to obtain a tax display model.
[0205] Specifically, in the voucher sequence, each tax voucher has a corresponding arrangement serial number. According to the arrangement serial numbers of the tax vouchers, the corresponding slot positions of the tax vouchers can be determined. According to the slot positions corresponding to the tax vouchers, the page model elements corresponding to the tax vouchers are stacked in the order from bottom to top, and the corresponding tax display model can be obtained. Among them, the arrangement serial number refers to the serial number corresponding to each tax voucher in the voucher sequence.
[0206] S43. Construct voucher nodes corresponding to each tax voucher, connect the voucher nodes according to the voucher sequence to obtain a voucher display structure, and bind the tax display model and the voucher display structure.
[0207] Specifically, voucher nodes corresponding to each tax voucher can be constructed. The voucher nodes are connected in sequence according to the arrangement order of the tax vouchers in the voucher sequence, and the corresponding voucher display structure can be obtained. By binding the tax display model and the corresponding voucher display structure, each tax voucher can be associated with the corresponding page model element, so that the tax vouchers can be quickly searched through the tax display model. Among them, the voucher node refers to the node corresponding to the tax voucher, and the voucher display structure refers to the structure that can display the tax voucher.
[0208] In some embodiments, "construct voucher nodes corresponding to each tax voucher, connect the voucher nodes according to the voucher sequence to obtain a voucher display structure" in step S43 includes the following steps:
[0209] S431. Obtain the association type corresponding to the tax voucher with an association factor, and update the corresponding voucher node according to the preset pixel value corresponding to the association type.
[0210] In actual tax business scenarios, there may be multiple correlation factors among different tax vouchers. For example, the transaction amount, business type, time period, etc. of invoices. Tax vouchers with correlation factors can be obtained, and their corresponding correlation types can be determined. For example, if an enterprise has multiple business types, including sales business, procurement business, etc., each business type can be used as a correlation factor. If multiple tax vouchers correspond to the same business type, it can be considered that the multiple corresponding tax vouchers have correlation factors. For tax vouchers with correlation factors, their corresponding correlation types can be determined, such as time correlation, business correlation, etc. For example, when multiple tax vouchers all correspond to the sales business, it can be considered that the correlation type of the multiple tax vouchers with correlation factors is business correlation. For each correlation type, a corresponding pixel value, that is, a preset pixel value, can be preset in advance. The preset pixel value can be used to visually distinguish voucher nodes during display. For example, for voucher nodes with a correlation type of business correlation, a red pixel value can be preset, while for voucher nodes with a correlation type of time correlation, a blue pixel value can be preset. According to the preset pixel values corresponding to the correlation types among tax vouchers, the corresponding voucher nodes can be updated accordingly, that is, the voucher nodes are set to the corresponding pixel values, so that different correlation types of tax vouchers can be visually distinguished by pixel features such as color.
[0211] Among them, the correlation factor refers to the factor that can correlate different tax vouchers, the correlation type refers to the classification determined according to the correlation factor and used to describe the correlation nature between tax vouchers, and the preset pixel value refers to the specific pixel value preset for each correlation type in advance.
[0212] S432. Connect the updated voucher nodes in sequence according to the voucher sequence to obtain a voucher display structure, and obtain the correlation strength between adjacent voucher nodes.
[0213] Specifically, according to the determined voucher sequence, the updated voucher nodes can be connected in sequence to obtain the corresponding voucher display structure. While connecting adjacent voucher nodes in order, if there are correlation factors between the tax vouchers corresponding to adjacent voucher nodes, the correlation tightness between adjacent voucher nodes can be analyzed, that is, the correlation strength between adjacent voucher nodes is obtained. When obtaining the correlation strength between adjacent voucher nodes, it can be calculated according to the correlation factor. For example, if there are correlation factors between the tax vouchers corresponding to adjacent voucher nodes and the correlation factor is the transaction amount, the correlation strength may be based on the ratio between the transaction amounts of adjacent two invoices. The larger the ratio, the greater the correlation strength. Among them, the correlation strength refers to the correlation tightness between adjacent voucher nodes.
[0214] S433. Determine the line segment features corresponding to the association strength, and update the connection lines between the corresponding voucher nodes according to the line segment features.
[0215] Specifically, the association strength can be reflected in the voucher display structure in a visual way. Therefore, corresponding line segment features can be set for different association strengths. For example, the higher the association strength, the thicker the line segment between adjacent voucher nodes; the lower the association strength, the thinner the line segment between adjacent voucher nodes. According to the determined line segment features, update the connection lines between the corresponding voucher nodes. By updating the line segment features of the connection lines between voucher nodes, users can more intuitively see the tightness of the association between tax vouchers. Here, the line segment features refer to the features corresponding to the line segments between adjacent voucher nodes in the voucher display structure, and the connection lines refer to the line segments between adjacent voucher nodes in the voucher display structure.
[0216] Through the above implementation manners, the target user can more intuitively see the tightness of the association between tax vouchers.
[0217] See Figure 4 , which is a schematic structural diagram of a tax data intelligent acquisition device provided by an embodiment of the present invention. The data processing system based on the tax data intelligent acquisition device includes:
[0218] A construction module, configured to obtain voucher data collected by a scanning module for each tax voucher, and construct page model elements corresponding to each tax voucher according to the voucher data;
[0219] A control module, configured to control a grabbing module to position tax vouchers that meet the immediate binding condition to the binding area according to the voucher data, and control the grabbing module to position tax vouchers that meet the delayed binding condition to the waiting area;
[0220] An adjustment module, configured to control the grabbing module to move the tax vouchers in the waiting area to the binding area based on the batch completion information in the binding area, and adjust the placement position of the tax vouchers according to the offset warning information of the position detection module;
[0221] A binding module, configured to determine the slot positions of each tax voucher according to the operation completion information in the binding area, perform layout adjustment on the page model elements based on the slot positions to obtain a tax display model, and bind the tax vouchers and the tax display model.
[0222] Figure 4 The device in the shown embodiment can correspondingly be used to execute Figure 1 the steps in the method embodiment shown. The implementation principle and technical effects are similar, and will not be elaborated here.
[0223] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements on some or all of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. An intelligent tax data collection method, characterized in that, Including: Obtain the voucher data collected by the scanning module for each tax voucher, and construct page model elements corresponding to each tax voucher according to the voucher data; According to the voucher data, control the grabbing module to locate the tax vouchers that meet the immediate binding condition to the binding area, and control the grabbing module to locate the tax vouchers that meet the delayed binding condition to the waiting area, including: Obtain the contour area of the voucher contour, and retrieve the standard angle template whose area difference from the contour area is less than the difference threshold; Calculate the first similarity between the voucher contour and the standard angle template, determine the rough angle step size according to the first similarity, rotate the standard angle template based on the rough angle step size, and determine the reduced angle range according to the second similarity between the rotated standard angle template and the voucher contour; Determine the fine angle step size according to the value range width of the reduced angle range, rotate the standard angle template based on the fine angle step size and the reduced angle range, and determine the inclination angle of the voucher contour according to the third similarity between the rotated standard angle template and the voucher contour; Obtain the angle difference between the inclination angle and the standard angle of the standard angle template. When the angle difference is less than the preset constant, determine that the adjustment direction of the tax voucher is the reverse direction; When the angle difference is greater than the preset constant, determine that the adjustment direction of the tax voucher is the forward direction, obtain the direction adjustment data according to the reverse direction or the forward direction, and determine the angle adjustment data of the tax voucher according to the direction adjustment data and the inclination angle; Based on the batch completion information in the binding area, control the grabbing module to move the tax vouchers in the waiting area to the binding area, and adjust the placement position of the tax vouchers according to the offset warning information of the position detection module; Determine the slot positions of each tax voucher according to the operation completion information in the binding area, perform layout adjustment on the page model elements based on the slot positions to obtain a tax display model, and bind the tax vouchers and the tax display model.
2. The method according to claim 1, wherein: Obtain the voucher data collected by the scanning module for each tax voucher, and construct page model elements corresponding to each tax voucher according to the voucher data, including: Extract the text information corresponding to the tax voucher according to the scanning module, and obtain the voucher data based on the text information; Determine the voucher type corresponding to the tax voucher based on the voucher data, and retrieve the preset template corresponding to the voucher type; Determine the sub-texts corresponding to each preset keyword in the preset template in the voucher data, and fill the sub-texts into the preset slots corresponding to the corresponding preset keywords to obtain the page model elements corresponding to the corresponding tax vouchers.
3. The method according to claim 1, wherein: According to the voucher data, control the grabbing module to locate the tax vouchers that meet the immediate binding condition to the binding area, and control the grabbing module to locate the tax vouchers that meet the delayed binding condition to the waiting area, including: Receive the binding order information of the target user, and determine that the voucher type currently being bound is the first target type according to the binding order information; If the voucher type of the tax voucher is equal to the first target type, it is determined that the tax voucher meets the immediate binding condition; Obtain the current voucher image of the tax voucher, and determine the angle adjustment data of the tax voucher according to the inclination angle of the voucher contour in the current voucher image; Control the rotating platform to adjust the angle of the tax voucher based on the angle adjustment data, and control the grasping module to position the adjusted tax voucher to the binding area; If the voucher type of the tax voucher is not equal to the first target type, it is determined that the tax voucher meets the condition of delayed binding, and the grasping module is controlled to position the tax voucher to the waiting area.
4. The method according to claim 3, wherein: Obtaining the current voucher image of the tax voucher and determining the angle adjustment data of the tax voucher according to the inclination angle of the voucher contour in the current voucher image includes: Obtain the corner points of the voucher contour, determine the contour edges corresponding to adjacent corner points, and determine the edge type of the contour edge according to the side length of the contour edge. The edge type includes a long edge type and a short edge type; Determine the inclination angle of the voucher contour according to the included angle between the contour edge of the long edge type and the horizontal axis; Obtain the angle difference between the inclination angle and the standard angle of the standard angle template. When the angle difference is less than a preset constant, determine that the adjustment direction of the tax voucher is the reverse direction; When the angle difference is greater than the preset constant, determine that the adjustment direction of the tax voucher is the forward direction, obtain the direction adjustment data according to the reverse direction or the forward direction, and determine the angle adjustment data of the tax voucher according to the direction adjustment data and the inclination angle.
5. The method according to claim 1, wherein: Calculate the first similarity between the voucher contour and the standard angle template, determine the rough angle step size according to the first similarity, rotate the standard angle template based on the rough angle step size, and determine the reduced angle range according to the second similarity between the rotated standard angle template and the voucher contour, including: Align the center points of the voucher contour and the standard angle template, and count the number of first pixel points where the voucher contour and the standard angle template coincide; Obtain the total number of pixel points corresponding to the standard angle template, and obtain the first similarity according to the ratio of the number of first pixel points to the total number of pixel points; Traverse multiple similarity intervals according to the first similarity, and determine that the preset angle step size corresponding to the similarity interval where the first similarity is located is the rough angle step size; Control the standard angle template to rotate in a preset rotation direction based on the rough angle step size, and obtain the second similarity between the rotated standard angle template and the voucher contour each time; Obtain the rotation angle whose second similarity is greater than or equal to the rough similarity threshold, and determine the angle interval corresponding to the rotation angle as the reduced angle range.
6. The method according to claim 1, wherein: Determine the fine angle step size according to the value range width of the reduced angle range, rotate the standard angle template based on the fine angle step size and the reduced angle range, and determine the inclination angle of the voucher contour according to the third similarity between the rotated standard angle template and the voucher contour, including: A step adjustment coefficient is obtained based on the ratio of the reduced angle range to the standard angle range, the product of the step adjustment coefficient and the standard number of steps is weighted to obtain the search number of steps, and a fine angle step size is obtained based on the ratio of the reduced angle range to the search number of steps; The second similarity corresponding to each interval extreme value of the reduced angle range is obtained, and the direction in which the interval extreme value with a larger value points to the interval extreme value with a smaller value is determined as the traversal direction; The standard angle template is controlled to rotate within the reduced angle range based on the traversal direction and the fine angle step size, and the third similarity between the rotated standard angle template and the voucher contour is obtained each time; The rotation angle with the third similarity greater than or equal to the fine similarity threshold and the largest third similarity is determined as the inclination angle of the voucher contour.
7. The method according to claim 1, wherein Based on the batch completion information of the binding area, the grabbing module is controlled to move the tax vouchers in the waiting area to the binding area, and the placement position of the tax vouchers is adjusted according to the offset warning information of the position detection module, including: According to the batch completion information, the voucher type located after the first target type is sequentially determined as the second target type, and the grabbing module is controlled to move the tax vouchers of the second target type in the waiting area to the binding area; The detection signal of the position detection module is received, and when the detection signal is outside the normal signal threshold interval, the offset warning information is responded to; The current calibration image collected by the overhead shooting module for the binding area is obtained, and the voucher contour located at the top in the current calibration image is identified as the calibration voucher contour; The offset angle and offset position of the calibration voucher contour are determined, the position calibration parameters of the corresponding tax vouchers are determined according to the offset angle and offset position, and the placement position of the corresponding tax vouchers is adjusted based on the position calibration parameters.
8. The method according to claim 7, wherein Controlling the grabbing module to move the tax vouchers of the second target type in the waiting area to the binding area includes: Determining the sub-region where the second target type is located in the waiting area, and controlling the grabbing module to move the tax vouchers in the sub-region to the designated hovering position in the binding area; Obtaining the acquisition image of the tax vouchers at the designated hovering position captured by the upward shooting module, and extracting the current voucher contour in the acquisition image; Determining the current inclination angle of the current voucher contour, and determining the current adjustment direction of the tax voucher according to the difference between the current inclination angle and the standard angle; Controlling the grabbing module to adjust the angle of the tax voucher based on the current adjustment direction and the current inclination angle, and positioning the adjusted tax voucher at the binding position in the binding area.
9. The method according to claim 7, wherein Determining the offset angle and offset position of the calibration voucher contour, determining the position calibration parameters of the corresponding tax vouchers according to the offset angle and offset position, and adjusting the placement position of the corresponding tax vouchers based on the position calibration parameters, including: Obtain the center point of the calibration voucher contour, determine the point distance between the binding point and the center point. If the point distance is less than the error threshold, respond to the angle correction information, and determine the tilt angle of the calibration voucher contour as the offset angle according to the angle correction information; If the point distance is greater than or equal to the error threshold, respond to the comprehensive correction information, determine the tilt angle of the calibration voucher contour as the offset angle according to the comprehensive correction information, and determine the center point of the calibration voucher contour as the offset position; Determine the angle calibration direction of the corresponding tax voucher according to the difference between the offset angle and the standard angle, and obtain the angle calibration parameter based on the angle calibration direction and the offset angle; Determine the direction from the offset position to the binding point as the displacement calibration direction, obtain the distance from the offset position to the binding point as the calibration distance, and obtain the displacement calibration parameter according to the position calibration direction and the calibration distance; Obtain the position calibration parameter according to the angle calibration parameter and the displacement calibration parameter, and control the grasping module to adjust the placement position of the corresponding tax voucher based on the position calibration parameter.
10. The method according to claim 1, wherein Determine the slot positions of each tax voucher according to the operation completion information of the binding area, perform layout adjustment on the page model elements based on the slot positions to obtain a tax display model, and bind the tax voucher and the tax display model, including: Obtain the binding time of each tax voucher, and arrange each tax voucher from front to back according to the binding time to obtain a voucher sequence; Determine the corresponding slot position of each tax voucher in the voucher sequence according to the arrangement serial number, and stack and arrange each page model element from bottom to top in sequence based on the slot positions to obtain a tax display model; Construct voucher nodes corresponding to each tax voucher, connect the voucher nodes according to the voucher sequence to obtain a voucher display structure, and bind the tax display model and the voucher display structure.
11. The method according to claim 10, wherein Construct voucher nodes corresponding to each tax voucher, and connect the voucher nodes according to the voucher sequence to obtain a voucher display structure, including: Obtain the association type corresponding to the tax voucher with associated factors, and update the corresponding voucher node according to the preset pixel value corresponding to the association type; Connect the updated voucher nodes in sequence according to the voucher sequence to obtain a voucher display structure, and obtain the association strength between adjacent voucher nodes; Determine the line segment feature corresponding to the association strength, and update the connection line between the corresponding voucher nodes according to the line segment feature.
12. An intelligent tax data collection device, characterized in that, Including: A construction module, configured to obtain voucher data collected by the scanning module for each tax voucher, and construct page model elements corresponding to each tax voucher according to the voucher data; A control module, configured to control the grasping module to position the tax vouchers that meet the immediate binding condition to the binding area according to the voucher data, and control the grasping module to position the tax vouchers that meet the delayed binding condition to the waiting area, including: Obtain the contour area of the voucher contour, and retrieve the standard angle template whose area difference from the contour area is less than the difference threshold; Calculate the first similarity between the voucher contour and the standard angle template, determine the coarse angle step based on the first similarity, rotate the standard angle template based on the coarse angle step, and determine the reduced angle range according to the second similarity between the rotated standard angle template and the voucher contour; Determine the fine angle step according to the value range width of the reduced angle range, rotate the standard angle template based on the fine angle step and the reduced angle range, and determine the inclination angle of the voucher contour according to the third similarity between the rotated standard angle template and the voucher contour; Obtain the angle difference between the inclination angle and the standard angle of the standard angle template. When the angle difference is less than the preset constant, determine that the adjustment direction of the tax voucher is the reverse direction; When the angle difference is greater than the preset constant, determine that the adjustment direction of the tax voucher is the forward direction, obtain the direction adjustment data according to the reverse direction or the forward direction, and determine the angle adjustment data of the tax voucher according to the direction adjustment data and the inclination angle; An adjustment module, configured to control the grabbing module to move the tax vouchers in the waiting area to the binding area based on the batch completion information of the binding area, and adjust the placement position of the tax vouchers according to the offset warning information of the position detection module; A binding module, configured to determine the slot positions of the tax vouchers according to the operation completion information of the binding area, perform layout adjustment on the page model elements based on the slot positions to obtain a tax display model, and bind the tax vouchers and the tax display model.
Citation Information
Patent Citations
Method and device for automatically generating vouchers in bill processing
CN110414927A
Automatic sequencing method based on accounting document arrangement machine
CN110435325A
Bill automatic identification method and system, and medium
CN116363665A