A tax planning scheme and early warning system
By constructing a temporal knowledge graph and a multi-objective optimization model, and keeping track of changes in tax laws in real time, a legal and compliant Pareto optimal tax planning scheme is generated. This solves the problems of static lag and single objective in existing tax planning schemes, and improves the practicality and security of tax planning.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ANCIENT TANG DYNASTY (BEIJING) TECH CO LTD
- Filing Date
- 2026-04-08
- Publication Date
- 2026-07-03
AI Technical Summary
Existing tax planning solutions are static and outdated, unable to keep up with the dynamic changes in tax laws and regulations in real time. They also have a single objective dimension and fail to take into account multi-dimensional business needs, resulting in the failure of the solutions or increased operating costs and high compliance risks.
The system employs a regulatory data collection and verification module, a time-series knowledge graph module, an optimization modeling module, a solver module, and an output interaction module. It uses distributed crawlers to capture tax law provisions in real time, constructs a time-series knowledge graph, uses a reverse breadth-first propagation algorithm to identify affected solutions, builds a multi-objective optimization model and adaptively adjusts weights, generates a Pareto optimal solution set, and provides natural language explanations and visual warnings.
It enables real-time and reliable detection of changes in tax law provisions, accurately identifies affected solutions, and generates legal and compliant multi-dimensional Pareto optimal solutions, thereby improving the practicality and security of tax planning and reducing compliance risks and operating costs.
Smart Images

