A method for constructing, preventing tampering and tracing a tax decision evidence chain
By constructing an evidence chain for fiscal and tax decisions and adopting a hash chain mechanism and RPA recording, the problems of black boxes in the decision-making process, easy tampering of logs, and inefficient auditing in existing technologies are solved. This achieves low-cost, high-performance end-to-end traceability and tamper-proofing of decision-making, meeting the auditing needs of tax authorities.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- 上海立业乐信息科技有限公司
- Filing Date
- 2026-04-23
- Publication Date
- 2026-05-29
AI Technical Summary
Existing technologies cannot achieve full-chain traceability, tamper-proof protection, and efficient tracking of financial and tax decisions at low cost and high performance, making it difficult to adapt to the application needs and regulatory compliance requirements of intelligent financial and tax systems.
Collect all evidence information for decision-making, construct a chain-like tamper-proof structure through a hash chain mechanism, and combine multi-dimensional indexes and Robotic Process Automation (RPA) records to achieve full transparency, traceability, and tamper-proofing of the decision-making process, generating an audit report.
It achieves full transparency and traceability of the decision-making process, meets the audit requirements of tax authorities, improves audit efficiency, reduces costs, and adapts to high-frequency decision-making scenarios.
Smart Images

Figure CN122113175A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of data security technology, specifically relating to a method for constructing, preventing tampering with, and tracing a chain of evidence for financial and tax decisions. Background Technology
[0002] With the continuous deepening of the digital transformation of finance and taxation, intelligent finance and taxation systems have been widely applied to core finance and taxation processes such as invoice processing, accounting, and tax declaration. The traceability, tamper-proofness, and auditability of the finance and taxation decision-making process are not only core requirements of internal compliance management for enterprises, but also mandatory requirements of laws and regulations such as the "Tax Collection and Administration Law" and the "Electronic Accounting Archives Management Measures". They directly determine the compliance of enterprise tax declarations and the evidentiary value in tax audits.
[0003] Currently, the technological implementation of decision-making traceability and audit record keeping in the financial and tax field mainly falls into three mainstream paths: First, the traditional operation log system, widely used in mainstream financial software, records user operation behaviors and results through relational databases, and relevant records are retrieved by querying the log table during audits; second, the evidence storage scheme based on the distributed ledger characteristics of blockchain, which stores the hash values of key financial and tax operations on the chain, and is mostly used for evidence storage scenarios of fixed electronic vouchers such as electronic invoices and electronic contracts; third, the third-party electronic signature and trusted timestamp scheme, which uses digital certificates issued by authoritative CA institutions to sign and store formal financial and tax documents to prove the integrity of the document content and the signing time.
[0004] However, existing technologies suffer from numerous intractable technical shortcomings in practical applications. For example, traditional operation log systems can only record flat operational behaviors; log data can be easily modified or deleted by authorized personnel, failing to guarantee data integrity and authenticity. Furthermore, they only record the final operation result, failing to retain the full contextual information of the decision-making process, leaving the decision-making process in a black box. The fragmented operation records lack structured semantic connections, requiring manual association of multi-source data during auditing, making the traceability process cumbersome and inefficient. While blockchain-based evidence storage solutions can achieve tamper-proof evidence, their deployment and usage costs are high, and transaction processing performance has significant bottlenecks. They cannot adapt to the high-frequency decision-making scenarios of intelligent financial and tax systems, nor can they fully retain the full contextual information of financial and tax decisions, still failing to solve the problem of the black box nature of the decision-making process. As for third-party electronic signatures and trusted timestamps, they can only cover the final, formal financial and tax documents, failing to adapt to the full-process traceability of high-frequency decision-making within the system, and also failing to record the corresponding policy and legal basis for decisions, making it difficult to meet the audit requirements of tax authorities for traceable declaration data and reproducible tax calculations.
[0005] Therefore, existing technologies cannot achieve closed-loop traceability, tamper-proof protection, and efficient tracking of the entire financial and tax decision-making process at low cost and high performance. They are difficult to adapt to the application needs and regulatory compliance requirements of current intelligent financial and tax systems and have obvious technical limitations. Summary of the Invention
[0006] This invention is made to solve the above-mentioned problems. Its purpose is to provide a method for constructing, preventing tampering and tracing the evidence chain of financial and tax decisions, which is applicable to enterprise financial and tax service scenarios and is used to construct and dynamically update the knowledge ontology in the field of finance and taxation to support the semantic understanding and automated processing of intelligent financial and tax systems.
[0007] This invention provides a method for constructing, preventing tampering with, and tracing a chain of evidence for fiscal and tax decisions, characterized by the following steps: S1. In response to the execution of fiscal and tax decisions, collect all evidence information of the current decision. S2. Obtain the hash value of the previous evidence chain based on the full-link tracking identifier of the current decision. Concatenate the preset fields in the full evidence information with the hash value of the previous evidence chain and calculate the hash value of the current evidence chain using a hash algorithm. S3. Persistently store the evidence chain data containing the current hash value and the hash value of the previous evidence chain to form a chain-like anti-tampering structure; S4. Perform integrity verification based on the chain-like anti-tampering structure, and complete the full-link traceability and audit of financial and tax decisions based on the verification results.
[0008] Furthermore, the full set of evidence information includes decision identifiers, end-to-end tracking identifiers, task identifiers, timestamps, decision input data, decision output data, hit rule information, policy basis information, implementing entity identifiers, a list of input ontology instance identifiers, and a list of output ontology instance identifiers.
[0009] Furthermore, the preset fields include end-to-end tracking identifier, decision identifier, decision input data, decision output data, hash value of the previous evidence chain, and timestamp. The preset fields are concatenated into a string in a preset order.
[0010] Furthermore, the hash algorithm is SHA256, and the calculated hash value is used to represent the unique data fingerprint of the current evidence chain.
[0011] Furthermore, a multi-dimensional index is established for the evidence chain data in persistent storage. The multi-dimensional index includes a full-link tracing identifier index, a task identifier index, a time partition index, and a decision type index.
[0012] Furthermore, the integrity verification involves reading all evidence chains corresponding to the same end-to-end tracking identifier in chronological order, and verifying one by one whether the hash value of the previous evidence chain stored in the current evidence chain matches the current hash value of the previous evidence chain. If they do not match, it is determined that the evidence chain has been tampered with.
[0013] Furthermore, when the current decision is the first evidence chain under the same end-to-end tracking identifier, the hash value of the previous evidence chain is set to a preset fixed value.
[0014] Furthermore, it also includes linking and binding the chain of evidence with the Robotic Process Automation (RPA) execution records, and using the RPA execution records to replay the operation process of financial and tax decision-making, forming a complete closed loop of decision-making evidence.
[0015] Furthermore, the execution triggers for fiscal and tax decisions include invoice verification decision triggers, tax calculation decision triggers, voucher generation decision triggers, risk assessment decision triggers, or tax return verification decision triggers.
[0016] The role and effect of invention This invention achieves full transparency and traceability in decision-making by collecting comprehensive evidence information, fully recording input, output, hit rules, and policy basis. A hash chain mechanism links the current hash value with the previous hash value for storage; any tampering will break the chain, which can be immediately detected through integrity verification, meeting the requirements for electronic evidence integrity. The audit report contains a complete evidence chain and policy basis, proving that the declared data is traceable, tax calculation is compliant, and the declaration process is reproducible, meeting the audit requirements of tax authorities. One-click audit report generation significantly improves audit efficiency. Compared to blockchain-based evidence storage solutions, this invention uses database storage combined with a hash chain, offering controllable costs and good performance, suitable for high-frequency decision-making scenarios. RPA execution record association allows for playback of the operation process, facilitating problem localization. Automatic alerts are triggered when integrity verification fails, helping enterprises detect data tampering or anomalies early. Attached Figure Description
[0017] Figure 1 This is a flowchart illustrating the construction, tamper-proofing, and traceability method for a financial and tax decision-making evidence chain according to the present invention. Detailed Implementation
[0018] To make the technical means, creative features, objectives and effects of this invention easier to understand, the following embodiments are described in detail with reference to the accompanying drawings.
[0019] like Figure 1 As shown, this invention provides a method for constructing, preventing tampering with, and tracing a chain of evidence for fiscal and tax decisions, including the following steps: S1. In response to the execution of fiscal and tax decisions, collect all evidence information for the current decision.
[0020] Specifically, in the intelligent financial and tax system, whenever the scheduling center invokes the decision service to execute a specific DMN decision, the evidence chain construction process is triggered. Triggerable decision types include, but are not limited to, invoice verification decisions, tax calculation decisions, voucher generation decisions, risk assessment decisions, or tax return verification decisions. After triggering, the system automatically collects all evidence information for this decision. In this embodiment, the full evidence information includes a decision identifier (uniquely identifying a decision model), a full-link tracking identifier (associating all decisions in a complete business chain), a task identifier (associating with a specific task), a timestamp (decision execution time), decision input data (such as JSON serialization of DMN input parameters), decision output data (JSON serialization of the decision result), hit rule information (hit rule ID and rule conditions), policy basis information (the legal and regulatory provisions on which it is based), execution entity identifier (system or user identifier), a list of input ontology instance identifiers (ontology instance IRIs involved in the decision), and a list of output ontology instance identifiers (ontology instance IRIs generated by the decision). This information constitutes the main content of the evidence chain, providing a complete data foundation for subsequent hash calculations and tracing.
[0021] S2. Obtain the hash value of the previous evidence chain based on the full-link tracking identifier of the current decision. Concatenate the preset fields in the full evidence information with the hash value of the previous evidence chain and calculate the hash value of the current evidence chain using a hash algorithm.
[0022] Specifically, based on the end-to-end tracking identifier of the current decision, the hash value of the most recent stored evidence chain under that tracking identifier is queried in the database. If the current decision is the first decision under that tracking identifier, then there is no previous evidence chain, and the hash value of the previous evidence chain is set to a preset fixed value (e.g., a string of all zeros). Next, preset key fields are extracted from the collected full-scale evidence information. These fields include the end-to-end tracking identifier, decision identifier, decision input data, decision output data, the hash value of the previous evidence chain, and a timestamp. These fields are concatenated into a string in a preset order. Finally, a hash algorithm is used to calculate the hash value of this string. In this embodiment, the hash algorithm used is SHA256, and the calculated hash value serves as the unique data fingerprint of the current evidence chain. This hash value can represent the entire content of the current evidence chain; even a slight change in any field will result in a completely different hash value.
[0023] S3. Persistently store the evidence chain data containing the current hash value and the hash value of the previous evidence chain to form a chain-like anti-tampering structure; Specifically, the full set of evidence information collected in step S1, the current hash value calculated in step S2, and the hash value of the previous evidence chain are stored together in the evidence chain table of the relational database. Each record simultaneously stores the previous hash value (i.e., the hash value of the previous evidence chain) and the current hash value, thus forming a chain structure: each evidence chain points to the previous evidence chain through the previous hash value. This structure ensures that any modification to an intermediate evidence chain will cause subsequent hash chain verification to fail, achieving tamper-proof protection. To improve the efficiency of audit queries, multi-dimensional indexes can be established for the stored evidence chain data, including a full-link tracing identifier index, a task identifier index, a time-partitioned index (such as monthly partitioning), and a decision type index.
[0024] S4. Perform integrity verification based on the chain-like anti-tampering structure, and complete the full-link traceability and audit of financial and tax decisions based on the verification results.
[0025] Specifically, the system reads all evidence chains corresponding to the same end-to-end tracking identifier in chronological order, and verifies one by one whether the hash value of the previous evidence chain stored in the current evidence chain matches the current hash value of the preceding evidence chain. In practice, the system retrieves evidence chain records from the database in ascending chronological order, initializes an expected previous hash value as a fixed initial value, and then iterates through each record: checking if the previous hash value field in the record is equal to the expected value; if they are equal, it calculates the hash value of the current record and compares it with the stored current hash value; if they are equal in both cases, it updates the expected value to the current hash value of the current record and continues to the next record. If any step fails to match, the evidence chain is determined to have been tampered with.
[0026] If the integrity verification passes, the system generates an audit report with a single click based on the task identifier or end-to-end tracing identifier. The audit report includes basic decision-making information (such as company name, accounting period, and execution time), a complete chain of evidence (in chronological order), a summary of policy basis, and the integrity verification result. Furthermore, this method also includes linking the chain of evidence to Robotic Process Automation (RPA) execution records: when RPA is invoked to complete the actual operation after a decision is executed, the RPA execution record ID is associated with the corresponding chain of evidence. During auditing, the operation process can be replayed through the RPA execution records (such as screenshots and operation logs), forming a complete closed loop of evidence from decision-making to execution to result. When the integrity verification fails, the system automatically triggers an alarm, indicating potential data tampering or system anomalies, helping companies identify problems before tax audits.
[0027] The technical solution of the present invention will be further explained below using the invoice verification decision as an example.
[0028] In a company's financial and tax system, a user uploaded a VAT invoice image and initiated an "Invoice Verification" task. The system scheduling center invoked the decision service to execute the invoice verification DMN decision, triggering the evidence chain construction process (corresponding to step S1). The system collected all evidence information for this decision, such as: the decision identifier is "decision_verify_invoice", the end-to-end tracing identifier is the system-generated unique string "trace_001", the task identifier is "task_001", the timestamp is "2026-04-16 10:30:00", the decision input data is a JSON string containing fields such as invoice code, invoice number, total amount including tax, and tax rate, the decision output data is "Verification passed, invoice valid" and the verification result code, the rule hit identifier list is "rule_001" and "rule_002", the policy basis is "Article 11 of the Provisional Regulations on Value-Added Tax", the executing entity identifier is "system", the input ontology instance identifier list is the IRI of the invoice ontology instance, and the output ontology instance identifier list is the IRI of the verification result ontology instance.
[0029] Next, step S2 is executed, which involves querying the database based on the end-to-end tracing identifier "trace_001". Finding no previous evidence chain, the previous hash value is set to a preset fixed value of "0". Preset fields are extracted: end-to-end tracing identifier, decision identifier, decision input data, decision output data, previous hash value "0", and timestamp. These are concatenated into a string in sequence, and the current hash value is calculated using the SHA256 algorithm, for example, "a1b2c3d4e5f6...".
[0030] Then, step S3 is executed, storing all the aforementioned evidence information, the previous hash value "0", and the current hash value into the evidence chain list in the database, forming a chained storage. Simultaneously, a multi-dimensional index is established to support efficient querying.
[0031] When an audit is required, step S4 is executed, which involves reading all evidence chains under the same end-to-end tracking identifier in chronological order and verifying the hash link relationships one by one. If all match, an audit report is generated based on the task identifier. The report includes basic information about the invoice verification decision, a complete list of evidence chains, policy basis, and integrity verification results. If the decision subsequently invokes the RPA executor to interact with the tax bureau system, the RPA execution record ID is associated with this evidence chain. During the audit, the RPA operation process can be replayed to form a complete evidence loop. If a mismatch is found during verification, the system immediately issues an alarm, indicating that data tampering may have occurred.
[0032] As can be seen from the above specific embodiments, the method of the present invention fully realizes the construction, anti-tampering and traceability of the evidence chain for financial and tax decisions, and can effectively solve the problems of easy log tampering, black box decision-making and inefficient auditing in the prior art.
[0033] The role and effect of the embodiments This invention presents a method for constructing, preventing tampering with, and tracing a chain of evidence for fiscal and tax decisions. By collecting all evidence information, it comprehensively records decision inputs, outputs, hit rules, and policy basis, eliminating the black box nature of the decision-making process and allowing auditors to fully reconstruct the decision basis. Employing a SHA256 hash chain mechanism, the current hash value is linked to the previous hash value for storage. Any tampering will cause the chain to break, which can be immediately detected through integrity verification, ensuring the tamper-proof nature and judicial validity of the evidence. One-click audit report generation significantly improves audit efficiency. Compared to blockchain solutions, this method is cost-effective, performs well, and meets the needs of high-frequency decision-making scenarios. Through RPA execution record association, a complete evidence loop from decision to execution is formed, facilitating problem localization and operation replay. Automatic alarms are triggered when integrity verification fails, helping to detect data tampering or anomalies early. This embodiment demonstrates that this invention effectively solves problems such as easily tampered logs, black-box decision-making, inefficient auditing, and the high cost and low performance of blockchain, demonstrating significant technological advancement and practical value.
[0034] The above embodiments are preferred embodiments of the present invention and are not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for constructing, preventing tampering with, and tracing a chain of evidence for fiscal and tax decisions, characterized in that, Includes the following steps: S1. In response to the execution of fiscal and tax decisions, collect all evidence information of the current decision. S2. Obtain the hash value of the previous evidence chain based on the full-link tracking identifier of the current decision, and concatenate the preset fields in the full evidence information with the hash value of the previous evidence chain and calculate the hash value of the current evidence chain using a hash algorithm. S3. Persistently store the evidence chain data containing the current hash value and the hash value of the previous evidence chain to form a chain-like anti-tampering structure; S4. Perform integrity verification based on the chain-like anti-tampering structure, and complete the full-link traceability and audit of financial and tax decisions based on the verification results.
2. The method for constructing, preventing tampering with, and tracing the evidence chain for fiscal and tax decisions according to claim 1, is characterized in that: The full set of evidence information includes decision identifiers, end-to-end tracking identifiers, task identifiers, timestamps, decision input data, decision output data, hit rule information, policy basis information, execution entity identifiers, a list of input ontology instance identifiers, and a list of output ontology instance identifiers.
3. The method for constructing, preventing tampering with, and tracing the evidence chain for fiscal and tax decisions according to claim 2, is characterized in that: The preset fields include end-to-end tracking identifier, decision identifier, decision input data, decision output data, hash value of the previous evidence chain, and timestamp. The preset fields are concatenated into a string in a preset order.
4. The method for constructing, preventing tampering with, and tracing the evidence chain for fiscal and tax decisions according to claim 1, characterized in that: The hash algorithm is SHA256, and the calculated hash value is used to represent the unique data fingerprint of the current evidence chain.
5. The method for constructing, preventing tampering with, and tracing the evidence chain for fiscal and tax decisions according to claim 1, characterized in that: A multi-dimensional index is established for the evidence chain data in persistent storage. The multi-dimensional index includes a full-link tracing identifier index, a task identifier index, a time partition index, and a decision type index.
6. The method for constructing, preventing tampering with, and tracing the evidence chain for fiscal and tax decisions according to claim 1, characterized in that: The integrity verification involves reading all evidence chains corresponding to the same end-to-end tracking identifier in chronological order, and verifying one by one whether the hash value of the previous evidence chain stored in the current evidence chain matches the current hash value of the previous evidence chain. If they do not match, it is determined that the evidence chain has been tampered with.
7. The method for constructing, preventing tampering with, and tracing the evidence chain for fiscal and tax decisions according to claim 6, characterized in that: When the current decision is the first evidence chain under the same end-to-end tracking identifier, the hash value of the previous evidence chain is set to a preset fixed value.
8. The method for constructing, preventing tampering with, and tracing the evidence chain for fiscal and tax decisions according to claim 1, characterized in that: Complete the full-chain traceability and audit of fiscal and tax decisions, specifically by generating an audit report based on task identifiers or full-chain tracking identifiers. The audit report includes basic decision information, a complete list of evidence chains, a summary of policy basis, and the results of integrity verification.
9. The method for constructing, preventing tampering with, and tracing the evidence chain for fiscal and tax decisions according to claim 1, characterized in that, Also includes: By linking and binding the chain of evidence with the execution records of Robotic Process Automation (RPA), the operation playback of the financial and tax decision-making process can be realized through the RPA execution records, forming a complete closed loop of decision evidence.
10. The method for constructing, preventing tampering with, and tracing the evidence chain for fiscal and tax decisions according to claim 1, characterized in that: The financial and tax decision execution triggers include invoice verification decision triggers, tax calculation decision triggers, voucher generation decision triggers, risk assessment decision triggers, or tax return verification decision triggers.