A system and method for automatically auditing differences in corporate income tax settlement and final tax meeting

CN122023050BActive Publication Date: 2026-08-07SHUI AN TECH (HANGZHOU) CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHUI AN TECH (HANGZHOU) CO LTD
Filing Date
2026-04-15
Publication Date
2026-08-07

AI Technical Summary

Technical Problem

[0005]鉴于现有技术的上述缺点、不足,本申请提供一种企业所得税汇算清缴税会差异自动审核系统及方法,其解决了现有技术中税务数据核对依赖人工操作、跨表单元格数据联动困难、税会差异计算效率低、报表数据与原始凭证无法快速穿透式追溯、易导致漏报或错报以及审计效率低下的技术问题

Benefits of technology

[0019]本申请实施例提供的企业所得税汇算清缴税会差异自动审核系统,通过数据输入模块获取标准化税务数据集,并对所述标准化税务数据集进行包括格式校验及完整性校验的预处理,从而能够保证税务数据在进入后续处理环节前的规范性与完整性,降低由于数据格式错误或数据缺失导致税会差异计算结果不准确的风险;同时,通过税会差异规则引擎基于规则模型库对所述预处理后的标准化税务数据集执行纳税调整规则匹配与税会差异计算,以生成税会差异对象,从而能够实现税会差异的自动识别与计算,减少人工逐项核对的工作量,提高企业所得税汇算清缴审核效率;并通过文档生成模块基于所述税会差异对象自动生成审核底稿、纳税调整表及纳税申报表,并根据各文档中单元格之间的数据引用关系构建跨表单元格依赖关系,从而使不同表单之间的数据逻辑关系得到统一管理,确保相关表格数据的一致性;进一步地,通过双向联动与追溯模块在用户对所述审核底稿、纳税调整表或纳税申报表中的任一单元格数值进行修改时,基于所述跨表单元格依赖关系对相关单元格执行跨表格的数据联动更新,并根据所述单元格关联的原始凭证索引号定位对应的原始凭证记录数据,从而能够实现从所述审核底稿、纳税调整表或纳税申报表中的数据到所述原始凭证记录数据的穿透式追溯查询,进而提升企业所得税汇算清缴过程中数据审核的准确性、自动化程度以及数据来源的可追溯性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122023050B_ABST
    Figure CN122023050B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of computer information processing, in particular to a system and method for automatically auditing enterprise income tax calculation and payment differences, which comprises the following modules: a data input module for obtaining a standardized tax data set and preprocessing the same to obtain a preprocessed standardized tax data set; a tax and accounting difference rule engine for performing tax adjustment rule matching and tax and accounting difference calculation on the preprocessed standardized tax data set to generate a tax and accounting difference object; a document generation module for automatically generating an audit draft, a tax adjustment table and a tax return form based on the tax and accounting difference object, and constructing cross-table cell dependency relationships according to data reference relationships between cells in each document; and a two-way linkage and tracing module for performing cross-table data linkage updating on related cells based on the cross-table cell dependency relationships when a user modifies any cell value, and realizing penetrating tracing query according to original voucher index numbers associated with the cells.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer information processing technology, and in particular to an automatic audit system and method for tax and accounting discrepancies in corporate income tax final settlement. Background Technology

[0002] During the corporate income tax settlement process, companies need to compare accounting data with tax return data to identify and adjust tax-accounting discrepancies. Currently, companies typically rely on manual reconciliation or spreadsheet tools, manually entering data or using simple formulas to complete data verification and report generation. However, these methods have significant limitations: First, manual operation is labor-intensive and inefficient, prone to data entry errors or calculation omissions; second, existing systems are mostly based on single or partial tables for calculations, lacking cross-table cell data association mechanisms, making it difficult to guarantee data consistency when multiple tables or multi-level summaries are involved; third, the original voucher information involved in tax adjustments is usually scattered across different databases or ledgers, and existing methods cannot quickly locate the corresponding original vouchers from the report data. Manual tracing is tedious and error-prone, resulting in low efficiency in tax-accounting discrepancy verification and increasing the risk of underreporting or misreporting. For example, patent CN116128664A (classification number G06Q) provides a corporate income tax management system, patent CN117372184A (classification number G06Q) provides a tax management system, and patent CN118657621A (classification number G06Q) provides a group enterprise tax interactive calculation system, tax calculation method and device.

[0003] Furthermore, existing systems have high requirements for the completeness and format consistency of accounting data. They cannot automatically identify and process data that is missing, abnormal, or inconsistent in format, making the identification of tax-accounting differences reliant on manual intervention. Especially in cases involving cross-accounting period carryovers, complex account adjustments, or multi-table summaries, traditional methods struggle to automate rule matching and calculations, cannot synchronously update relevant table content when users modify report data, and cannot achieve penetrating traceability between report data and original voucher records, thus impacting audit efficiency and compliance management. Summary of the Invention

[0004] (a) Technical problems to be solved

[0005] In view of the above-mentioned shortcomings and deficiencies of the prior art, this application provides an automatic audit system and method for corporate income tax settlement and payment tax-accounting differences, which solves the technical problems of the prior art, such as tax data verification relying on manual operation, difficulty in linking data across table cells, low efficiency in calculating tax-accounting differences, inability to quickly trace report data and original vouchers, easy to lead to omissions or errors in reporting, and low audit efficiency.

[0006] (II) Technical Solution

[0007] To achieve the above objectives, the main technical solutions adopted in this application include:

[0008] In a first aspect, embodiments of this application provide an automatic audit system for tax-accounting differences in corporate income tax settlement, comprising: a data input module for acquiring a standardized tax dataset and preprocessing the standardized tax dataset to obtain a preprocessed standardized tax dataset, wherein the preprocessing includes format verification and integrity verification; the standardized tax dataset includes at least the opening balance of accounting subjects, current year debits, current year credits, and corresponding original voucher index numbers, wherein the original voucher index number is used to identify the corresponding original voucher record data, and the original voucher record data is accounting original voucher business record data stored in a database cluster; and a tax-accounting difference rule engine for executing rules on the preprocessed standardized tax dataset based on a rule model library. The system includes a tax adjustment rule matching and tax-accounting difference calculation module to generate a tax-accounting difference object; a document generation module to automatically generate audit working papers, tax adjustment forms, and tax returns based on the tax-accounting difference object, and to construct cross-table cell dependencies based on the data reference relationships between cells in each document; and a two-way linkage and traceability module to perform cross-table data linkage updates on relevant cells based on the cross-table cell dependencies when a user modifies the value of any cell in the audit working paper, tax adjustment form, or tax return, and to locate the corresponding original voucher record data based on the original voucher index number associated with the cell, so as to realize a penetrating traceability query from the data in the audit working paper, tax adjustment form, or tax return to the original voucher record data.

[0009] Preferably, in some embodiments of this application, the tax-accounting difference rule engine is further used to traverse the pre-defined tax adjustment rules in the rule model library according to a preset priority, match the corresponding tax adjustment rules for the accounting subjects in the standardized tax dataset, perform data queries and expression operations on the preprocessed standardized tax dataset, inject the query results and threshold parameters into an executable expression object for tax adjustment calculation, thereby generating the tax-accounting difference object corresponding to the accounting subject; wherein, the rule model library includes multiple predefined tax adjustment rules, each tax adjustment rule corresponds to a tax adjustment item, and is described using a rule description language DSL specifically for tax and financial calculations combined with SQL statements and MVEL expressions, each tax adjustment rule includes the corresponding accounting subject, data query statement, calculation expression, threshold parameter, and carry-over identifier.

[0010] Preferably, in some embodiments of this application, the tax-accounting difference rule engine is further configured to, during the data query and expression calculation process in the preprocessed standardized tax dataset, after determining the tax adjustment rule matching the accounting subject, extract the data query statement in the tax adjustment rule, and replace the parameters of the data query statement according to the code of the current accounting period and accounting subject to generate an executable target query statement; execute the target query statement, obtain the corresponding query data from the preprocessed standardized tax dataset, and encapsulate the query data into a mapping structure with the query field name as the key and the field value as the value; obtain the threshold parameter corresponding to the tax adjustment rule of the accounting subject, and construct an expression context variable environment together with the query data in the mapping structure; call the pre-compiled calculation expression in the tax adjustment rule of the accounting subject to perform expression calculation to calculate the book amount, tax amount, and tax adjustment amount, thereby generating the tax-accounting difference object; the tax-accounting difference object includes: tax adjustment rule ID, subject name, book amount, tax amount, adjustment amount, corresponding cell feature value, and template identification information.

