Tamper-proof finance and tax electronic certificate storage method and system based on block chain
By constructing a blockchain-based evidence storage graph and time-series behavior path, the problem of difficulty in tracing the evolution path of voucher status in existing technologies has been solved. This enables full lifecycle monitoring of financial and tax electronic vouchers and identification of abnormal operations, thereby improving the credibility and tamper-proof capability of the stored evidence data.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- 广州莲星科技有限公司
- Filing Date
- 2025-12-26
- Publication Date
- 2026-04-10
AI Technical Summary
Existing electronic financial and tax voucher storage solutions cannot fully record and trace the evolution path and operational context of vouchers before and after storage, and cannot identify abnormal operational behaviors during the storage interval, thus reducing the credibility and audit value of the stored data.
A blockchain-based evidence storage graph is constructed, which records the dynamic changes of credentials through multiple evidence storage nodes and associated edges, generates evidence storage behavior paths with time sequence, and achieves proactive and intelligent monitoring of the evidence storage process and identification of abnormal operations by comparing the deviation between the evidence storage behavior state and the baseline state.
It enables traceable and verifiable storage of electronic financial and tax vouchers throughout their entire lifecycle, enhancing the credibility and tamper-proof capabilities of the stored data, and enabling timely identification and early warning of potential tampering risks.
Smart Images

