A method, system and device for generating a data table

By constructing a bill database and generating a standard template library, and using primary and secondary indexes for fast retrieval, the problem of inefficient invoice data query is solved and fast and accurate data query is achieved.

CN114722074BActive Publication Date: 2024-08-27SHENZHEN WEIYAN TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210425845.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-22
Publication Date
2024-08-27
Estimated Expiration
2042-04-22

AI Technical Summary

Technical Problem

The existing technology requires a full table scan when querying invoice data, resulting in uncertain query speed and low efficiency, making it difficult to quickly obtain the required information.

Method used

By building a bill database, a standard template library is generated, identification tags are generated based on different subject types and historical data, primary and secondary indexes are used for quick retrieval, and a standard data table is generated.

Benefits of technology

It shortens the single-category retrieval time, improves the retrieval speed and accuracy, simplifies the work intensity of staff, speeds up information query, and improves the correctness of data tables.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114722074B
    Figure CN114722074B
Patent Text Reader

Abstract

The present invention discloses a method, system and device for generating a data table, and relates to the technical field of data processing. The specific steps are: based on tax invoices, constructing an invoice database; generating different standard templates based on historical data according to different subject types, and constructing a template library; obtaining request information, determining the subject type, and calling the corresponding standard template; parsing the request information, generating an identification mark, and based on the identification mark, retrieving data from the invoice database, and generating a standard data table according to the corresponding standard template; by using the first mark as the classification standard, the time for single-category retrieval is shortened, and at the same time, two-level indexes are established to cooperate with each other, which can improve the speed and accuracy of retrieval; the present invention also standardizes the retrieval data by establishing a template library, which is convenient for data aggregation and statistics; the present invention simplifies the work intensity of personnel and increases the accuracy of data tables.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and more particularly to a method, system and device for generating a data table. Background Art

[0002] An invoice refers to a business voucher issued and collected by all units and individuals when buying and selling goods, providing or receiving services, and engaging in other business activities. It is the original basis for accounting and an important basis for law enforcement inspections by auditing and tax authorities.

[0003] Generally speaking, after a merchant issues an invoice, the invoice data needs to be stored in a database for easy inspection and use at any time. At present, when storing invoice data, a traditional relational database that is generally applicable to data storage management in various industries is generally used to store invoice data.

[0004] When invoice data needs to be queried, the table containing the invoice data needs to be fully scanned to obtain the invoice data that the user wants to query. The time required varies from a few minutes to a few hours depending on the number of invoices and the length of the invoice sequence, resulting in uncertainty in the query speed and low query efficiency. Therefore, how to quickly obtain query information is a problem that technical personnel in this field urgently need to solve. Summary of the invention

[0005] In view of this, the present invention provides a method, system and device for generating a data table, which overcome the above-mentioned defects.

[0006] In order to achieve the above object, the present invention provides the following technical solutions:

[0007] A method for generating a data table, the specific steps are:

[0008] Build a bill database based on tax bills;

[0009] According to different subject types and based on historical data, different standard templates are generated to build a template library;

[0010] Get request information, determine the subject type, and call the corresponding standard template;

[0011] Parse the request information, generate an identification mark, and based on the identification mark, retrieve data from the bill database and generate a standard data table according to the corresponding standard template.

[0012] Optionally, the steps to build the bill database are:

[0013] Create an empty database;

[0014] Get the tax receipt and generate a string based on the invoice code and invoice number;

[0015] determining a first identifier based on the invoice code and the invoice number;

[0016] Classify and store the tax receipts based on the first identifier and generate a primary index;

[0017] Obtain information on tax receipts stored in categories and generate secondary indexes;

[0018] Generate an index table based on the primary index and secondary index.

[0019] Optionally, the tax receipt includes an electronic receipt obtained from an invoicing system, a scanned or filled-in paper receipt.

[0020] Optionally, the step of determining the first identifier is:

[0021] Determining the number of digits of the first identifier based on the total number of digits of the invoice code and the invoice number;

[0022] The first identifier is determined according to the number of digits of the first identifier and a preset mapping relationship.

[0023] Optionally, the secondary index includes any one or more combinations of invoicing date, buyer name, buyer taxpayer identification number, product name, and invoice amount.

[0024] Optional, entity types include VAT declaration, periodic tax bill statistics for long-term contracts, single tax bill query, and account summary.

[0025] Optional steps to generate the data table:

[0026] Step 4.1, obtain the request information and parse the request information;

[0027] Step 4.2: Based on the parsed information, obtain the keywords and keyword types of the request information;