[0011] Preferably, in some embodiments of this application, when the tax and accounting difference rule engine executes the target query statement, it retrieves the corresponding query data from a hash table built in memory using the preprocessed standardized tax dataset; if the required data is not found in the memory hash table, it executes an SQL query through a database connection pool to retrieve the query data from the database cluster, and caches the retrieved data in the memory hash table for use in subsequent rule queries, thereby improving data access efficiency and avoiding duplicate queries; the database cluster also stores historical carry-over data across accounting periods.

[0012] Preferably, in some embodiments of this application, the document generation module is used to automatically generate audit working papers, tax adjustment forms, and tax returns based on the tax-accounting difference object, including: receiving the corresponding cell feature values ​​and tax-accounting difference calculation results recorded in the tax-accounting difference object; the tax-accounting difference calculation results include book amount, tax amount, and tax adjustment amount; retrieving the corresponding template file from the working paper template library according to the template identification information contained in the tax-accounting difference object, the template file including audit working paper template, tax adjustment form template, and tax return form template; reading the pre-set cell feature values ​​of each cell in the template file, obtaining the metadata corresponding to the cell feature values, and constructing a feature value mapping pool, wherein the cell feature value is used as the key, and the cell position coordinates and corresponding formula information are used as the value; the metadata includes cell position coordinates, cell formulas, and cell dependencies; parsing the cell dependencies corresponding to each cell formula in the template file to identify each single cell within the template. The calculation dependencies between cells are identified, and a cell dependency graph is constructed based on these dependencies to determine the calculation order of each cell, prioritizing the calculation of dependent cells over those that depend on them. The tax and accounting difference objects are traversed, and the corresponding target cell coordinates are searched in the feature value mapping pool based on the corresponding cell feature values ​​recorded in the difference objects. The tax and accounting difference calculation results are then filled into the corresponding target cells, while inheriting the preset format attributes of the target cells in the template. The formula calculations of the cells in the template are executed sequentially according to the calculation order determined by the cell dependency graph. During the calculation process, if the filled value of a dependent cell changes, the formulas that depend on that cell are recalculated to ensure consistency in the calculation results of all cells in the template. After completing the data filling and formula calculations, the corresponding audit drafts, tax adjustment forms, and tax returns are generated and output as editable documents. The cell feature values ​​corresponding to each cell are retained in the generated documents.

[0013] Preferably, in some embodiments of this application, the document generation module is further configured to, after completing the construction of the cell dependency graph within each document, merge the cell dependency graph of each document with the cross-table cell dependency graph to form a complete cross-table cell dependency graph; further, perform topological sorting on the cross-table cell dependency graph to generate the order of cell data filling and formula calculation, so that the data filling and calculation of the dependent cell takes precedence over the cells that depend on the dependent cell; wherein, the cross-table cell dependency graph is constructed by parsing the cell feature values ​​referenced by the cell formulas in each cell of the template file and extracting the dependency relationships between each cell, the cell feature values ​​are used as nodes, and the dependency relationships between cells are used as directed edges, the directed edges can span different documents, thereby forming a complete cross-table cell dependency graph.

[0014] Preferably, in some embodiments of this application, the bidirectional linkage and traceability module includes: a linkage listener, used to capture the value change event through the cell feature value corresponding to the cell when the user modifies the value of any cell in the audit working paper, tax adjustment form, or tax return, and query at least one target cell feature value associated with the cell feature value according to the cross-table cell dependency relationship graph; wherein, the cross-table cell dependency relationship graph uses cell feature values ​​as nodes and the mapping relationship between data cells with the same business meaning in different documents as connecting edges, and is used to describe the cross-table data association relationship between the audit working paper, tax adjustment form, and tax return; the linkage listener is also used to locate the corresponding target cell position coordinates according to the target cell feature value and automatically update the value in the target cell to realize cross-table data linkage update.

[0015] Preferably, in some embodiments of this application, after the target cell value is updated, the linkage listener triggers the cell dependency graph in the document generation module to recalculate the formula cells that depend on the feature value of the target cell; the recalculation is performed sequentially according to the calculation order obtained by topological sorting of the cell dependency graph to ensure that the calculation results of all formula cells that depend on the target cell are consistent.

[0016] Preferably, in some embodiments of this application, the bidirectional linkage and traceability module further includes a traceability indexer. The traceability indexer is used to associate and bind the original voucher index number in the standardized tax dataset with the corresponding cell feature value when generating the audit working paper, tax adjustment form, and tax return, and store it in the corresponding cell as a hidden attribute. When a user modifies the value of any cell in the audit working paper, tax adjustment form, or tax return, the linkage listener captures the value change event through the cell feature value corresponding to that cell, and locates at least one target cell feature value associated with that cell feature value based on the cross-table cell dependency graph, so as to automatically update the value in the corresponding target cell. After completing the... After the target cell value is updated, the linkage listener triggers the calculation process of the cell dependency graph and recalculates the formula cells that depend on the target cell feature value according to the calculation order obtained by topological sorting, so as to ensure that the calculation results in the cross-document data link remain consistent. When the user selects any cell on the terminal interface, the cell feature value corresponding to the cell is read, the original voucher index number associated with the cell feature value is queried through the traceability indexer, and a query is initiated to the database cluster based on the original voucher index number to obtain the corresponding original voucher record data and display it in the user interface, thereby realizing a penetrating traceability query from the data in the audit draft, tax adjustment form or tax declaration form to the original voucher record data.

[0017] On the other hand, this embodiment also provides an automatic audit of tax and accounting differences in corporate income tax settlement, the method of which is executed by the automatic audit system for tax and accounting differences in corporate income tax settlement described in the above embodiment.

[0018] (III) Beneficial Effects

[0019] The automatic audit system for tax-accounting differences in corporate income tax settlement provided in this application embodiment acquires a standardized tax dataset through a data input module and performs preprocessing on the standardized tax dataset, including format and integrity checks. This ensures the standardization and integrity of tax data before entering subsequent processing stages, reducing the risk of inaccurate tax-accounting difference calculations due to data format errors or missing data. Simultaneously, a tax-accounting difference rule engine performs tax adjustment rule matching and tax-accounting difference calculation on the preprocessed standardized tax dataset based on a rule model library to generate tax-accounting difference objects. This enables automatic identification and calculation of tax-accounting differences, reducing the workload of manual item-by-item verification and improving the efficiency of corporate income tax settlement audits. Furthermore, a document generation module automatically generates audit working papers and tax adjustment documents based on the tax-accounting difference objects. The system integrates the entire audit draft and tax return forms, and constructs cross-table cell dependencies based on the data reference relationships between cells in each document. This ensures unified management of the data logic relationships between different forms and guarantees the consistency of related table data. Furthermore, through a two-way linkage and traceability module, when a user modifies the value of any cell in the audit draft, tax adjustment form, or tax return form, cross-table data linkage updates are performed on the relevant cells based on the cross-table cell dependencies. The system also locates the corresponding original voucher record data based on the original voucher index number associated with the cell. This enables a penetrating traceability query from the data in the audit draft, tax adjustment form, or tax return form to the original voucher record data, thereby improving the accuracy, automation, and traceability of data sources in the corporate income tax settlement process. Attached Figure Description

[0020] Figure 1 This is a schematic diagram of the structure of a system for reviewing tax and accounting differences during the corporate income tax settlement process according to an embodiment of this application;

[0021] Figure 2 This is a schematic diagram of the structure of a bidirectional linkage and traceability module according to an embodiment of this application. Detailed Implementation

[0022] To better explain and facilitate understanding of this application, the following detailed description of the application is provided in conjunction with the accompanying drawings and specific embodiments.

[0023] In related technologies, the review and handling of tax-accounting discrepancies during corporate income tax settlement generally employs a scheme based on manual verification and spreadsheet calculations. This scheme typically involves finance or tax personnel manually preparing review working papers based on the company's accounting records, analyzing the differences between accounting and tax treatments item by item according to tax regulations, calculating tax adjustment amounts using spreadsheet tools, and finally completing the tax adjustment form and tax return. However, this scheme relies heavily on human experience, requiring repeated data copying and comparison between multiple spreadsheets. Furthermore, the complex data relationships between different spreadsheets mean that any data modification often necessitates manual updates to related spreadsheets, easily leading to calculation errors or data inconsistencies, resulting in low review efficiency and a high error rate.

