Commodity tax classification code correction method and device, equipment and storage medium
By standardizing product information and synonyms conversion, and correcting the commodity tax classification code using preset deviation correction rules, the problem of low accuracy in the existing technology is solved, and higher correction accuracy and coexistence support for multiple classifications is achieved.
Patent Information
- Application Number
- CN202411676362.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-21
- Publication Date
- 2025-03-14
AI Technical Summary
Existing machine learning algorithms lack understanding and full utilization of data in the correction of commodity tax classification encoding, and fail to identify and utilize features that can improve accuracy, resulting in low accuracy of output results.
By standardizing product information, converting synonyms, and correcting the commodity tax classification code using preset deviation correction rules, supporting the coexistence of product names under multiple categories, combining invoice data with actual business and multiple deviation correction rules, considering the universality and special nature of commodity tax classification code correction.
It improves the accuracy of product tax classification code correction, supports the coexistence of product names under multiple categories, and enhances the universality and special application of bias correction rules.
Smart Images

Figure CN119624677A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a method, device, equipment and storage medium for correcting commodity tax classification codes. Background Art
[0002] Commodity tax classification codes are one of the important data for analyzing commodity invoice data. Commodity tax classification codes are generally obtained from invoices issued by enterprises themselves or invoices issued by tax authorities. Due to the differences in the professional level of financial personnel in different enterprises, the same commodity has different commodity tax classification codes in invoices issued by different enterprises, and the commodity tax classification codes need to be corrected.
[0003] At present, the coding correction method using machine learning algorithms is used to correct the commodity tax classification codes in the invoices issued by enterprises themselves. Specifically, based on the statistical data such as the number of enterprises that selected commodity tax classification codes for each commodity name in the historical information of invoice issuance in the past and the number of invoice records, a final commodity tax classification code is calculated through various machine learning algorithms.
[0004] However, the coding correction method of the machine learning algorithm only uses simple statistical numbers such as the number of households and the number of records in the historical invoice data. It lacks integration with actual business, lacks understanding and full use of data, does not make more accurate classifications of invoice data, and fails to identify and utilize features that can improve accuracy. For example, the coding correction method using the algorithm does not take into account the fact that the accuracy of commodity tax classification codes in invoices issued by tax authorities is relatively high. And it does not consider the coexistence of the same commodity name in different scenarios. It can be seen that the final output results of the coding correction method of the machine learning algorithm currently used have the problem of low accuracy. Summary of the invention
[0005] In view of this, the present application provides a method, device, equipment and storage medium for correcting commodity tax classification codes, which standardizes commodity information and converts synonyms, and then uses preset correction rules to correct commodity tax classification codes. It supports the coexistence of commodity names under multiple categories, combines invoice data with actual business and multiple correction rules, takes into account the universality and particularity of commodity tax classification code correction, and improves the accuracy of commodity tax classification code correction.
[0006] To solve the above problems, the technical solutions provided by this application are as follows:
[0007] In a first aspect, an embodiment of the present application provides a method for correcting a commodity tax classification code, the method comprising:
[0008] Extracting commodity information from pre-stored invoice data, the commodity information including original commodity name, original commodity tax classification code and original issuing enterprise data;
[0009] Normalizing the original commodity name and the original commodity tax classification code to obtain a normalized commodity name and a normalized commodity tax classification code;
[0010] Converting the normalized product name based on a pre-built product synonym dictionary to obtain a target product name;
[0011] Taking the target commodity name and the standardized commodity tax classification code as objects, obtaining the target issuing enterprise data corresponding to the target commodity name based on the statistics of the original issuing enterprise data;
[0012] Based on the target issuing enterprise data, the standardized commodity tax classification code is corrected using specific coexistent classification rules and preset correction rules to obtain the target commodity tax classification code corresponding to the target commodity name; the preset correction rules include trusted factor calculation rules, general correction rules, special correction rules for invoice issuance on behalf of others, and special correction rules for empty codes.
[0013] In a possible implementation, the normalizing the original commodity name and the original commodity tax classification code to obtain the normalized commodity name and the normalized commodity tax classification code includes:
[0014] Remove the abbreviations of commodity and service classifications, and the names of goods and services from the original commodity data to obtain the first commodity name;
[0015] Unifying the input format of the first product name to obtain the second product name;
[0016] Performing data cleaning on the second product name to obtain the standardized product name;
[0017] If the original commodity tax classification code is an empty code, the commodity tax classification code retrieved based on the commodity and service classification abbreviation and the goods and service name is used as the normalized commodity tax classification code corresponding to the empty code;
[0018] If the commodity tax classification code corresponding to the abbreviation of the commodity and service classification and the name of the goods and services cannot be retrieved, the preset special code will be used as the standardized commodity tax classification code corresponding to the empty code.
[0019] In a possible implementation, the target issuing enterprise data includes the number of issued enterprise accounts, the number of issued invoices, the number of accounts opened on behalf of others, and the number of accounts with other specific invoicing behaviors. Based on the target issuing enterprise data, the standardized commodity tax classification code is corrected using specific coexisting classification rules and preset correction rules to obtain the target commodity tax classification code corresponding to the target commodity name, including:
[0020] Using the trust factor calculation rule, weights are assigned to the number of corporate accounts issued, the number of invoices issued, the number of accounts opened on behalf of others, and the number of accounts for other specific invoicing behaviors;
[0021] Calculate a total credibility factor based on the weight, and use the total credibility factor to sort the standardized commodity tax classification codes; the sorting includes a total sorting, a general coexistent classification sorting, and a specific coexistent classification sorting;
[0022] If the number of accounts opened on behalf of others and the number of accounts for other specific invoicing behaviors are 0, then according to the sorting, the target commodity tax classification code corresponding to the target commodity name is determined by using the general correction rule and the specific coexisting classification rule;
[0023] If the number of accounts opened on behalf of others is not 0, the target commodity tax classification code corresponding to the target commodity name is determined by using the special correction rule for invoice issuance on behalf of others;
[0024] If there is a special code in the standardized commodity tax classification code corresponding to the target commodity name, the target commodity tax classification code corresponding to the target commodity name is determined using the empty code special correction rule.
[0025] In a possible implementation, if the number of accounts opened on behalf of others and the number of accounts for other specific invoicing behaviors are 0, then according to the sorting, the target commodity tax classification code corresponding to the target commodity name is determined using the general correction rule and the specific coexistent classification rule, including:
[0026] If the target commodity name does not have a record in the rule table corresponding to the specific coexistent classification rule, the normalized commodity tax classification code ranked as 1 in the general coexistent classification ranking is used as the target commodity tax classification code;
[0027] If the target commodity name has a record in the rule table corresponding to the specific coexistent classification rule, the normalized commodity tax classification code ranked as 1 in the specific coexistent classification ranking is used as the target commodity tax classification code;
[0028] For the non-specially coded target commodity name ranked as 0 in the specific co-existing classification sorting, the normalized commodity tax classification code ranked as 1 in the general co-existing classification sorting is used as the target commodity tax classification code.
[0029] In a possible implementation, if the number of agency account openings is not 0, the target commodity tax classification code corresponding to the target commodity name is determined by using the special correction rule for agency invoice issuance, including:
[0030] If the target commodity name whose number of agency account openings is not 0 is ranked 1 in the general coexisting classification ranking, then the first commodity tax classification code ranked 1 and the second commodity tax classification code ranked 2 in the general coexisting classification ranking are obtained;
[0031] comparing the coding level of the first commodity tax classification code with the coding level of the second commodity tax classification code;
[0032] If the coding level of the first commodity tax classification code is higher than or equal to the coding level of the second commodity tax classification code, the first commodity tax classification code is used as the target commodity tax classification code;
[0033] If the coding level of the first commodity tax classification code is lower than the coding level of the second commodity tax classification code, the second commodity tax classification code is used as the target commodity tax classification code.
[0034] In a possible implementation, if there is a special code in the standardized commodity tax classification code corresponding to the target commodity name, the target commodity tax classification code corresponding to the target commodity name is determined using the empty code special correction rule, including:
[0035] If the target commodity name corresponding to the special code also has a corresponding standardized commodity tax classification code in addition to the special code, the standardized commodity tax classification code that exists in addition to the special code shall be used as the pending commodity tax classification code;
[0036] If there is one pending commodity tax classification code ranked as 1 in the general coexistent classification ranking, the pending commodity tax classification code is used as the target commodity tax classification code;
[0037] If there are multiple pending commodity tax classification codes ranked as 1 in the general coexistent classification ranking, determine the target commodity tax classification code from the multiple pending commodity tax classification codes according to a preset importance level;
[0038] If the target commodity name corresponding to the special code does not have a corresponding standardized commodity tax classification code other than the special code, the preset special code will be used as the target commodity tax classification code.
[0039] In one possible implementation, the weight of the number of corporate accounts issued is greater than the weight of the number of invoices issued, the weight of the number of accounts for other specific invoicing behaviors is greater than the weight of the number of corporate accounts issued, and the weight of the number of accounts opened on behalf of others is greater than the weight of the number of accounts for other specific invoicing behaviors.
[0040] In a second aspect, an embodiment of the present application provides a correction device for commodity tax classification codes, the correction device comprising:
[0041] An extraction module is used to extract commodity information from pre-stored invoice data, wherein the commodity information includes original commodity name, original commodity tax classification code and original issuing enterprise data;
[0042] A normalization module, used for normalizing the original commodity name and the original commodity tax classification code to obtain a normalized commodity name and a normalized commodity tax classification code;
[0043] A conversion module, used for converting the normalized product name based on a pre-built product synonym dictionary to obtain a target product name;
[0044] An acquisition module is used to obtain the target issuing enterprise data corresponding to the target commodity name based on the original issuing enterprise data statistics, taking the target commodity name and the standardized commodity tax classification code as objects;
[0045] A correction module is used to correct the standardized commodity tax classification code based on the target issuing enterprise data, using specific coexisting classification rules and preset correction rules to obtain the target commodity tax classification code corresponding to the target commodity name; the preset correction rules include trust factor calculation rules, general correction rules, special correction rules for invoicing on behalf of others, and special correction rules for empty codes.
[0046] In a possible implementation, the normalization module is specifically used to:
[0047] Remove the abbreviations of commodity and service classifications, and the names of goods and services from the original commodity data to obtain the first commodity name;
[0048] Unifying the input format of the first product name to obtain the second product name;
[0049] Performing data cleaning on the second product name to obtain the standardized product name;
[0050] If the original commodity tax classification code is an empty code, the commodity tax classification code retrieved based on the commodity and service classification abbreviation and the goods and service name is used as the normalized commodity tax classification code corresponding to the empty code;
[0051] If the commodity tax classification code corresponding to the abbreviation of the commodity and service classification and the name of the goods and services cannot be retrieved, the preset special code will be used as the standardized commodity tax classification code corresponding to the empty code.
[0052] In a possible implementation, the target issuing enterprise data includes the number of issued enterprise accounts, the number of invoices issued, the number of agency accounts opened, and the number of other specific invoicing behavior accounts, and the correction module includes:
[0053] A weight setting submodule, for assigning weights to the number of enterprise accounts issued, the number of invoices issued, the number of accounts opened on behalf of others, and the number of accounts for other specific invoicing behaviors using the trust factor calculation rule;
[0054] A calculation submodule, for calculating a total credibility factor based on the weight, wherein the total credibility factor is used to sort the normalized commodity tax classification codes; the sorting includes a total sorting, a general coexistent classification sorting, and a specific coexistent classification sorting;
[0055] A general correction submodule, for determining the target commodity tax classification code corresponding to the target commodity name according to the sorting, using the general correction rule and the specific coexistent classification rule, if the number of accounts opened on behalf of others and the number of accounts for other specific invoicing behaviors are 0;
[0056] A special correction submodule for invoice issuance on behalf of another, for determining the target commodity tax classification code corresponding to the target commodity name by using the special correction rule for invoice issuance on behalf of another if the number of accounts opened on behalf of another is not 0;
[0057] The empty code special correction submodule is used to determine the target commodity tax classification code corresponding to the target commodity name using the empty code special correction rule if there is a special code in the standardized commodity tax classification code corresponding to the target commodity name.
[0058] In a possible implementation, the general deviation correction submodule is specifically used to:
[0059] If the target commodity name does not have a record in the rule table corresponding to the specific coexistent classification rule, the normalized commodity tax classification code ranked as 1 in the general coexistent classification ranking is used as the target commodity tax classification code;
[0060] If the target commodity name has a record in the rule table corresponding to the specific coexistent classification rule, the normalized commodity tax classification code ranked as 1 in the specific coexistent classification ranking is used as the target commodity tax classification code;
[0061] For the non-specially coded target commodity name ranked as 0 in the specific co-existing classification sorting, the normalized commodity tax classification code ranked as 1 in the general co-existing classification sorting is used as the target commodity tax classification code.
[0062] In a possible implementation, the special deviation correction submodule for issuing invoices on behalf of others is specifically used for:
[0063] If the target commodity name whose number of agency account openings is not 0 is ranked 1 in the general coexisting classification ranking, then the first commodity tax classification code ranked 1 and the second commodity tax classification code ranked 2 in the general coexisting classification ranking are obtained;
[0064] comparing the coding level of the first commodity tax classification code with the coding level of the second commodity tax classification code;
[0065] If the coding level of the first commodity tax classification code is higher than or equal to the coding level of the second commodity tax classification code, the first commodity tax classification code is used as the target commodity tax classification code;
[0066] If the coding level of the first commodity tax classification code is lower than the coding level of the second commodity tax classification code, the second commodity tax classification code is used as the target commodity tax classification code.
[0067] In a possible implementation, the empty code special correction submodule is specifically used to:
[0068] If the target commodity name corresponding to the special code also has a corresponding standardized commodity tax classification code in addition to the special code, the standardized commodity tax classification code that exists in addition to the special code shall be used as the pending commodity tax classification code;
[0069] If there is one pending commodity tax classification code ranked as 1 in the general coexistent classification ranking, the pending commodity tax classification code is used as the target commodity tax classification code;
[0070] If there are multiple pending commodity tax classification codes ranked as 1 in the general coexistent classification ranking, determine the target commodity tax classification code from the multiple pending commodity tax classification codes according to a preset importance level;
[0071] If the target commodity name corresponding to the special code does not have a corresponding standardized commodity tax classification code other than the special code, the preset special code will be used as the target commodity tax classification code.
[0072] In one possible implementation, the weight of the number of corporate accounts issued is greater than the weight of the number of invoices issued, the weight of the number of accounts for other specific invoicing behaviors is greater than the weight of the number of corporate accounts issued, and the weight of the number of accounts opened on behalf of others is greater than the weight of the number of accounts for other specific invoicing behaviors.
[0073] In a third aspect, an embodiment of the present application provides a device for correcting a commodity tax classification code, the device comprising: a processor, a memory, and a system bus;
[0074] The processor and the memory are connected via the system bus;
[0075] The memory is used to store one or more programs, and the one or more programs include instructions, which, when executed by the processor, enable the processor to execute the method for correcting the commodity tax classification code described in the first aspect above.
[0076] In a fourth aspect, an embodiment of the present application provides a storage medium, which stores instructions. When the instructions are executed by a computer, the computer implements the method for correcting the commodity tax classification code described in the first aspect.
[0077] It can be seen that this application has the following beneficial effects:
[0078] The embodiment of the present application provides a method for correcting commodity tax classification codes, extracting the original commodity name, the original commodity tax classification code and the original issuing enterprise data from the pre-stored invoice data; normalizing the original commodity name and the original commodity tax classification code to obtain the normalized commodity name and the normalized commodity tax classification code; converting the normalized commodity name based on the pre-built commodity synonym dictionary to obtain the target commodity name. Taking the target commodity name and the normalized commodity tax classification code as the objects, the target issuing enterprise data corresponding to the target commodity name is obtained based on the statistics of the original issuing enterprise data; based on the target issuing enterprise data, the normalized commodity tax classification code is corrected using specific coexisting classification rules and preset correction rules to obtain the target commodity tax classification code corresponding to the target commodity name; the preset correction rules include trust factor calculation rules, general correction rules, special correction rules for issuing invoices on behalf of others and special correction rules for empty codes. In this way, by standardizing the commodity information and converting synonyms, and then using the preset correction rules to correct the commodity tax classification code, it supports the coexistence of commodity names under multiple categories, combines invoice data with actual business and multiple correction rules, takes into account the universality and particularity of commodity tax classification code correction, and improves the accuracy of commodity tax classification code correction.
[0079] The embodiment of the present application also provides a device corresponding to the above method, which has the same beneficial effects as the above method. BRIEF DESCRIPTION OF THE DRAWINGS
[0080] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention, and for ordinary technicians in this field, other drawings can also be obtained based on these drawings.
[0081] Figure 1 A schematic diagram of part of the contents of the "Goods and Services Tax Classification and Coding" provided for the embodiment of this application;
[0082] Figure 2 A flowchart of a method for correcting a commodity tax classification code provided in an embodiment of the present application;
[0083] Figure 3 A flowchart of another method for correcting a commodity tax classification code provided in an embodiment of the present application;
[0084] Figure 4 A schematic diagram of the structure of a correction device for commodity tax classification code provided in an embodiment of the present application;
[0085] Figure 5A structural schematic diagram of a correction device for commodity tax classification codes provided in an embodiment of the present application. DETAILED DESCRIPTION
[0086] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.
[0087] In this application, relational terms such as first and second, etc. are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. The terms "comprise", "comprising" or any other variants thereof are intended to cover non-exclusive inclusion, so that the process, method, article or equipment including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or equipment. In the absence of further restrictions, the elements defined by the statement "comprising a ..." do not exclude the presence of other identical elements in the process, method, article or equipment including the elements.
[0088] The commodity tax classification code included in the invoice issued by the enterprise does not match the commodity name, that is, the commodity tax classification code selected by the enterprise when issuing the invoice is wrong, and the commodity name does not correspond to the correct commodity tax classification code in the tax business, which will affect the accuracy of the data analysis results based on the commodity tax classification code.
[0089] There are generally two ways for enterprises to issue invoices: the enterprises themselves issue invoices or the tax authorities issue invoices on their behalf.
[0090] Enterprises issue invoices by themselves: Enterprises with invoice-issuing qualifications can issue invoices by themselves in the tax control system or online platform. When issuing invoices, users enter the name of the goods actually sold and select the corresponding commodity tax classification code. Due to the differences in the business level of financial personnel in different enterprises, the commodity tax classification codes of the same commodity in the invoices issued by different enterprises may be inconsistent, and users may have selected the wrong commodity tax classification code.
[0091] Tax authorities issue invoices on behalf of others: Enterprises that do not have the qualifications to issue invoices can apply for tax authorities to issue invoices on their behalf. After submitting relevant information and prepaying taxes, a dedicated person at the tax authorities will issue invoices. Unlike enterprises issuing invoices on their own, the commodity tax classification codes in invoices issued by tax authorities are relatively more accurate.
[0092] At present, the coding correction method using machine learning algorithms is used to correct the commodity tax classification codes in the invoices issued by enterprises themselves. Specifically, based on the statistical data such as the number of enterprises that selected commodity tax classification codes for each commodity name in the historical information of invoice issuance in the past and the number of invoice records, a final commodity tax classification code is calculated through various machine learning algorithms.
[0093] However, the coding correction method of the machine learning algorithm tends to be a pure algorithm application, which only uses simple statistical numbers such as the number of households and the number of records in the historical invoice data. It lacks integration with actual business, lacks understanding and full utilization of the data, does not make a more precise classification of the invoice data, fails to identify and utilize features in the invoice data that can improve accuracy, and the final output results contain a large number of errors.
[0094] For example, for the same product name, the accuracy of the commodity tax classification code obtained from the agency invoice is significantly higher than that of the self-issued invoice. In this case, even if the number of companies and records issued by the agency is smaller, the final output of the result should still be inclined to the agency invoice. However, the machine learning algorithm is the opposite.
[0095] For another example, some service invoices will add the "goods and services name" information in front of the product name. The commodity tax classification code extracted from the "goods and services name" information is the actual commodity tax classification code corresponding to the product. For this type of invoice, the commodity tax classification code extracted from the "goods and services name" information should have a higher priority than the pure algorithm method.
[0096] The coding correction method of the machine learning algorithm can only output a unique commodity tax classification code for the same commodity name, and the output result is obviously biased towards the goods category, that is, the same commodity name cannot coexist in different scenarios.
[0097] For example, for an invoice with the commodity name "steel plate", it may be because the steel production enterprise sold the physical "steel plate" and issued it. The invoice item is a kind of goods, which corresponds to the record of "article" 1 and "combined code" 1080207070000000000 in the "Commodity and Service Tax Classification and Coding". It may also be because the goods transported by the freight transport enterprise are "steel plates", which should actually be a kind of transportation service (a more detailed level of sales service), which corresponds to the record of "article" 3 and "combined code" 3010102020100000000 in the "Commodity and Service Tax Classification and Coding".
[0098] Even within the commodity category, the same commodity name can have multiple commodity tax classification codes. For example, for "Yuhua Stone", it can be a kind of "cigarette", and its "combined code" is 1030402010000000000. It can also be a kind of "natural stone products", and its "combined code" is 1080107030000000000.
[0099] In the existing technical solutions, "steel plates" are generally considered to be physical objects, and the output "merged code" is basically "1080207070000000000", and some invoices that should be classified as transportation services are also considered to be goods invoices. The classification of "Yuhua Stone" will determine which one to output based on the number and number of records of companies that issue "cigarettes" and "natural stone products", and the different commodity types corresponding to the two invoices are modified to the same type.
[0100] In view of this, the embodiment of the present application provides a correction method, device, equipment and storage medium for commodity tax classification codes, extracting the original commodity name, original commodity tax classification code and original issuing enterprise data from pre-stored invoice data; normalizing the original commodity name and the original commodity tax classification code to obtain the normalized commodity name and the normalized commodity tax classification code; converting the normalized commodity name based on a pre-built commodity synonym dictionary to obtain the target commodity name. Taking the target commodity name and the normalized commodity tax classification code as objects, the target issuing enterprise data corresponding to the target commodity name is obtained based on the statistics of the original issuing enterprise data; based on the target issuing enterprise data, the normalized commodity tax classification code is corrected using specific coexisting classification rules and preset correction rules to obtain the target commodity tax classification code corresponding to the target commodity name; the preset correction rules include trust factor calculation rules, general correction rules, special correction rules for issuing invoices on behalf of others and special correction rules for empty codes. In this way, by standardizing the commodity information and converting synonyms, and then using the preset correction rules to correct the commodity tax classification code, it supports the coexistence of commodity names under multiple categories, combines invoice data with actual business and multiple correction rules, takes into account the universality and particularity of commodity tax classification code correction, and improves the accuracy of commodity tax classification code correction.
[0101] In order to facilitate understanding of the technical solution provided in the embodiment of the present application, the correction method, device, equipment and storage medium for the commodity tax classification code provided in the embodiment of the present application are described below in conjunction with the accompanying drawings.
[0102] First, the terms mentioned in the embodiments of the present application are explained.
[0103] See also Figure 1 , Figure 1A schematic diagram of part of the contents of the "Commodity and Service Tax Classification and Coding" provided for the embodiment of the present application. Commodity tax classification codes are important data when analyzing invoice data. Due to the rich variety of commodities, commodity names are not enumerable. Even for the same commodity, some companies will add some supplementary descriptions to the commodity name when issuing invoices, which will cause the commodity name in the invoice to be different. Some of them are different only because the company employees use full-width or half-width input methods when entering Chinese characters.
[0104] The commodity tax classification code is derived from the "Commodity and Service Tax Classification and Coding" compiled by the State Administration of Taxation. It covers all activities in six major categories of the national economy, including goods, labor, sales services, intangible assets, real estate, and non-taxable items without sales, with more than 4,200 enumeration values. When analyzing invoice data, the commodity tax classification code is used as the object. In order to ensure the accuracy of data analysis, very high requirements are placed on the accuracy of the commodity tax classification code in the invoice.
[0105] Figure 1 Some of the data in the "Commodity and Service Tax Classification and Coding" shown have a hierarchical relationship. The "name of goods and services" of the lower-level commodities are the subdivision of the "name of goods and services" of the upper-level commodities. The higher the level, such as the "article", "category" and "chapter" level, the clearer the meaning of the "name of goods and services" is, and the easier it is to distinguish it from other "names of goods and services". At a more detailed level, the closer the meanings of two adjacent "names of goods and services" at the same level are, the easier it is to misselect them when issuing invoices. Therefore, the commodity tax classification code in the invoice has a relatively small probability of error in the high-level coding of "article", "category" and "chapter", and a relatively large probability of error in the low-level coding of "section", "article" and "clause".
[0106] Characteristics of invoice data: Invoices issued through the tax control system or online platform have obvious characteristics after being saved in the background database. For example, the "abbreviation of the classification of goods and services" in the "Classification and Coding of Goods and Services Taxes" will be automatically added to the front of the name of the goods filled in by the enterprise after adding "*" before and after. At the same time, if the invoice is issued by the enterprise itself, the corresponding "merged code" will be assigned to the commodity tax classification code. If the invoice is issued on behalf of others, the commodity tax classification code will be empty. In some invoice data, the "name of goods and services" and "|" in the "Classification and Coding of Goods and Services Taxes" will be added to the front of the commodity name filled in by the enterprise, and its commodity tax classification code is empty.
[0107] See also Figure 2 , Figure 2A flowchart of a method for correcting the commodity tax classification code provided in an embodiment of the present application. The implementation of the embodiment of the present application mainly includes six parts: extracting commodity information from invoice data, normalizing commodity information, commodity synonym dictionary, specific coexisting classification rules, normalized commodity statistics, and normalized commodity tax classification code correction. Each part is described in detail through the following embodiments.
[0108] See also Figure 3 , Figure 3 A flowchart of another method for correcting the commodity tax classification code provided in an embodiment of the present application. The method for correcting the commodity tax classification code can be applied to a server or a system, which is not limited in the embodiment of the present application and can be selected according to actual needs. The correction method specifically includes S301-S305.
[0109] S301: extracting commodity information from pre-stored invoice data, wherein the commodity information includes the original commodity name, the original commodity tax classification code, and the original issuing enterprise data.
[0110] The embodiment of the present application is a specific description of “extracting commodity information from invoice data”.
[0111] After an enterprise issues an invoice, the invoice data of all enterprises in each province will be automatically collected to the target user by province. After obtaining the invoice data, the target user can perform various data analyses, first pre-processing various errors in the original invoice data, including the correction of commodity tax classification codes.
[0112] Depending on the type of enterprise, enterprises can issue different types of invoices, such as special VAT invoices, ordinary VAT invoices, roll invoices, toll invoices, motor vehicle sales unified invoices, used car sales unified invoices, etc. Special VAT invoices and ordinary VAT invoices are divided into paper and electronic versions.
[0113] Since the face information of different types of invoices varies greatly, invoices issued by enterprises are stored independently by invoice type when they are stored in the production system. After data integration, 16 data tables involving commodities are obtained.
[0114] When processing invoice data, the pre-stored invoice data is the data stored in the data table of 16 commodities. The original commodity name, original commodity tax classification code and original issuing enterprise data are obtained from the data table of 16 commodities that have been constructed. After unifying the field names, all data are grouped together for centralized storage.
[0115] S302: Normalize the original commodity name and the original commodity tax classification code to obtain a normalized commodity name and a normalized commodity tax classification code.
[0116] The embodiment of the present application is a specific description of "standardization of commodity information".
[0117] The standardization of commodity information includes two parts: the standardization of commodity names and the standardization of commodity tax classification codes.
[0118] In a possible manner, the normalization of the original commodity name and the original commodity tax classification code to obtain the normalized commodity name and the normalized commodity tax classification code includes: removing the commodity and service classification abbreviations and the goods and service names from the original commodity data to obtain the first commodity name; unifying the input format of the first commodity name to obtain the second commodity name; and performing data cleaning on the second commodity name to obtain the normalized commodity name. If the original commodity tax classification code is an empty code, the commodity tax classification code retrieved based on the commodity and service classification abbreviations and the goods and service names is used as the normalized commodity tax classification code corresponding to the empty code; if the commodity tax classification code corresponding to the commodity and service classification abbreviations and the goods and service names cannot be retrieved, the preset special code is used as the normalized commodity tax classification code corresponding to the empty code.
[0119] The purpose of product name standardization is to solve the problem of inconsistent product names due to differences in issuing behaviors of different companies, although the product is essentially the same.
[0120] In the data table storing invoices, the original commodity name is generated by adding "abbreviated commodity and service classification" or "name of goods and services" and other contents corresponding to the original commodity tax classification code to the commodity name filled in by the enterprise, and the original commodity tax classification code is the commodity tax classification code selected by the enterprise. Therefore, even if different enterprises fill in the same commodity name, the original commodity names will be different due to the selection of different commodity tax classification codes. In the embodiment of the present application, the "abbreviated commodity and service classification" and "name of goods and services" are removed from the original commodity name to obtain a first commodity name that is not fully standardized.
[0121] Next, the input format of the first commodity name is unified to obtain the second commodity name. Differences in the input format of commodity names may also lead to different commodity tax classification codes. In the embodiment of the present application, full-width characters can be unified into half-width characters, and Chinese punctuation marks can be unified into English punctuation marks.
[0122] Finally, the second product name is cleaned to remove meaningless content from the product name. For example, a product name may contain information such as "commercial [%3]", "commercial [%5]", "sales", "self-produced and self-sold", and quantity units. For example, the "1.6L" in "0 added premium high-fresh soy sauce 1.6L" will also affect the uniformity of the product name. The meaningless content that affects the uniformity of the product name is removed. Finally, the standardized product name is obtained.
[0123] In the case of invoice issuance and other special cases, the original commodity tax classification code in the invoice data is an empty code. The commodity tax classification code normalization is to normalize the empty code so that it has the same format as other codes.
[0124] First, based on the "abbreviated name of commodity and service classification", "name of goods and services" and other contents in the original commodity name, a commodity tax classification code is retrieved and restored from the "Commodity and Service Tax Classification and Coding", and the code is used as the normalized commodity tax classification code corresponding to the empty code. If the "abbreviated name of commodity and service classification", "name of goods and services" and other contents do not exist in the original commodity name, or it is impossible to retrieve and restore a commodity tax classification code in the "Commodity and Service Tax Classification and Coding" through the "abbreviated name of commodity and service classification", "name of goods and services" and other contents, then a special code is assigned to the commodity tax classification code to identify the empty code, that is, the preset special code is used as the normalized commodity tax classification code corresponding to the empty code. The special code can be "0000000000000000000", and the setting of the special code can be determined according to actual needs, and the embodiment of the present application is not limited to this.
[0125] The standardized commodity names and standardized commodity tax classification codes help target users analyze and process invoice data, thereby improving the accuracy of invoice data analysis.
[0126] S303: converting the normalized product name based on a pre-built product synonym dictionary to obtain a target product name.
[0127] The embodiment of the present application is a specific description of the "commodity synonym dictionary".
[0128] Since different companies have inconsistent descriptions of the same product, there are still different names for the same product after the above processing. For example, "Poplar" and "Old Poplar" actually refer to "Poplar", which corresponds to the same "combined code" in the "Commodity and Service Tax Classification and Coding"; "Light Soy Sauce" and "Haitian Soy Sauce" both refer to "soy sauce", which corresponds to the same "combined code" in the "Commodity and Service Tax Classification and Coding".
[0129] Based on this, a product synonym dictionary is pre-built, which is essentially a comparison table for storing the comparison relationship between the common name of the product and various aliases of the product. The target product name corresponding to the standardized product name is searched in the pre-built product synonym dictionary.
[0130] In addition to initializing some common commodities in the table, when the embodiment of the present application is applied to different regions, the commodity synonym dictionary can be supplemented according to the actual data conditions of each region. Specifically, commodities with multiple alias expressions, large invoice volume, and great influence on data analysis are added to the comparison table.
[0131] S304: Taking the target commodity name and the standardized commodity tax classification code as objects, the target issuing enterprise data corresponding to the target commodity name is obtained based on the statistics of the original issuing enterprise data.
[0132] The embodiment of the present application is a specific description of “normalized commodity statistics”.
[0133] Taking the target commodity name and the standardized commodity tax classification code as the object, the target issuing enterprise data is counted. The target issuing enterprise data includes the number of enterprise accounts issued, the number of invoices issued, the number of accounts opened on behalf of others, the number of accounts with other specific invoicing behaviors and other data items.
[0134] In the statistical operation process, the standardized commodity name is matched with the alias in the commodity synonym dictionary, and commodities with the same common name are grouped under the same target commodity name. Specifically, the target commodity name and the standardized commodity tax classification code are used as the objects, and the data items such as the number of issued enterprise accounts, the number of issued invoices, the number of accounts opened on behalf of others, and the number of other specific invoicing behaviors corresponding to the target commodity name are obtained from the original issuing enterprise data.
[0135] S305: Based on the target issuing enterprise data, use specific coexisting classification rules and preset correction rules to correct the standardized commodity tax classification code to obtain the target commodity tax classification code corresponding to the target commodity name; the preset correction rules include trust factor calculation rules, general correction rules, special correction rules for invoice issuance on behalf of others, and special correction rules for empty codes.
[0136] The embodiment of the present application is a specific description of "specific coexistent classification rules" and "commodity tax classification code correction".
[0137] Before explaining the "specific coexistence classification rule", the "general coexistence classification rule" is explained.
[0138] The definition of the general coexistent classification rule is that in the process of correcting the commodity tax classification code, a commodity name is allowed to output different commodity tax classification codes in different "sections" of the "Commodity and Service Tax Classification and Coding" (i.e., six categories such as goods, labor, sales services, intangible assets, real estate, and non-taxable items without sales), but only one commodity tax classification code is allowed to be output in the same "section". Unless there are special circumstances, the general coexistent classification rule is used by default in the commodity tax classification code correction link.
[0139] The general co-existing classification rules solve the large-scale problem that "steel plate" in the above example can be both "goods" and "sales service", but it cannot solve the more special problem that different commodity tax classification codes are allowed to exist within "goods" such as "Yuhua Stone". Such special problems are solved by designing specific co-existing classification rules.
[0140] Specific coexistence classification rules establish and store special coexistence rules for commodity names outside of the general and universal coexistence rules. Specifically, a table can be established to maintain multiple coexistent "merged codes" for a specified commodity under a certain level of coding in the "Commodity and Service Tax Classification and Coding". Taking "Yuhua Stone" as an example, it maintains the content shown in Table 1 below:
[0141] Product Name Coexisting tax classifications of goods Commodity tax classification code Rain Flower Stone 103 1030402010000000000 Rain Flower Stone 108 1080107030000000000
[0142] Table 1
[0143] The commodity "Yuhua Stone" is allowed to have two values under the "Goods" category. One is 1030402010000000000. When the normalized commodity tax classification code starts with 103, 1030402010000000000 is taken. The other is 1080107030000000000. When the normalized commodity tax classification code starts with 108, 1080107030000000000 is taken.
[0144] According to the specific coexistent classification rules, the higher the level of the "coexistent commodity tax classification" in the table, the more commodity tax classification codes it includes, and more commodities can be classified into their corresponding "commodity tax classification codes" during the correction process. For example, referring to Table 2, the "coexistent commodity tax classification" of the first record of "Yuhua Stone" in the table is 103, which means that as long as the commodity tax classification code after normalization begins with 103, it will correspond to 1030402010000000000, and if the "coexistent commodity tax classification" of the first record is set to 10304, only those beginning with 10304 will correspond, and the range is naturally much smaller than that set to 103. When initializing this table, it is necessary to consider the actual data situation. The smaller the range of "coexistent commodity tax classification", the more accurate the result, but some commodities may also be missed.
[0145]
[0146] Table 2
[0147] Commodity tax classification code correction is based on the statistical results of the target commodity names and commodity tax classification codes, and uses various rules to calculate one or more commodity tax classification codes for each commodity name. The main rules include specific coexisting classification rules, trust factor calculation rules, general correction rules, special correction rules for invoice issuance, and special correction rules for empty codes.
[0148] The target issuing enterprise data includes the number of issued enterprise accounts, the number of issued invoices, the number of accounts opened on behalf of others, and the number of accounts with other specific invoicing behaviors. In a possible implementation method, based on the target issuing enterprise data, the standardized commodity tax classification code is corrected using specific coexisting classification rules and preset correction rules to obtain the target commodity tax classification code corresponding to the target commodity name, including:
[0149] The trust factor calculation rules are used to assign weights to the number of corporate accounts issued, the number of invoices issued, the number of accounts opened on behalf of others, and the number of accounts for other specific invoicing behaviors; a total trust factor is calculated based on the weights, and the total trust factor is used to sort the standardized commodity tax classification codes; the sorting includes a total sorting, a general coexistent classification sorting, and a specific coexistent classification sorting.
[0150] If the number of accounts opened on behalf of others and the number of accounts for other specific invoicing behaviors are 0, the target commodity tax classification code corresponding to the target commodity name is determined according to the sorting by using the general correction rule and the specific coexisting classification rule. If the number of accounts opened on behalf of others is not 0, the target commodity tax classification code corresponding to the target commodity name is determined by using the special correction rule for invoicing on behalf of others. If there is a special code in the standardized commodity tax classification code corresponding to the target commodity name, the target commodity tax classification code corresponding to the target commodity name is determined by using the special correction rule for empty codes.
[0151] The embodiment of the present application illustrates the trusted factor calculation rules, and uses general correction rules, special correction rules for invoicing on behalf of others, and special correction rules for empty codes on the basis of the sorting generated based on the trusted factor calculation rules. For details on the use of the general correction rules, special correction rules for invoicing on behalf of others, and special correction rules for empty codes, please refer to the following.
[0152] The trust factor calculation rule assigns weights to the target invoicing enterprise data, multiplies the value of each data item by its corresponding weight to obtain the sub-trust factor, and then adds up all the sub-trust factors to calculate the total trust factor. And sort according to the total trust factor to obtain the total ranking of each commodity name and commodity tax classification code in all records, the ranking in the general coexistent classification, and the ranking in the specific coexistent classification.
[0153] In one possible implementation, the weight of the number of corporate accounts issued is greater than the weight of the number of invoices issued, the weight of the number of accounts for other specific invoicing behaviors is greater than the weight of the number of corporate accounts issued, and the weight of the number of accounts opened on behalf of others is greater than the weight of the number of accounts for other specific invoicing behaviors.
[0154] Based on the actual business situation, the weight of the number of enterprise accounts issued is greater than the weight of the number of invoices issued, and the weight of the number of accounts opened on behalf of others and the weight of the number of accounts for other specific invoicing behaviors are significantly greater than the weight of the number of enterprise accounts issued. If the weight of the number of invoices issued is set to 1, the weight of the number of enterprise accounts issued can be set to 10, the weight of the number of accounts for other specific invoicing behaviors can be set to 1,000,000, and the weight of the number of accounts opened on behalf of others can be set to 10,000,000. The embodiment of the present application is not limited to this, and the weights can be set according to actual needs.
[0155] The following Table 3 is the statistical data of some commodities in the embodiment of the present application, as well as examples of the total credibility factor and various rankings determined according to the credibility factor calculation rules.
[0156]
[0157]
[0158] Table 3
[0159] According to the contents shown in Table 3, commodity tax code correction can be achieved based on sorting and preset correction rules. Please see below for details.
[0160] Based on the contents of the above steps S301-S305, it can be known that the original commodity name, the original commodity tax classification code and the original issuing enterprise data are extracted from the pre-stored invoice data; the original commodity name and the original commodity tax classification code are normalized to obtain the normalized commodity name and the normalized commodity tax classification code; the normalized commodity name is converted based on the pre-built commodity synonym dictionary to obtain the target commodity name. Taking the target commodity name and the normalized commodity tax classification code as the objects, the target issuing enterprise data corresponding to the target commodity name is obtained based on the statistics of the original issuing enterprise data; based on the target issuing enterprise data, the normalized commodity tax classification code is corrected using specific coexisting classification rules and preset correction rules to obtain the target commodity tax classification code corresponding to the target commodity name; the preset correction rules include trust factor calculation rules, general correction rules, special correction rules for issuing invoices on behalf of others and special correction rules for empty codes. In this way, by standardizing the commodity information and converting synonyms, and then using the preset correction rules to correct the commodity tax classification code, it supports the coexistence of commodity names under multiple categories, combines invoice data with actual business and multiple correction rules, takes into account the universality and particularity of commodity tax classification code correction, and improves the accuracy of commodity tax classification code correction.
[0161] The following describes the use of the general correction rules, special correction rules for invoicing on behalf of others, and special correction rules for empty codes provided in the embodiments of the present application.
[0162] The use of general correction rules, special correction rules for invoicing on behalf of others and special correction rules for empty codes is based on the sorting table integrated based on the trust factor calculation rules.
[0163] In one possible implementation, if the number of accounts opened on behalf of others and the number of accounts for other specific invoicing behaviors are 0, the target commodity tax classification code corresponding to the target commodity name is determined according to the sorting and using the general correction rules and the specific co-existing classification rules, including: if the target commodity name does not have a record in the rule table corresponding to the specific co-existing classification rule, the normalized commodity tax classification code ranked as 1 in the general co-existing classification sorting is used as the target commodity tax classification code; if the target commodity name does have a record in the rule table corresponding to the specific co-existing classification rule, the normalized commodity tax classification code ranked as 1 in the specific co-existing classification sorting is used as the target commodity tax classification code; for the non-specially coded target commodity name ranked as 0 in the specific co-existing classification sorting, the normalized commodity tax classification code ranked as 1 in the general co-existing classification sorting is used as the target commodity tax classification code.
[0164] If a commodity does not involve agency opening or other specific invoicing behaviors, that is, the "number of agency opening accounts" and "number of other specific invoicing behaviors" in the above statistical data are both 0, for example, the "number of agency opening accounts" and "number of other specific invoicing behaviors" of "H-beam" and "Yuhua Stone" in the above table are both 0, then the general correction rules are used to correct the commodity tax classification codes with non-empty codes. It should be noted that the record of "00000000000000000000" needs to be excluded for "Yuhua Stone" in Table 3 above, and this record will be specially processed later.
[0165] There are two situations for general correction rules:
[0166] a: If the target commodity name does not exist in the rule table corresponding to the specific coexisting classification rule, that is, there is no record in Table 1, such as "H-beam" in the above example, the normalized commodity tax classification code record ranked 1 in the general coexisting classification ranking is taken as the target commodity tax classification code after correction. The target commodity tax classification code of "H-beam" will output two codes: 1080207020000000000 and 3010102020100000000.
[0167] b: If the target commodity name has a record in the rule table corresponding to the specific coexisting classification rule, that is, a record in Table 1, such as "Yuhua Stone" in the above example, the normalized commodity tax classification code record ranked 1 in the specific coexisting classification ranking is taken as the target commodity tax classification code after correction. The target commodity tax classification code of "Yuhua Stone" will output two codes: 10304020100000000000 and 1080107040000000000.
[0168] On this basis, for the non-specially coded target commodity names that are ranked 0 in the specific co-existing classification sorting, that is, the codes corresponding to a commodity name have both non-empty codes and empty codes, the standardized commodity tax classification code record that is ranked 1 in the general co-existing classification sorting is taken as the target commodity tax classification code after correction.
[0169] The target commodity tax classification code of "Yuhua Stone" will output two codes 1030402010000000000 and 1080107040000000000, and the code 1030402010000000000 outside the specific classification.
[0170] In a possible implementation, if the number of agency account openings is not 0, the target commodity tax classification code corresponding to the target commodity name is determined by using the special correction rule for agency invoice issuance, including:
[0171] If the target commodity name whose number of agency account openings is not 0 is ranked 1 in the general coexisting classification ranking, then the first commodity tax classification code ranked 1 and the second commodity tax classification code ranked 2 in the general coexisting classification ranking are obtained;
[0172] comparing the coding level of the first commodity tax classification code with the coding level of the second commodity tax classification code;
[0173] If the coding level of the first commodity tax classification code is higher than or equal to the coding level of the second commodity tax classification code, the first commodity tax classification code is used as the target commodity tax classification code;
[0174] If the coding level of the first commodity tax classification code is lower than the coding level of the second commodity tax classification code, the second commodity tax classification code is used as the target commodity tax classification code.
[0175] Although the commodity tax classification code obtained from the invoice issuance is relatively accurate, the level of the code corresponding to the "Commodity and Service Tax Classification and Coding" is relatively coarse, not as detailed as the self-issued invoice, and some information may be lost.
[0176] For example, in the above example, the code ranked 1 in the general coexistent classification sorting is the one opened on behalf of others, and the number of accounts opened on behalf of others is greater than 0. The corresponding commodity tax classification code is 1060100000000000000 (paper and paper products). The code ranked 2 is not opened on behalf of others, and the corresponding commodity tax classification code is 10601050200000000000 (paper stationery and supplies). Self-opening is obviously more accurate than opening on behalf of others.
[0177] Therefore, for commodities involved in agency opening, that is, the target commodity name whose agency opening number is not 0, if it is determined that the target commodity name is ranked 1 in the general coexistent classification sorting, it is necessary to then look at the coding record ranked 2 in the general coexistent classification sorting. The coding record ranked 2 is a non-agent opening record. Obtain the coding record ranked 1 in the general coexistent classification sorting as the first commodity tax classification code, and obtain the coding record ranked 2 as the second commodity tax classification code. Compare the coding levels of the first commodity tax classification code and the second commodity tax classification code.
[0178] It should be noted that the non-agent opening records may be sorted as other data in the general co-existing classification sorting, that is, in addition to the sorting of the agent opening records in the general co-existing classification sorting, the code of the non-agent opening record sorting 1 is the second commodity tax classification code, and the embodiment of the present application is explained with the sorting 2.
[0179] If the coding level of the first commodity tax classification code is higher than or equal to the coding level of the second commodity tax classification code, that is, the commodity tax classification code of the record opened on behalf of others has a finer level, then the commodity tax classification code of the record opened on behalf of others is output as the target commodity tax classification code, and the aforementioned first commodity tax classification code is the target commodity tax classification code.
[0180] If the coding level of the first commodity tax classification code is lower than the coding level of the second commodity tax classification code, that is, the commodity tax classification code of the non-agent record has a finer level, then the commodity tax classification code of the non-agent record is output as the target commodity tax classification code, and the aforementioned second commodity tax classification code is the target commodity tax classification code.
[0181] For products involving agent opening, that is, the target product name whose agent opening number is not 0, the weight of the agent opening number is relatively large. Generally, the target product name is ranked 1 in the general coexistent classification sorting.
[0182] If the target commodity name is not ranked 1 in the general co-existing classification sorting, the code record ranked 1 in the general co-existing classification sorting can be used as the third commodity tax classification code, and the code record corresponding to the commodity with the highest ranking involved in the agency opening can be used as the fourth commodity tax classification code. The coding levels of the two are compared, and the code record with the higher coding level is used as the target commodity tax classification code.
[0183] Other specific invoicing behaviors are currently regarded as proxy invoicing in the processing rules, but the weight setting is different when calculating the trust factor. The weight of the number of accounts for other specific invoicing behaviors is one order of magnitude smaller than the weight of the number of proxy accounts.
[0184] When using the trusted factor calculation rules to calculate data items such as "general coexistent classification sorting" and "specific coexistent classification sorting", it is actually to clarify the category to which the commodity tax classification code of the non-empty code belongs after normalization. It can only determine which category the commodity tax classification code of the non-empty code belongs to. For the commodity tax classification code of the empty code, it cannot be arbitrarily included in a certain category. Therefore, when correcting, it is not possible to simply use the general correction rules for the commodity tax classification code of the empty code. The embodiment of the present application sets a special correction rule for the empty code to correct the empty code.
[0185] In a possible implementation, if there is a special code in the standardized commodity tax classification code corresponding to the target commodity name, the target commodity tax classification code corresponding to the target commodity name is determined using the empty code special correction rule, including:
[0186] If the target commodity name corresponding to the special code also has a corresponding standardized commodity tax classification code in addition to the special code, the standardized commodity tax classification code that exists in addition to the special code shall be used as the pending commodity tax classification code;
[0187] If there is one pending commodity tax classification code ranked as 1 in the general coexistent classification ranking, the pending commodity tax classification code is used as the target commodity tax classification code;
[0188] If there are multiple pending commodity tax classification codes ranked as 1 in the general coexistent classification ranking, determine the target commodity tax classification code from the multiple pending commodity tax classification codes according to a preset importance level;
[0189] If the target commodity name corresponding to the special code does not have a corresponding standardized commodity tax classification code other than the special code, the preset special code will be used as the target commodity tax classification code.
[0190] Empty codes will be standardized as special codes during normalization. There are two cases for special correction rules for empty codes:
[0191] a: If the target commodity name corresponding to the special code has a corresponding normalized commodity tax classification code in addition to the special code, that is, the target commodity name has a record with a non-empty code in addition to an empty code, such as the above-mentioned "Yuhua Stone", then in the record with a non-empty code, the commodity tax classification code ranked 1 in the general coexistent classification sorting will be taken as the target commodity tax classification code according to the general correction rules.
[0192] The standardized commodity tax classification codes that exist in addition to the special codes are used as pending commodity tax classification codes. If there is only one pending commodity tax classification code ranked 1 in the general coexisting classification sorting, the pending commodity tax classification code ranked 1 is used as the target commodity tax classification code. If there are multiple pending commodity tax classification codes ranked 1 in the general coexisting classification sorting, the commodity may be either a commodity, a labor, or a service, etc. At this time, the target commodity tax classification code is determined from multiple pending commodity tax classification codes according to the preset importance level. The preset importance level is for the sorting of "articles", and the first one is taken in order from small to large. See Table 4 below, where the sorting of "articles" is goods, labor, sales services, intangible assets, real estate, and non-taxable items without sales behavior, and goods and labor are given priority.
[0193]
[0194] Table 4
[0195] b: If the target commodity name corresponding to the special code does not have any other corresponding normalized commodity tax classification code except the special code, that is, there is no record of commodity tax classification code with other non-empty codes, the preset special code is used as the target commodity tax classification code. The special code can be directly output as 0000000000000000000, and it will be treated as a special value for special processing during subsequent data analysis. In the embodiment of the present application, the special processing can be to analyze the special code alone.
[0196] Different from the correction method that relies on the algorithm, the embodiment of the present application supports the coexistence of commodity names under multiple categories. Whether it is a general coexistent classification rule or a specific coexistent classification rule, one or more commodity tax classification codes can be correctly output for a commodity name according to the actual business situation. The preset special rules used in the correction operation take into account both generality and specificity, and solve the specificity problems through commodity synonym dictionaries and specific coexistent classification rules. Starting from solving actual business problems, such as the problem of coexistence under classification, the accuracy of proxy invoicing, etc., the data characteristics under various invoicing behaviors are analyzed and utilized, so that the output commodity tax classification code is more correct and more accurate, avoiding the incorrect commodity tax classification code from affecting the accuracy of subsequent data analysis.
[0197] The above embodiment of the present application provides a method for correcting a commodity tax classification code based on the above. Next, a correction device for a commodity tax classification code also provided in the embodiment of the present application is described, which is used to perform the above Figure 3 The function of the correction device for commodity tax classification code is explained. The structural diagram of the correction device for commodity tax classification code is shown in FIG. Figure 4 As shown, it includes an extraction module 401 , a normalization module 402 , a conversion module 403 , an acquisition module 404 and a correction module 405 .
[0198] in,
[0199] Extraction module 401, used to extract commodity information from pre-stored invoice data, the commodity information including original commodity name, original commodity tax classification code and original issuing enterprise data;
[0200] A normalization module 402 is used to normalize the original commodity name and the original commodity tax classification code to obtain a normalized commodity name and a normalized commodity tax classification code;
[0201] A conversion module 403 is used to convert the normalized product name based on a pre-built product synonym dictionary to obtain a target product name;
[0202] An acquisition module 404 is used to obtain target issuing enterprise data corresponding to the target commodity name based on the original issuing enterprise data statistics, taking the target commodity name and the standardized commodity tax classification code as objects;
[0203] The correction module 405 is used to correct the standardized commodity tax classification code based on the target issuing enterprise data, using specific coexisting classification rules and preset correction rules to obtain the target commodity tax classification code corresponding to the target commodity name; the preset correction rules include trust factor calculation rules, general correction rules, special correction rules for invoice issuance on behalf of others, and special correction rules for empty codes.
[0204] In a possible implementation, the normalization module 402 is specifically configured to:
[0205] Remove the abbreviations of commodity and service classifications, and the names of goods and services from the original commodity data to obtain the first commodity name;
[0206] Unifying the input format of the first product name to obtain the second product name;
[0207] Performing data cleaning on the second product name to obtain the standardized product name;
[0208] If the original commodity tax classification code is an empty code, the commodity tax classification code retrieved based on the commodity and service classification abbreviation and the goods and service name is used as the normalized commodity tax classification code corresponding to the empty code;
[0209] If the commodity tax classification code corresponding to the abbreviation of the commodity and service classification and the name of the goods and services cannot be retrieved, the preset special code will be used as the standardized commodity tax classification code corresponding to the empty code.
[0210] In a possible implementation, the target issuing enterprise data includes the number of issued enterprise accounts, the number of issued invoices, the number of agency accounts, and the number of other specific invoicing behavior accounts. The correction module 405 includes:
[0211] A weight setting submodule, for assigning weights to the number of enterprise accounts issued, the number of invoices issued, the number of accounts opened on behalf of others, and the number of accounts for other specific invoicing behaviors using the trust factor calculation rule;
[0212] A calculation submodule, for calculating a total credibility factor based on the weight, wherein the total credibility factor is used to sort the normalized commodity tax classification codes; the sorting includes a total sorting, a general coexistent classification sorting, and a specific coexistent classification sorting;
[0213] A general correction submodule, for determining the target commodity tax classification code corresponding to the target commodity name according to the sorting, using the general correction rule and the specific coexistent classification rule, if the number of accounts opened on behalf of others and the number of accounts for other specific invoicing behaviors are 0;
[0214] A special correction submodule for invoice issuance on behalf of another, for determining the target commodity tax classification code corresponding to the target commodity name by using the special correction rule for invoice issuance on behalf of another if the number of accounts opened on behalf of another is not 0;
[0215] The empty code special correction submodule is used to determine the target commodity tax classification code corresponding to the target commodity name using the empty code special correction rule if there is a special code in the standardized commodity tax classification code corresponding to the target commodity name.
[0216] In a possible implementation, the general deviation correction submodule is specifically used to:
[0217] If the target commodity name does not have a record in the rule table corresponding to the specific coexistent classification rule, the normalized commodity tax classification code ranked as 1 in the general coexistent classification ranking is used as the target commodity tax classification code;
[0218] If the target commodity name has a record in the rule table corresponding to the specific coexistent classification rule, the normalized commodity tax classification code ranked as 1 in the specific coexistent classification ranking is used as the target commodity tax classification code;
[0219] For the non-specially coded target commodity name ranked as 0 in the specific co-existing classification sorting, the normalized commodity tax classification code ranked as 1 in the general co-existing classification sorting is used as the target commodity tax classification code.
[0220] In a possible implementation, the special deviation correction submodule for issuing invoices on behalf of others is specifically used for:
[0221] If the target commodity name whose number of agency account openings is not 0 is ranked 1 in the general coexisting classification ranking, then the first commodity tax classification code ranked 1 and the second commodity tax classification code ranked 2 in the general coexisting classification ranking are obtained;
[0222] comparing the coding level of the first commodity tax classification code with the coding level of the second commodity tax classification code;
[0223] If the coding level of the first commodity tax classification code is higher than or equal to the coding level of the second commodity tax classification code, the first commodity tax classification code is used as the target commodity tax classification code;
[0224] If the coding level of the first commodity tax classification code is lower than the coding level of the second commodity tax classification code, the second commodity tax classification code is used as the target commodity tax classification code.
[0225] In a possible implementation, the empty code special correction submodule is specifically used to:
[0226] If the target commodity name corresponding to the special code also has a corresponding standardized commodity tax classification code in addition to the special code, the standardized commodity tax classification code that exists in addition to the special code shall be used as the pending commodity tax classification code;
[0227] If there is one pending commodity tax classification code ranked as 1 in the general coexistent classification ranking, the pending commodity tax classification code is used as the target commodity tax classification code;
[0228] If there are multiple pending commodity tax classification codes ranked as 1 in the general coexistent classification ranking, determine the target commodity tax classification code from the multiple pending commodity tax classification codes according to a preset importance level;
[0229] If the target commodity name corresponding to the special code does not have a corresponding standardized commodity tax classification code other than the special code, the preset special code will be used as the target commodity tax classification code.
[0230] In one possible implementation, the weight of the number of corporate accounts issued is greater than the weight of the number of invoices issued, the weight of the number of accounts for other specific invoicing behaviors is greater than the weight of the number of corporate accounts issued, and the weight of the number of accounts opened on behalf of others is greater than the weight of the number of accounts for other specific invoicing behaviors.
[0231] The embodiment of the present application provides a correction device for commodity tax classification codes, including an extraction module, a normalization module, a conversion module, an acquisition module and a correction module. The extraction module is used to extract commodity information from pre-stored invoice data, and the commodity information includes the original commodity name, the original commodity tax classification code and the original issuing enterprise data. The normalization module is used to normalize the original commodity name and the original commodity tax classification code to obtain a normalized commodity name and a normalized commodity tax classification code. The conversion module is used to convert the normalized commodity name based on a pre-built commodity synonym dictionary to obtain a target commodity name. The acquisition module is used to obtain the target issuing enterprise data corresponding to the target commodity name based on the original issuing enterprise data statistics, taking the target commodity name and the normalized commodity tax classification code as objects. The correction module is used to correct the normalized commodity tax classification code based on the target invoicing enterprise data using specific coexisting classification rules and preset correction rules to obtain the target commodity tax classification code corresponding to the target commodity name; the preset correction rules include trust factor calculation rules, general correction rules, special correction rules for invoicing on behalf of others, and special correction rules for empty codes. In this way, by normalizing commodity information and converting synonyms, and then using preset correction rules to correct commodity tax classification codes, it supports the coexistence of commodity names under multiple categories, combines invoice data with actual business and multiple correction rules, takes into account the universality and particularity of commodity tax classification code correction, and improves the accuracy of commodity tax classification code correction.
[0232] Based on the method for correcting a commodity tax classification code provided by the above method embodiment, the present application embodiment also provides a device for correcting a commodity tax classification code, see Figure 5 , the device includes: a processor, a memory, and a system bus;
[0233] The processor and the memory are connected via the system bus;
[0234] The memory is used to store one or more programs, and the one or more programs include instructions, which, when executed by the processor, enable the processor to execute the method for correcting the commodity tax classification code described in any of the above embodiments.
[0235] Based on the method for correcting a commodity tax classification code provided in the above method embodiment, the embodiment of the present application also provides a storage medium, which stores instructions. When the instructions are executed by a computer, the computer implements the method for correcting a commodity tax classification code described in any of the above embodiments.
[0236] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device or device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. The device and device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0237] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0238] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those 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 application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for correcting commodity tax classification codes, characterized in that: The correction method comprises: Extracting commodity information from pre-stored invoice data, the commodity information including original commodity name, original commodity tax classification code and original issuing enterprise data; Normalizing the original commodity name and the original commodity tax classification code to obtain a normalized commodity name and a normalized commodity tax classification code; Converting the normalized product name based on a pre-built product synonym dictionary to obtain a target product name; Taking the target commodity name and the standardized commodity tax classification code as objects, obtaining the target issuing enterprise data corresponding to the target commodity name based on the statistics of the original issuing enterprise data; Based on the target issuing enterprise data, the standardized commodity tax classification code is corrected using specific coexistent classification rules and preset correction rules to obtain the target commodity tax classification code corresponding to the target commodity name; the preset correction rules include trusted factor calculation rules, general correction rules, special correction rules for invoice issuance on behalf of others, and special correction rules for empty codes.
2. The correction method according to claim 1, characterized in that: The step of normalizing the original commodity name and the original commodity tax classification code to obtain a normalized commodity name and a normalized commodity tax classification code includes: Remove the abbreviations of commodity and service classifications, and the names of goods and services from the original commodity data to obtain the first commodity name; Unifying the input format of the first product name to obtain the second product name; Performing data cleaning on the second product name to obtain the standardized product name; If the original commodity tax classification code is an empty code, the commodity tax classification code retrieved based on the commodity and service classification abbreviation and the goods and service name is used as the normalized commodity tax classification code corresponding to the empty code; If the commodity tax classification code corresponding to the abbreviation of the commodity and service classification and the name of the goods and services cannot be retrieved, the preset special code will be used as the standardized commodity tax classification code corresponding to the empty code.
3. The deviation correction method according to claim 1, characterized in that: The target issuing enterprise data includes the number of issued enterprise accounts, the number of issued invoices, the number of accounts opened on behalf of others, and the number of accounts with other specific invoicing behaviors. Based on the target issuing enterprise data, the standardized commodity tax classification code is corrected using specific coexisting classification rules and preset correction rules to obtain the target commodity tax classification code corresponding to the target commodity name, including: Using the trust factor calculation rule, weights are assigned to the number of corporate accounts issued, the number of invoices issued, the number of accounts opened on behalf of others, and the number of accounts for other specific invoicing behaviors; Calculate a total credibility factor based on the weight, and use the total credibility factor to sort the standardized commodity tax classification codes; the sorting includes a total sorting, a general coexistent classification sorting, and a specific coexistent classification sorting; If the number of accounts opened on behalf of others and the number of accounts for other specific invoicing behaviors are 0, then according to the sorting, the target commodity tax classification code corresponding to the target commodity name is determined by using the general correction rule and the specific coexisting classification rule; If the number of accounts opened on behalf of others is not 0, the target commodity tax classification code corresponding to the target commodity name is determined by using the special correction rule for invoice issuance on behalf of others; If there is a special code in the standardized commodity tax classification code corresponding to the target commodity name, the target commodity tax classification code corresponding to the target commodity name is determined using the empty code special correction rule.
4. The correction method according to claim 3, characterized in that: If the number of accounts opened on behalf of others and the number of accounts for other specific invoicing behaviors are 0, the target commodity tax classification code corresponding to the target commodity name is determined according to the sorting by using the general correction rule and the specific coexisting classification rule, including: If the target commodity name does not have a record in the rule table corresponding to the specific coexistent classification rule, the normalized commodity tax classification code ranked as 1 in the general coexistent classification ranking is used as the target commodity tax classification code; If the target commodity name has a record in the rule table corresponding to the specific coexistent classification rule, the normalized commodity tax classification code ranked as 1 in the specific coexistent classification ranking is used as the target commodity tax classification code; For the non-specially coded target commodity name ranked as 0 in the specific co-existing classification sorting, the normalized commodity tax classification code ranked as 1 in the general co-existing classification sorting is used as the target commodity tax classification code.
5. The deviation correction method according to claim 3, characterized in that: If the number of accounts opened on behalf of another is not 0, the target commodity tax classification code corresponding to the target commodity name is determined by using the special correction rule for invoice issuance on behalf of another, including: If the target commodity name whose number of agency account openings is not 0 is ranked 1 in the general coexisting classification ranking, then the first commodity tax classification code ranked 1 and the second commodity tax classification code ranked 2 in the general coexisting classification ranking are obtained; comparing the coding level of the first commodity tax classification code with the coding level of the second commodity tax classification code; If the coding level of the first commodity tax classification code is higher than or equal to the coding level of the second commodity tax classification code, the first commodity tax classification code is used as the target commodity tax classification code; If the coding level of the first commodity tax classification code is lower than the coding level of the second commodity tax classification code, the second commodity tax classification code is used as the target commodity tax classification code.
6. The deviation correction method according to claim 3, characterized in that: If there is a special code in the normalized commodity tax classification code corresponding to the target commodity name, the target commodity tax classification code corresponding to the target commodity name is determined using the empty code special correction rule, including: If the target commodity name corresponding to the special code also has a corresponding standardized commodity tax classification code in addition to the special code, the standardized commodity tax classification code that exists in addition to the special code shall be used as the pending commodity tax classification code; If there is one pending commodity tax classification code ranked as 1 in the general coexistent classification ranking, the pending commodity tax classification code is used as the target commodity tax classification code; If there are multiple pending commodity tax classification codes ranked as 1 in the general coexistent classification ranking, the target commodity tax classification code is determined from the multiple pending commodity tax classification codes according to a preset importance level; If the target commodity name corresponding to the special code does not have a corresponding standardized commodity tax classification code other than the special code, the preset special code will be used as the target commodity tax classification code.
7. The deviation correction method according to claim 3, characterized in that: The weight of the number of corporate accounts opened is greater than the weight of the number of invoices issued, the weight of the number of accounts for other specific invoicing behaviors is greater than the weight of the number of corporate accounts opened, and the weight of the number of accounts opened on behalf of others is greater than the weight of the number of accounts for other specific invoicing behaviors.
8. A device for correcting the deviation of commodity tax classification codes, characterized in that: The deviation correcting device comprises: An extraction module is used to extract commodity information from pre-stored invoice data, wherein the commodity information includes original commodity name, original commodity tax classification code and original issuing enterprise data; A normalization module, used for normalizing the original commodity name and the original commodity tax classification code to obtain a normalized commodity name and a normalized commodity tax classification code; A conversion module, used for converting the normalized product name based on a pre-built product synonym dictionary to obtain a target product name; An acquisition module is used to obtain the target issuing enterprise data corresponding to the target commodity name based on the original issuing enterprise data statistics, taking the target commodity name and the standardized commodity tax classification code as objects; A correction module is used to correct the standardized commodity tax classification code based on the target issuing enterprise data, using specific coexisting classification rules and preset correction rules to obtain the target commodity tax classification code corresponding to the target commodity name; the preset correction rules include trust factor calculation rules, general correction rules, special correction rules for invoicing on behalf of others, and special correction rules for empty codes.
9. A correction device for commodity tax classification codes, characterized in that: The device includes: a processor, a memory, and a system bus; The processor and the memory are connected via the system bus; The memory is used to store one or more programs, and the one or more programs include instructions, which, when executed by the processor, enable the processor to execute the method for correcting the commodity tax classification code as described in any one of claims 1 to 7.
10. A storage medium, characterized in that: The storage medium stores instructions, which, when executed by a computer, enable the computer to implement the method for correcting the commodity tax classification code as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Method and system for obtaining tax classification code of commodity
CN108241677A
System and method for determining recommended tax classification code of commodity
CN110019404A
Tax classification code matching method, system and device
CN110287218A
Commodity name correction method, device and computer readable storage medium
CN110377801A
Commodity name classification method, device and equipment, and readable storage medium
CN110597995A