[0028] Step 4.3: Determine whether the keyword type is numeric; if so, proceed to step 4.4; if not, proceed to step 4.5;

[0029] Step 4.4, determine whether it is an invoice code and / or invoice number; if so, call the mapping relationship, generate a first identification mark, and perform a first-class search; then generate a second identification mark based on the keyword, and perform a second-class search; if not, generate a second identification mark based on the keyword, and perform a second-class search;

[0030] Step 4.5, generate a second identification mark based on the keyword and perform a second-category search;

[0031] Step 4.6: Generate a data table based on the corresponding standard template according to the search results.

[0032] Optionally, when performing a second-category search, if the keyword is two or more keywords, the second identification mark also includes the logical relationship between the keywords.

[0033] A data table generation system, comprising:

[0034] Invoice database generation module: used to build an invoice database based on tax invoices;

[0035] Template library generation module: used to generate standard templates based on subject type and historical data;

[0036] Information collection module: used to obtain request information and transmit it to the data processing module;

[0037] Data processing module: used to call the corresponding standard template and generate an identification mark according to the request information; and generate a standard data table based on the corresponding standard template and identification mark.

[0038] A device for generating a data table comprises a processor; and a memory arranged to store computer executable instructions, wherein when the executable instructions are executed, the processor executes any one of the above methods.

[0039] It can be seen from the above technical solution that compared with the prior art, the present invention discloses a method, system and device for generating a data table. By taking the first identifier as the classification standard, the time for single-category retrieval is shortened, and at the same time, two-level indexes are established to cooperate with each other, which can improve the speed and accuracy of retrieval. The present invention also standardizes the retrieval data by establishing a template library to facilitate data aggregation and statistics. The present invention simplifies the work intensity of the staff, speeds up the information query, and increases the accuracy of the data table. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0041] Figure 1 It is a schematic diagram of the method flow of the present invention;

[0042] Figure 2 It is a schematic diagram of the system structure of the present invention. DETAILED DESCRIPTION

[0043] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0044] Example 1

[0045] The embodiment of the present invention discloses a method for generating a data table, such as Figure 1 As shown, the specific steps are:

[0046] Step 1: Build a bill database based on tax bills;

[0047] Step 2: Generate different standard templates based on historical data according to different subject types and build a template library;

[0048] Step 3: Get the request information, determine the subject type, and call the corresponding standard template;

[0049] Step 4: parse the request information, generate an identification mark, and retrieve data from the bill database based on the identification mark, and generate a standard data table according to the corresponding standard template; the specific steps are:

[0050] The bill database construction process disclosed in step 1 is specifically as follows:

[0051] Step 1.1, create an empty database;

[0052] Step 1.2, obtain the tax receipt, and concatenate the invoice code and the invoice number to generate a string;

[0053] Step 1.3, determining a first identifier based on the invoice code and the invoice number;

[0054] Step 1.4: Classify and store the tax receipts based on the first identifier, and generate a primary index;

[0055] Step 1.5, obtain the information data of the tax receipts stored in categories and generate a secondary index;

[0056] Step 1.6: Generate an index table based on the primary index and the secondary index.

[0057] In the above steps, step 1.3 also includes:

[0058] Step 1.3.1, determining the number of digits of the first identifier based on the total number of digits of the invoice code and the invoice number;

[0059] Step 1.3.2: Determine the first identifier according to the number of digits of the first identifier and a preset mapping relationship.

[0060] The details of the data table generated in step 4 are as follows:

[0061] Step 4.1, obtain the request information and parse the request information;

[0062] Step 4.2: Based on the parsed information, obtain the keywords and keyword types of the request information;

[0063] Step 4.3: Determine whether the keyword type is numeric; if so, proceed to step 4.4; if not, proceed to step 4.5;

[0064] Step 4.4, determine whether it is an invoice code and / or invoice number; if so, call the mapping relationship, generate a first identification mark, and perform a first-class search; then generate a second identification mark based on the keyword, and perform a second-class search; if not, generate a second identification mark based on the keyword, and perform a second-class search;

[0065] Step 4.5, generate a second identification mark based on the keyword and perform a second-category search;

[0066] Step 4.6: Generate a data table based on the corresponding standard template according to the search results.

[0067] Among them, the secondary index includes any one or more combinations of invoice date, buyer name, buyer taxpayer identification number, product name, and invoice amount.

[0068] Among them, the subject types include value-added tax declaration, periodic tax bill statistics for long-term contracts, single tax bill inquiry, and account summary.