[0024] To address this, this application provides an automatic audit system for corporate income tax settlement and accounting discrepancies. The system acquires a standardized tax dataset through a data input module and performs preprocessing, including format and integrity checks, on the standardized tax dataset to ensure the standardization and integrity of the input data. Then, a tax-accounting discrepancy rule engine, based on a rule model library, performs tax adjustment rule matching and tax-accounting discrepancy calculation on the preprocessed standardized tax dataset to generate tax-accounting discrepancy objects, thereby achieving automatic identification and calculation of tax-accounting discrepancies. Simultaneously, a document generation module automatically generates audit working papers, tax adjustment tables, and tax returns based on the tax-accounting discrepancy objects, and calculates the data between cells in each document. The reference relationship establishes cross-table cell dependencies, enabling unified management of data logic relationships between different forms. Furthermore, through the bidirectional linkage and traceability module, when a user modifies the value of any cell in the audit working paper, tax adjustment form, or tax return, cross-table data linkage updates can be performed on the relevant cells based on the cross-table cell dependencies. The corresponding original voucher record data can be located based on the original voucher index number associated with the cell, thereby realizing a penetrating traceability query from the data in the audit working paper, tax adjustment form, or tax return to the original voucher record data. This not only improves the automation level of tax and accounting difference audits but also enhances data consistency and the traceability of the audit process.

[0025] To better understand the above technical solutions, exemplary embodiments of this application will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of this application are shown in the drawings, it should be understood that this application can be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this application can be understood more clearly and thoroughly, and that the scope of this application can be fully conveyed to those skilled in the art.

[0026] Figure 1This is a schematic diagram of the structure of an automatic audit system for tax and accounting differences in corporate income tax final settlement according to one embodiment of this application. Figure 1 As shown, this type of automatic auditing system for corporate income tax settlement and payment discrepancies includes:

[0027] The data input module is used to acquire a standardized tax dataset and preprocess the standardized tax dataset to obtain a preprocessed standardized tax dataset, wherein the preprocessing includes format verification and integrity verification.

[0028] The standardized tax dataset includes at least the opening balance of accounting subjects, the current year's debits, the current year's credits, and the corresponding original voucher index numbers. The original voucher index numbers are used to identify the original voucher record data corresponding to them. The original voucher record data is accounting original voucher business record data stored in the database cluster.

[0029] In this embodiment, the standardized tax dataset may further include information such as accounting subject codes, accounting subject names, accounting periods, debit entries, credit entries, current period entries, ending balance, auxiliary accounting items, cost and expense categories, tax processing categories, business type identifiers, and enterprise taxpayer identification numbers. Specifically, the accounting period identifies the accounting year or reporting cycle to which the accounting subject data belongs; the debit entries, credit entries, and current period entries reflect the cash changes of the corresponding accounting subject during the current period; auxiliary accounting items may include department codes, project codes, or cost center codes to identify the object to which the business occurs; and the tax processing category identifies how the accounting data is processed under tax law, such as whether it belongs to taxable income, deductible costs and expenses, or tax adjustment items. For example, in one embodiment, the standardized tax dataset may include the following fields: the accounting subject code is "6601", the accounting subject name is "Sales Expenses", the beginning balance is 500,000 yuan, the current year's debit amount is 0 yuan, the current year's credit amount is 0 yuan, the accounting period is "2024", the tax treatment category is "Deductible Period Expenses", and it is associated with the original voucher index number "VCH202401150023", wherein the original voucher index number corresponds to an accounting original voucher business record data stored in the database cluster, and the record data may include voucher date, business summary, debit and credit entries and attachment information, etc.

[0030] The tax-accounting difference rule engine is used to perform tax adjustment rule matching and tax-accounting difference calculation on the preprocessed standardized tax dataset based on the rule model library to generate a tax-accounting difference object. Specifically, the tax-accounting difference rule engine is also used to traverse the pre-set tax adjustment rules in the rule model library according to a preset priority, match the tax adjustment rules to the corresponding accounting subjects in the standardized tax dataset, perform data query and expression operation on the preprocessed standardized tax dataset, and inject the query results and threshold parameters into an executable expression object to perform tax adjustment calculation, thereby generating the tax-accounting difference object corresponding to the accounting subject.

[0031] The rule model library includes multiple predefined tax adjustment rules. Each tax adjustment rule corresponds to a tax adjustment item and is described using a rule description language (DSL) specifically for tax and financial calculations, combined with SQL statements and MVEL expressions. Each tax adjustment rule includes the corresponding accounting subject, data query statement, calculation expression, threshold parameter, and carry-forward identifier.

[0032] For example, in this embodiment, the tax adjustment rules in the rule model library are defined using a Domain Specific Language (DSL), a rule description language specifically designed for tax and financial calculations. The DSL is a structured rule description language designed for corporate income tax settlement scenarios. It is used to uniformly describe tax adjustment logic, data sources, and calculation formulas, enabling tax law provisions to be recognized and invoked by the system in a configurable, parsable, and executable manner. By adopting the DSL rule description method, tax law provisions that originally existed in text form can be transformed into structured rule models. Data extraction is achieved using SQL statements, and calculation logic execution is achieved using MVEL expressions, thereby realizing the automatic calculation and processing of tax-accounting differences.

[0033] Preferably, in the practical application of this embodiment, the tax-accounting difference rule engine is further used to, during the data query and expression calculation process in the preprocessed standardized tax dataset, after determining the tax adjustment rule matching the accounting subject, extract the data query statement in the tax adjustment rule, and replace the parameters of the data query statement according to the code of the current accounting period and accounting subject to generate an executable target query statement;

[0034] Execute the target query statement, obtain the corresponding query data from the preprocessed standardized tax dataset, and encapsulate the query data into a mapping structure with the query field name as the key and the field value as the value.

[0035] Obtain the threshold parameters corresponding to the tax adjustment rules of the accounting subject, and construct the expression context variable environment together with the query data in the mapping structure;

[0036] The pre-compiled calculation expression in the tax adjustment rules of the accounting subject is called to perform expression operation to calculate the book amount, tax amount, and tax adjustment amount, thereby generating the tax-accounting difference object;

[0037] The tax and accounting difference objects include: tax adjustment rule ID, account name, book amount, tax amount, adjustment amount, corresponding cell feature value, and template identification information.

[0038] Specifically, multiple tax adjustment rules are pre-stored in the rule model library. Each tax adjustment rule corresponds to a specific tax adjustment item, such as the cross-year tax adjustment of advertising expenses and business promotion expenses, the tax adjustment of employee education funds, the tax adjustment of business entertainment expenses, etc. Each tax adjustment rule is described using a rule description language DSL dedicated to tax and financial calculations, combined with SQL statements and MVEL expressions, which includes information such as accounting subjects, data query statements, calculation expressions, threshold parameters, and carry-forward flags. Accounting subjects are used to define the range of accounting subject codes applicable to the rule, such as "6601.01 Advertising Expenses" or "6601 Selling Expenses"; data query statements are used to extract the data required for calculations from the preprocessed standardized tax data set or database cluster, such as book amounts, total revenues, or historical year carry-forward amounts; calculation expressions are used to perform tax adjustment calculations according to the calculation logic stipulated by the tax law; threshold parameters are used to represent the deduction ratios or limit standards stipulated by the tax law, such as the advertising expense deduction ratio being 15% of the total revenue; the carry-forward flag is used to indicate whether the tax adjustment item generates a difference amount that can be carried forward to future years. The tax accounting difference rule engine first traverses the tax adjustment rules in the rule model library according to the preset priorities. For example, the priority order is set according to the tax law logic dependency, first performing calculations for revenue items, then for expense items, and finally for asset items, so as to ensure a reasonable calculation order among different rules. During the traversal process, the tax accounting difference rule engine matches the accounting subjects defined in each tax adjustment rule with the corresponding accounting subjects in the preprocessed standardized tax data set. When it is detected that the accounting subject of a certain tax adjustment rule matches the accounting subject code in the standardized tax data set, it is determined that the rule is applicable to the current data. Then, the tax accounting difference rule engine first extracts the data query statement in the tax adjustment rule and performs parameter substitution on the data query statement according to the current accounting period and the code of the accounting subject, so as to generate an executable target query statement. For example, the original data query statement may contain parameter placeholders such as "period=:period" and "subject_code=:subjectCode", which are replaced with the current year "2024" and the accounting subject code "6601.01" during actual execution, thus forming a complete target query statement. Subsequently, the target query statement is executed to obtain the corresponding query data from the preprocessed standardized tax data set or database cluster, and the query results are encapsulated into a mapping structure with the query field names as keys and the field values as values, such as {"Current Year Amount": 500000, "Previous Year Carry-Forward Amount": 20000, "Current Year Revenue": 3000000}. This mapping structure is used as the input data for subsequent expression operations.After acquiring the query data, the tax and accounting difference rule engine further retrieves the threshold parameters corresponding to the tax adjustment rule from the rule model library, such as the advertising expense deduction ratio parameter "0.15" or the business entertainment expense deduction ratio parameter "0.60", and constructs the expression context variable environment together with the query data in the mapping structure. Then, it calls the pre-compiled calculation expression in the tax adjustment rule to perform expression calculation. The calculation expression can be in MVEL form, for example, calculating the deductible amount and tax adjustment amount of advertising expenses according to tax law. After executing the expression, the calculated results such as the book amount, tax amount, and tax adjustment amount can be obtained. For example, in the advertising expense tax adjustment project, the data query statement can be: "SELECT current_year_expense AS current year's amount, last_year_carry_forward AS previous year's carry-forward amount, total_revenue AS current year's income FROM tax_data WHERE subject_code='6601.01' AND period='2024'". Executing this query statement will obtain data such as the current year's advertising expense amount, current year's income, and previous year's carry-forward amount. The query data, along with threshold parameters (e.g., a 15% deduction for advertising expenses), is then injected into the context variable environment of the calculation expression. Tax adjustment calculations are performed using MVEL expressions. For example, the expression calculates the amount of advertising expenses allowed for deduction under tax law, and further calculates the difference between the book amount and the tax-law amount, thereby determining the tax adjustment amount and the amount to be carried forward to future years. After completing the expression calculation, the tax-accounting difference rule engine encapsulates the calculation result into a standardized tax-accounting difference object. This object may contain information such as the tax adjustment rule ID, account name, book amount, tax amount, adjustment amount, and corresponding cell feature value. The corresponding cell feature value identifies the target cell position of the calculation result in subsequent audit working papers or tax adjustment tables, while the template identification information identifies the report template type to which the data belongs, such as an audit working paper template or a tax adjustment table template.

