Tax return error correction method and system based on multi-round intention disassembly agent
Patent Information
- Application Number
- CN202611293450.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-25
- Publication Date
- 2026-10-23
AI Technical Summary
然而,税务申报错误中往往一个申报错误可能是多个前置错误叠加的结果,也可能是错误的连锁反应
[0063]1.本发明通过构建意图时序图并以当前错误状态为起点沿有向边逆方向进行深度优先遍历,结合置信度权重乘积确定根因意图链,能够穿透表象错误、追溯至引发错误的源头根因,有效克服了现有技术仅进行单轮语义匹配和表象校验的缺陷。同时,本发明通过税务申报表本体模型中的表项依赖关系库,对修正操作进行逐项传播推演,能够预判修改任意字段后各相关表项的连锁数值变化以及可能触发的新增校验错误,使纠错过程具备前瞻性和全局性。
Smart Images

Figure CN122966375A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of tax data processing technology, and in particular to a method and system for correcting tax declarations based on multi-round intent decomposition intelligent agents. Background Technology
[0002] With the accelerating digitalization of tax collection and administration, the complexity of tax declarations is increasing daily. The accuracy and compliance of declaration data directly affect the efficiency of national tax collection and administration and the level of corporate tax risk management. In current tax declaration practices, taxpayers frequently make errors when filling out multiple tax types and supplementary forms, such as VAT returns and corporate income tax returns, due to reasons such as incorrect tax rate application, incorrect entry of income items, deviations in input tax calculation, and mismatches in cross-form reconciliation. How to efficiently and accurately detect, locate the root causes of, and guide the correction of declaration errors has become a key technical problem that urgently needs to be solved in the field of tax informatization.
[0003] In the existing technology, various tax data processing and intelligent question-answering solutions have been proposed. For example, Chinese invention patent application CN121213263A discloses a method and apparatus for processing tax and financial business requests. This technical solution includes the following steps: receiving tax and financial business requests; performing semantic parsing using a BERT model trained on a tax and financial domain corpus to extract user intent and key business entities; managing the dialogue flow of the business scenario based on a finite state machine model; triggering state transitions according to the current dialogue state, user intent, and key business entities to orderly advance the invoicing, verification, or diagnosis business processes; and scheduling corresponding AI capability modules to execute tasks according to the business scenario defined by the user intent and key business entities. This solution can adapt to the needs of tax and financial business with multi-step, scenario-based dialogue responses. However, the above technical solutions suffer from intent recognition remaining at the level of single-turn semantic parsing, lacking the ability to deeply deconstruct erroneous intents in a temporal sequence. Although the above solutions introduce BERT semantic parsing, intent classifiers, and other technical means for intent recognition, their essence is still to map the user's current single input to a preset intent label. However, tax filing errors often result from the accumulation of multiple preceding errors or a chain reaction of mistakes. Existing solutions cannot model this evolution of intent across different filing cycles, leading to corrective suggestions that often only address surface errors without addressing their root causes.
[0004] Therefore, there is an urgent need for a tax return correction method that can achieve deep intent temporal decomposition, cross-table causal chain tracing, cognitive state adaptation, and progressive multi-round interactive correction, in order to overcome the shortcomings of the existing technologies and improve the accuracy, comprehensiveness, and user experience of tax return correction. Summary of the Invention
[0005] This invention provides a method and system for correcting tax declarations based on multi-round intent decomposition of intelligent agents, in order to solve the problems mentioned in the background art.
[0006] To achieve the above objectives, the present invention provides a tax declaration error correction method based on multi-round intent decomposition intelligent agents, comprising:
[0007] O1: Extract the error status identifier and correction action identifier of the target user in the tax declaration process, and construct an intent sequence graph with the error status identifier as the node and the causal dependency relationship between the error status before and after indicated by the correction action identifier as the directed edge.
[0008] O2: The error verification result in the tax declaration process is taken as the current error state. Starting from the current error state, a depth-first traversal is performed in the reverse direction of the directed edge in the intent sequence graph to obtain all possible predecessor error state paths. The error state sequence corresponding to the predecessor error state path with the largest confidence weight product is determined as the root cause intent chain.
[0009] O3: Based on the terminal root cause error node in the root cause intent chain, propagate and deduce the current declaration data of the target user item by item, generate the modified values of each relevant table item and the newly added verification error list, and use it as the counterfactual deduction result;
[0010] O4: Assess the cognitive proficiency level of the target user, and generate an error correction and guidance strategy based on the cognitive proficiency level and the error complexity in the counterfactual deduction results;
[0011] O5: In accordance with the error correction guidance strategy, the correction guidance is gradually output to the target user through dialogue, and the correction operation data input by the target user is received after each round of dialogue, and the declaration data is updated according to the correction operation data;
[0012] O6: Perform consistency verification on the updated declaration data. If the verification passes, the error correction is completed. If the verification fails, return to O2 to redetermine the root cause intention chain until the verification passes or the preset round limit is reached.
[0013] In a preferred embodiment, the step of extracting the error status identifier and correction action identifier of the target user during the tax declaration process, and constructing an intent sequence graph using the error status identifier as a node and the causal dependency relationship between the previous and subsequent error states indicated by the correction action identifier as directed edges, includes:
[0014] Obtain the historical interaction records between the target user and the intelligent agent, extract the error code and error location of the declaration form item from the interaction content of each round in the historical interaction records, combine the error code and error location of the declaration form item to generate an error status identifier;
[0015] Extract the user's field modification actions, the original error status identifier targeted by the field modification actions, and the new error status identifier generated after the execution from the interaction content of each round in the historical interaction record.
[0016] Using the original error status identifier as the starting node, the new error status identifier as the ending node, and the execution sequence of the field modification action as the direction of the edge, a correction action identifier is generated.
[0017] The error status identifier is used as a graph node, and the correction action identifier is used as a directed edge. The graph nodes are connected sequentially according to the temporal order of the correction action identifier to generate an intent sequence graph.
[0018] In a preferred embodiment, the step of extracting the error code and error location of the declaration form item from each round of interaction content in the historical interaction record, and combining the error code and error location of the declaration form item to generate an error status identifier includes:
[0019] Extract the declaration form number, declaration form field number, and error type number that indicate the verification failure from the interaction content of each round in the historical interaction record. Concatenate the declaration form number, declaration form field number, and error type number in a preset order to generate the declaration form item error code.
[0020] Extract the data row identifier and data column identifier of the declaration data that the verification failed from the interaction content of each round in the historical interaction record. Combine the data row identifier and data column identifier by Cartesian product to generate the error position of the declaration form item.
[0021] The error code and the error position of the declaration form item are aligned with the timestamp and then hashed together to generate an error status identifier.
[0022] In a preferred embodiment, the step of generating a correction action identifier, using the original error state identifier as the starting node, the new error state identifier as the ending node, and the execution sequence of the field modification action as the direction of the edge, includes:
[0023] Extract the target entry identifier, the value before modification, and the value after modification corresponding to the modification operation performed by the user from each round of interaction content in the historical interaction record. Combine the target entry identifier, the value before modification, and the value after modification according to the execution order of the modification operation to generate a field modification action.
[0024] The error status identifier before the field modification action is taken is determined as the original error status identifier, and the error status identifier after the field modification action is taken is determined as the new error status identifier.
[0025] Using the original error status identifier as the starting graph node, the new error status identifier as the ending graph node, and the execution order of the field modification actions as the direction indicator of the directed edges, a correction action identifier is generated.
[0026] In a preferred embodiment, the step of taking the error verification result in the tax declaration process as the current error state, using the current error state as the starting point, performing a depth-first traversal along the reverse direction of the directed edge in the intent sequence graph to obtain all possible predecessor error state paths, and determining the error state sequence corresponding to the predecessor error state path with the largest confidence weight product as the root cause intent chain includes:
[0027] Extract the current error status identifier pointing to the current verification failure from the error verification results in the tax declaration process;
[0028] Starting with the current error state identifier, a depth-first search is performed in the reverse direction of the directed edge in the intent sequence graph, and the predecessor error state identifier is recorded each time a directed edge is passed.
[0029] Arrange all predecessor error status identifiers encountered during the search process in the search order to generate a predecessor error status path;
[0030] Repeat O2 until all predecessor nodes reachable from the current error state identifier in the intent sequence diagram have been visited, and integrate all possible predecessor error state paths;
[0031] Obtain the confidence weight of the correction action corresponding to each directed edge in the intent sequence graph, and multiply the confidence weights of all correction actions on each predecessor error state path to obtain the confidence product.
[0032] The error state identifiers contained in the predecessor error state path with the largest confidence product are arranged in order from the root node to the current node to generate the root cause intention chain.
[0033] In a preferred embodiment, obtaining the confidence weight of the corrected action corresponding to each directed edge in the intent time sequence graph includes:
[0034] Obtain the historical number of successful executions and the historical number of failed executions of the correction action identifier, and determine the basic success rate weight;
[0035] Obtain the semantic similarity between the original error state identifier associated with the correction action identifier and the new error state identifier, map the semantic similarity to a preset interval, and generate a semantic consistency weight;
[0036] The basic success rate weight and the semantic consistency weight are weighted and summed to generate the confidence weight of the corrective action.
[0037] In a preferred embodiment, the step of propagating and deducing the current reported data of the target user item by item based on the terminal root cause error node in the root cause intent chain, generating modified values for each relevant entry and a list of newly added verification errors, and using this as the counterfactual deduction result, includes:
[0038] Based on the terminal root cause error node in the root cause intent chain, query the pre-constructed error propagation map for a correction operation template that has a correction mapping relationship with the terminal root cause error node, and extract the target field identifier and target correction value to be modified from the correction operation template.
[0039] Construct a table entry dependency relationship library, using the current declaration data as the initial state data, and write the target correction value into the field position pointed to by the target field identifier in the initial state data to generate the first intermediate state data;
[0040] Traverse the table item dependency relationship database, query all first-level dependency table item identifiers with the target field identifier as the input variable, calculate the first-level dependency table item update value according to the arithmetic operation formula associated with the first-level dependency table item identifier, and write the first-level dependency table item update value into the corresponding position in the first intermediate state data to generate the second intermediate state data.
[0041] Using the second intermediate state data as the current state data, O3 is executed repeatedly, propagating layer by layer until all computable dependency entries are updated, generating the third intermediate state data.
[0042] Using the third intermediate state data as input, the logical verification rules in the table item dependency relationship library are executed to obtain the verification rule identifiers and declaration table item positions of all verification failures, and integrate them into a new verification error list;
[0043] Extract all table field values that have changed relative to the initial state data from the third intermediate state data, along with the values before and after the changes, and combine them with the newly added check error list to form a counterfactual deduction result.
[0044] In a preferred embodiment, using the current declaration data as initial state data, the target correction value is written into the field position pointed to by the target field identifier in the initial state data to generate first intermediate state data, including:
[0045] Parse each dependency record in the dependency relationship database, where each dependency record contains an output entry identifier, an output entry calculation formula, and a set of input entry identifiers; traverse all the dependency records.
[0046] Filter all dependent records that contain the target field identifier in the input table entry identifier set, and determine the output table entry identifier corresponding to all dependent records as the first-level dependent table entry identifier;
[0047] For each first-level dependency table entry identifier, obtain the corresponding output table entry calculation formula, extract the field value that matches each input variable placeholder from the first intermediate state data, substitute the field value into the input variable placeholder, and generate the substituted calculation formula.
[0048] The substituted calculation formula is evaluated according to the preset operator priority to generate the first-level dependency table entry update value.
[0049] In a preferred embodiment, the step of assessing the cognitive proficiency level of the target user and generating an error correction guidance strategy based on the cognitive proficiency level and the error complexity in the counterfactual deduction result includes:
[0050] Acquire the target user's historical operation behavior data, which includes the average time taken for historical correction operations, the single-step error rate of historical correction operations, and the frequency of historical help requests.
[0051] The historical operation behavior data are mapped to preset proficiency scoring intervals to obtain time consumption score, error rate score and help frequency score. The time consumption score, error rate score and help frequency score are weighted and summed to generate a comprehensive proficiency score.
[0052] Based on the preset proficiency level classification threshold, the level corresponding to the scoring interval to which the comprehensive proficiency score belongs is determined as the cognitive proficiency level of the target user;
[0053] Obtain the total number of verification error entries in the counterfactual deduction result and the total number of table field entries whose values have changed in the third intermediate state data. Normalize the total number of verification error entries and the total number of table field entries respectively, and then sum them by weight to generate the error complexity.
[0054] Based on the cognitive proficiency level and the error complexity, the corresponding presentation granularity level and interaction rhythm mode are queried from the preset strategy mapping table. The presentation granularity level and the interaction rhythm mode are combined to generate an error correction guidance strategy.
[0055] To address the aforementioned problems, this invention also provides a tax declaration error correction system based on a multi-round intent decomposition intelligent agent, the system comprising:
[0056] The intent sequence graph construction module is used to extract the error status identifiers and correction action identifiers of the target user in the tax declaration process. The error status identifiers are used as nodes, and the causal dependency relationship between the error statuses indicated by the correction action identifiers is used as directed edges to construct the intent sequence graph.
[0057] The root cause intention chain tracing module is used to take the error verification result in the tax declaration process as the current error state, take the current error state as the starting point, perform a depth-first traversal along the reverse direction of the directed edge in the intention sequence graph to obtain all possible predecessor error state paths, and determine the error state sequence corresponding to the predecessor error state path with the largest confidence weight product as the root cause intention chain.
[0058] The counterfactual propagation and deduction module is used to propagate and deduce the current declaration data of the target user item by item based on the terminal root cause error node in the root cause intent chain, generate the modified values of each relevant table item and the newly added verification error list, and use them as the counterfactual deduction result.
[0059] The cognitive strategy adaptive module is used to evaluate the cognitive proficiency level of the target user and generate an error correction guidance strategy based on the cognitive proficiency level and the error complexity in the counterfactual inference results.
[0060] The dialogue correction and update module is used to output correction guidance to the target user step by step through dialogue according to the error correction guidance strategy, and to receive correction operation data input by the target user after each round of dialogue, and update the declaration data according to the correction operation data.
[0061] The consistency check loop module is used to perform consistency checks on the updated declaration data. If the check passes, the error correction is completed. If the check fails, it returns to O2 to redetermine the root cause intention chain until the check passes or the preset round limit is reached.
[0062] Compared with the prior art, the present invention has the following beneficial effects:
[0063] 1. This invention constructs an intent sequence graph and performs a depth-first traversal along the directed edges in the reverse direction starting from the current error state. It then determines the root cause intent chain by combining the confidence weight product. This allows it to penetrate the apparent error and trace back to the root cause that triggered the error, effectively overcoming the shortcomings of existing technologies that only perform single-round semantic matching and apparent verification. Simultaneously, this invention utilizes the table item dependency relationship library in the tax return ontology model to propagate and deduce the correction operation item by item. This enables it to predict the chain of numerical changes in related table items after modifying any field, as well as the possible new verification errors that may be triggered, making the error correction process forward-looking and global.
[0064] 2. This invention dynamically generates matching error correction guidance strategies by assessing the cognitive proficiency level of the target user and combining it with error complexity. It adapts the granularity and interaction rhythm to different users' operational abilities and cognitive levels, avoiding excessive intervention for professional users while lowering the understanding threshold for non-professional users, significantly improving the friendliness and effectiveness of error correction guidance. Through a multi-round dialogue mechanism, this invention performs a consistency check after each round of correction and automatically returns to tracing the root cause intent chain if the check fails, until the check passes or the round limit is reached. This gives the entire error correction process self-consistent iterative convergence characteristics, fundamentally overcoming the inherent defects of existing technologies that provide one-time output and lack a closed-loop verification mechanism. Attached Figure Description
[0065] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0066] Figure 1 This is a flowchart illustrating a tax declaration error correction method based on a multi-round intent decomposition intelligent agent provided in an embodiment of the present invention.
[0067] Figure 2 This is a functional block diagram of a tax declaration error correction system based on a multi-round intent decomposition intelligent agent, provided in an embodiment of the present invention.
[0068] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0069] It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
[0070] This application provides a tax return error correction method based on a multi-round intent decomposition intelligent agent. The executing entity of this method includes, but is not limited to, at least one of the following electronic devices that can be configured to execute the method provided in this application: a server, a terminal, etc. In other words, the tax return error correction method based on a multi-round intent decomposition intelligent agent can be executed by software or hardware installed on a terminal device or a server device. The server includes, but is not limited to, a single server, a server cluster, a cloud server, or a cloud server cluster. The server can be an independent server or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms.
[0071] Reference Figure 1 The diagram shown is a flowchart illustrating a tax declaration error correction method based on a multi-round intent decomposition intelligent agent provided in an embodiment of the present invention. In this embodiment, the tax declaration error correction method based on a multi-round intent decomposition intelligent agent includes:
[0072] O1: Extract the error status identifier and correction action identifier of the target user in the tax declaration process, and construct an intent sequence graph with the error status identifier as the node and the causal dependency relationship between the error status before and after indicated by the correction action identifier as the directed edge.
[0073] In this embodiment of the invention, historical interaction records between the target user and the intelligent agent are obtained. These historical interaction records are stored in the interaction log database of the tax declaration system. Each record includes an interaction timestamp, the text content input by the user, the feedback content output by the system, and the status change information of the declaration form items recorded in the system background. From each round of interaction content in the historical interaction records, the declaration form number, the declaration form field number, and the error type number pointed to when the verification failed are extracted. The declaration form number is a unique identifier assigned to each declaration form in the tax declaration system. For example, the main VAT declaration form, supplementary schedule 1 of the VAT declaration form, and the annual corporate income tax declaration form all have their own independent numbers.
[0074] The declaration form field number is a location code assigned to each data entry cell in each declaration form. This code is arranged according to the row and column structure of the declaration form and uniquely points to a specific data entry location. The error type number is a system-preset error classification code used to identify the specific type of error that failed the verification, including data logic contradictions, mismatched reconciliation relationships, incorrect tax rate application, and values exceeding the reasonable range. The declaration form number, declaration form field number, and error type number are concatenated in a preset order to generate the declaration form item error code.
[0075] Extract the row and column identifiers of the declared data corresponding to each failed verification from the historical interaction log. The row identifier locates the row position of the data record in the declaration form, and the column identifier locates the column position; together, they constitute a precise location description of a data cell in the declaration form. Combine the row and column identifiers using a Cartesian product, forming a coordinate pair to generate the error location of the declaration form item. Align the error code and error location of the declaration form item according to the timestamp in the interaction log, ensuring that the error code and error location corresponding to the same verification failure match. Then, hash the matched data to generate an error status identifier. This error status identifier uniquely identifies the declaration form item and its specific data location involved in a particular verification failure.
[0076] This process extracts the target entry identifier, the value before modification, and the value after modification for each user's modification operation from the historical interaction log. The target entry identifier specifies the exact data cell targeted by the user's modification operation. This identifier includes the application form number, the application form field number, the data row identifier, and the data column identifier, allowing precise location of a specific data entry position within a specific application form. The value before modification is the original data value stored in the cell pointed to by the target entry identifier before the user performed the modification operation. The value after modification is the new data value stored in the cell pointed to by the target entry identifier after the user performed the modification operation. The target entry identifier, the value before modification, and the value after modification are combined and arranged in chronological order of their appearance in the interaction log to generate a field modification action. This field modification action completely records all the essential information of a data correction operation.
[0077] The error status identifiers existing in the system before the field modification action is executed are identified as the original error status identifiers targeted by the field modification action. The error status identifiers newly appearing in the system after the field modification action is executed are identified as the new error status identifiers generated after the field modification action. Using the original error status identifiers as the starting graph nodes and the new error status identifiers as the ending graph nodes, and the execution time sequence of the field modification actions in the interaction records as the direction indicators for the directed edges (i.e., from the earlier node to the later node), a correction action identifier is generated. This correction action identifier contains both the transformation relationship between error states and the specific modification operation information performed to achieve the transformation. All generated error status identifiers are used as graph nodes in the intent sequence graph. All generated correction action identifiers are used as directed edges connecting the graph nodes in the intent sequence graph. According to the execution time sequence recorded by each correction action identifier, the corresponding directed edges are sequentially connected to the corresponding starting and ending graph nodes, ultimately generating a complete intent sequence graph. This intent sequence graph uses a directed graph data structure to describe the various error states experienced by the target user during the tax declaration process and the evolution path between these error states.
[0078] O2: The error verification result in the tax declaration process is taken as the current error state. Starting from the current error state, a depth-first traversal is performed in the reverse direction of the directed edge in the intent sequence graph to obtain all possible predecessor error state paths. The error state sequence corresponding to the predecessor error state path with the largest confidence weight product is determined as the root cause intent chain.
[0079] In this embodiment of the invention, the error verification result output by the tax declaration system after verifying the current declaration data is obtained. This error verification result contains the identifiers of all failed verification rules and the location information of the declaration form item pointed to by each failed verification. The declaration form number, declaration form field number, error type number, data row identifier, and data column identifier pointed to by the current failed verification are extracted from the error verification result. These are then processed using the same combination encoding and hash concatenation method as the error status identifier to generate the current error status identifier. Using this current error status identifier as the starting node for traversal, a depth-first search is performed in the already constructed intent sequence graph, starting from the starting node and proceeding in the reverse direction along the directed edges. The meaning of depth-first search is that, upon reaching a graph node, it first moves along one of the incoming edges of that node to its predecessor node, until it is impossible to continue moving in the reverse direction, at which point it backtracks to the previous level node and explores other unvisited incoming edges.
[0080] During the search process, for each directed edge traversed, the predecessor error state identifier reached by that edge is recorded. These predecessor error state identifiers represent which earlier error states were transformed from the current error state through corrective actions in history. All predecessor error state identifiers traversed in a single search are arranged sequentially from the starting node to the end node at the current search depth, generating a predecessor error state path. It is determined whether there are any unvisited reachable predecessor nodes in the reverse direction of the intent sequence graph from the current starting node. If so, the depth-first search continues from that unvisited predecessor node, and a new predecessor error state path is recorded. If all graph nodes reachable from the current error state identifier in the reverse direction have been visited, the search operation stops. All predecessor error state paths obtained during the search process are summarized and integrated to obtain a set of all possible predecessor error state paths.
[0081] Obtain the confidence weight of the correction action associated with each directed edge in the intent sequence graph. Each directed edge is uniquely associated with a correction action identifier. This confidence weight quantifies the reliability of the transformation relationship from the error state corresponding to the starting node of the directed edge to the error state corresponding to the ending node of the directed edge through the modification action recorded in the correction action identifier. Obtain the total number of times the correction action identifier associated with each directed edge has been executed in the historical interaction records, including the number of historical successful executions after the system verification passed and the number of historical failed executions after the system verification failed. Divide the number of historical successful executions by the sum of the number of historical successful executions and the number of historical failed executions to obtain the base success rate weight.
[0082] Obtain the semantic similarity between the original error status identifier and the new error status identifier in the correction action identifier associated with each directed edge. The semantic similarity is determined by comparing each field of the error code in the original error status identifier with each field of the error code in the new error status identifier, counting the ratio of identical fields to the total number of fields. This ratio is then weighted and averaged with the ratios of identical fields obtained from comparing each coordinate component of the error location in the original error status identifier with each coordinate component of the error location in the new error status identifier. This semantic similarity is then mapped to a preset confidence interval, with a lower limit of 0 and an upper limit of 1, generating a semantic consistency weight.
[0083] The base success rate weight and semantic consistency weight are weighted and summed. Specifically, the base success rate weight is multiplied by a first weight coefficient, and the semantic consistency weight is multiplied by a second weight coefficient. The sum of the first and second weight coefficients is 1, yielding the confidence weight of the correction action. For each preceding error state path, the confidence weights of the correction actions corresponding to each directed edge contained in that path are multiplied sequentially to obtain the confidence product of that preceding error state path. The preceding error state path with the largest confidence product is determined as the optimal root cause tracing path. All error state identifiers contained in the optimal root cause tracing path are arranged in order from the root node to the current node, generating a root cause intent chain. The first error state identifier in this root cause intent chain is the source root cause error state that triggers a series of subsequent errors, and the last error state identifier in this root cause intent chain is the current error state that needs to be processed.
[0084] O3: Based on the terminal root cause error node in the root cause intent chain, propagate and deduce the current declaration data of the target user item by item, generate the modified values of each relevant table item and the newly added verification error list, and use it as the counterfactual deduction result;
[0085] In this embodiment of the invention, the last error state identifier in the root cause intention chain generated in step 02 is obtained, and this last error state identifier is determined as the terminal root cause error node. A correction operation template with a correction mapping relationship to the terminal root cause error node is queried from a pre-built error propagation graph. The error propagation graph is a pre-built relational network that stores the mapping relationship between the error type corresponding to each error state identifier and one or more correction operation templates that can be used to correct that error type. Each correction operation template records the target field identifier that needs to be modified to correct the error type and the target correction value that the target field should be modified to. The target field identifier and target correction value to be modified are extracted from the queried correction operation templates. The table item dependency relationship library in the tax return ontology model is loaded. The tax return ontology model is a knowledge base that formally describes the table structure, inter-table relationships, and data dependencies between table items of all tax returns in the tax return system. The table item dependency relationship library is a component of this ontology model, which stores the arithmetic operation relationships and logical verification relationships between various tax return table items. Arithmetic operations describe how the values of certain table entries are calculated from the values of one or more other table entries through arithmetic operations such as addition, subtraction, multiplication, and division. For example, the total tax payable field in the main table of the value-added tax return is equal to the sum of the values of the corresponding fields in each supplementary table. Logical validation relationships describe the equal, greater than, less than, and other logical constraints that certain table entries must satisfy. For example, the total profit field in the corporate income tax return should be equal to the total revenue field minus the cost and expense field.
[0086] The initial state data is based on the tax declaration data currently stored in the tax declaration system. This initial state data contains the specific values of each item in all the declaration forms that the target user has already completed. The target correction value is written into the field position pointed to by the target field identifier in the initial state data, generating the first intermediate state data. The mathematical meaning of this write operation is: let the field position pointed to by the target field identifier be... Its original value in the initial state data is If the target correction value is [value], then the value of that field in the first intermediate state data after writing will become [value]. ,Right now:
[0087] ;
[0088] in This represents the value of the target field in the first intermediate state data. After this write operation is completed, the values of all other fields in the first intermediate state data, except for the target field, will be consistent with the values of the corresponding fields in the initial state data.
[0089] Parse each dependency record stored in the dependency database. Each dependency record contains an output entry identifier, an output entry calculation formula, and a set of input entry identifiers. The output entry identifier indicates the position code of the declaration entry corresponding to the final calculated result of the arithmetic operation described by the dependency record. The output entry calculation formula is an arithmetic expression used to calculate the value of the output entry, which contains multiple input variable placeholders. The set of input entry identifiers is the set of the position codes of the declaration entries corresponding to each of the input variable placeholders involved in the output entry calculation formula. Traverse all dependency records in the dependency database, reading the set of input entry identifiers for each dependency record one by one. For each dependency record, determine whether the set of input entry identifiers for that dependency record contains a target field identifier. If the set of input entry identifiers for a dependency record contains a target field identifier, then that dependency record is identified as a filter hit record. Extract the output entry identifiers corresponding to each of the filter hit records; these output entry identifiers are then identified as the first-level dependency entry identifiers. For each first-level dependency entry identifier, the output entry calculation formula is retrieved from the dependency record corresponding to that first-level dependency entry identifier in the dependency relation database. The general form of this output entry calculation formula is:
[0090] ;
[0091] in This indicates the value of the output entry. This represents the functional relationship involving the four arithmetic operations: addition, subtraction, multiplication, division, and parentheses. Indicates the first The value of each input field. This indicates the total number of input entries in the calculation formula. All input variable placeholders in the output entry calculation formula are read; each input variable placeholder has a corresponding declaration entry position code. For each input variable placeholder, the current value stored at the corresponding declaration entry position code is extracted from the first intermediate state data. All current values extracted from the first intermediate state data are substituted into the respective input variable placeholders according to their positions in the output entry calculation formula, forming the substituted calculation formula:
[0092] ;
[0093] in This represents the first intermediate state data extracted from the first intermediate state data. Each input variable placeholder corresponds to a numerical value. The formula is evaluated step-by-step according to the preset operator precedence in arithmetic operations. Operator precedence dictates that multiplication and division take precedence over addition and subtraction, and operations of the same precedence are performed from left to right. Intermediate results are calculated sequentially according to operator precedence to obtain the final numerical result of the formula. That is, updating the value of the first-level dependency table entry:
[0094] ;
[0095] Update the value of the first-level dependency table entry. The second intermediate state data is generated by writing to the field pointed to by the first-level dependency table entry identifier in the first intermediate state data. That is, for the first-level dependency table entry identifier... The value of it in the second intermediate state data Equal to the result of evaluation operation :
[0096] ;
[0097] Other fields not affected by this update retain the same values as in the first intermediate state data. For example, in a VAT declaration, assume the target field is the sales amount field in Appendix 1, with a corrected value of 1000. There is a dependent record in the dependency database, the output field is the VAT output tax amount field in Appendix 1, and the calculation formula for the output field is sales amount multiplied by the applicable tax rate. The input fields are the sales amount field and the tax rate field. Extract the sales amount value of 1000 and the tax rate value of 0.13 from the first intermediate state data, substitute them into the calculation formula, and the output tax amount equals 130. Write this updated output tax amount to the VAT output tax amount field in Appendix 1, generating the second intermediate state data. Using the second intermediate state data as the current state data, repeat the steps of querying dependent fields, extracting input values, substituting into the calculation formula, performing evaluation, and writing updated values, propagating outwards layer by layer until all dependent fields in the current state data that can be calculated based on existing arithmetic operations in the dependency database are updated, generating the third intermediate state data. Using the third intermediate state data as input, the values of each entry in this third intermediate state data are substituted one by one into the conditional expression specified by each logical verification rule stored in the entry dependency database for verification and judgment. The general form of the logical verification rule is:
[0098] Test conditions: ;
[0099] in This represents a logical judgment function composed of logical operators such as equality, greater than, and less than. Indicates the first The numerical values of each item in the declaration form that are included in this verification. This indicates the total number of declaration form items participating in this verification. If a certain logical verification rule specifies the verification conditions... If the result of substituting the corresponding value into the third intermediate state data is false, then the identifier of the logical verification rule and the position of the declaration form item pointed to by the logical verification rule are determined as a verification failure record. All verification failure records are collected, forming a new verification error list. The third intermediate state data and the initial state data are compared item by item and field by field, extracting all table item fields whose values in the third intermediate state data do not match the values in the initial state data. For each extracted table item field... Record its field identifier The original values in the initial state data And the updated values in the third intermediate state data. That is, to record triples:
[0100] ;
[0101] in and The value range is the index of all table field entries that have undergone numerical changes. The extracted table field entries with numerical changes, along with their values before and after the changes, are combined with the newly added check error list to form the counterfactual deduction result.
[0102] O4: Assess the cognitive proficiency level of the target user, and generate an error correction and guidance strategy based on the cognitive proficiency level and the error complexity in the counterfactual deduction results;
[0103] In this embodiment of the invention, historical operation behavior data of the target user is obtained. This historical operation behavior data is stored in the user behavior log of the tax declaration system. The log records the timestamp, operation content, and operation result of each correction operation performed by the target user during the historical declaration process. The average time taken for historical correction operations of the target user is extracted from the historical operation behavior data. The average time taken for historical correction operations is determined by obtaining the records of the target user's most recent 30 correction operations from the user behavior log. For each correction operation record, the time from the start of modifying a field to the completion and submission of the modification is determined as the single-operation time for that correction operation. The single-operation times of the most recent 30 correction operations are added together and divided by 30 to obtain the average time taken for historical correction operations. The single-step error rate of historical correction operations of the target user is extracted from the historical operation behavior data. The historical single-step error rate for correction operations is determined by retrieving the target user's most recent 30 correction operation records from the user behavior log. For each correction operation record, it is determined whether the system failed to display a correction failure message due to the introduction of a new validation error after the correction operation. The number of failed correction operations is divided by the total number of correction operations (30) to obtain the historical single-step error rate for correction operations. The historical help-seeking trigger frequency of the target user is extracted from the historical operation behavior data. The historical help-seeking trigger frequency is determined by retrieving the target user's most recent 30 interaction sessions from the user behavior log, counting the number of times the target user actively clicked the help button or entered help-seeking questions in these 30 interaction sessions, and dividing this number of interactions by the total number of interaction sessions (30) to obtain the historical help-seeking trigger frequency.
[0104] The average time taken for historical correction operations is mapped to a preset proficiency score range. The preset proficiency score range has a lower limit of 0 points and an upper limit of 100 points. The mapping relationship between the average time taken for historical correction operations and the proficiency score is a linear inverse mapping; that is, the shorter the average time taken for historical correction operations, the higher the corresponding proficiency score. The average time taken for historical correction operations is taken as the arithmetic mean of the time taken for the target user's most recent 30 correction operations. When the average time is less than or equal to 10 seconds, it is mapped to 100 points; when the average time is greater than or equal to 300 seconds, it is mapped to 0 points; and the average time between 10 seconds and 300 seconds is mapped to the corresponding score using linear interpolation. Specifically, the mapping method is as follows: Let the average time taken for historical correction operations be... Seconds, then time consumption score The calculation formula is:
[0105] ;
[0106] Among them when Time to take ,when Time to take This formula allows the time consumption score to smoothly reflect the user's operation speed level. The historical single-step error rate of corrective operations is mapped to a proficiency score range, with a preset lower limit of 0 points and an upper limit of 100 points. The mapping relationship between the historical single-step error rate and the proficiency score is a linear inverse mapping; that is, the lower the historical single-step error rate, the higher the corresponding proficiency score. The historical single-step error rate is calculated as the number of failed corrections divided by the total number of corrections (30). When the single-step error rate is 0, it is mapped to 100 points; when the single-step error rate is greater than or equal to 0.5, it is mapped to 0 points; and single-step error rates between 0 and 0.5 are mapped to the corresponding score using linear interpolation. Specifically, the mapping method is as follows: Let the historical single-step error rate be... Error rate score The calculation formula is:
[0107] ;
[0108] Among them when Time to take This formula allows the error rate score to smoothly reflect the user's operational accuracy level. Historical help trigger frequencies are mapped to a proficiency score range, with a preset lower limit of 0 and an upper limit of 100. The mapping relationship between historical help trigger frequencies and proficiency scores is a linear inverse mapping; that is, the lower the historical help trigger frequency, the higher the corresponding proficiency score. The historical help trigger frequency is calculated by dividing the number of times the target user actively clicks the help button or enters help-related questions by the total number of interaction sessions (30). When the help trigger frequency is 0, it is mapped to 100 points; when the help trigger frequency is greater than or equal to 0.5, it is mapped to 0 points; and help trigger frequencies between 0 and 0.5 are mapped to the corresponding score using a linear interpolation method. Specifically, the mapping method is as follows: Let the historical help trigger frequency be... Then, the frequency of seeking help is scored. The calculation formula is:
[0109] ;
[0110] Among them when Time to take This formula allows the frequency of requests for help to smoothly reflect the user's level of independent operation ability. The time spent will be scored. Error rate score And help frequency score Perform a weighted sum. The weight of the time spent score is 0.3, the weight of the error rate score is 0.4, and the weight of the frequency of asking for help is 0.3. The sum of the three weights is 1. Overall proficiency score. The calculation formula is:
[0111] ;
[0112] Among them, the time consumption score This reflects the target user's operational speed and proficiency; the weight of 0.3 reflects the auxiliary reference role of operational speed in proficiency assessment; error rate score. This reflects the target user's operational accuracy. A weight of 0.4 highlights the core importance of operational accuracy in proficiency assessment, as a low error rate directly indicates a high level of user mastery of the error reporting and correction process; Request frequency score. This reflects the target user's independent operating ability, with a weight of 0.3 reflecting the auxiliary reference role of independent operating ability in proficiency assessment. The result of this weighted sum is the comprehensive proficiency score.
[0113] The cognitive proficiency level of the target user is determined based on preset proficiency level classification thresholds. Proficiency levels are divided into four levels: beginner, intermediate, advanced, and expert. The preset proficiency level classification thresholds are as follows: a comprehensive proficiency score below 40 corresponds to the beginner level; a comprehensive proficiency score greater than or equal to 40 and less than 60 corresponds to the intermediate level; a comprehensive proficiency score greater than or equal to 60 and less than 80 corresponds to the advanced level; and a comprehensive proficiency score greater than or equal to 80 corresponds to the expert level. The rationale for this classification is that it divides the score range of 0 to 100 into four equal-length sub-intervals, each sub-interval corresponding to a level, making the classification standard uniform and easy to implement.
[0114] Obtain the total number of verification error entries in the counterfactual analysis results and the total number of table field entries with numerical changes in the third intermediate state data. The total number of verification error entries refers to the total number of failed verification records included in the newly added verification error list in the counterfactual analysis results. This total directly reflects the number of new compliance issues that the corrective operation may introduce. The total number of table field entries with numerical changes in the third intermediate state data refers to the total number of table field entries whose values have changed relative to the initial state data. This total directly reflects the scope of the impact of the corrective operation on the declared data. Normalize both the total number of verification error entries and the total number of table field entries. The normalization method for the total number of verification error entries is to calculate the first normalized value using the total number of verification error entries as the numerator and the sum of the total number of verification error entries and the total number of table field entries as the denominator. The calculation formula is as follows:
[0115] ;
[0116] in Indicates the total number of check error entries. This represents the total number of fields in a table entry. The normalization method for the total number of fields in a table entry is to calculate the second normalized value using the total number of fields in the table entry as the numerator and the sum of the total number of validation errors and the total number of fields in the table entry as the denominator. The calculation formula is as follows:
[0117] ;
[0118] First normalized value With the second normalized value The sum equals 1. The first normalized value... Multiply by 0.5 and add the second normalized value Multiply by 0.5 to get the error complexity. The calculation formula is as follows:
[0119] ;
[0120] because and The sum is 1, therefore the error complexity is... The value is consistently 0.5, indicating that the two metrics mentioned above alone are insufficient to effectively distinguish differences in error complexity. To address this issue, a third intermediate state data propagation round is introduced as a third quantitative metric in the calculation of error complexity. The propagation round refers to the number of layers traversed from the point where the target field is modified, propagating the update outwards until all computable dependency entries are updated. The value of is a positive integer, with a minimum value of 1. The propagation rounds will be... Mapping to the interval between 0 and 1 yields the third normalized value. Its mapping formula is:
[0121] ;
[0122] in The preset maximum propagation rounds threshold is set to 10. When equal to 1 Equal to 0, when When greater than or equal to 10 Equals 1. The first normalized value... Second normalized value and the third normalized value The error complexity is obtained by multiplying each component by its respective weight and then summing the results. The calculation formula is as follows:
[0123] ;
[0124] The sum of the three weights is 1. This represents the total number of error entries in the validation process. The larger the value, the more compliance issues that may be triggered after the correction; the total number of fields in the table entry. The larger the value, the wider the scope of the correction's impact and the more rounds of propagation. The larger the value, the longer the dependency chain between the items in the declaration form and the greater the impact of the correction. Together, these three factors constitute a comprehensive quantitative assessment of the error complexity.
[0125] Based on the cognitive proficiency level and error complexity, the corresponding presentation granularity level and interaction rhythm mode are retrieved from a pre-defined strategy mapping table. The pre-defined strategy mapping table is a two-dimensional decision table. Each row corresponds to a cognitive proficiency level, and each column corresponds to an error complexity range. Each entry stores a presentation granularity level and an interaction rhythm mode jointly determined by the cognitive proficiency level of that row and the error complexity range of that column. The error complexity range is arranged according to... The values are divided into three intervals: the low complexity interval is... Greater than or equal to 0 and less than 0.4, medium complexity range. Values greater than or equal to 0.4 and less than 0.7 fall within the high complexity range. The value is greater than or equal to 0.7 and less than or equal to 1. The granularity of presentation includes two levels: detailed guidance and summary guidance. Detailed guidance provides step-by-step explanations of field locations and corrective values. For each field requiring modification in the counterfactual analysis, the target user is shown its specific location in the declaration form and its target value. Summary guidance only provides a list of fields requiring modification and their corresponding corrective values, presenting a consolidated list of all modified fields and their target values. The interaction rhythm includes two modes: step-by-step guidance and one-time notification. In step-by-step guidance, the correction guidance is broken down into multiple rounds and presented to the target user sequentially. Each round provides guidance for only one field or a group of related fields, pausing after each round to allow the target user to perform the correction and confirm the result. In one-time notification, all correction guidance is presented to the target user in a single round.
[0126] The rules for determining the strategy mapping table are as follows: When the cognitive proficiency level is beginner, the presentation granularity is always detailed guidance, and the interaction rhythm is always step-by-step guidance, because beginner users need the most detailed guidance and need to confirm step by step to prevent operational errors; when the cognitive proficiency level is intermediate, the presentation granularity is detailed guidance, but the interaction rhythm is one-time notification, because intermediate users, although they need detailed guidance, already have the ability to handle multiple correction commands simultaneously; when the cognitive proficiency level is advanced and the error complexity is low or medium complexity, the presentation granularity is summary guidance, and the interaction rhythm is one-time notification, because advanced users only need summary prompts to complete the correction independently when facing low or medium complexity errors; when the cognitive proficiency level is expert, the presentation granularity is always summary guidance, and the interaction rhythm is always one-time notification, because expert users have the highest independent operation ability; when the cognitive proficiency level is advanced and the error complexity is high complexity, the presentation granularity is detailed guidance, and the interaction rhythm is step-by-step guidance, to prevent advanced users from missing or misoperating due to excessively long error chains. The retrieved presentation granularity level and interaction rhythm pattern are combined to form an error correction guidance strategy. This strategy includes two dimensions of information: the presentation granularity level indicates the level of detail at which the correction guidance content is presented to the user, and the interaction rhythm pattern indicates the pace at which the correction guidance is output in rounds or all at once.
[0127] O5: In accordance with the error correction guidance strategy, the correction guidance is gradually output to the target user through dialogue, and the correction operation data input by the target user is received after each round of dialogue, and the declaration data is updated according to the correction operation data;
[0128] In this embodiment of the invention, the error correction guidance strategy generated in step 04 is obtained. This error correction guidance strategy includes presentation granularity level information and interaction rhythm mode information. Based on the presentation granularity level in the error correction guidance strategy, corrective guidance content matching the presentation granularity level is extracted from the counterfactual deduction results generated in step 03. When the presentation granularity level is detailed guidance, the field identifier of each field in all table item fields that have undergone numerical changes, as well as the specific application form number and application form column number of that field in the application form, are extracted from the counterfactual deduction results. Simultaneously, the original value of that field in the initial state data and the updated value in the third intermediate state data are extracted. This information is then arranged according to the values before and after the change recorded in the counterfactual deduction results to generate detailed guidance content. When the presentation granularity level is summary guidance, the field identifiers and corresponding updated values of each table item field that have undergone numerical changes are extracted from the counterfactual deduction results. These field identifiers and updated values are paired and summarized into a correction item list, without including the specific location information of each field in the application form, to generate summary guidance content. The output method of the correction guidance content is determined based on the interaction rhythm pattern in the error correction guidance strategy.
[0129] When the interaction rhythm mode is one-time notification, the entire correction guidance content is encapsulated into a single-turn dialogue response. This response outputs all correction guidance content to the target user through the agent's dialogue interface, prompting the user to modify all fields according to the complete guidance. When the interaction rhythm mode is step-by-step guidance, the correction guidance content is broken down into multiple dialogue rounds based on the dependency propagation hierarchy of fields in the counterfactual deduction results. Fields with higher propagation hierarchies are output first. For each dialogue round, the correction guidance for the current round is extracted from the output sequence and output to the target user through the agent's dialogue interface. This sub-guidance contains only the field identifier, location on the application form, and target value of the field or group of related fields with the same propagation hierarchy that need to be modified in the current round. After outputting the sub-guidance in each dialogue round, the agent enters a response listening state, awaiting the target user's feedback on the execution of the sub-guidance.
[0130] After the target user completes the correction operation according to the current round's guidance and submits the execution feedback, the agent receives the feedback and extracts the correction operation data. This correction operation data includes the field identifiers of the fields actually modified by the target user, the values before modification, and the values after modification. The agent determines whether the field identifiers actually modified by the target user match the field identifiers pointed to by the correction sub-guidance output in the current round. If they match, the correction operation for that round is confirmed to be complete. If the field identifiers actually modified by the target user do not completely match the field identifiers pointed to by the correction sub-guidance output in the current round, a prompt message is generated requiring the target user to reconfirm or re-execute the correction operation. After confirming that the target user has completed the correction operation according to the correction sub-guidance for the current round, the agent writes the modified values from the correction operation data submitted by the target user into the tax declaration system at the data storage location pointed to by the field identifiers contained in the correction operation data, replacing the original values with the modified values, thus updating the declaration data in the tax declaration system. In step-by-step guided mode, once the correction operation data for one dialogue round is written into the declaration data, the system returns to execute the output operation of the corresponding correction sub-guide for the next dialogue round, until the correction sub-guides for all dialogue rounds have been output and the corresponding correction operation data have been written into the declaration data, thus completing all update operations on the declaration data.
[0131] When the interaction rhythm mode is set to one-time notification, after outputting all correction guidance content to the target user at once, the intelligent agent's dialogue interface waits for the target user to input the final correction operation data submitted after completing all modification operations. This final correction operation data contains a set of all field modification operations actually performed by the target user. For each modified field, the correction operation data records the field identifier and the final value of the field after modification. Upon receiving the final correction operation data, the modified value of each field in the final correction operation data is written to the declaration data storage location pointed to by the corresponding field identifier in the tax declaration system, replacing the original values one by one with the modified values, so that the declaration data in the tax declaration system is updated comprehensively in one go.
[0132] When the interaction rhythm mode is step-by-step guided, after each step of the correction operation data is written into the declaration data, a confirmation message indicating the completion of the current step is output to the target user, prompting the target user whether to continue with subsequent correction steps. Upon receiving a confirmation response from the target user to continue, the next dialogue round is initiated, outputting subsequent correction sub-guidelines. If a pause or abort response is received from the target user, the current error correction process is terminated, and information on completed and incomplete correction steps is recorded.
[0133] In the step-by-step guided mode, for fields in the correction guidance content that have a propagation hierarchy, the output order of each round is arranged in the order from the root cause field to the end field. That is, the field with the first propagation level is output in the first round, the field with the second propagation level is output in the second round, and so on, so that the correction operation is consistent with the logical order of layer-by-layer propagation and update in counterfactual inference.
[0134] During the target user's correction operation, the system monitors the user's input in real time. If no feedback is received from the target user within the preset response timeout period, a reminder message is automatically sent to the target user to inquire about the current correction operation status. This reminder message contains a summary of the correction sub-guidelines that have not yet been completed in the current round. If no feedback is received from the target user after sending three consecutive reminder messages, the current error correction process is paused and the pause status information is recorded.
[0135] O6: Perform consistency verification on the updated declaration data. If the verification passes, the error correction is completed. If the verification fails, return to O2 to redetermine the root cause intention chain until the verification passes or the preset round limit is reached.
[0136] In this embodiment of the invention, the updated declaration data obtained in step 05 is used as the data to be verified. All logical verification rules are read from the table dependency database. Each logical verification rule includes a verification condition expression and the location of the declaration table item pointed to by the verification condition expression. The values of each declaration table item in the data to be verified are substituted one by one into the verification condition expression of each logical verification rule for verification. For a given logical verification rule, if the logical relationship specified by the verification condition expression is true after substituting the values of each declaration table item involved in the rule into the verification condition expression, the verification rule is deemed to have passed; otherwise, the logical relationship specified by the verification condition expression is deemed to have failed. The above verification operation is performed on all logical verification rules in the table dependency database, and the identifiers of all failed logical verification rules and the location of the declaration table item pointed to by each failed logical verification rule are collected to form a consistency verification failure list.
[0137] The system checks if the consistency check failure list is empty. If it is, it means all logical check rules in the table dependency database have passed, confirming that the updated declaration data has passed consistency check, completing the error correction process, and outputting a correction completion message to the target user. This message contains a summary record of all correction operations during this error correction process. If the consistency check failure list is not empty, it confirms that the updated declaration data has failed consistency check. Each failure record in the consistency check failure list is treated as an independent error result. The system extracts the declaration form number, declaration form field number, error type number, data row identifier, and data column identifier pointed to by each failure record from the error result. These are then processed using the same combination encoding and hash concatenation method as in step 01 to generate a new current error status identifier. After generating a new current error status identifier, return to step 02, use the new current error status identifier as the current error status, re-execute the depth-first traversal along the reverse direction of the directed edges in the already constructed intent sequence graph, redetermine the root cause intent chain, and re-execute the propagation deduction, strategy generation, and correction guidance output and reporting data update operations according to subsequent steps 03 to 05.
[0138] The intent sequence diagram constructed in step 02 remains unchanged to accumulate interaction records of each correction operation. This allows the intent sequence diagram to be continuously enriched and expanded as the error correction process progresses, providing more complete historical error evolution information in subsequent root cause tracing. Each time the process returns to step 02 to re-determine the root cause intent chain, the number of correction rounds already executed is cumulatively counted. The preset maximum number of rounds is five. This maximum is set based on statistical data from actual business scenarios of tax declaration error correction. Over 95% of declaration errors can be root cause tracing and correction operations completed within five rounds of iterative correction. The marginal benefit of more than five rounds of iterative correction significantly decreases. Furthermore, to avoid excessive consumption of system resources and uncontrollable user time costs due to infinite loop tracing, five rounds are set as the maximum number of rounds. Before each return to step 02, it is determined whether the cumulative number of correction rounds has reached five. If the cumulative number of correction rounds is less than five, returning to step 02 to re-execute the error correction process is allowed. If the cumulative number of correction rounds has reached five, the process will not return to step 02, will terminate the error correction process, and will output a prompt message to the target user indicating that the error correction has not been completed. This prompt message includes a list of consistency verification failures after the end of the current round and the result of the most recent counterfactual inference, for the target user to refer to and manually complete the remaining correction operations.
[0139] When returning to step 02 to re-execute the error correction process, the root cause intent chain determined in step 02 will be consistent with the constructed intent sequence graph. That is, the newly generated current error state identifier will be added as a new node in the intent sequence graph and a causal dependency relationship will be established between it and the existing nodes in the intent sequence graph through directed edges. This will enable subsequent root cause tracing to utilize the complete error evolution path accumulated from previous correction operations.
[0140] like Figure 2 The diagram shown is a functional block diagram of a tax declaration error correction system based on a multi-round intent decomposition intelligent agent provided in an embodiment of the present invention.
[0141] The tax declaration error correction system 100 based on multi-turn intention decomposition intelligent agents described in this invention can be installed in an electronic device. Depending on the functions implemented, the tax declaration error correction system 100 based on multi-turn intention decomposition intelligent agents may include an intention sequence diagram construction module 101, a root cause intention chain tracing module 102, a counterfactual propagation and deduction module 103, a cognitive strategy adaptive module 104, a dialogue correction and update module 105, and a consistency verification loop module 106. The modules described in this invention can also be called units, referring to a series of computer program segments that can be executed by the processor of an electronic device and can perform a fixed function, stored in the memory of the electronic device.
[0142] In this embodiment, the functions of each module / unit are as follows:
[0143] The intent sequence graph construction module 101 is used to extract the error status identifier and correction action identifier of the target user in the tax declaration process, and construct the intent sequence graph with the error status identifier as the node and the causal dependency relationship between the error status before and after indicated by the correction action identifier as the directed edge.
[0144] The root cause intention chain tracing module 102 is used to take the error verification result in the tax declaration process as the current error state, take the current error state as the starting point, perform a depth-first traversal along the reverse direction of the directed edge in the intention time sequence graph to obtain all possible predecessor error state paths, and determine the error state sequence corresponding to the predecessor error state path with the largest confidence weight product as the root cause intention chain.
[0145] The counterfactual propagation and deduction module 103 is used to propagate and deduce the current declaration data of the target user item by item according to the terminal root cause error node in the root cause intent chain, generate the modified values of each relevant table item and the newly added verification error list, and use them as the counterfactual deduction result.
[0146] The cognitive strategy adaptive module 104 is used to evaluate the cognitive proficiency level of the target user and generate an error correction guidance strategy based on the cognitive proficiency level and the error complexity in the counterfactual inference result.
[0147] The dialogue correction and update module 105 is used to output correction guidance to the target user step by step through dialogue according to the error correction guidance strategy, and to receive correction operation data input by the target user after each round of dialogue, and update the declaration data according to the correction operation data.
[0148] The consistency verification loop module 106 is used to perform consistency verification on the updated declaration data. If the verification passes, the error correction is completed. If the verification fails, it returns to O2 to redetermine the root cause intention chain until the verification passes or the preset round limit is reached.
[0149] In the several embodiments provided by this invention, it should be understood that the disclosed methods and systems can be implemented in other ways. For example, the system embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and other division methods may be used in actual implementation.
[0150] Furthermore, the functional modules in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or in the form of hardware plus software functional modules.
[0151] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.
[0152] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.
Claims
1. A tax declaration error correction method based on multi-round intent decomposition of intelligent agents, characterized in that, The method includes: O1: Extract the error status identifier and correction action identifier of the target user in the tax declaration process, and construct an intent sequence graph with the error status identifier as the node and the causal dependency relationship between the error status before and after indicated by the correction action identifier as the directed edge. O2: The error verification result in the tax declaration process is taken as the current error state. Starting from the current error state, a depth-first traversal is performed in the reverse direction of the directed edge in the intent sequence graph to obtain all possible predecessor error state paths. The error state sequence corresponding to the predecessor error state path with the largest confidence weight product is determined as the root cause intent chain. O3: Based on the terminal root cause error node in the root cause intent chain, propagate and deduce the current declaration data of the target user item by item, generate the modified values of each relevant table item and the newly added verification error list, and use it as the counterfactual deduction result; O4: Assess the cognitive proficiency level of the target user, and generate an error correction and guidance strategy based on the cognitive proficiency level and the error complexity in the counterfactual deduction results; O5: In accordance with the error correction guidance strategy, the correction guidance is gradually output to the target user through dialogue, and the correction operation data input by the target user is received after each round of dialogue, and the declaration data is updated according to the correction operation data; O6: Perform consistency verification on the updated declaration data. If the verification passes, the error correction is completed. If the verification fails, return to O2 to redetermine the root cause intention chain until the verification passes or the preset round limit is reached.
2. The tax declaration error correction method based on multi-round intent decomposition intelligent agent as described in claim 1, characterized in that, The process involves extracting error status identifiers and correction action identifiers from the target user during the tax declaration process. Using the error status identifiers as nodes and the causal dependencies between the preceding and following error states indicated by the correction action identifiers as directed edges, an intent sequence graph is constructed, including: Obtain the historical interaction records between the target user and the intelligent agent, extract the error code and error location of the declaration form item from the interaction content of each round in the historical interaction records, combine the error code and error location of the declaration form item to generate an error status identifier; Extract the user's field modification actions, the original error status identifier targeted by the field modification actions, and the new error status identifier generated after the execution from the interaction content of each round in the historical interaction record. Using the original error status identifier as the starting node, the new error status identifier as the ending node, and the execution sequence of the field modification action as the direction of the edge, a correction action identifier is generated. The error status identifier is used as a graph node, and the correction action identifier is used as a directed edge. The graph nodes are connected sequentially according to the temporal order of the correction action identifier to generate an intent sequence graph.
3. The tax declaration error correction method based on multi-round intent decomposition intelligent agent as described in claim 2, characterized in that, The step involves extracting the error code and error location of the declaration form item from each round of interaction content in the historical interaction record, and combining the error code and error location to generate an error status identifier, including: Extract the declaration form number, declaration form field number, and error type number that indicate the verification failure from the interaction content of each round in the historical interaction record. Concatenate the declaration form number, declaration form field number, and error type number in a preset order to generate the declaration form item error code. Extract the data row identifier and data column identifier of the declaration data that the verification failed from the interaction content of each round in the historical interaction record. Combine the data row identifier and data column identifier by Cartesian product to generate the error position of the declaration form item. The error code and the error position of the declaration form item are aligned with the timestamp and then hashed together to generate an error status identifier.
4. The tax declaration error correction method based on multi-round intent decomposition intelligent agent as described in claim 2, characterized in that, The process of generating a correction action identifier, using the original error state identifier as the starting node, the new error state identifier as the ending node, and the execution sequence of the field modification action as the direction of the edge, includes: Extract the target entry identifier, the value before modification, and the value after modification corresponding to the modification operation performed by the user from each round of interaction content in the historical interaction record. Combine the target entry identifier, the value before modification, and the value after modification according to the execution order of the modification operation to generate a field modification action. The error status identifier before the field modification action is taken is determined as the original error status identifier, and the error status identifier after the field modification action is taken is determined as the new error status identifier. Using the original error status identifier as the starting graph node, the new error status identifier as the ending graph node, and the execution order of the field modification actions as the direction indicator of the directed edges, a correction action identifier is generated.
5. The tax declaration error correction method based on multi-round intent decomposition intelligent agent as described in claim 1, characterized in that, The process involves using the error verification result during the tax declaration process as the current error state, and starting from this current error state, performing a depth-first traversal along the reverse direction of the directed edges in the intent sequence graph to obtain all possible predecessor error state paths. The error state sequence corresponding to the predecessor error state path with the largest confidence weight product is then determined as the root cause intent chain, including: Extract the current error status identifier pointing to the current verification failure from the error verification results in the tax declaration process; Starting with the current error state identifier, a depth-first search is performed in the reverse direction of the directed edge in the intent sequence graph, and the predecessor error state identifier is recorded each time a directed edge is passed. Arrange all predecessor error status identifiers encountered during the search process in the search order to generate a predecessor error status path; Repeat O2 until all predecessor nodes reachable from the current error state identifier in the intent sequence diagram have been visited, and integrate all possible predecessor error state paths; Obtain the confidence weight of the correction action corresponding to each directed edge in the intent sequence graph, and multiply the confidence weights of all correction actions on each predecessor error state path to obtain the confidence product. The error state identifiers contained in the predecessor error state path with the largest confidence product are arranged in order from the root node to the current node to generate the root cause intention chain.
6. The tax declaration error correction method based on multi-round intent decomposition intelligent agent as described in claim 5, characterized in that, The step of obtaining the confidence weight of the corrected action corresponding to each directed edge in the intent sequence graph includes: Obtain the historical number of successful executions and the historical number of failed executions of the correction action identifier, and determine the basic success rate weight; Obtain the semantic similarity between the original error state identifier associated with the correction action identifier and the new error state identifier, map the semantic similarity to a preset interval, and generate a semantic consistency weight; The basic success rate weight and the semantic consistency weight are weighted and summed to generate the confidence weight of the corrective action.
7. The tax declaration error correction method based on multi-round intent decomposition intelligent agent as described in claim 1, characterized in that, The step of propagating and deducing the current reported data of the target user item by item based on the terminal root cause error node in the root cause intent chain, generating modified values for each relevant table item and a list of newly added verification errors, and using this as the counterfactual deduction result, includes: Based on the terminal root cause error node in the root cause intent chain, query the pre-constructed error propagation map for a correction operation template that has a correction mapping relationship with the terminal root cause error node, and extract the target field identifier and target correction value to be modified from the correction operation template. Construct a table entry dependency relationship library, using the current declaration data as the initial state data, and write the target correction value into the field position pointed to by the target field identifier in the initial state data to generate the first intermediate state data; Traverse the table item dependency relationship database, query all first-level dependency table item identifiers with the target field identifier as the input variable, calculate the first-level dependency table item update value according to the arithmetic operation formula associated with the first-level dependency table item identifier, and write the first-level dependency table item update value into the corresponding position in the first intermediate state data to generate the second intermediate state data. Using the second intermediate state data as the current state data, O3 is executed repeatedly, propagating layer by layer until all computable dependency entries are updated, generating the third intermediate state data. Using the third intermediate state data as input, the logical verification rules in the table item dependency relationship library are executed to obtain the verification rule identifiers and declaration table item positions of all verification failures, and integrate them into a new verification error list; Extract all table field values that have changed relative to the initial state data from the third intermediate state data, along with the values before and after the changes, and combine them with the newly added check error list to form a counterfactual deduction result.
8. The tax declaration error correction method based on multi-round intent decomposition intelligent agent as described in claim 7, characterized in that, Using the current declared data as initial state data, the target correction value is written into the field position pointed to by the target field identifier in the initial state data to generate first intermediate state data, including: Parse each dependency record in the dependency relationship database, where each dependency record contains an output entry identifier, an output entry calculation formula, and a set of input entry identifiers; traverse all the dependency records. Filter all dependent records that contain the target field identifier in the input table entry identifier set, and determine the output table entry identifier corresponding to all dependent records as the first-level dependent table entry identifier; For each first-level dependency table entry identifier, obtain the corresponding output table entry calculation formula, extract the field value that matches each input variable placeholder from the first intermediate state data, substitute the field value into the input variable placeholder, and generate the substituted calculation formula. The substituted calculation formula is evaluated according to the preset operator priority to generate the first-level dependency table entry update value.
9. The tax declaration error correction method based on multi-round intent decomposition intelligent agent as described in claim 8, characterized in that, The process of assessing the cognitive proficiency level of the target user and generating an error correction and guidance strategy based on the cognitive proficiency level and the error complexity in the counterfactual deduction results includes: Acquire the target user's historical operation behavior data, which includes the average time taken for historical correction operations, the single-step error rate of historical correction operations, and the frequency of historical help requests. The historical operation behavior data are mapped to preset proficiency scoring intervals to obtain time consumption score, error rate score and help frequency score. The time consumption score, error rate score and help frequency score are weighted and summed to generate a comprehensive proficiency score. Based on the preset proficiency level classification threshold, the level corresponding to the scoring interval to which the comprehensive proficiency score belongs is determined as the cognitive proficiency level of the target user; Obtain the total number of verification error entries in the counterfactual deduction result and the total number of table field entries whose values have changed in the third intermediate state data. Normalize the total number of verification error entries and the total number of table field entries respectively, and then sum them by weight to generate the error complexity. Based on the cognitive proficiency level and the error complexity, the corresponding presentation granularity level and interaction rhythm mode are queried from the preset strategy mapping table. The presentation granularity level and the interaction rhythm mode are combined to generate an error correction guidance strategy.
10. A tax declaration error correction system based on multi-round intent decomposition intelligent agents, characterized in that, The system for implementing the tax declaration error correction method based on a multi-round intent decomposition agent as described in claim 1 includes: The intent sequence graph construction module is used to extract the error status identifiers and correction action identifiers of the target user in the tax declaration process. The error status identifiers are used as nodes, and the causal dependency relationships between the error statuses indicated by the correction action identifiers are used as directed edges to construct the intent sequence graph. The root cause intention chain tracing module is used to take the error verification result in the tax declaration process as the current error state, take the current error state as the starting point, perform a depth-first traversal along the reverse direction of the directed edge in the intention sequence graph to obtain all possible predecessor error state paths, and determine the error state sequence corresponding to the predecessor error state path with the largest confidence weight product as the root cause intention chain. The counterfactual propagation and deduction module is used to propagate and deduce the current declaration data of the target user item by item based on the terminal root cause error node in the root cause intent chain, generate the modified values of each relevant table item and the newly added verification error list, and use them as the counterfactual deduction result. The cognitive strategy adaptive module is used to evaluate the cognitive proficiency level of the target user and generate an error correction guidance strategy based on the cognitive proficiency level and the error complexity in the counterfactual inference results. The dialogue correction and update module is used to output correction guidance to the target user step by step through dialogue according to the error correction guidance strategy, and to receive correction operation data input by the target user after each round of dialogue, and update the declaration data according to the correction operation data. The consistency check loop module is used to perform consistency checks on the updated declaration data. If the check passes, the error correction is completed. If the check fails, it returns to O2 to redetermine the root cause intention chain until the check passes or the preset round limit is reached.
Citation Information
Patent Citations
Finance and tax service request processing method and device
CN121213263A