[0069] In another embodiment, if the keyword is two or more keywords, the second identification mark further includes the logical relationship between the keywords.

[0070] In another embodiment, a data table generation system is also included, such as Figure 2 As shown, including:

[0071] Invoice database generation module: used to build an invoice database based on tax invoices;

[0072] Template library generation module: used to generate standard templates based on subject type and historical data;

[0073] Information collection module: used to obtain request information and transmit it to the data processing module;

[0074] Data processing module: used to call the corresponding standard template and generate an identification mark according to the request information; and generate a standard data table based on the corresponding standard template and identification mark.

[0075] Another embodiment also includes a data table generation device, including a processor; and a memory arranged to store computer executable instructions, wherein when the executable instructions are executed, the processor executes the above-mentioned data table generation method.

[0076] Example 2

[0077] This embodiment takes value-added tax declaration as an example to generate a data table.

[0078] Step 1: Build a bill database based on tax bills;

[0079] Step 1.1, create an empty database;

[0080] Step 1.2, obtain the tax receipt, and concatenate the beginning and end of any invoice code and invoice number to generate a string;

[0081] Step 1.3: Determine the first identifier based on the invoice code and invoice number, specifically:

[0082] Step 1.3.1, determining the number of digits of the first identifier based on the total number of digits of the invoice code and the invoice number;

[0083] Specifically: For a tax invoice, the invoice code and number are its basic components. The ordinary invoice code is 12 digits, and the VAT invoice code is 10 digits (including ordinary VAT invoices and special VAT invoices); each digit in the invoice code has a specific meaning. The invoice number is 8 digits, and each digit is a serial number without a specific meaning. The invoice code and the invoice number together identify an invoice. The invoice code plus the invoice number of an ordinary invoice is a total of 20 digits, and the invoice code plus the invoice number of a VAT invoice is a total of 18 digits. The number of digits of the first identifier should be less than the sum of the number of digits of the invoice code and the invoice number. In this embodiment, the number of digits of the first identifier is 8;

[0084] Step 1.3.2, determining the first identifier according to the number of digits of the first identifier and a preset mapping relationship;

[0085] Specifically, the mapping relationship may be determined based on historical data and empirical values, such as the first N characters, the last N characters, scattered characters, etc.; the mapping relationship determined in this embodiment is the one-to-one corresponding scattered characters, and characters 1-6, the 8th, and the 9th are selected as the first identifier;

[0086] Step 1.4: Classify and store the tax receipts based on the first identifier, and generate a primary index;

[0087] Specifically, it is determined whether there is a data table corresponding to the eight characters in the database; if so, any invoice is entered into the data table; if not, a corresponding data table is created, and the invoice is inserted into the newly created data table, the first identifier is used as the data table identifier, a primary index is generated, and the index table is updated;

[0088] Step 1.5: Obtain the information data of the newly deposited tax receipt, generate a secondary index, and update the index table;

[0089] Specifically, the secondary index includes any one or more of the categories such as invoice date, buyer name, buyer taxpayer identification number, commodity name, invoice amount, etc.

[0090] Step 1.6: Determine whether any invoice is the last invoice. If so, end the establishment of the bill database; if not, proceed to step 1.2.

[0091] Step 2: Generate different standard templates based on historical data according to different subject types and build a template library.

[0092] Step 3: Get the request information, determine the subject type, and call the corresponding standard template;

[0093] In this embodiment, the request information is to generate the "Anti-Counterfeiting Tax Control VAT Special Invoice Stub Detail List" for month X, so the subject is determined to be VAT declaration, and the standard template of the VAT special invoice stub detail list is called.

[0094] Step 4: parse the request information, generate an identification mark, and retrieve data from the bill database based on the identification mark, and generate a standard data table according to the corresponding standard template; the specific steps are:

[0095] Step 4.1, obtain the request information and parse the request information;

[0096] Step 4.2: Based on the parsed information, the keywords for obtaining the requested information are: X month, special VAT invoice, stub; the keyword type is text type;

[0097] Step 4.3: The keyword type is text type. Based on the keywords and their internal logical relationships, an identification mark is generated: X month & VAT special invoice & stub, and a second-class search is performed in the bill database;

[0098] Step 4.4: Obtain the search results and generate an anti-counterfeiting tax control VAT special invoice stub detail list based on the standard template of the VAT special invoice stub detail list.

[0099] Before this step, the bill database needs to be updated according to the time difference between the last update time and the current operation time.

[0100] Example 3

[0101] This embodiment takes the query of a single bill as an example to generate a data table.