[0039] Preferably, in some embodiments of this application, when the tax and accounting difference rule engine executes the target query statement, it obtains the corresponding query data from the hash table built in memory by the preprocessed standardized tax dataset;

[0040] Specifically, the data input module loads the preprocessed standardized tax dataset into memory and constructs a hash table data structure according to preset key-value rules. The hash table uses "accounting code + accounting period" as the key and the corresponding tax data record as the value, thereby enabling fast indexing and access to standardized tax data. When the tax-accounting difference rule engine executes a target query statement, it first searches the in-memory hash table for data matching the accounting code and the current accounting period, and directly retrieves the corresponding query data. Because hash tables have constant-time complexity for data access, they can significantly improve the data reading efficiency during rule execution.

[0041] If the required data is not found in the in-memory hash table, an SQL query is executed through the database connection pool to retrieve the query data from the database cluster. The retrieved data is then cached in the in-memory hash table for subsequent rule queries, thereby improving data access efficiency and avoiding duplicate queries. The database cluster also stores historical carry-over data across accounting periods. For example, in actual operation, some tax adjustment rules require not only data from the current accounting period but may also involve historical data across accounting periods. For instance, for tax adjustment items with cross-year carry-over mechanisms, such as advertising and business promotion expenses, and employee education expenses, when the current period's amount exceeds the tax law's deductible limit, the excess can usually be carried forward to future years for continued deduction. Therefore, when calculating the current year's tax adjustment amount, it is necessary to simultaneously obtain the historical amount carried forward from the previous year or even earlier. In this case, if the required historical data is not found in the in-memory hash table, the tax accounting difference rule engine executes the corresponding SQL query statement through the database connection pool to retrieve the relevant historical data from the database cluster. The database connection pool is used to uniformly manage connection resources between the system and the database cluster. By reusing database connections, the performance overhead of connection establishment and release can be reduced, thereby improving overall query efficiency. After retrieving the required data from the database cluster through the database connection pool, the tax accounting difference rule engine caches the query result in the in-memory hash table and establishes an index relationship according to the same key-value rules. In this way, when subsequent rules need to access the same data again during execution, they can be read directly from the in-memory hash table without accessing the database again, thus avoiding duplicate queries and improving operational efficiency. Simultaneously, the database cluster also stores historical carry-over data across accounting periods, such as the carry-over balance of tax adjustment items for each year, historical book amounts, and tax amounts, providing complete data support for performing tax adjustment calculations.

[0042] The automatic audit system for corporate income tax settlement and accounting discrepancies in this embodiment also includes a document generation module, used to automatically generate audit working papers, tax adjustment tables, and tax returns based on the tax-accounting discrepancy objects, and to construct cross-table cell dependencies based on the data reference relationships between cells in each document; wherein, the document generation module, used to automatically generate audit working papers, tax adjustment tables, and tax returns based on the tax-accounting discrepancy objects, specifically includes:

[0043] The system receives the corresponding cell feature values ​​and tax-accounting difference calculation results recorded in the tax-accounting difference object. The calculation results include the book amount, tax amount, and tax adjustment amount. The cell feature value is a unique identifier pre-assigned to each cell in the template, used to locate the target cell during document generation. For example, for the "Current Year Amount" cell in the A105050 Advertising and Business Promotion Expenses Tax Adjustment Table, the cell feature value can be set to "TA_105050_Sheet1_AdFee_CurrentExpense". This feature value is used to uniquely identify the cell's position in the template and its data source.

[0044] Based on the template identifier information contained in the tax and accounting difference object, the corresponding template file is retrieved from the working paper template library. The template files include audit working paper templates, tax adjustment form templates, and tax return form templates. For example, when it is necessary to generate a document corresponding to the tax adjustment item for advertising expenses, the tax adjustment form template file "A105050_TaxAdjustment.xlsx" can be retrieved from the template library. The template file pre-sets the characteristic values ​​and related metadata of each cell for automatic matching and filling during document generation.

[0045] The template file reads the pre-set cell feature values ​​of each cell, retrieves the metadata corresponding to the cell feature values, and constructs a feature value mapping pool. The cell feature value serves as the key, and the cell position coordinates and corresponding formula information serve as the value. The metadata includes cell position coordinates, cell formulas, and cell dependencies. For example, the metadata corresponding to a certain cell feature value can be recorded as: "Sheet1, row 10, column 4, formula is 'Current Year Amount - Tax Law Allowable Deduction', dependent cells are 'Current Year Amount' and 'Tax Law Allowable Deduction'". By establishing a feature value mapping pool, the target cell position can be quickly located without traversing the entire template when filling data, thus significantly improving document generation efficiency.

[0046] The cell dependencies corresponding to the formulas in each cell of the template file are analyzed to identify the computational dependencies between cells within the template. A cell dependency graph is then constructed based on these dependencies to determine the calculation order of each cell, ensuring that the calculation of a dependent cell takes precedence over the calculation of cells that depend on it. For example, the formula for a "tax adjustment amount" cell might reference cells such as "current year's amount," "deduction limit," and "carryover amount from the previous year," thus identifying the dependencies between these cells. Subsequently, a cell dependency graph is constructed based on the identified computational dependencies. This dependency graph is typically represented using a directed graph structure, where cells are nodes and the dependencies between cells are directed edges. By performing a topological sort on this dependency graph, the calculation order of each cell can be determined, ensuring that the calculation of a dependent cell takes precedence over the calculation of cells that depend on it, thus avoiding errors in the formula calculation order.

[0047] The document generation module iterates through the tax-accounting difference objects, searches for the corresponding target cell coordinates in the feature value mapping pool based on the corresponding cell feature values ​​recorded in the difference objects, and fills the corresponding target cell with the tax-accounting difference calculation result, while inheriting the preset format attributes of the target cell in the template. Specifically, after completing the dependency graph construction, the document generation module begins the data filling operation. For example, when the tax-accounting difference object records the feature value "TA_105050_Sheet1_AdFee_CurrentExpense" and the corresponding book amount is 500,000 yuan, the corresponding cell in the template can be directly located through the feature value mapping pool, and 500,000 yuan can be filled into that cell, while inheriting the preset format attributes of that cell in the template, such as font, border, and background color, thus ensuring that the generated document maintains the same format as the original template.

[0048] Following the calculation order determined by the cell dependency diagram, the formulas in the template cells are calculated sequentially. During the calculation process, if the fill value of a dependent cell changes, the formulas dependent on that cell are recalculated to ensure consistency in the calculation results across all cells in the template. For example, in the advertising expense tax adjustment table, the "tax adjustment amount" cell may depend on the calculation results of cells such as "current year's amount" and "tax law allowable deductions." Therefore, the relevant base cells are calculated first, followed by the dependent cells. If the fill value of a dependent cell changes during the calculation process, the formulas dependent on that cell are automatically recalculated to ensure consistency in the calculation results across all cells in the template. For instance, when the "current year's amount" or "total revenue" data is updated, the advertising expense deduction limit and tax adjustment amount are automatically recalculated to avoid data inconsistencies.