Figure CN122335461A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of tax planning technology, and more specifically, to a tax planning scheme and early warning system. Background Technology
[0002] With the development of the market economy and the continuous improvement of the tax system, tax planning has become an important management tool for enterprises to optimize tax costs and improve operating efficiency. Currently, enterprise tax planning largely relies on manual analysis of tax policies and design of plans based on financial data, or the use of basic tax calculation software for auxiliary calculations. Its core logic is to construct a tax burden optimization model and formulate a planning scheme based on established tax law provisions and enterprise operating data.
[0003] However, existing tax planning methods have significant technical flaws. On the one hand, they suffer from static and outdated characteristics. The formulation and implementation of existing schemes are based on tax law provisions at a certain point in time, making it impossible to keep up with the dynamic changes in tax law provisions in real time. In particular, they are difficult to cover scenarios such as frequent adjustments to regional tax incentive policies and detailed updates to tax collection and management standards. This leads to a disconnect between the planning scheme and the latest tax rules, which not only causes the scheme to lose its expected tax-saving effect, but may also lead to compliance risks due to violations of current effective policies, triggering problems such as tax audits, back taxes, and late payment penalties. On the other hand, the limitations of a singular objective are obvious. Existing tax planning generally takes "minimizing tax burden" as the only core objective. In the process of designing the plan, it only focuses on reducing the overall tax burden of the enterprise, without taking into account the planning costs such as human resources costs, consulting costs, and compliance rectification costs incurred in the planning process. At the same time, it ignores the multi-dimensional business demands of the enterprise, such as cash flow constraints, profit fluctuation risks, and audit verification risks. This can easily lead to situations where the planning plan reduces the tax burden, but significantly increases the enterprise's comprehensive operating costs, exacerbates cash flow pressure, or increases audit risks, and fails to achieve synergistic optimization of enterprise taxation and business management.
[0004] The aforementioned technical deficiencies result in insufficient practicality, timeliness, and comprehensiveness of existing tax planning solutions, making it difficult to adapt to the dynamic updates of current tax policies and the actual needs of multi-objective coordination in enterprise operation and management. This restricts the effectiveness and security of enterprise tax planning, and there is an urgent need for a tax planning solution and early warning system that can keep up with the dynamics of tax law in real time and take into account multi-dimensional business objectives, in order to solve the problems of static lag and single objective of existing technologies. Summary of the Invention
[0005] The technical problem to be solved by the present invention is that the existing tax planning schemes are not practical, timely and comprehensive enough. In view of the above-mentioned defects of the prior art, a tax planning scheme and early warning system are provided.
[0006] The technical solution adopted by this invention to solve its technical problem is: on the one hand A tax planning scheme and early warning system, characterized in that it includes a legal data collection and verification module, a time-series knowledge graph module, an optimization modeling module, a solver module, and an output interaction module; The regulatory collection and verification module is used to collect tax law provisions from multiple official tax information source zones through distributed crawlers, calculate the hash value of each provision document from each official tax information source zone, and form a blockchain-style hash chain with the hash value of the previous version of the provision document. When the hash values are inconsistent, a regulatory change event is generated. The time-series knowledge graph module stores a knowledge graph containing regulatory nodes, preferential nodes, enterprise nodes, planning scheme nodes, and time-series relation edges carrying effective time intervals. In response to the regulatory change event, the time-series knowledge graph module executes a reverse breadth-first propagation algorithm, traverses all planning scheme nodes that depend on the changed regulations along the time-series relation edges, calculates the failure degree and compliance risk level of each affected planning scheme, and generates early warning information. The optimization modeling module uses five optimization objectives: total tax burden, planning costs, cash flow pressure coefficient, profit fluctuation variance, and audit risk score. It sets hard constraints on legal bottom lines and soft constraints on budget upper limits to construct a multi-objective optimization model. The solver module employs a decomposition-based multi-objective evolutionary algorithm (MOEA / D), utilizes business rules to guide the generation of an initial population, and adaptively adjusts the aggregation weights of each optimization objective based on the company's real-time financial indicators to solve the multi-objective optimization model and output a Pareto optimal solution set. The output interaction module is used to perform decision variable contribution analysis on each solution in the Pareto optimal solution set using SHAP values, generate solution explanation text in natural language form, receive user ratings for the solutions, and update the system preference model through Bayesian optimization. The warning information output by the time-series knowledge graph module triggers the optimization modeling module to reconstruct the multi-objective optimization model, and the parameters of the failed scheme are used as constraints of the new model and input into the solver module to realize the adaptive planning scheme update driven by regulatory changes.
[0007] Preferably, the hash value in the regulation collection and verification module is a SHA-256 hash value; in the blockchain-style hash chain, the hash value of each regulation document is included in the field of the hash value of the previous version of the regulation document, forming a tamper-proof chain structure.
[0008] Preferably, the reverse breadth-first propagation algorithm is as follows: starting from the changed regulatory node, it traverses backward along the reference relationship of "regulatory node → preferential node → planning scheme node", and calculates the failure degree f=α·dependence depth + β·time overlap + γ·existence of alternative preferential treatment for each traversed planning scheme node, where α, β, and γ are preset weight coefficients; when the failure degree exceeds the threshold, the scheme is marked as a red warning.
[0009] Preferably, the optimization modeling module further includes a dynamic constraint unit. When the solver module returns no feasible solution, the dynamic constraint unit relaxes the upper or lower limit of the soft constraint sequentially according to a preset step size. After each relaxation, the solution is resolved until at least one feasible solution is obtained, and the cost of each relaxation is recorded. The cash flow pressure coefficient is defined as Σmax(0, tax payment date - expected cash inflow date) × daily cost of capital rate. The audit risk score is output by a LightGBM model trained based on historical tax audit cases.
[0010] Preferably, the initial population includes four typical planning templates as initial individuals: maintaining the status quo, adjusting transfer pricing, regional preferential entry, and business decomposition, and then generating the remaining individuals through polynomial mutation; The adaptive adjustment of the aggregation weights of each optimization objective includes detecting the company's current quick ratio and debt-to-equity ratio, increasing the aggregation weight of the cash flow pressure coefficient when the quick ratio is below 0.8, and reducing the aggregation weight of planning costs when the debt-to-equity ratio is above 70%.
[0011] Preferably, the natural language explanation text generated by the output interaction module includes a scheme comparison explanation and a regulatory impact explanation; the scheme comparison explanation uses SHAP values to list the top three decision variables with the greatest impact on the total tax burden and their contribution directions; the regulatory impact explanation extracts the graph path of the affected scheme from the time-series knowledge graph module and generates a statement describing the causal relationship between regulatory changes and scheme failure.
[0012] Preferably, it also includes a visual early warning board, which is used to display the history of regulatory changes, a list of affected solutions, a heat map of failure levels and compliance risk levels in the form of a timeline, and supports viewing the complete impact propagation path diagram at any solution node.
[0013] Preferably, the system is deployed on a cloud server or a local server and connects to the enterprise ERP system through an API interface to obtain enterprise financial data in real time as input parameters for a multi-objective optimization model.
[0014] on the other hand A tax planning scheme and early warning method, applied to any of the systems described herein, includes the following steps: S1. Real-time crawling of tax law provisions is performed using distributed crawlers. The hash value of each tax law provision is calculated and compared with the historical hash chain. If they are inconsistent, a law change event is generated. S2. Input the aforementioned regulatory change event into the time-series knowledge graph, execute the reverse breadth-first propagation algorithm, identify all planning schemes that depend on the changed regulations, calculate the degree of failure and compliance risk level, and output early warning information; S3. In response to the warning information or the planning request initiated by the user, construct a multi-objective optimization model with the total tax burden, planning cost, cash flow pressure coefficient, profit fluctuation variance and audit risk score as objective functions, and legal bottom line and budget upper limit as constraints; S4. The improved MOEA / D algorithm is used to solve the multi-objective optimization model. The initial population contains typical templates guided by business rules. During the optimization process, the weights of each objective are dynamically adjusted according to the real-time financial indicators of the enterprise to generate a Pareto optimal solution set. S5. Calculate the SHAP value for each solution in the Pareto optimal solution set, generate natural language explanation text, and receive user selections through an interactive interface. Store the user-selected solution and the corresponding legal impact path in the knowledge graph for subsequent learning.
[0015] Preferably, the system also includes step S6: after a user selects a solution, the system continuously monitors the regulatory nodes related to that solution. Once a regulatory change event is detected, steps S2 to S5 are automatically repeated to generate an updated solution set and push regulatory change notifications and new solution suggestions to the user.
[0016] The beneficial effects of this invention are as follows: 1. By incrementally crawling using distributed crawlers and employing a SHA-256 chained verification structure that includes the hash value of the previous version, this solution achieves real-time and reliable detection of changes to tax law provisions. The immutability of the hash chain ensures the traceability and integrity of historical versions of the provisions, and any unauthorized modifications to historical data will be detected immediately. Compared to traditional polling or single hash verification, this method reduces server crawling load and technically eliminates the risk of subsequent tampering with the legal version, providing a highly reliable legal data foundation for subsequent early warning and planning.
[0017] 2. By constructing a knowledge graph containing nodes such as regulations, incentives, enterprises, and plans, as well as temporal relationship edges, and introducing a reverse breadth-first propagation algorithm, the system can accurately and efficiently identify all planning schemes affected by a certain regulatory change. When calculating the degree of failure, it comprehensively considers dependency depth, temporal overlap, and the existence of alternative incentives, ensuring that the warning results not only indicate which schemes have failed but also quantify their risk level (red / yellow warning). Compared to traditional static impact analysis based on keyword matching, this method supports dynamic timeline reasoning and path tracing, significantly improving the accuracy and interpretability of regulatory change impact assessment.
[0018] 3. This approach formalizes the complex decision-making problem of tax planning into five conflicting optimization objectives, covering tax savings, execution costs, cash flow pressure, profit stability, and audit risk. This approach is closer to the actual operational needs of businesses than traditional models that only focus on minimizing the tax burden. Furthermore, it introduces hard constraints such as legal limits and soft constraints such as budget limits, ensuring that the generated solutions are both legal and financially feasible. This multi-objective framework outputs a set of Pareto optimal solutions, allowing decision-makers to flexibly choose according to their risk preferences, avoiding the side effects of "lowest tax burden but cash flow collapse" that may result from single-objective optimization.
[0019] 4. When initial constraints are too strict, resulting in no feasible solution, this unit sequentially relaxes soft constraints (such as the budget ceiling) at preset step sizes. After each relaxation, the solution is recalculated, and the relaxation cost is recorded. Finally, the feasible solution with the minimum cost is selected from multiple relaxation options. This mechanism ensures that the system can provide at least one feasible solution under any circumstances, avoiding the embarrassment of the optimization engine returning an empty result due to a lack of solutions. Furthermore, recording the relaxation process facilitates auditing and subsequent constraint adjustments, improving the system's robustness and user-friendliness.
[0020] 5. By forcibly incorporating four typical planning templates—"maintaining the status quo," "transfer pricing adjustment," "regional preferential entry," and "business decomposition"—into the initial population, the algorithm's convergence speed and solution quality are significantly improved, as the initial solutions are already located in promising regions. Compared to completely random initialization, this guidance strategy utilizes domain expert knowledge, reduces invalid searches, and is particularly suitable for optimization problems with clear business models, such as tax planning. Experiments show that this strategy can improve the Pareto front hypervolume index by more than 20% within the first 100 generations.
[0021] 6. During the MOEA / D evolution process, the aggregation weights of each objective are dynamically adjusted based on real-time financial indicators such as the company's quick ratio, debt-to-equity ratio, and historical audit records (e.g., increasing the weight of the cash flow pressure coefficient when the quick ratio is low). This allows the optimization model to adapt to the company's current operational health: companies with poor short-term solvency will be more inclined to generate cash flow-friendly solutions, while highly leveraged companies will prioritize low-cost planning. This mechanism effectively avoids static weights with a "one-size-fits-all" approach, improving the applicability of the solutions to specific company conditions.
[0022] 7. For each option in the Pareto set, calculate the SHAP value, quantify the marginal contribution of each decision variable to each optimization objective, and automatically generate a natural language explanation (e.g., "Utilizing the 15% tax rate in the Hainan Free Trade Port reduces the tax burden by 900,000 yuan"). This solves the interpretability problem of black-box optimization models, enabling financial personnel to understand why a certain option is better, enhancing users' trust in the system's recommended solutions and their willingness to adopt them. Simultaneously, the explanation of the impact of regulations extracts causal paths from the knowledge graph, helping users intuitively see the logical chain between regulatory changes and solution failure.
[0023] 8. By receiving user ratings of selected options and updating the implicit preference model (Gaussian process) using Bayesian optimization, the system can continuously learn the personalized preferences of each decision-maker (e.g., a CFO dislikes audit risk more than tax burden). In subsequent optimizations, this preference model guides the direction of the MOEA / D reference point, making the generated Pareto set more aligned with the user's preferences. Compared to traditional multi-objective optimization methods that require users to pre-specify weights, this method achieves implicit, interactive preference acquisition, significantly lowering the barrier to entry.
[0024] 9. When the time-series knowledge graph outputs a red alert, the system automatically treats the decision variables of the failed solutions as prohibitive constraints, reconstructs and optimizes the model, resolves it, generates an updated solution set, and proactively pushes it to the user. This mechanism achieves a fully automated closed loop from regulatory change awareness to new solution generation, requiring no manual intervention. Compared to traditional systems that require users to manually modify model parameters and run the system again, this solution reduces response time from days to minutes and ensures that new solutions no longer rely on expired regulations, significantly reducing the enterprise's compliance risks.
[0025] 10. By displaying the history of regulatory changes via a timeline, presenting the degree of failure of each solution via a heatmap, and allowing users to view the complete propagation path of regulatory impact by clicking on solution nodes, this solution provides managers with an intuitive, multi-dimensional, and drill-down-able risk monitoring dashboard. Even tax personnel without a technical background can quickly identify high-risk solutions and understand their causal relationship with regulatory changes. The path diagram can be exported, facilitating audit documentation and reporting to superiors, greatly improving the system's usability and management transparency. Attached Figure Description
[0026] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the present invention will be further described below in conjunction with the accompanying drawings and embodiments. 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: Figure 1 This is a schematic diagram of the composition of the tax planning scheme and early warning system in the embodiments of this application.
[0027] Figure 2 This is a flowchart illustrating the tax planning scheme and early warning method in the embodiments of this application. Detailed Implementation
[0028] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, a clear and complete description will be provided below in conjunction with the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the protection scope of the present invention.
[0029] Example 1 Preferred embodiments of the present invention, for example Figure 1 As shown, to address the technical problems of existing tax planning systems, such as sluggish response to dynamic changes in regulations, lack of interpretability of planning schemes, and difficulty in balancing multiple objectives, a tax planning scheme and early warning system is provided. This system includes a regulatory data collection and verification module, a time-series knowledge graph module, an optimization modeling module, a solver module, an output interaction module, and a visual early warning dashboard. The system is deployed on a cloud server or local server and interfaces with the enterprise ERP system via an API to obtain real-time enterprise financial data as input parameters for the multi-objective optimization model.
[0030] The regulations collection and verification module is used to collect tax law data from multiple official tax information sources (such as the official website of the State Taxation Administration and the bulletin boards of local tax bureaus) through distributed crawlers. The distributed crawler adopts an incremental crawling strategy, based on the Last-Modified field of RSS subscriptions or site maps, and only crawls pages that have changed since the last crawl, thereby reducing server load.
[0031] For each official tax information source document, a SHA-256 hash value is calculated. To form a tamper-proof blockchain, a hash chain is created. The hash value of each document is contained in the field of the hash value of the previous version document, forming a tamper-proof chain structure. The hash value H_new of each version document is generated as follows: H_new = SHA-256(document content|| previous version hash value|| timestamp).
[0032] Here, "||" represents the string concatenation operation. When the hash value calculated from a newly crawled document is inconsistent with the latest hash value stored locally, a regulatory change event is generated. The data structure of the regulatory change event includes the changed regulation ID, change type (new / modified / repealed), hash values of the old and new versions, effective time, and crawl timestamp.
[0033] The temporal knowledge graph module stores a knowledge graph containing regulatory nodes, preferential nodes, enterprise nodes, planning scheme nodes, and temporal relationship edges, each with its own effective time interval. In response to regulatory change events, the module executes a reverse breadth-first propagation algorithm, traversing all planning scheme nodes dependent on the changed regulation along the temporal relationship edges. It calculates the failure degree and compliance risk level of each affected planning scheme and generates early warning information. Regulatory node attributes include regulatory ID, clause content, hash chain pointer, and effective time interval [start_date, end_date] (if currently valid, end_date is +∞). Preferential node attributes include preferential ID, applicable conditions, preferential amount, and associated regulatory ID. Enterprise node attributes include enterprise ID, industry, size, historical tax data, and risk preference. Planning scheme node attributes include scheme ID, combination of decision variables, expected tax burden, associated preferential ID, and creation time.
[0034] The temporal relation edge E includes: (Legal Node) - [Basis] -> (Preferential Node): Indicates the legal basis for a certain preferential clause.
[0035] (Discount Node) - [Applies to] -> (Planning Scheme Node): Indicates that a certain planning scheme uses a specific discount.
[0036] (Enterprise Node) - [Adoption] -> (Planning Scheme Node): Indicates that the enterprise has adopted the scheme.
[0037] Each edge is appended with a valid time interval [t_start, t_end], which supports historical state backtracking.
[0038] The reverse breadth-first propagation algorithm is as follows: Initialize queue: Add the changed regulation node v_reg to the queue.
[0039] Reverse traversal: Retrieve nodes from the queue and search backwards along the incoming edges. The specific path is: Regulations node ← Discount node ← Planning scheme node. Each time a planning scheme node v_plan is found, it is marked as affected.
[0040] Failure severity calculation: Calculate the failure severity f for each v_plan using the following formula:
[0041] Depth D: D is the shortest path length (number of edges) from v_reg to v_plan in the graph. The greater the depth, the more indirect the influence. D is normalized (e.g., divided by the maximum possible depth).
[0042] Time overlap (Time interval of effective date of regulatory change ∩ Time interval of application of planning scheme) / length (Time interval of application of planning scheme). The higher the degree of overlap, the greater the impact on the scheme.
[0043] Alternative Offer Existence S: S is a Boolean value (0 or 1), determined by querying the knowledge graph to see if there are other offer nodes associated with v_plan that are not affected by the changed regulations. If an alternative offer exists, S=1; otherwise, S=0.
[0044] Weighting coefficients: α, β, γ are preset and configurable weights that satisfy α+β+γ=1, for example, α=0.4, β=0.4, γ=0.2.
[0045] Warning level determination: When f exceeds the first threshold (e.g., 0.6), it is marked as a yellow warning (requires attention); when f exceeds the second threshold (e.g., 0.8), it is marked as a red warning (immediate adjustment is recommended). The warning information includes the scheme ID, failure level, risk level, and impact propagation path.
[0046] The optimization modeling module uses five optimization objectives: total tax burden, planning costs, cash flow pressure coefficient, profit volatility variance, and audit risk score. It sets hard constraints (legal bottom line) and soft constraints (budget ceiling) to construct a multi-objective optimization model. As an optional implementation, legal bottom line constraints include: total tax burden must not be lower than zero; repealed regulations cannot be used; transfer pricing must comply with the arm's length principle (which can be quantified as a profit range constraint); budget ceiling constraints include: planning costs ≤ 1 million yuan; cash flow pressure coefficient ≤ 0.05. The formal expression is as follows: Minimize (total tax burden, planning costs, cash flow pressure coefficient, profit volatility variance, audit risk score).
[0047] The total tax burden is the sum of corporate income tax, value-added tax, and other taxes and fees calculated according to the plan. Planning costs include direct costs such as consulting fees, new entity registration fees, and transfer pricing document preparation fees. Profit volatility variance is calculated based on the variance of the profit forecasts for each quarter over the next three years, measuring profitability stability. The audit risk score is output by a LightGBM model trained on historical tax audit cases. LightGBM model input features include the type of incentives used in the plan, the company's industry, the number of historical audits, the number of related parties in the transaction, and the transfer pricing method.
[0048] The cash flow pressure coefficient is defined as Σmax(0, tax payment date_t - expected cash inflow date_t) × daily cost of capital rate. Here, t iterates through all taxes within a fiscal year. If the tax payment date is earlier than the major cash inflow date, a positive cash flow gap occurs, and this gap is multiplied by the daily cost of capital rate and then accumulated.
[0049] The optimization modeling module also includes a dynamic constraint unit. When the solver module returns no feasible solution, the dynamic constraint unit triggers a constraint relaxation mechanism. The dynamic constraint unit relaxes the soft constraint limits sequentially in a preset step size (such as 5% of the budget limit). After each relaxation, the solver module is called again to solve the problem until at least one feasible solution is obtained. If a feasible solution is obtained, the total cost of this relaxation is recorded (such as the weighted sum of cost overruns and cash flow deterioration values). The feasible solution with the lowest cost among multiple relaxation options is selected as the most recommended, and the relaxation process is recorded in the log for auditing.
[0050] The solver module employs a decomposition-based multi-objective evolutionary algorithm (MOEA / D), using business rules to guide the generation of the initial population and adaptively adjusting the aggregation weights of each optimization objective based on the company's real-time financial indicators. It solves the multi-objective optimization model and outputs a Pareto optimal solution set. The initial population includes four typical planning templates: maintaining the status quo, transfer pricing adjustment, regional preferential entry, and business decomposition. The remaining individuals are then generated through polynomial mutation. Maintaining the status quo involves taking the current values for all decision variables; transfer pricing adjustment involves transferring profits to related parties with lower tax rates, with adjustments within a reasonable range; regional preferential entry involves establishing new entities in tax havens and allocating a predetermined percentage of profits; and business decomposition involves splitting high-profit businesses into independent legal entities, applying preferential policies for small and micro enterprises. The adaptive adjustment of the aggregation weights of each optimization objective includes detecting the company's current quick ratio and debt-to-equity ratio. When the quick ratio is below 0.8, the aggregation weight increases the cash flow pressure coefficient; when the debt-to-equity ratio is above 70%, the aggregation weight decreases the planning cost.
[0051] The output interaction module uses SHAP values to perform a contribution analysis of decision variables for each option in the Pareto optimal solution set, generating a natural language explanation text for the solutions. The generated natural language explanation text includes a comparative explanation of the solutions and an explanation of the impact of regulations. The comparative explanation uses SHAP values to list the three decision variables with the greatest impact on the total tax burden and their contribution directions. For example, compared to the current situation, Solution A reduces the total tax burden by 1.2 million yuan. Among these, the decision to 'utilize the 15% income tax rate in the Hainan Free Trade Port' contributes -900,000 yuan (reduction), while 'increasing interest on related-party loans' contributes +300,000 yuan (increase due to thin capitalization restrictions). The explanation of the impact of regulations extracts the graph path of the affected scheme from the time-series knowledge graph module (such as [regulatory change node] - basis - [preferential node] - applied to - [failed scheme node]), and generates a statement describing the causal relationship between the regulatory change and the failure of the scheme. For example: Because Article 3 of the "×× Regulations" was repealed on January 1, 2024, the preferential treatment of "high-tech enterprise income tax reduction" became invalid, which in turn made your previously selected "R&D expense additional deduction scheme" invalid to 85%. It is recommended to update.
[0052] The system displays a Pareto front plot through an interactive interface. After selecting a solution, users can rate it from 1 to 5 stars. Upon receiving the rating, the system updates an implicit preference model (Gaussian process surrogate model) using Bayesian optimization. The implicit preference model uses the user's rating as the objective function, adjusting the reference point direction of MOEA / D in subsequent optimizations to make the generated Pareto set more closely reflect the user's personalized preferences.
[0053] When the warning information (especially the red warning) output by the time sequence knowledge graph module triggers the optimization modeling module to reconstruct the multi-objective optimization model, the parameters of the failed scheme are used as constraints of the new model and input into the solver module to realize the adaptive planning scheme update driven by regulatory changes.
[0054] The visual warning dashboard displays the history of regulatory changes, a list of affected solutions, a heatmap of failure levels, and compliance risk levels in a timeline format. It allows users to view the complete impact propagation path for any solution node. When a user clicks on a solution node, the dashboard queries and renders all relevant regulations and incentive nodes in the knowledge graph in real time, highlighting the process of the change event propagating along the path to that solution with animated highlights. The path can be exported as PNG or JSON format.
[0055] As an optional embodiment, the system also includes Embodiment 2. A tax planning scheme and early warning method, for reference Figure 2 The system applied to any of the embodiments in Example 1 includes the following steps: S1. Detection and Verification of Regulatory Change Events S11. The system uses distributed crawlers to crawl tax law provisions in real time based on an incremental crawling strategy.
[0056] S12. For each captured document, calculate the SHA-256 hash value and compare it with the latest hash value of that document stored locally.
[0057] S13. If the hash values do not match, it is determined to be a regulatory change event. The system records the change type and timestamp, and updates the hash chain. If they match, the current capture is ignored, and monitoring continues.
[0058] S2. Knowledge Graph Traversal and Risk Propagation Assessment S21. Input the regulatory change events generated in S1.3 into the timing knowledge graph module.
[0059] S22. Starting from the changed regulation node, execute the reverse breadth-first propagation algorithm and traverse in reverse along the path of regulation → preferential treatment → planning scheme.
[0060] S23. For each planning scheme node traversed, calculate its failure degree f (the calculation formula is the same as in Example 1), and determine the compliance risk level (red / yellow / blue) based on the f value.
[0061] S24. Generate early warning information, including a list of affected solutions, heatmap data of failure severity, and graph structure data of the propagation path of the impact. If no solutions are affected, skip the subsequent steps and continue monitoring.
[0062] By continuously monitoring regulatory change events, the system immediately triggers reverse graph propagation and failure level calculation upon hash verification inconsistencies, achieving proactive early warning. Enterprises no longer need to manually check for regulatory changes periodically; the system automatically pushes affected solutions and their risk levels. This event-driven architecture significantly shortens the time lag between regulatory release and enterprise awareness, helping companies complete planning and adjustments before new regulations take effect, effectively mitigating tax audit risks.
[0063] S3. Dynamic Construction of Multi-Objective Optimization Model S31. Triggering condition: This step is triggered when S2.4 outputs a red warning message or when a user initiates a new planning request through the interface.
[0064] S32. Obtain the latest financial data (income statement, cash flow statement, balance sheet) from the enterprise ERP system.
[0065] S33. Construct a five-objective optimization model with the objective function: min (total tax burden, planning costs, cash flow pressure coefficient, profit volatility variance, audit risk score).
[0066] S34. Set constraints: hard constraints on legal bottom line (automatically extracted from the knowledge graph) and soft constraints on budget ceiling (configurable by the user).
[0067] S35. Handling infeasible solutions: If no feasible solution is found on the first attempt, call the dynamic constraint unit and relax the soft constraints in steps of 5% of the upper limit of the budget. After each relaxation, re-solve until at least one feasible solution is obtained, and record the relaxation cost.
[0068] S4. Improved MOEA / D solution and dynamic weight adjustment S41. Generate the initial population. Forcefully add four types of business template individuals (maintain status quo, transfer pricing adjustment, regional preferential entry, and business decomposition), and generate the remaining individuals through polynomial mutation.
[0069] S42. Use the MOEA / D algorithm for evolutionary optimization, with the number of subproblems set to 100 and the maximum number of iterations to 500.
[0070] S43. During the evolution process, the company's real-time financial indicators (quick ratio, debt-to-equity ratio, and historical audit records) are checked every 10 generations, and the aggregation weight of each target is dynamically adjusted (see Example 1 for specific adjustment rules).
[0071] S44. After the evolution is complete, output a set of Pareto optimal solutions containing 10-20 non-dominated solutions.
[0072] By incorporating "infeasible solution handling" as part of the standard solution process, the system first attempts the original constraints. If this fails, constraint relaxation is automatically performed and the cost is recorded, ensuring that one or more feasible solutions are always returned. Combined with the MOEA / D algorithm and dynamic weight adjustment, this method can handle common constraint conflicts in real-world enterprise data (such as an excessively low budget ceiling leading to no solution). This design gives the system a very high success rate and adaptability in real-world business environments, avoiding engineering failures caused by extreme data.
[0073] S5. Solution Explanation and User Interaction Learning S51. For each option in the Pareto set, calculate the SHAP value of its decision variable relative to the "maintain the status quo" option.
[0074] S52. Generate natural language explanation text based on SHAP values: List the top three decision variables that have the greatest impact on the total tax burden and their contribution directions.
[0075] Extract the legal impact paths from the knowledge graph and generate causal explanation statements.
[0076] S53. Display the solution set through an interactive interface (table or parallel coordinate graph) and show explanatory text.
[0077] S54. Receive user ratings (1-5 stars) for a particular solution.
[0078] S55. Use this score to update the system preference model (Gaussian process) through Bayesian optimization, and adjust the reference point for future solutions.
[0079] S56. Store the user's final selected solution and its associated regulatory impact path (graph structure) back into the time-series knowledge graph as a new edge (enterprise node) - [adoption] -> (planning solution node), and record the timestamp.
[0080] Not only does it generate interpretable solution descriptions, but it also stores the user's final selected solution and its associated regulatory impact path as new knowledge back into the temporal knowledge graph (forming "enterprise-adoption-solution" edges). This allows the knowledge graph to accumulate the enterprise's historical decision-making records. Subsequently, when similar regulatory changes occur, the system can prioritize recommending solution types that the user previously preferred or quickly identify effective strategies that have been adopted.
[0081] S6, Continuous Monitoring and Adaptive Update Closed Loop S61. The system starts a background monitoring thread for the scheme selected by the user in S5.6, and continuously monitors all legal nodes associated with the scheme (through the reverse index of the scheme node - [applied to] -> preferential node - [basis] -> legal node in the path planning graph).
[0082] S62. Once S1 detects a change event in any of these monitored regulatory nodes, steps S2 to S5 are automatically repeated.
[0083] S63. After generating the updated solution set, the system sends a notification to the user via email, in-app push, or WeChat Work robot: "The solution '××' you are following has become invalid due to regulatory changes. A new solution has been generated. Please click to view it." S64. Repeat steps S61 to S63 to form an adaptive and continuous optimization closed loop for the dynamic tax environment.
[0084] A background monitoring thread is established for adopted solutions to continuously track the regulatory nodes they depend on. Once any regulation changes, S2-S5 are automatically triggered, generating a new solution and proactively pushing it to users. This mechanism forms a complete closed loop of "monitoring → impact analysis → model reconstruction → solution → interpretation → push," and executes cyclically. This means that enterprises only need to make one selection, and the system will continuously provide updated suggestions as regulations change, achieving dynamic and continuous compliance in tax planning and greatly reducing manual maintenance costs and legal risks.
[0085] It should be understood that those skilled in the art can make improvements or modifications based on the above description, and all such improvements and modifications should fall within the protection scope of the appended claims.
Claims
1. A tax planning scheme and early warning system, characterized in that, It includes a regulatory data collection and verification module, a time-series knowledge graph module, an optimization modeling module, a solver module, and an output interaction module; The regulatory collection and verification module is used to collect tax law provisions from multiple official tax information source zones through distributed crawlers, calculate the hash value of each provision document from each official tax information source zone, and form a blockchain-style hash chain with the hash value of the previous version of the provision document. When the hash values are inconsistent, a regulatory change event is generated. The time-series knowledge graph module stores a knowledge graph containing legal nodes, preferential nodes, enterprise nodes, planning scheme nodes, and time-series relation edges carrying effective time intervals. The temporal knowledge graph module responds to the regulatory change event by executing a reverse breadth-first propagation algorithm, traversing all planning scheme nodes that depend on the changed regulations along the temporal relationship edges, calculating the failure degree and compliance risk level of each affected planning scheme, and generating early warning information. The optimization modeling module uses five optimization objectives: total tax burden, planning costs, cash flow pressure coefficient, profit fluctuation variance, and audit risk score. It sets hard constraints on legal bottom lines and soft constraints on budget upper limits to construct a multi-objective optimization model. The solver module employs a decomposition-based multi-objective evolutionary algorithm (MOEA / D), utilizes business rules to guide the generation of an initial population, and adaptively adjusts the aggregation weights of each optimization objective based on the company's real-time financial indicators to solve the multi-objective optimization model and output a Pareto optimal solution set. The output interaction module is used to perform decision variable contribution analysis on each solution in the Pareto optimal solution set using SHAP values, generate solution explanation text in natural language form, receive user ratings for the solutions, and update the system preference model through Bayesian optimization. The warning information output by the time-series knowledge graph module triggers the optimization modeling module to reconstruct the multi-objective optimization model, and the parameters of the failed scheme are used as constraints of the new model and input into the solver module to realize the adaptive planning scheme update driven by regulatory changes.
2. The tax planning scheme and early warning system according to claim 1, characterized in that, The hash value in the regulation collection and verification module is a SHA-256 hash value; in the blockchain-style hash chain, the hash value of each regulation document is included in the field of the hash value of the previous version regulation document, forming a tamper-proof chain structure.
3. The tax planning scheme and early warning system according to claim 1, characterized in that, The reverse breadth-first propagation algorithm is as follows: starting from the changed regulatory node, it traverses backward along the reference relationship of "regulatory node → preferential node → planning scheme node", and calculates the failure degree f=α·dependence depth + β·time overlap + γ·existence of alternative preferential treatment for each traversed planning scheme node, where α, β, and γ are preset weight coefficients; when the failure degree exceeds the threshold, the scheme is marked as a red warning.
4. The tax planning scheme and early warning system according to claim 1, characterized in that, The optimization modeling module also includes a dynamic constraint unit. When the solver module returns no feasible solution, the dynamic constraint unit relaxes the upper or lower limit of the soft constraint in a preset step size. After each relaxation, the solution is resolved until at least one feasible solution is obtained, and the cost of each relaxation is recorded. The cash flow pressure coefficient is defined as Σmax(0, tax payment date - expected cash inflow date) × daily cost of capital rate. The audit risk score is output by the LightGBM model trained based on historical tax audit cases.
5. The tax planning scheme and early warning system according to claim 1, characterized in that, The initial population includes four typical planning templates: maintaining the status quo, adjusting transfer pricing, regional preferential entry, and business decomposition, as initial individuals, and then generates the remaining individuals through polynomial mutation. The adaptive adjustment of the aggregation weights of each optimization objective includes detecting the company's current quick ratio and debt-to-equity ratio, increasing the aggregation weight of the cash flow pressure coefficient when the quick ratio is below 0.8, and reducing the aggregation weight of planning costs when the debt-to-equity ratio is above 70%.
6. The tax planning scheme and early warning system according to claim 1, characterized in that, The output interaction module generates a natural language explanation text for the schemes, including a scheme comparison explanation and a regulatory impact explanation. The scheme comparison explanation uses SHAP values to list the top three decision variables with the greatest impact on the total tax burden and their contribution directions. The regulatory impact explanation extracts the graph paths of the affected schemes from the time-series knowledge graph module and generates statements describing the causal relationship between regulatory changes and scheme failure.
7. The tax planning scheme and early warning system according to claim 1, characterized in that, It also includes a visual early warning board, which is used to display the history of regulatory changes, a list of affected solutions, a heat map of failure levels and compliance risk levels in the form of a timeline, and supports viewing the complete impact propagation path diagram at any solution node.
8. The tax planning scheme and early warning system according to claim 1, characterized in that, The system is deployed on a cloud server or a local server and connects to the enterprise ERP system through an API interface to obtain enterprise financial data in real time as input parameters for a multi-objective optimization model.
9. A tax planning scheme and early warning method, applied to the system described in any one of claims 1 to 8, characterized in that, Includes the following steps: S1. Real-time crawling of tax law provisions is performed using distributed crawlers. The hash value of each tax law provision is calculated and compared with the historical hash chain. If they are inconsistent, a law change event is generated. S2. Input the aforementioned regulatory change event into the time-series knowledge graph, execute the reverse breadth-first propagation algorithm, identify all planning schemes that depend on the changed regulations, calculate the degree of failure and compliance risk level, and output early warning information; S3. In response to the warning information or the planning request initiated by the user, construct a multi-objective optimization model with the total tax burden, planning cost, cash flow pressure coefficient, profit fluctuation variance and audit risk score as objective functions, and legal bottom line and budget upper limit as constraints; S4. The improved MOEA / D algorithm is used to solve the multi-objective optimization model. The initial population contains typical templates guided by business rules. During the optimization process, the weights of each objective are dynamically adjusted according to the real-time financial indicators of the enterprise to generate a Pareto optimal solution set. S5. Calculate the SHAP value for each solution in the Pareto optimal solution set, generate natural language explanation text, and receive user selections through an interactive interface. Store the user-selected solution and the corresponding legal impact path in the knowledge graph for subsequent learning.
10. A tax planning scheme and early warning method according to claim 9, characterized in that, It also includes step S6: After the user selects a solution, the system continuously monitors the regulatory nodes related to that solution. Once a regulatory change event is detected, steps S2 to S5 are automatically repeated to generate an updated solution set and push regulatory change prompts and new solution suggestions to the user.