Figure CN121836720A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of blockchain and electronic certificate storage, in particular to a tamper-proof electronic certificate storage method and system based on blockchain. BACKGROUND
[0002] The existing tamper-proof storage scheme of electronic tax certificates generally relies on blockchain technology. The conventional method is to directly store the final file or its hash value of the electronic certificate on the chain, and use the tamper-proof nature of the blockchain to ensure the fixed state of the certificate at the storage time point. The actual business life cycle of the electronic tax certificate contains dynamic changes in multiple links, and the traditional single node storage method can only record the static results at a certain moment.
[0003] This static storage mode has defects. It cannot completely record and trace the state evolution path and operation context of the certificate before and after storage. When the historical authenticity of the certificate needs to be audited or verified, the existing technology cannot prove how the current certificate version is derived from the initial version, and cannot identify abnormal operation behaviors that occur during the storage interval and leave no traces on the chain. The whole process from generation to archiving of the certificate lacks continuous and verifiable time sequence track, which reduces the credibility and audit value of the storage data.
[0004] The main problem faced by the existing technical solution is how to go beyond the single record of the final state of the certificate and realize continuous and verifiable storage of all key states and their legal change relationship in the whole life cycle of the certificate; how to not only guarantee the static integrity of the data itself during the storage process, but also actively identify abnormal patterns in the storage behavior sequence to prevent and warn potential tampering risks from a dynamic perspective. SUMMARY
[0005] The purpose of the present application is to provide a tamper-proof electronic certificate storage method and system based on blockchain to solve the problems raised in the background.
[0006] To achieve the above purpose, the present application provides a tamper-proof electronic certificate storage method based on blockchain, which comprises: Based on at least one storage dimension data of the target electronic tax certificate, a storage graph containing multiple storage nodes and storage association edges is constructed, wherein each storage node represents a storage snapshot at a storage time, and the storage association edge represents the derivative relationship between any two storage snapshots; Select a target storage node as the starting point in the storage graph, and traverse the storage graph according to the chronological order of the storage time to generate a storage behavior path containing time sequence; For each evidence storage node in the evidence storage behavior path, extract the evidence storage behavior features corresponding to the evidence storage dimension data, and calculate the evidence storage behavior status of the evidence storage behavior path based on all evidence storage behavior features. In response to the deviation between the evidence storage behavior status and the predefined benchmark behavior status reaching or exceeding the status offset threshold, an evidence storage quality assessment is initiated for the target financial and tax electronic voucher. Based on the results of the evidence preservation quality assessment, the corresponding evidence preservation actions are performed on the target electronic financial and tax documents.
[0007] Preferably, the step of constructing an evidence storage graph containing multiple evidence storage nodes and evidence storage association edges based on at least one dimension of evidence storage data of the target electronic financial and tax voucher includes: Obtain all historical document snapshots of the target electronic financial and tax voucher within the historical period, where each historical document snapshot contains the voucher content hash value and voucher control parameter group; Each historical evidence snapshot is mapped to an evidence node, and each evidence node is marked with the corresponding evidence storage time. Calculate the similarity between the hash values of the credential content of any two historical evidence snapshots, and generate evidence association edges connecting the corresponding two evidence nodes based on the similarity. All evidence storage nodes and all evidence storage associated edges are integrated to form the evidence storage graph.
[0008] Preferably, the step of selecting a target evidence storage node in the evidence storage graph as the starting point and traversing the evidence storage graph according to the chronological order of evidence storage times to generate an evidence storage behavior path containing the time sequence includes: Among all the evidence storage nodes in the evidence storage map, the evidence storage node with the earliest storage time is selected as the target evidence storage node. Starting from the target evidence storage node, select the next adjacent evidence storage node with a later evidence storage time based on the evidence storage association edge; Repeat the step of selecting the next adjacent evidence storage node with a later evidence storage time until there are no adjacent evidence storage nodes with a later evidence storage time, thereby generating the evidence storage behavior path formed by sequentially connecting the selected evidence storage nodes.
[0009] Preferably, the step of extracting evidence storage behavior features corresponding to the evidence storage dimension data for each evidence storage node in the evidence storage behavior path, and calculating the evidence storage behavior state of the evidence storage behavior path based on all evidence storage behavior features, includes: For each evidence storage node in the evidence storage behavior path, the credential control parameter group is parsed from its corresponding evidence storage snapshot; Separate the parameter components that are directly related to the evidence storage dimension data from the credential control parameter group, and use them as the evidence storage behavior features; Arrange the evidence storage behavior features of all evidence storage nodes on the evidence storage behavior path in the order of evidence storage time to form an evidence storage behavior feature sequence. Pattern analysis is performed on the feature sequence of the evidence preservation behavior, and the pattern identifier obtained from the analysis is used as the evidence preservation behavior state of the evidence preservation behavior path.
[0010] Preferably, the step of initiating an evidence storage quality assessment for the target electronic financial and tax document in response to the deviation between the evidence storage behavior state and the predefined benchmark behavior state reaching or exceeding a state offset threshold includes: Obtain a baseline behavioral state description pre-configured for the voucher type of the target electronic financial and tax voucher from the blockchain network; The calculated evidence storage behavior status is compared with the baseline behavior status description to obtain a status consistency score; When the state consistency score is lower than the predefined consistency score threshold, it is determined that the deviation has reached or exceeded the state offset threshold, and an evidence quality assessment instruction is generated.
[0011] Preferably, the step of performing corresponding evidence storage actions on the target electronic financial and tax documents based on the results of the evidence storage quality assessment includes: Receive the evidence quality assessment instruction and obtain the evidence storage time corresponding to all evidence storage nodes included in the evidence storage behavior path from the evidence storage graph; Based on the evidence preservation quality assessment instruction, calculate the evidence preservation quality decay coefficient of the evidence preservation behavior path; Based on the evidence preservation quality attenuation coefficient and the evidence preservation time, the type of evidence preservation behavior to be executed is determined.
[0012] Preferably, the step of calculating the evidence preservation quality decay coefficient of the evidence preservation behavior path based on the evidence preservation quality assessment instruction includes: The consistency score of the state is parsed from the evidence preservation quality assessment instruction; Obtain the predefined status consistency scoring baseline for the voucher type of the target electronic financial and tax voucher; Calculate the absolute value of the difference between the state consistency score and the state consistency score baseline; The absolute value of the difference is input into the pre-trained attenuation coefficient calculation model, and the output of the attenuation coefficient calculation model is the evidence quality attenuation coefficient.
[0013] Preferably, the step of determining the type of evidence preservation behavior to be performed based on the evidence preservation quality attenuation coefficient and the evidence preservation time includes: At least two intervals for evidence quality degradation coefficients are preset, and each interval is associated with an evidence storage behavior category; Determine which range of evidence quality degradation coefficient the evidence quality degradation coefficient falls into; The evidence storage behavior category associated with the evidence storage quality attenuation coefficient range that falls into is determined as the evidence storage behavior category to be executed.
[0014] Preferably, the step of performing corresponding evidence storage actions on the target electronic financial and tax documents based on the results of the evidence storage quality assessment further includes: If the type of evidence storage action to be performed is document evidence storage data correction, then the following steps are executed: Based on the evidence preservation quality attenuation coefficient, a correction strength parameter is generated for the evidence preservation behavior path; Based on the correction strength parameter and the evidence storage time, a set of target evidence storage nodes that need to be corrected is selected from the evidence storage behavior path; For each evidence storage node in the set of target evidence storage nodes, adjust the credential control parameter group in its corresponding historical evidence storage snapshot according to the baseline behavior state description. If the type of evidence storage behavior to be executed is an abnormal evidence storage path marker, then the following steps are performed: Extract the path features of the evidence preservation behavior path, wherein the path features include at least the evidence preservation behavior state and the evidence preservation quality attenuation coefficient; The path features are matched with an anomaly path feature database obtained from the blockchain network; When a match is successful, an anomaly marker is added to the evidence storage behavior path in the evidence storage graph, and the feature information of the evidence storage behavior path carrying the anomaly marker is uploaded to the blockchain network for recording.
[0015] Preferably, when the processor executes the computer program, it implements the steps of the blockchain-based tamper-proof electronic financial and tax document storage method as described in any one of the above-described methods.
[0016] Compared with the prior art, the beneficial effects of the present invention are: Based on multiple dimensions of evidence storage data, an evidence storage graph containing nodes and related edges is constructed. Each node represents a snapshot at a specific point in time of evidence storage, while edges represent the derivative relationships between snapshots. This transforms the originally isolated and static evidence storage records into a structured, dynamic relationship network. It comprehensively records all key state changes of electronic financial and tax vouchers throughout their entire lifecycle, forming a traceable and verifiable evolutionary graph. Any query or verification of historical intermediate states can be traced and verified through the related edges in the graph, ensuring that any tampering will inevitably disrupt the graph's coherence and be detected, thus enhancing the auditability and credibility of the evidence storage data.
[0017] This scheme generates behavioral paths based on time sequence within the evidence storage graph, extracts behavioral features of each node along the path to calculate the overall behavioral state, and triggers quality assessment by comparing the deviation with the baseline state. This expands the verification of evidence authenticity from simple data hash comparison to the rationality analysis of the evidence storage operation sequence itself. It achieves proactive and intelligent monitoring of the evidence storage process. The system can automatically identify abnormal operation sequences that violate preset rules or common patterns, thereby providing timely warnings and interventions in the early stages of tampering attempts, enhancing proactive anti-tampering defense capabilities at the process level. Attached Figure Description
[0018] Figure 1 This is a schematic diagram illustrating the working principle of the blockchain-based tamper-proof electronic financial and tax voucher storage method described in this invention. Figure 2 A flowchart of the steps for constructing an evidence storage map; Figure 3 A flowchart for calculating the status of evidence preservation actions; Figure 4 A comparison chart of consistency scores for customs-specific payment vouchers; Figure 5 The time distribution of the entire process of storing electronic financial and tax vouchers. Detailed Implementation
[0019] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0020] Please see Figure 1This invention provides a blockchain-based method for tamper-proof electronic tax and financial voucher storage. The method includes: constructing a storage graph containing multiple storage nodes and storage association edges based on at least one storage dimension data of the target electronic tax and financial voucher. Each storage node represents a storage snapshot at a storage time, and storage association edges represent the derivation relationship between any two storage snapshots. A target storage node is selected as the starting point in the storage graph, and the graph is traversed according to the chronological order of storage times to generate a time-series storage behavior path. For each storage node in the storage behavior path, storage behavior features corresponding to the storage dimension data are extracted, and the storage behavior state of the storage behavior path is calculated based on all storage behavior features. In response to the deviation between the storage behavior state and a predefined baseline behavior state reaching or exceeding a state offset threshold, a storage quality assessment is initiated for the target electronic tax and financial voucher. Based on the result of the storage quality assessment, the corresponding storage behavior is performed on the target electronic tax and financial voucher.
[0021] Example 1: See Figure 2 In its implementation, a blockchain-based method for tamper-proof electronic tax voucher storage involves constructing a storage graph. This graph is built upon at least one storage dimension of the target electronic tax voucher. Taking a value-added tax (VAT) invoice as an example, its storage dimension data includes the voucher content integrity dimension and the operation audit trajectory dimension. In practice, all historical storage snapshots of the target electronic tax voucher within a historical period are obtained. This historical period covers the complete cycle from invoice issuance and circulation to archiving. Each historical storage snapshot contains a voucher content hash value and a voucher control parameter set. The voucher content hash value is generated by calculating the original structured data of the invoice using a cryptographic hash function. The voucher control parameter set includes the timestamp of the historical storage snapshot, the digital signature of the operating entity, and the associated business process status code at that time.
[0022] In specific implementation, each acquired historical evidence snapshot is mapped to an independent evidence node, and each evidence node is marked with a corresponding evidence storage time, which originates from the timestamp field in the voucher control parameter group within the historical evidence snapshot. In some embodiments, the mapping relationship is achieved by establishing key-value pairs, where the key is a unique identifier for the historical evidence snapshot, and the value is a structured object containing all attribute data of the evidence node. It can be understood that the generation of evidence nodes completes a point-like abstraction of discrete historical evidence states. Then, the similarity between the voucher content hash values of any two historical evidence snapshots is calculated. The similarity calculation can be quantified based on the matching degree or difference degree of the hash values. One optional quantification method is to calculate the Hamming distance between the hash values of two voucher contents, expressed by the formula: in: This represents the Hamming distance between the hash values of two voucher contents. and These represent sequences of hash values of the credentials from two historical snapshots to be compared. It is a fixed length of the hash value of the voucher content. and These represent the binary values of the two hash value sequences at the i-th position, respectively. In specific implementations, evidence-related edges connecting the corresponding two evidence-storage nodes are generated based on the calculated similarity. When the Hamming distance d is less than a preset difference threshold, it is determined that the two historical evidence snapshots have a derivative relationship in content, and a directed evidence-related edge is established between the corresponding two evidence-storage nodes. The direction of the edge is usually from the evidence-storage node with an earlier evidence-storage time to the evidence-storage node with a later evidence-storage time. In some embodiments, the evidence-storage edge itself may also carry attributes, such as a relationship strength weight, which is negatively correlated with the similarity calculation result. Finally, all generated evidence-storage nodes and all established evidence-storage edges are integrated. The integration process serializes the relationship structure between nodes and edges and stores it as a graph structure, thereby forming a complete evidence-storage graph representing the evolution history of the target financial and tax electronic voucher.
[0023] Example 2: In specific implementation, traversing the evidence storage graph according to the chronological order of the evidence storage time to generate the evidence storage behavior path is a key step in analyzing the evolution process of the target financial and tax electronic voucher. Here, an electronic expense reimbursement form is used as an example for illustration. In specific implementation, among all evidence storage nodes in the constructed evidence storage graph, the evidence storage node with the earliest evidence storage time is selected as the target evidence storage node. The selection is based on traversing the evidence storage time field marked by all evidence storage nodes and determining the minimum value by comparing the timestamp values, for example, the evidence storage node with the evidence storage time of "2023-01-01 10:00:00". In some embodiments, the comparison process can be implemented by a minimization search algorithm, which traverses the "timestamp" attribute of each evidence storage node. In specific implementation, the specific implementation of the minimization search algorithm involves initializing a temporary variable to record the currently found minimum evidence storage time and its corresponding evidence storage node identifier. The initial value of this variable can be set to a maximum value or the evidence storage time of the first evidence storage node. The algorithm then traverses each evidence node in the evidence graph, sequentially accessing the "timestamp" attribute of each node and comparing its value with the current minimum evidence storage time recorded in a temporary variable. If the evidence storage time of the current node is earlier than the value recorded in the temporary variable, the temporary variable is updated to reflect the evidence storage time and node identifier of the current node. After traversal, the evidence node recorded in the temporary variable is the earliest evidence storage node and is selected as the target evidence storage node. Starting from the target evidence storage node, the algorithm selects the next adjacent evidence storage node with a later evidence storage time based on the established evidence storage association edges. The judgment logic involves checking all nodes pointed to by evidence storage association edges originating from the current node and filtering out nodes with evidence storage times later than the current node. It can be understood that if multiple adjacent evidence storage nodes meet the conditions, a selection must be made according to preset rules. One possible rule is to select the adjacent evidence storage node with the earliest evidence storage time; another possible rule is to select based on the association strength weight carried on the evidence storage association edges.
[0024] Repeat the step of selecting the next adjacent node with a later notarization time. Each selection updates the current node with the newly selected adjacent node, and uses this new node as the starting point to search for another adjacent node with a later notarization time. In practice, this iterative process continues until there are no adjacent nodes with later notarization times starting from the current notarization node, at which point the path has reached its temporal endpoint in the notarization graph. In some embodiments, the path termination condition can be determined by calculating the notarization time of the target node outgoing from the current node. The entire traversal and selection process can be formally viewed as searching for a temporally increasing path in a directed graph, and the constraints of each selection step can be expressed as: in: Indicates the currently accessed evidence storage node. The time of evidence preservation Indicates the next candidate adjacent proof node to be selected. The time of evidence preservation, symbol This indicates a temporal order of "later than". This constraint ensures a strict increasing order of path nodes in the time dimension. Ultimately, the initial target evidence storage node and a series of sequentially selected adjacent evidence storage nodes are connected by evidence storage association edges, generating an evidence storage path that includes a clear temporal order from the earliest evidence storage time to a later evidence storage time.
[0025] Example 3: See Figure 3 In practical implementation, extracting evidence preservation behavior features for each evidence preservation node in the evidence preservation behavior path and calculating the evidence preservation behavior status of the entire path is the core step in assessing the quality of evidence preservation. Taking the evidence preservation behavior path of an electronic bank statement as an example, one of its evidence preservation dimensions is defined as "change of operation authority." In practice, for each evidence preservation node in the generated evidence preservation behavior path, a complete set of voucher control parameters is parsed from its corresponding historical evidence preservation snapshot. This voucher control parameter set is a structured data collection containing the evidence preservation time, operation subject identifier, digital signature, and a series of control parameters related to business logic. The parameter components directly associated with the "change of operation authority" evidence preservation dimension are separated from the voucher control parameter set as the evidence preservation behavior features of that node in the current dimension. For example, the parameter components could be "current list of operable roles" or "approval authority level code." In some embodiments, the separation operation is completed by querying a predefined dimension-parameter mapping table, which specifies the specific parameter field names corresponding to the "change of operation authority" dimension.
[0026] In practical implementation, the evidence storage behavior characteristics of all evidence storage nodes along the evidence storage behavior path are strictly arranged according to the chronological order of evidence storage time, forming an ordered sequence of evidence storage behavior characteristics. This sequence represents the evolution of the "operation permission change" dimension throughout the entire evidence storage lifecycle of the target financial and tax electronic voucher. Pattern analysis is performed on the evidence storage behavior characteristic sequence. Pattern analysis aims to identify the changing patterns or fixed patterns of feature values in the sequence. One optional pattern analysis method is based on state machine matching, and another is based on sequence clustering. The process of pattern analysis can be formally represented as obtaining the result of a pattern identification function: in: This represents the state of evidence-keeping behavior obtained from the analysis, used to characterize the regularity of the entire sequence. Representative pattern analysis function, The sequence of features representing the input evidence storage behavior, i.e. ,in Indicates the first step in the evidence preservation path The characteristics of evidence storage behavior of each evidence storage node This represents the total number of nodes along the evidence storage path. This can be understood as a schema analysis function. The specific implementation may include rule matching, statistical feature induction, or machine learning model inference. In some embodiments, if the sequence features exhibit a pattern of "changing from [cashier, accountant] to [accountant, supervisor] and then fixing to [supervisor]", pattern analysis may identify it as a "gradual tightening of permissions" state. In specific implementation, the pattern identifier obtained from pattern analysis is used as the evidence storage behavior state corresponding to the "operation permission change" dimension of the evidence storage behavior path. This evidence storage behavior state is a label or code used to summarize the path behavior.
[0027] Example 4: In practical implementation, initiating a proof-of-existence quality assessment in response to the deviation between the proof-of-existence behavior state and the predefined baseline behavior state reaching or exceeding a state offset threshold is a crucial decision-making step. Here, an electronic customs payment receipt is used as an example, with the document type being "Customs-Specific Payment Receipt." In practical implementation, a pre-configured baseline behavior state description for this document type, "Customs-Specific Payment Receipt," is obtained from the blockchain network. This baseline behavior state description defines the standard or expected behavior pattern sequence for this type of document under a specific proof-of-existence dimension. The baseline behavior state description is stored in the form of structured data in the blockchain's smart contract or a specific data domain. In practical implementation, the calculated proof-of-existence behavior state is compared with the baseline behavior state description obtained from the blockchain network to obtain a state consistency score. The comparison process involves calculating pattern matching degree or sequence similarity. One optional comparison method is to calculate the difference between two state sequences based on edit distance; another optional comparison method is to perform matching degree mapping based on a predefined rule matrix.
[0028] In practice, the state consistency score can be calculated using a scoring function that comprehensively considers both the number and order of matching pattern elements. An example of such a scoring function is as follows: in: This represents the calculated state consistency score. This represents the total number of pattern elements defined in the baseline behavior state description. This represents the i-th pattern element in the calculated evidence storage behavior state. This represents the i-th pattern element in the baseline behavior state description. This represents the preset weight of the i-th pattern element. It is a comparison function, when and Output 1 if they match, otherwise output 0. In a specific comparison scenario, the baseline behavior state description might specify a pattern sequence of ["Generated", "Sent", "Verified"], while the calculated evidence storage behavior state is ["Generated", "Sent", "Returned"]. The calculation is then performed according to the above function. It can be understood that the weights... Differentiation of importance for different stage patterns is allowed. In some embodiments, referring to Table 1, the comparison and scoring mapping between the baseline behavioral state description and the calculated state can be accomplished by querying a preset mapping table.
[0029] Table 1: Behavioral Status Matching and Rating Mapping Table When the state consistency score falls below a predefined consistency score threshold, the deviation between the evidence preservation behavior state and the baseline behavior state description is determined to have reached or exceeded a state offset threshold, and an evidence preservation quality assessment instruction is generated. In specific implementations, the consistency score threshold is a configurable value, for example, set to 70%. If the calculated state consistency score is 60%, the judgment condition is triggered. The evidence preservation quality assessment instruction is a data structure containing information such as the triggering event, the target credential identifier, the calculated state consistency score, and the version of the baseline behavior state description used. The generation of this instruction marks the formal start of the evidence preservation quality assessment process.
[0030] See Figure 4 In the quality assessment of customs-specific payment vouchers, the consistency score directly reflects the degree of matching between the status of the evidence-keeping behavior and the baseline behavior status description. In a specific scenario, the standard sequence defined by the baseline behavior status description is ["Generated", "Sent", "Verified"]. The figure shows the consistency scores corresponding to four types of evidence-keeping behavior statuses: a perfect match to the sequence results in a score of 100%; a sequence where the duration of the "Sent" status exceeds the threshold scores 80%; a sequence of ["Generated", "Sent", "Returned"] scores 60%; and a sequence of ["Generated", "Invalidated"] scores 30%. The red dashed line in the figure marks the predefined consistency score threshold (70%), clearly identifying sequences like "Generated-Sent-Returned" and "Generated-Invalidated" where scores are below the threshold, requiring the triggering of the evidence-keeping quality assessment process. Through quantitative comparison, the compliance differences of different evidence-keeping behavior paths are clearly presented, providing data support for subsequent evidence-keeping decisions.
[0031] Example 5: In specific implementation, based on the results of the evidence preservation quality assessment, the corresponding evidence preservation behavior is executed on the target financial and tax electronic voucher. This involves a complete logical chain from instruction parsing to behavior execution. Here, an electronic purchase and sale contract is used as an example to illustrate its specific implementation process. In specific implementation, the system receives the generated evidence preservation quality assessment instruction and obtains the evidence preservation time corresponding to all evidence preservation nodes included in the evidence preservation behavior path that triggers the instruction from the constructed evidence preservation graph. The evidence preservation time is obtained by reading the timestamp attribute of each evidence preservation node. Based on the received evidence preservation quality assessment instruction, the system needs to calculate the evidence preservation quality attenuation coefficient of the evidence preservation behavior path. The calculation process first parses the recorded state consistency score from the evidence preservation quality assessment instruction, and then obtains the predefined state consistency score baseline for the voucher type "electronic purchase and sale contract". The state consistency score baseline represents the expected score of this type of voucher under ideal conditions. In practice, the absolute value of the difference between the state consistency score and the state consistency score baseline is calculated, and this absolute value of the difference is input into a pre-trained decay coefficient calculation model. The output of the pre-trained decay coefficient calculation model is the required evidence quality decay coefficient. This model can be a simple linear function or a neural network mapping trained based on historical data.
[0032] In practical implementation, the calculation of the evidence preservation quality attenuation coefficient can be expressed through a mathematical transformation, and its formula is as follows: in: This represents the calculated evidence quality degradation coefficient. This represents the function mapping relationship defined by the pre-trained decay coefficient calculation model. This represents the consistency score of the state parsed from the evidence preservation quality assessment instruction. This represents the predefined state consistency scoring baseline for this document type. This represents the absolute value of the difference between the two. It can be understood that the function... The absolute value of the difference and the evidence quality attenuation coefficient were ensured. The system establishes a positive correlation between the calculated evidence quality attenuation coefficient and the previously acquired evidence storage time. Based on this, the system determines the category of evidence storage behavior to be executed, using a preset interval matching rule. In some embodiments, at least two evidence quality attenuation coefficient intervals are preset, each interval associated with an evidence storage behavior category. For example, the interval [0.0, 0.3) is associated with "Logging Only," the interval [0.3, 0.7) with "Abnormal Evidence Storage Path Marking," and the interval [0.7, 1.0] with "Document Evidence Storage Data Correction." The system determines which preset evidence quality attenuation coefficient interval the calculated evidence quality attenuation coefficient falls into, and the evidence storage behavior category associated with that interval is ultimately determined as the category of evidence storage behavior to be executed.
[0033] In specific implementation, if the determined category of the evidence storage behavior to be executed is credential evidence storage data correction, the following steps are performed: Based on the calculated evidence storage quality decay coefficient, a correction strength parameter is generated for the current evidence storage behavior path. The correction strength parameter is positively correlated with the evidence storage quality decay coefficient. According to the correction strength parameter and the evidence storage time of each node on the evidence storage behavior path, a set of target evidence storage nodes that need to be corrected is selected from the evidence storage behavior path. One optional selection logic is to select all nodes whose evidence storage time is later than a time threshold calculated by the correction strength parameter. For each evidence storage node in the selected set of target evidence storage nodes, the credential control parameter group in its corresponding historical evidence storage snapshot is adjusted according to the baseline behavior state description obtained from the blockchain network, for example, correcting the abnormal state value to the baseline state value. In some embodiments, if the determined category of the evidence storage behavior to be executed is abnormal evidence storage path marking, the following steps are performed: Extract the path features of the current evidence storage behavior path. The path features include at least the calculated evidence storage behavior state and evidence storage quality decay coefficient, and may also include path length and time span. The extracted path features are matched against an anomaly path feature library obtained from the blockchain network. This matching is to identify known anomaly patterns. When a match is successful, an anomaly marker is added to this evidence storage behavior path in the evidence storage graph, and the feature information of the evidence storage behavior path carrying the anomaly marker is uploaded to the blockchain network for permanent recording, for global auditing and early warning.
[0034] See Figure 5In the analysis of the entire process of electronic tax and financial voucher storage, the time consumption of each stage shows a differentiated distribution. Specifically, the execution processing stage takes the longest time, reaching 4 hours, and is the core time-consuming module of the entire process; followed by quality assessment (3 hours) and effect verification (2.5 hours); behavioral decision-making and behavioral path generation both take 2 hours, which is at a medium level; state calculation (1.5 hours) and storage graph construction (1 hour) take relatively short time and are lightweight pre-processing / intermediate stages in the process. The time distribution of each stage corresponds to the business logic of the storage process: storage graph construction, as a basic data layer operation, needs to quickly complete the mapping of nodes and related edges; while execution processing involves the actual operation of voucher data and core actions such as blockchain on-chaining, thus consuming the most resources and time; quality assessment and effect verification are responsible for verifying the compliance and validity of the process, and need to be matched with corresponding time consumption to ensure the reliability of storage.
[0035] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus.
[0036] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
Claims
1. A blockchain-based method for tamper-proof electronic financial and tax voucher storage, characterized in that, The method includes: Based on at least one dimension of evidence storage data of the target electronic financial and tax voucher, an evidence storage graph containing multiple evidence storage nodes and evidence storage association edges is constructed, wherein each evidence storage node represents an evidence storage snapshot at a time of evidence storage, and evidence storage association edges represent the derivative relationship between any two evidence storage snapshots. In the evidence storage graph, a target evidence storage node is selected as the starting point, and the evidence storage graph is traversed according to the order of evidence storage time to generate an evidence storage behavior path containing the time sequence. For each evidence storage node in the evidence storage behavior path, extract the evidence storage behavior features corresponding to the evidence storage dimension data, and calculate the evidence storage behavior status of the evidence storage behavior path based on all evidence storage behavior features. In response to the deviation between the evidence storage behavior status and the predefined benchmark behavior status reaching or exceeding the status offset threshold, an evidence storage quality assessment is initiated for the target financial and tax electronic voucher. Based on the results of the evidence preservation quality assessment, the corresponding evidence preservation actions are performed on the target electronic financial and tax documents.
2. The blockchain-based method for tamper-proof electronic financial and tax voucher storage as described in claim 1, characterized in that, The step of constructing an evidence storage graph containing multiple evidence storage nodes and evidence storage association edges based on at least one dimension of evidence storage data of the target electronic financial and tax vouchers includes: Obtain all historical document snapshots of the target electronic financial and tax voucher within the historical period, where each historical document snapshot contains the voucher content hash value and voucher control parameter group; Each historical evidence snapshot is mapped to an evidence node, and each evidence node is marked with the corresponding evidence storage time. Calculate the similarity between the hash values of the credential content of any two historical evidence snapshots, and generate evidence association edges connecting the corresponding two evidence nodes based on the similarity. All evidence storage nodes and all evidence storage associated edges are integrated to form the evidence storage graph.
3. The blockchain-based method for tamper-proof electronic financial and tax voucher storage as described in claim 1, characterized in that, The step of selecting a target evidence storage node in the evidence storage graph as the starting point and traversing the evidence storage graph according to the chronological order of evidence storage times to generate an evidence storage behavior path containing the time sequence includes: Among all the evidence storage nodes in the evidence storage map, the evidence storage node with the earliest storage time is selected as the target evidence storage node. Starting from the target evidence storage node, select the next adjacent evidence storage node with a later evidence storage time based on the evidence storage association edge; Repeat the step of selecting the next adjacent evidence storage node with a later evidence storage time until there are no adjacent evidence storage nodes with a later evidence storage time, thereby generating the evidence storage behavior path formed by sequentially connecting the selected evidence storage nodes.
4. The blockchain-based method for tamper-proof electronic financial and tax voucher storage as described in claim 1, characterized in that, The steps of extracting evidence storage behavior features corresponding to the evidence storage dimension data for each evidence storage node in the evidence storage behavior path, and calculating the evidence storage behavior state of the evidence storage behavior path based on all evidence storage behavior features, include: For each evidence storage node in the evidence storage behavior path, the credential control parameter group is parsed from its corresponding evidence storage snapshot; Separate the parameter components that are directly related to the evidence storage dimension data from the credential control parameter group, and use them as the evidence storage behavior features; Arrange the evidence storage behavior features of all evidence storage nodes on the evidence storage behavior path in the order of evidence storage time to form an evidence storage behavior feature sequence. Pattern analysis is performed on the feature sequence of the evidence preservation behavior, and the pattern identifier obtained from the analysis is used as the evidence preservation behavior state of the evidence preservation behavior path.
5. The blockchain-based method for tamper-proof electronic financial and tax voucher storage as described in claim 1, characterized in that, The steps for initiating an evidence storage quality assessment for the target electronic financial and tax voucher in response to a deviation between the evidence storage behavior state and a predefined baseline behavior state reaching or exceeding a state offset threshold include: Obtain a baseline behavioral state description pre-configured for the voucher type of the target electronic financial and tax voucher from the blockchain network; The calculated evidence storage behavior status is compared with the baseline behavior status description to obtain a status consistency score; When the state consistency score is lower than the predefined consistency score threshold, it is determined that the deviation has reached or exceeded the state offset threshold, and an evidence quality assessment instruction is generated.
6. The blockchain-based method for tamper-proof electronic financial and tax voucher storage as described in claim 5, characterized in that, Based on the results of the evidence preservation quality assessment, the steps for performing corresponding evidence preservation actions on the target electronic financial and tax documents include: Receive the evidence quality assessment instruction and obtain the evidence storage time corresponding to all evidence storage nodes included in the evidence storage behavior path from the evidence storage graph; Based on the evidence preservation quality assessment instruction, calculate the evidence preservation quality decay coefficient of the evidence preservation behavior path; Based on the evidence preservation quality attenuation coefficient and the evidence preservation time, the type of evidence preservation behavior to be executed is determined.
7. The blockchain-based method for tamper-proof electronic financial and tax voucher storage as described in claim 6, characterized in that, The step of calculating the evidence preservation quality attenuation coefficient based on the evidence preservation quality assessment instruction for the evidence preservation behavior path includes: The consistency score of the state is parsed from the evidence preservation quality assessment instruction; Obtain the predefined status consistency scoring baseline for the voucher type of the target electronic financial and tax voucher; Calculate the absolute value of the difference between the state consistency score and the state consistency score baseline; The absolute value of the difference is input into the pre-trained attenuation coefficient calculation model, and the output of the attenuation coefficient calculation model is the evidence quality attenuation coefficient.
8. The blockchain-based method for tamper-proof electronic financial and tax voucher storage as described in claim 6, characterized in that, The step of determining the type of evidence preservation action to be performed based on the evidence preservation quality attenuation coefficient and the evidence preservation time includes: At least two intervals for evidence quality degradation coefficients are preset, and each interval is associated with an evidence storage behavior category; Determine which range of evidence quality degradation coefficient the evidence quality degradation coefficient falls into; The evidence storage behavior category associated with the evidence storage quality attenuation coefficient range that falls into is determined as the evidence storage behavior category to be executed.
9. The blockchain-based method for tamper-proof electronic financial and tax voucher storage as described in claim 8, characterized in that, Based on the results of the evidence preservation quality assessment, the corresponding evidence preservation actions for the target electronic financial and tax documents also include: If the type of evidence storage action to be performed is document evidence storage data correction, then the following steps are executed: Based on the evidence preservation quality attenuation coefficient, a correction strength parameter is generated for the evidence preservation behavior path; Based on the correction strength parameter and the evidence storage time, a set of target evidence storage nodes that need to be corrected is selected from the evidence storage behavior path; For each evidence storage node in the set of target evidence storage nodes, adjust the credential control parameter group in its corresponding historical evidence storage snapshot according to the baseline behavior state description. If the type of evidence storage behavior to be executed is an abnormal evidence storage path marker, then the following steps are performed: Extract the path features of the evidence preservation behavior path, wherein the path features include at least the evidence preservation behavior state and the evidence preservation quality attenuation coefficient; The path features are matched with an anomaly path feature database obtained from the blockchain network; When a match is successful, an anomaly marker is added to the evidence storage behavior path in the evidence storage graph, and the feature information of the evidence storage behavior path carrying the anomaly marker is uploaded to the blockchain network for recording.
10. A blockchain-based tamper-proof electronic financial and tax voucher storage system, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the blockchain-based tamper-proof electronic financial and tax document storage method as described in any one of claims 1 to 9.