[0049] After data entry and formula calculations are completed, the corresponding audit working papers, tax adjustment forms, and tax returns are generated and output as editable documents. Simultaneously, the document generation module retains the cell feature values ​​for each cell within the generated documents. After all data entry and formula calculations are completed, the document generation module generates the corresponding audit working papers, tax adjustment forms, and tax returns, and outputs them as editable documents, such as Excel files. The system retains the cell feature value information for each cell within the generated documents, typically stored as hidden attributes or internal identifiers, so that subsequent modules can quickly locate the corresponding data source using these feature values ​​when performing data linkage or traceability queries. For example, when a user modifies the value of a cell in the audit working paper, the corresponding tax and accounting difference object and related rules can be identified through the cell's feature value, thereby achieving cross-table data synchronization updates or original voucher traceability.

[0050] By adopting the above technical solutions, the automatic audit system for tax discrepancies in corporate income tax settlement and payment in this embodiment of the application can achieve automated generation and accurate data filling of tax audit documents. On the one hand, the target cell in the template can be quickly located through the cell feature value mechanism; on the other hand, by constructing a cell dependency graph and performing topological sorting, the correct order of complex formula calculations can be ensured, avoiding incorrect formula references or inconsistent data calculations. In addition, by retaining cell feature values ​​in the generated document, a basic support can be provided for subsequent data linkage and traceability functions, thereby improving the automation level and data consistency of the corporate income tax settlement and payment audit process.

[0051] In one embodiment of this application, after parsing the dependencies corresponding to the formulas in each cell of the template file, the document generation module constructs a cell dependency graph and uses a Directed Acyclic Graph (DAG) structure to organize and manage the dependencies between cells. A DAG structure is a graph structure composed of a set of nodes and directed edges, where each edge has a definite direction, and there are no circular paths in the entire graph, meaning that no node depends on itself again through several dependency paths. In this embodiment, the cell dependency graph uses the cell feature values ​​in the template as nodes and the data dependencies or formula references between cells as directed edges, thereby constructing a cell calculation dependency network. Specifically, the document generation module first reads the feature value and metadata of each cell and extracts the feature values ​​of other cells that the cell depends on. For example, in a tax adjustment form template, the calculation formula for the "Tax Adjustment Amount" cell might be "Current Year Incurred Amount - Tax Law Allowable Deduction Amount," in which case the cell is identified as depending on the "Current Year Incurred Amount" cell and the "Tax Law Allowable Deduction Amount" cell. In the dependency graph, the "Current Year Amount" cell and the "Tax Law Deductible Amount" cell can be used as source nodes, and the "Tax Adjustment Amount" cell as the target node. Two directed edges are established: "Current Year Amount → Tax Adjustment Amount" and "Tax Law Deductible Amount → Tax Adjustment Amount". In this way, the dependencies between all cells in the template are gradually identified and organized into a unified directed graph structure. During the construction of this graph structure, the document generation module also performs validity checks on the dependencies to ensure that the constructed graph structure does not contain circular dependencies. For example, if a template contains a situation where cell A depends on cell B, and cell B also depends on cell A, a circular dependency is formed, which will make it impossible to determine the calculation order when calculating formulas. To avoid such problems, a cycle detection algorithm is executed when constructing the dependency graph. Once a circular dependency is detected, an exception log is recorded and the template designer is prompted to make corrections, thus ensuring that the constructed dependency graph always remains an acyclic structure. After completing the dependency graph construction, the document generation module performs topological sorting based on this DAG structure to determine the calculation order of each cell. Topological sorting is a sorting method for directed acyclic graphs (DAGs) that ensures all dependent nodes precede their corresponding nodes. In this application, a cell calculation order list is generated using topological sorting, guaranteeing that all basic data cells are filled or calculated first, while formula cells that depend on this data are calculated in subsequent steps. For example, in the advertising expense tax adjustment table, basic data cells such as "Current Year Amount," "Current Year Revenue," and "Carryover Amount from Previous Year" are filled first, then the "Tax Law Allowable Deduction Amount" is calculated, and finally the "Tax Adjustment Amount" is calculated.In this way, it can be ensured that all data required for formula calculations are prepared, thereby avoiding calculation errors. Furthermore, in the actual tax document generation process, the DAG structure can be used not only to manage dependencies within the same table but also to manage cross-table dependencies between different tables. For example, in the corporate income tax return, the "Taxable Income" cell may depend on the "Total Tax Adjustment" cell in the tax adjustment table. In this case, the system can use the target cell in the tax adjustment table as the source node and the "Taxable Income" cell in the return as the target node, establishing a cross-table dependency edge. By uniformly incorporating cells from different template files into the same DAG structure for management, the system can automatically determine the calculation order of cross-table data during topological sorting, thereby achieving data linkage calculation between multiple tables. For example, in a specific embodiment, the advertising expense tax adjustment table has the following cell dependencies: "Current Year Amount" and "Current Year Revenue" are used to calculate "Tax Law Allowable Deductions," "Tax Law Allowable Deductions" and "Current Year Amount" are jointly used to calculate "Tax Adjustment Amount," and "Tax Adjustment Amount" is referenced by the "Taxable Income" cell in the tax return. In this scenario, the following Directed Acyclic Graph (DAG) dependencies can be constructed: Current Year Amount → Tax-Deductible Amount; Current Year Revenue → Tax-Deductible Amount; Tax-Deductible Amount → Tax Adjustment Amount; Current Year Amount → Tax Adjustment Amount; Tax Adjustment Amount → Taxable Income. In this dependency graph, directed edges are established between nodes according to the data dependency direction, and there are no circular paths, thus forming a standard directed acyclic graph structure. By performing a topological sort on this DAG structure, the system can obtain the correct calculation order: first, fill in the basic data; then calculate the intermediate variables; and finally, calculate the final declaration result. Using a DAG structure to manage cell dependencies clearly describes complex cell dependencies and automatically identifies the data flow between cells, thus avoiding the difficulty in maintaining formula dependencies in traditional Excel templates. Secondly, performing a topological sort on the DAG structure ensures that all cells are calculated in the correct dependency order, thus avoiding data inconsistencies caused by incorrect calculation order. Thirdly, by performing circular dependency detection on the DAG structure, potential errors can be identified in advance during the template design stage, improving the reliability and maintainability of the template. Furthermore, because the DAG structure can uniformly manage intra-table and inter-table dependencies, it can automatically complete cross-table data calculations and updates when generating audit working papers, tax adjustment forms, and tax returns, thereby improving document generation efficiency and ensuring data consistency. In summary, by constructing a cell dependency graph based on a DAG structure, not only can the automated generation of complex tax documents be achieved, but the accuracy, stability, and scalability of system calculations can also be effectively improved.

[0052] Preferably, in the actual application of the application, the document generation module is further used to merge the cell dependency graph of each document with the cross-table cell dependency graph after completing the construction of the cell dependency graph within each document, so as to form a complete cross-table cell dependency graph.

[0053] Furthermore, a topological sort is performed on the cross-table cell dependency graph to generate the order of cell data filling and formula calculation, so that the data filling and calculation of the dependent cell are performed before the cells that depend on the dependent cell.

[0054] The cross-table cell dependency graph is constructed by parsing the cell feature values ​​referenced by the formulas in each cell of the template file and extracting the dependencies between cells. The cell feature values ​​serve as nodes, and the dependencies between cells serve as directed edges. The directed edges can span different documents, thus forming a complete cross-table cell dependency graph.

[0055] For example, in one embodiment of this application, the document generation module can not only construct a cell dependency graph within a single document, but also merge the cell dependency graphs of multiple documents with cross-table cell dependencies to form a complete cross-table cell dependency graph. Specifically, the cell dependencies in each template file (such as the audit working paper template, tax adjustment form template, and tax return form template) are parsed, extracting the feature values ​​of each cell and the feature values ​​of other cells they depend on, and constructing them as a DAG structure within the document. Each cell feature value corresponds to a node in the DAG, and the data dependencies or formula references between cells correspond to directed edges in the DAG. After parsing the dependencies within each document, the document generation module further analyzes the dependencies between different documents. For example, in the corporate income tax scenario, the "Total Tax Adjustment Amount" cell in the tax adjustment form may be referenced by the "Taxable Income" cell in the tax return form. The system identifies the cell feature value it references by parsing the formula in the "Taxable Income" cell of the tax return form template, and determines that the feature value belongs to a node in the tax adjustment form template. Subsequently, the document generation module adds directed edges from the "Total Tax Adjustment Amount" node to the "Taxable Income" node in the cross-table dependency graph, thereby incorporating the dependencies between different documents into the same dependency graph for management. By merging the internal DAGs of each document with the cross-table dependency edges, a complete cross-table cell dependency graph is formed. In this graph, each node still corresponds to a cell feature value, and directed edges represent data or formula dependencies. These edges can span different documents, thus uniformly managing calculation dependencies within and between tables. For example, the "Current Year Amount" and "Tax Law Deduction Amount" nodes in the Advertising Expense Tax Adjustment Table form an internal DAG structure to calculate the "Tax Adjustment Amount," while the "Tax Adjustment Amount" node is referenced by the "Taxable Income" node in the Tax Return Table. After merging, the complete cross-table DAG contains the following dependencies: Current Year Amount → Tax Law Deduction Amount; Tax Law Deduction Amount → Tax Adjustment Amount; Tax Adjustment Amount → Taxable Income. After forming the complete cross-table dependency graph, a topological sort is performed on the graph to generate the order of cell data filling and formula calculation. In the topological sorting results, all dependent cells (such as "Current Year Amount", "Tax Law Deduction", and "Tax Adjustment Amount") are processed before the cells that depend on them (such as "Taxable Income"). This ensures that the data a cell depends on is prepared before it is populated or calculated, avoiding calculation errors or data inconsistencies.