[0102] In this embodiment, the establishment of the bill database and the template library is the same as that in the previous embodiment.

[0103] In this embodiment, the request information obtained is to obtain the value XXX, and the goods are the invoice information of the excavator, so the subject type is determined to be a single tax invoice query, and thus the single invoice information table is called.

[0104] Step 4.1, obtain the request information and parse the request information;

[0105] Step 4.2, based on the parsed information, obtain the keywords of the request information; in this embodiment, the keywords are XXX and excavator, and the types of the keywords are numerical and text respectively;

[0106] Step 4.3: Determine whether the value XXX is an invoice code and / or an invoice number. If the value XXX is an invoice code, call the mapping relationship, generate a first identification mark, and perform a first-class search. In the obtained results, perform a second-class search based on the keyword "excavator".

[0107] Step 4.4: Generate a data table based on the single bill information table according to the search results.

[0108] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.

[0109] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for generating a data table, characterized in that: The specific steps are: Build a bill database based on tax bills; According to different subject types and based on historical data, different standard templates are generated to build a template library; Get request information, determine the subject type, and call the corresponding standard template; Parse the request information, generate an identification mark, and based on the identification mark, retrieve data from the bill database and generate a standard data table according to the corresponding standard template; Steps to generate the data table: Step 4.1, obtain the request information and parse the request information; Step 4.2: Based on the parsed information, obtain the keywords and keyword types of the request information; Step 4.3: Determine whether the keyword type is numeric; if so, proceed to step 4.4; if not, proceed to step 4.5; Step 4.4, determine whether it is an invoice code and / or invoice number; if so, call the mapping relationship, generate a first identification mark, and perform a first-class search; then generate a second identification mark based on the keyword, and perform a second-class search; if not, generate a second identification mark based on the keyword, and perform a second-class search; Step 4.5, generate a second identification mark based on the keyword and perform a second-category search; Step 4.6: Generate a data table based on the corresponding standard template according to the search results.

2. The method for generating a data table according to claim 1, characterized in that: The steps to build the bill database are: Create an empty database; Get the tax receipt and generate a string based on the invoice code and invoice number; determining a first identifier based on the invoice code and the invoice number; Classify and store the tax receipts based on the first identifier and generate a primary index; Obtain information on tax receipts stored in categories and generate secondary indexes; Generate an index table based on the primary index and secondary index.

3. The method for generating a data table according to claim 1, characterized in that: Tax receipts include electronic receipts obtained from the invoicing system, scanned or filled-in paper receipts.

4. The method for generating a data table according to claim 2, characterized in that: The steps for determining the first identification are: Determining the number of digits of the first identifier based on the total number of digits of the invoice code and the invoice number; The first identifier is determined according to the number of digits of the first identifier and a preset mapping relationship.

5. The method for generating a data table according to claim 2, characterized in that: The secondary index includes any one or more combinations of invoice date, buyer name, buyer taxpayer identification number, product name, and invoice amount.

6. The method for generating a data table according to claim 1, characterized in that: Entity types include VAT declaration, periodic tax bill statistics for long-term contracts, single tax bill inquiry, and account summary.

7. A method for generating a data table according to claim 6, characterized in that: When performing a second-category search, if the keyword is two or more keywords, the second identification mark also includes the logical relationship between the keywords.

8. A data table generation system, characterized in that: A method for generating a data table according to any one of claims 1 to 7, comprising: Invoice database generation module: used to build an invoice database based on tax invoices; Template library generation module: used to generate standard templates based on subject type and historical data; Information collection module: used to obtain request information and transmit it to the data processing module; Data processing module: used to call the corresponding standard template and generate identification marks according to the request information; and generate a standard data table based on the corresponding standard template and identification marks; Steps to generate the data table: Step 4.1, obtain the request information and parse the request information; Step 4.2: Based on the parsed information, obtain the keywords and keyword types of the request information; Step 4.3: Determine whether the keyword type is numeric; if so, proceed to step 4.4; if not, proceed to step 4.5; Step 4.4, determine whether it is an invoice code and / or invoice number; if so, call the mapping relationship, generate a first identification mark, and perform a first-class search; then generate a second identification mark based on the keyword, and perform a second-class search; if not, generate a second identification mark based on the keyword, and perform a second-class search; Step 4.5, generate a second identification mark based on the keyword and perform a second-category search; Step 4.6: Generate a data table based on the corresponding standard template according to the search results.

9. A data table generating device, characterized in that: comprising a processor; and a memory arranged to store computer executable instructions, which when executed cause the processor to perform the method according to any one of claims 1 to 7.