[0056] This embodiment utilizes a cross-table cell dependency graph to uniformly manage complex dependencies between multiple documents, avoiding the need for manual maintenance of cross-table formulas and data references in traditional methods, thereby significantly improving the automation and accuracy of document generation. Secondly, topological sorting ensures the correctness of cell data filling and formula calculation order, enabling complex multi-table calculations to proceed smoothly without manual intervention. Thirdly, the cross-table DAG structure also allows for incremental updates when data changes. For example, if the data in a basic cell changes, relevant formulas can be automatically recalculated along the dependency path, ensuring data consistency across documents.

[0057] The automatic audit system for tax and accounting discrepancies in corporate income tax settlement in this embodiment also includes a two-way linkage and traceability module. The two-way linkage and traceability module is used to perform cross-table data linkage updates on related cells based on the cross-table cell dependency relationship when the user modifies the value of any cell in the audit working paper, tax adjustment form or tax return, and locate the corresponding original voucher record data according to the original voucher index number associated with the cell, so as to realize a penetrating traceability query from the data in the audit working paper, tax adjustment form or tax return to the original voucher record data.

[0058] See Figure 2 Specifically, the bidirectional linkage and traceability module includes: a linkage listener, used to capture the value change event through the cell feature value corresponding to the cell when the user modifies the value of any cell in the audit draft, tax adjustment form or tax declaration form, and query at least one target cell feature value associated with the cell feature value according to the cross-table cell dependency relationship graph;

[0059] The cross-table cell dependency graph uses cell feature values ​​as nodes and mapping relationships between data cells with the same business meaning in different documents as connecting edges to describe the cross-table data association relationships between audit working papers, tax adjustment forms, and tax returns.

[0060] The linkage listener is also used to locate the corresponding target cell position coordinates based on the target cell feature value, and automatically update the value in the target cell to achieve cross-table data linkage update.

[0061] In detail, when a user modifies a value in any cell of an audit working paper, tax adjustment form, or tax return, the linked listener captures the "value change" event through the cell's pre-bound characteristic value. For example, suppose a user modifies the "business entertainment expense increase" in cell C5 of audit working paper Sheet1, and the characteristic value of this cell is WD_001_Sheet1_Entertain_Adjust. The linked listener will recognize this change event and use this characteristic value as the basis for querying, locating all related target cell characteristic values ​​in the cross-table cell dependency graph, such as the characteristic value TA_105000_Sheet1_Entertain_Adjust in the tax adjustment form and the corresponding cell in the tax return A105000. In the dependency graph, each cell characteristic value acts as a node, and mapping relationships are established between cells with the same business meaning in different documents as connecting edges. For example, cell C5 in the audit working paper, which shows "Adjustment / Increase in Business Entertainment Expenses," shares the same business data with the corresponding cells in the tax adjustment form and tax return, forming an interconnected relationship in the dependency graph. Based on this structure, the linkage listener can quickly query all target cells related to the changed cell and obtain their specific location coordinates in the document. Subsequently, it automatically updates the modified values ​​to all target cells, achieving cross-table data linkage updates.

[0062] Taking a practical example, if a user modifies the amount in cell C5 of the audit draft to 5000 yuan, the system captures this change event through a linked listener, queries the dependency graph, locates the corresponding cell in the tax adjustment table, and automatically updates its amount to 5000 yuan. Simultaneously, it triggers the recalculation of formula cells in the tax return table that depend on this data, such as "taxable income." Topological sorting ensures that the dependent cell is calculated before the cells that depend on it, thus guaranteeing data consistency throughout the entire document chain.

[0063] This embodiment, through the synergy of the cross-table cell dependency graph and the linkage listener, allows for automatic synchronization of related target cell values ​​when a user modifies any cell in the audit draft, tax adjustment form, or tax return. This avoids the tedious manual repetitive updates, improves data processing accuracy, and ensures the consistency of business data across documents. Secondly, by accurately capturing numerical change events through cell feature values, it eliminates the need for a full document scan, performing data updates only on the changed cell and its related cells. This mechanism significantly reduces the time required for data filling and formula calculations, making it particularly suitable for processing large amounts of tax documents and complex multi-table data, thus effectively improving operational efficiency. Furthermore, the cross-table cell dependency graph has excellent scalability and adaptability. In newly added documents or dynamically generated cells, the dependency graph can automatically expand, enabling cross-table data linkage updates across multiple templates and documents. Finally, through the bidirectional linkage and traceability module, users do not need to manually search for and modify duplicate data in multiple documents; they only need to modify the value in any cell to complete the entire data update process. Meanwhile, the system can display the calculation results and data sources of the dependent formulas in real time, giving users intuitive feedback on data changes during operation, facilitating auditing and significantly improving user experience and auditing convenience.

[0064] Specifically, in some embodiments of this application, after the target cell value is updated, the linkage listener triggers the cell dependency graph in the document generation module to recalculate the formula cells that depend on the feature value of the target cell;

[0065] The recalculation is performed sequentially according to the calculation order obtained by topological sorting of the cell dependency graph to ensure that the calculation results of all formula cells that depend on the target cell are consistent. Taking a real tax scenario as an example, suppose the rule engine calculates "Adjustment of Business Entertainment Expenses" X, corresponding to the feature value TA_105000_Sheet1_Entertain_Adjust, which is mapped to cell C5 of the audit working paper Sheet1 (feature value WD_001_Sheet1_Entertain_Adjust) and row 3 of the declaration form A105000 (feature value TA_105000_Sheet1_Entertain_Adjust). When the user modifies the value of cell C5 in the audit working paper, the linkage listener captures the value change event and first updates the value of the corresponding declaration form cell. Subsequently, the cell dependency graph is triggered, and recalculation is performed on all formula cells that depend on this feature value. For example, if the formula in the "Taxable Income" cell of the tax return references "Adjustment of Business Entertainment Expenses," this formula cell will be located in the dependency graph and calculated according to the order determined by the topological sorting. This ensures that the values ​​of all dependent cells have been updated before the "Taxable Income" is calculated. This dependency-driven recalculation mechanism ensures the consistency of formula calculation results and avoids data inconsistencies caused by manual modifications or partial updates. Secondly, the topological sorting of the dependency graph intelligently determines the calculation order, ensuring that dependent cells are calculated before their dependent cells, reducing calculation conflicts and errors, and improving the reliability and accuracy of tax return generation. Furthermore, this mechanism, combined with bidirectional linkage and feature value positioning, enables efficient processing of simultaneous updates and calculations of large-scale, multi-table, and multi-formula cells, improving the automation level of corporate tax processing. Finally, users can obtain the correct formula calculation results in real time after modifying any cell, without manual adjustment, improving operational convenience and audit reliability.

[0066] Preferably, in some embodiments of this application, the bidirectional linkage and traceability module further includes a traceability indexer, which is used to associate and bind the original voucher index number in the standardized tax dataset with the corresponding cell feature value when generating the audit draft, tax adjustment form and tax return, and store it in the corresponding cell in the form of a hidden attribute;

[0067] When a user modifies the value of any cell in the audit draft, tax adjustment form, or tax return, the linkage listener captures the value change event through the cell feature value corresponding to that cell, and locates at least one target cell feature value associated with that cell feature value based on the cross-table cell dependency graph, so as to automatically update the value in the corresponding target cell.

[0068] After the target cell value is updated, the linkage listener triggers the calculation process of the cell dependency graph and recalculates the formula cells that depend on the feature value of the target cell according to the calculation order obtained by topological sorting, so as to ensure that the calculation results in the cross-document data link remain consistent.

[0069] When a user selects any cell on the terminal interface, the cell feature value corresponding to that cell is read. The traceability indexer queries the original voucher index number associated with that cell feature value and initiates a query to the database cluster based on the original voucher index number to obtain the corresponding original voucher record data, which is then displayed in the user interface. This enables a penetrating traceability query from the data in the audit draft, tax adjustment form, or tax return to the original voucher record data. For example, the rule engine calculates that the "business entertainment expense adjustment increase" is 10,000 yuan, with a corresponding feature value of TA_105000_Sheet1_Entertain_Adjust. This amount originates from the original voucher index number VCH_20260308_001. When generating cell C5 (feature value WD_001_Sheet1_Entertain_Adjust) of audit working paper Sheet1 and the amount cell (feature value TA_105000_Sheet1_Entertain_Adjust) of row 3 of declaration form A105000, the traceability indexer binds VCH_20260308_001 to the feature values ​​of the two cells and stores it in the cells as a hidden attribute, thereby realizing the implicit association between the cells and the source documents.

[0070] When a user modifies the amount in cell C5 of the audit draft Sheet1 to 12,000 yuan, the linked listener captures this change event through the cell feature value WD_001_Sheet1_Entertain_Adjust. Subsequently, the listener uses the cross-table cell dependency graph to locate the target cell feature value associated with this change, such as TA_105000_Sheet1_Entertain_Adjust in row 3 of form A105000, and automatically updates its amount to 12,000 yuan. After the target cell update is complete, the listener triggers the calculation process of the cell dependency graph (DAG structure) established in the document generation module. Formula cells that depend on the target cell, such as the "Taxable Income" cell in the main table of the tax return (feature value TA_105000_Sheet1_TaxableIncome), are recalculated sequentially according to the calculation order obtained by topological sorting. This ensures that the calculation results of all dependent formula cells, including "Taxable Income," are consistent, thereby achieving data link consistency across documents and tables.

[0071] Furthermore, when a user clicks on any cell in the terminal interface (e.g., cell C5 of Sheet1), the system reads its cell feature value WD_001_Sheet1_Entertain_Adjust and queries the original voucher index number VCH_20260308_001 associated with that feature value using the trace indexer. Subsequently, the system initiates a query to the database cluster based on this index number to obtain the corresponding original voucher record data, including the voucher number, date, summary, and amount, and displays it in a floating window in the user interface, enabling a penetrating traceability query from cell data in audit drafts, tax adjustment forms, or tax returns to the original voucher record data.

[0072] In one specific embodiment of this application, after the tax and accounting difference rule engine completes the tax adjustment calculation and generates the tax and accounting difference object based on the rule model library, it also performs a credibility analysis on the tax and accounting difference object. Specifically, it first extracts multiple data points involved in the calculation of the tax and accounting difference object, such as the cumulative amount of the corresponding accounting subject for the year, the beginning balance, the tax adjustment rule number, the original voucher index number, the adjustment calculation formula, and the difference situation of similar subjects in the historical period, and calculates the difference confidence value of the tax and accounting difference object based on this information. The difference confidence value is used to reflect the reliability of the current tax and accounting difference result and the degree of consistency with its matching with historical data or rules. In this embodiment, the difference confidence value can be calculated by comparing the current tax and accounting difference amount with the difference amount of similar subjects in the historical period. Specifically, it first retrieves historical difference records corresponding to the tax and accounting difference object from the historical tax and accounting difference database, such as historical tax and accounting difference objects with the same accounting subject number, the same tax adjustment rule number, or the same difference type identifier, and obtains a set of historical difference amount data. Subsequently, it performs statistical processing on the set of historical difference amounts to obtain the historical average difference amount H. The difference amount corresponding to the current tax and accounting difference object is denoted as D. The difference confidence value C is calculated based on the deviation of the current difference amount from the historical average difference amount: C = 1 − |D − H| / (H + ϵ), where ϵ is a preset minimum constant to avoid a denominator of zero. Using this calculation method, the difference confidence value is higher when the current difference amount is close to the historical average; and lower when the deviation is large. The difference confidence value is then compared with a preset threshold range. When the calculated difference confidence value is lower than the first preset threshold, it indicates that the reliability of the current tax and accounting difference object is low, and there may be data anomalies or rule matching errors. This tax and accounting difference object is marked as a low-confidence difference object, and a rule backtracking calculation mechanism is triggered. Specifically, the rule backtracking calculation traverses the relevant rules in the rule model library backwards along the dependencies between tax adjustment rules, re-acquires the original data and intermediate calculation results involved in the calculation, and re-executes the tax adjustment calculation. For example, when a tax-accounting difference object is calculated based on the "rules for limiting the deduction ratio of business entertainment expenses" and the "rules for summarizing expense accounts", the rule node that directly participates in the calculation will be located first, and then the original data node will be traced back, such as the corresponding accounting account amount, expense details record and original voucher index number, and the calculation will be re-executed to generate the difference object, thereby improving the accuracy of the difference calculation.

[0073] When the difference confidence level falls between the first and second preset thresholds, it indicates that the current difference object has a certain degree of credibility, but uncertainty still exists. The system performs perturbation calculations on multiple data elements involved in the calculation, generating multiple sets of numerical simulations within a preset perturbation range, and re-executing tax adjustment rules such as the pre-tax deduction ratio for business entertainment expenses, thereby obtaining multiple sets of difference calculation results. Subsequently, based on these results, the difference fluctuation coefficient is calculated, for example, by using the ratio of the standard deviation of the difference value to the average difference value to reflect the degree of fluctuation. If the fluctuation coefficient is small, it indicates that the difference result is stable under slight data changes, which will increase the credibility of the difference object; if the fluctuation coefficient is large, its credibility is corrected, and the user is prompted for manual review.

[0074] When the confidence value of the difference is higher than the second preset threshold, it indicates that the current tax-accounting difference object has high reliability, and further automatic classification and explanation generation are performed using historical data. Specifically, the tax-accounting difference rule engine generates a difference feature vector based on the difference object, including multiple feature dimensions such as the difference account number, the difference amount range, the applicable tax adjustment rule number, the adjustment ratio, the number of vouchers involved, and the accounting subject category. Then, the difference feature vector is matched with historical feature vectors for similarity, for example, by using vector cosine similarity to calculate the similarity between the current difference vector and the historical difference vector. When the similarity exceeds the preset threshold, the current difference object is automatically classified into the corresponding historical difference type, and tax adjustment explanation information is generated, such as "According to the provisions of the Implementation Regulations of the Enterprise Income Tax Law regarding the pre-tax deduction ratio of business entertainment expenses, a tax adjustment is made to the accounting recognition amount, forming a tax-accounting difference." This explanation information is automatically written into the tax working paper generation module to form a complete tax-accounting difference explanation record, and supports subsequent tax working paper generation and tax-accounting difference traceability query. Through the above embodiments, based on the simple calculation of the difference confidence level, it is possible to achieve hierarchical processing, automatic verification, stability assessment and historical difference matching of tax and accounting difference results, which significantly improves the accuracy, reliability and automation level of the tax and accounting difference audit system.

[0075] In addition, this application embodiment also provides an automatic auditing method for tax and accounting differences in corporate income tax settlement, which is executed by the automatic auditing system for tax and accounting differences in corporate income tax settlement described in the above embodiment.

[0076] In the description of this application, it should be understood that the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this application, "multiple" means two or more, unless otherwise explicitly specified.

[0077] Although embodiments of this application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting this application. Those skilled in the art can make modifications, alterations, substitutions and variations to the above embodiments within the scope of this application.

Claims

1. An automatic auditing system for discrepancies between corporate income tax settlement and accounting, characterized in that, include: The data input module is used to acquire a standardized tax dataset and preprocess the standardized tax dataset to obtain a preprocessed standardized tax dataset, wherein the preprocessing includes format verification and integrity verification. The standardized tax dataset includes at least the opening balance of accounting subjects, the current year's debits, the current year's credits, and the corresponding original voucher index numbers. The original voucher index numbers are used to identify the original voucher record data corresponding to them. The original voucher record data is accounting original voucher business record data stored in the database cluster. The tax-accounting difference rule engine is used to perform tax adjustment rule matching and tax-accounting difference calculation on the preprocessed standardized tax dataset based on the rule model library, so as to generate tax-accounting difference objects. The document generation module is used to automatically generate audit working papers, tax adjustment forms and tax returns based on the tax and accounting difference objects, and to build cross-table cell dependencies based on the data reference relationships between cells in each document; The two-way linkage and traceability module is used to perform cross-table data linkage update on related cells based on the cross-table cell dependency relationship when the user modifies the value of any cell in the audit working paper, tax adjustment form or tax return, and locate the corresponding original voucher record data according to the original voucher index number associated with the cell, so as to realize the penetrating traceability query from the data in the audit working paper, tax adjustment form or tax return to the original voucher record data; The tax-accounting difference objects include: tax adjustment rule ID, account name, book amount, tax amount, adjustment amount, corresponding cell feature value, and template identification information; The document generation module includes: receiving the corresponding cell feature values ​​recorded in the tax and accounting difference object and the tax and accounting difference calculation results; Based on the template identification information contained in the tax and accounting difference object, the corresponding template file is retrieved from the working paper template library. The template file includes the audit working paper template, the tax adjustment form template, and the tax return form template. Read the pre-set cell feature values ​​of each cell in the template file and construct a feature value mapping pool, wherein the cell feature value is used as the key and the cell position coordinates and corresponding formula information are used as the value; Traverse the tax and accounting difference objects, find the corresponding target cell position coordinates in the feature value mapping pool according to the corresponding cell feature value recorded in the difference object, and fill the tax and accounting difference calculation result into the corresponding target cell; After completing the data entry and formula calculations, the corresponding audit working papers, tax adjustment forms, and tax returns are generated and output as editable documents; at the same time, the cell feature values ​​corresponding to each cell are retained in the generated documents.

2. The automatic auditing system for tax and accounting discrepancies in corporate income tax final settlement as described in claim 1, characterized in that, The tax-accounting difference rule engine is also used to traverse the pre-set tax adjustment rules in the rule model library according to the preset priority, match the corresponding tax adjustment rules for the accounting subjects in the standardized tax dataset, perform data query and expression operation on the pre-processed standardized tax dataset, inject the query results and threshold parameters into the executable expression object for tax adjustment calculation, thereby generating the tax-accounting difference object corresponding to the accounting subject; The rule model library includes multiple predefined tax adjustment rules. Each tax adjustment rule corresponds to a tax adjustment item and is described using a rule description language (DSL) specifically for tax and financial calculations, combined with SQL statements and MVEL expressions. Each tax adjustment rule includes the corresponding accounting subject, data query statement, calculation expression, threshold parameter, and carry-forward identifier.

3. The automatic auditing system for tax and accounting discrepancies in corporate income tax final settlement as described in claim 2, characterized in that, The tax-accounting difference rule engine is also used to, during the data query and expression calculation process in the preprocessed standardized tax dataset, after determining the tax adjustment rule that matches the accounting subject, extract the data query statement in the tax adjustment rule, and replace the parameters of the data query statement according to the code of the current accounting period and accounting subject to generate an executable target query statement; Execute the target query statement, obtain the corresponding query data from the preprocessed standardized tax dataset, and encapsulate the query data into a mapping structure with the query field name as the key and the field value as the value. Obtain the threshold parameters corresponding to the tax adjustment rules of the accounting subject, and construct the expression context variable environment together with the query data in the mapping structure; The pre-compiled calculation expression in the tax adjustment rules of the accounting subject is called to perform expression operation to calculate the book amount, tax amount, and tax adjustment amount, thereby generating the tax-accounting difference object.

4. The automatic auditing system for tax and accounting discrepancies in corporate income tax final settlement as described in claim 3, characterized in that, When executing the target query statement, the tax and accounting difference rule engine retrieves the corresponding query data from the hash table built in memory by the preprocessed standardized tax dataset; If the required data is not found in the memory hash table, an SQL query is executed through the database connection pool to retrieve the query data from the database cluster. The retrieved data is then cached in the memory hash table for subsequent rule queries, thereby improving data access efficiency and avoiding duplicate queries. The database cluster also stores historical carryover data across accounting periods.

5. The automatic auditing system for corporate income tax settlement and accounting discrepancies according to any one of claims 1 to 4, characterized in that, The calculation results of the tax-accounting differences include the book amount, the tax amount, and the tax adjustment amount; The document generation module further includes: when reading the pre-set cell feature values ​​of each cell in the template file, it also obtains metadata corresponding to the cell feature values, the metadata including cell position coordinates, cell formulas and cell dependencies; The cell dependencies corresponding to the formulas in each cell of the template file are parsed to identify the calculation dependencies between cells in the template. A cell dependency graph is constructed based on the calculation dependencies to determine the calculation order of each cell, so that the calculation of the dependent cell takes precedence over the calculation of the cell that depends on it. When filling the tax and accounting difference calculation results into the corresponding target cell, the preset format attributes of the target cell in the template are also inherited; According to the calculation order determined by the cell dependency graph, the formulas of the cells in the template are calculated sequentially. During the calculation process, if the fill value of a dependent cell changes, the formulas that depend on that cell are recalculated to ensure that the calculation results of each cell in the template are consistent.

6. The automatic auditing system for tax and accounting discrepancies in corporate income tax final settlement as described in claim 5, characterized in that, The document generation module is also used to merge the cell dependency graph of each document with the cross-table cell dependency graph after the construction of the cell dependency graph of each document is completed, so as to form a complete cross-table cell dependency graph. Furthermore, a topological sort is performed on the cross-table cell dependency graph to generate the order of cell data filling and formula calculation, so that the data filling and calculation of the dependent cell are performed before the cells that depend on the dependent cell. The cross-table cell dependency graph is constructed by parsing the cell feature values ​​referenced by the formulas in each cell of the template file and extracting the dependencies between cells. The cell feature values ​​serve as nodes, and the dependencies between cells serve as directed edges. The directed edges can span different documents, thus forming a complete cross-table cell dependency graph.

7. The automatic auditing system for tax and accounting discrepancies in corporate income tax final settlement as described in claim 6, characterized in that, The bidirectional linkage and traceability module includes: The linkage listener is used to capture the value change event through the cell feature value corresponding to the cell when the user modifies the value of any cell in the audit draft, tax adjustment form or tax declaration form, and query at least one target cell feature value associated with the cell feature value according to the cross-table cell dependency relationship graph. The cross-table cell dependency graph uses cell feature values ​​as nodes and mapping relationships between data cells with the same business meaning in different documents as connecting edges to describe the cross-table data association relationships between audit working papers, tax adjustment forms, and tax returns. The linkage listener is also used to locate the corresponding target cell position coordinates based on the target cell feature value, and automatically update the value in the target cell to achieve cross-table data linkage update.

8. The automatic auditing system for tax and accounting discrepancies in corporate income tax final settlement as described in claim 7, characterized in that, After the target cell value is updated, the linkage listener triggers the cell dependency graph in the document generation module to recalculate the formula cells that depend on the feature value of the target cell. The recalculation is performed sequentially according to the calculation order obtained by topological sorting of the cell dependency graph, to ensure that the calculation results of all formula cells that depend on the target cell are consistent.

9. The automatic auditing system for tax and accounting discrepancies in corporate income tax final settlement as described in claim 8, characterized in that, The bidirectional linkage and traceability module also includes a traceability indexer, which is used to associate and bind the original voucher index number in the standardized tax dataset with the corresponding cell feature value when generating the audit working paper, tax adjustment form and tax declaration form, and store it in the corresponding cell as a hidden attribute. When a user modifies the value of any cell in the audit draft, tax adjustment form, or tax return, the linkage listener captures the value change event through the cell feature value corresponding to that cell, and locates at least one target cell feature value associated with that cell feature value based on the cross-table cell dependency graph, so as to automatically update the value in the corresponding target cell. After the target cell value is updated, the linkage listener triggers the calculation process of the cell dependency graph and recalculates the formula cells that depend on the feature value of the target cell according to the calculation order obtained by topological sorting, so as to ensure that the calculation results in the cross-document data link remain consistent. When a user selects any cell on the terminal interface, the cell feature value corresponding to that cell is read. The traceability indexer queries the original voucher index number associated with that cell feature value and initiates a query to the database cluster based on the original voucher index number to obtain the corresponding original voucher record data and display it in the user interface. This enables a penetrating traceability query from the data in the audit draft, tax adjustment form, or tax return to the original voucher record data.

10. A method for automatically verifying tax-accounting discrepancies in corporate income tax final settlement, characterized in that, The method is executed by the automatic audit system for tax and accounting differences in corporate income tax settlement as described in any one of claims 1-9.

Citation Information

Patent Citations

  • Enterprise income tax management system

    CN116128664A

  • Tax management system

    CN117372184A

  • Interactive tax calculation system, method and device for tax payment of group-type enterprise

    CN118657621A

  • Enterprise income tax declaration form automatic generation method and device and storage medium

    CN113449495A

  • Report generation method and device supporting multiple layouts and multiple templates

    CN120257955A