An automatic auditing method for data integrity based on zero-knowledge proof

CN122615912BActive Publication Date: 2026-10-23BEIJING ZHIZHENYUN INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202610982503.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-07-02
Publication Date
2026-10-23
Estimated Expiration
2046-07-02

AI Technical Summary

Technical Problem

[0004]本申请提供一种基于零知识证明的审计数据完整性自动验证方法,以解决零知识证明审计数据时,仅能对动态更新的审计数据进行全局更新,导致验证过程耗时久、计算冗余的问题,所采用的技术方案具体如下:

Benefits of technology

本申请首先生成初始Merkle树,根据预设分析周期内所有不同种类的审计数据数量的差异,分析与审计数据种类相同的所有审计数据的数量相对占比,获取审计数据的类型波动因子,根据同一种类的审计数据的变动导致初始Merkle树层级结构改变的概率与特性、同一种类的审计数据的更新对零知识证明电路重构的开销影响,计算审计数据的差异幅度因子,并确定审计数据的数据变动系数;根据不同审计数据的变动对初始Merkle树的影响和计算开销的影响,将审计数据分别划分为低频、中频和高频变动审计数据,对低频、中频和高频变动审计数据采取差异化的承诺结构、证明构造方式及更新策略,实现“高变动数据局部化、低变动数据稳定化”的目的,从而降低ZKP的整体计算开销,具体的,针对低频变动审计数据和中频变动审计数据组建静态Merkle树,并依托零知识证明机制,完成低频变动审计数据和中频变动审计数据的完整性验证,而针对高频变动审计数据构建链式承诺结构,在核验过程中,用加法同态加密的可加性,使得证明方无需解密原始数据,也无需重新计算整个树结构,在高频变动审计数据变化时仅需对受影响部分进行证明“增量”更新,在保证零知识特性和安全性的前提下降低了零知识证明的计算开销;最后,生成预设分析周期内所有审计数据的聚合承诺指纹,实现异构结构下全量审计数据的完整性闭环、隐私安全验证,解决零知识证明审计数据时,仅能对动态更新的审计数据进行全局更新,导致验证过程耗时久、计算冗余的问题。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122615912B_ABST
    Figure CN122615912B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of data security, and provides an audit data integrity automatic verification method based on zero-knowledge proof, which comprises the following steps: collecting multi-source audit data, and establishing a characteristic vector of the audit data; generating an initial Merkle tree, and calculating a type fluctuation factor, a difference amplitude factor and a data variation coefficient of the audit data; screening low-frequency, medium-frequency and high-frequency variable audit data; performing optimal grouping and merging on the low-frequency and medium-frequency variable audit data, constructing a static Merkle tree, and completing integrity verification by relying on a zero-knowledge proof mechanism; constructing a chain commitment structure for the high-frequency variable audit data, and completing commitment legality verification by relying on real-time updating and uploading of cloud encryption data; and generating an aggregated commitment fingerprint of all audit data in a preset analysis period, so as to realize integrity and security verification of the audit data. The application aims to solve the problem that only dynamic updating audit data can be globally updated, thereby leading to redundant calculation in the verification process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data security technology, specifically to an automatic verification method for audit data integrity based on zero-knowledge proof. Background Technology

[0002] Auditing is a core means of verifying the authenticity and validity of data. Zero-knowledge proofs can transform audit verification logic into mathematical proof circuits without disclosing the original audit data, thereby completing the credible verification of the authenticity and integrity of data. This effectively solves the data privacy leakage problem of traditional auditing and improves the security of auditing work.

[0003] Existing zero-knowledge proof schemes mostly build proof circuits based on static data, only suitable for verification scenarios with fixed and unchanging audit data. When audit data undergoes dynamic updates such as partial additions, modifications, or deletions, existing technologies cannot update the local proof information accordingly. They must re-perform complex mathematical operations and generate entirely new proofs based on the entire audit data, resulting in significant redundant computational overhead. When dealing with massive amounts of frequently updated audit data, regenerating proofs from scratch significantly increases the proof generation time, failing to meet the real-time verification needs of audit operations. The extremely high data update and verification costs severely restrict the practicality and scalability of zero-knowledge proof audit schemes, making them unsuitable for dynamic and frequently changing real-world audit scenarios. Summary of the Invention

[0004] This application provides an automatic verification method for audit data integrity based on zero-knowledge proofs, to solve the problem that when auditing data with zero-knowledge proofs, global updates can only be performed on dynamically updated audit data, resulting in a time-consuming verification process and computational redundancy. The specific technical solution adopted is as follows: One embodiment of this application provides an automatic verification method for audit data integrity based on zero-knowledge proofs, the method comprising the following steps: Collect multi-source audit data and convert it into a standardized numerical form that can be used for zero-knowledge proof computation, and establish a feature vector of the audit data; Based on all audit data within the preset analysis period, an initial Merkle tree is generated. Based on the difference in the number of different types of audit data within the preset analysis period, the type fluctuation factor of each audit data is calculated. Based on the difference in the feature vectors of adjacent audit data, the number of times the node depth of the initial Merkle tree changes due to the change operation of the same type of audit data within the preset analysis period, and the path length from the corresponding leaf node to the root node in the initial Merkle tree, the difference amplitude factor of each audit data is calculated. Combined with the type fluctuation factor, the data variation coefficient of the audit data is determined. Based on the data variation coefficients of all audit data within a preset analysis period, low-frequency, medium-frequency, and high-frequency change audit data are filtered out. The low-frequency and medium-frequency change audit data are optimally grouped and merged, and a static Merkle tree is constructed. Relying on a zero-knowledge proof mechanism, the integrity of the audit data is verified through the consistency of the Merkle path check and the root hash. Based on the hash values ​​of the corresponding nodes of the high-frequency change audit data in the initial Merkle tree, a chain-like commitment structure is constructed. When data is updated, the node's encrypted fingerprint and chain structure are simultaneously updated and uploaded to the cloud. At the same time, the encrypted change amount is uploaded to the cloud when data is updated, and the legality of the commitment is verified based on the cloud-encrypted data. An aggregated commitment fingerprint of all audit data within the preset analysis period is generated, achieving integrity and security verification of the audit data.

[0005] Furthermore, the method for calculating the type volatility factor of the audit data is as follows: For any audit data within the preset analysis period, the number of audit data of the same type as the audit data within the preset analysis period is recorded as the first quantity; The number of preset analysis periods that contain audit data of the same type as the audit data before the preset analysis period is denoted as the second number; The average number of all audit data of the same type within the pre-defined analysis period, which is different from the audit data type, is recorded as the third quantity. The square of the first quantity is used as the numerator, and the sum of the product of the second and third quantities and the preset division by zero parameter is used as the denominator. The value of the fraction is recorded as the type fluctuation factor of any audit data.

[0006] Furthermore, the method for calculating the difference magnitude factor of the audit data is as follows: For any audit data within the preset analysis period, the ratio of the Euclidean distance between the audit data and the feature vector of the previous adjacent audit data to the number of dimensions of the feature vector is denoted as the first ratio. Record any type of audit data within the preset analysis period as feature type audit data, and calculate the tree depth variation coefficient of feature type audit data based on the number of times the initial Merkle tree node depth changes due to the feature type audit data change operation. Calculate the average path cost coefficient of the feature type audit data based on the path length from the corresponding leaf node to the root node in the initial Merkle tree. The sum of the first ratio of any audit data within the preset analysis period, the tree depth variation coefficient of the corresponding type of audit data, and the average path cost coefficient is denoted as the difference magnitude factor of any audit data.

[0007] Furthermore, the tree depth variation coefficient of the feature type audit data is: the ratio of the number of changes that cause a change in the initial Merkle tree node depth to the total number of changes that cause a change in the initial Merkle tree node depth among all the change operations of the feature type audit data.

[0008] Furthermore, the average path cost coefficient of the feature type audit data is: the normalized value of the average path length from the leaf node to the initial Merkle tree root node corresponding to all change operations of the feature type audit data.

[0009] Furthermore, the data variation coefficient of the audit data is the product of the type fluctuation factor and the difference magnitude factor of the audit data.

[0010] Furthermore, the method for filtering the low-frequency, medium-frequency, and high-frequency change audit data is as follows: Cluster the data variation coefficients of all audit data within the preset analysis period to obtain three clusters. These clusters are named high-variance cluster, medium-variance cluster, and low-variance cluster in descending order of the mean of all data variation coefficients contained within each cluster. The maximum value of the data variation coefficient in the low-variance cluster is used as the stability threshold, and the minimum value of the data variation coefficient in the high-variance cluster is used as the high-frequency threshold. The average value of the coefficient of variation of the same type of audit data is recorded as the average coefficient of variation. When the average coefficient of variation is less than the stability threshold, all audit data corresponding to the average coefficient of variation are marked as low-frequency change audit data; when the average coefficient of variation is greater than the high-frequency threshold, all audit data corresponding to the average coefficient of variation are marked as high-frequency change audit data; otherwise, all audit data corresponding to the average coefficient of variation are marked as medium-frequency change audit data.

[0011] Furthermore, the specific method for constructing the static Merkle tree is as follows: Find the optimal data combination of all low-frequency and medium-frequency change audit data determined by the preset analysis period, treat each optimal data combination as an independent data block, and construct a static Merkle tree with each data block as a leaf node.

[0012] Furthermore, the specific construction method of the chain commitment structure is as follows: The hash value of the node corresponding to the high-frequency change audit data in the initial Merkle tree is used as the initial commitment value of the leaf node corresponding to the high-frequency change audit data in the chain structure; all high-frequency change audit data are traversed to construct the chain commitment structure.

[0013] Furthermore, the specific method for generating the aggregated commitment fingerprint is as follows: The static Merkle tree root hash value corresponding to the low-frequency and medium-frequency change audit data and the final node commitment value of the chain commitment structure of the high-frequency change audit data are concatenated and generated into an aggregate commitment fingerprint through hash operation.

[0014] The beneficial effects of this application are: This application first generates an initial Merkle tree. Based on the differences in the quantity of all different types of audit data within a preset analysis period, it analyzes the relative proportion of all audit data of the same type, obtaining the type fluctuation factor of the audit data. Based on the probability and characteristics of changes in the hierarchical structure of the initial Merkle tree caused by changes in the same type of audit data, and the impact of updates to the same type of audit data on the overhead of zero-knowledge proof circuit reconstruction, it calculates the difference magnitude factor of the audit data and determines the data variation coefficient of the audit data. Based on the impact of changes in different types of audit data on the initial Merkle tree and the impact on computational overhead, the audit data is divided into low-frequency, medium-frequency, and high-frequency variable audit data. Differentiated commitment structures, proof construction methods, and update strategies are adopted for low-frequency, medium-frequency, and high-frequency variable audit data to achieve the goal of "localization of high-variable data and stabilization of low-variable data," thereby reducing the overall complexity of ZKP. Specifically, to reduce computational overhead, a static Merkle tree is constructed for low-frequency and medium-frequency change audit data, and the integrity verification of these data is completed using a zero-knowledge proof mechanism. For high-frequency change audit data, a chain commitment structure is constructed. During the verification process, the additivity of additive homomorphic encryption is used, so that the prover does not need to decrypt the original data or recalculate the entire tree structure. When the high-frequency change audit data changes, only the affected part needs to be updated with a "proof increment". This reduces the computational overhead of zero-knowledge proof while ensuring zero-knowledge characteristics and security. Finally, an aggregate commitment fingerprint of all audit data within a preset analysis period is generated to achieve a closed-loop integrity and privacy security verification of all audit data under a heterogeneous structure. This solves the problem that zero-knowledge proof audit data can only be updated globally for dynamically updated audit data, resulting in a long verification process and computational redundancy. Attached Figure Description

[0015] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0016] Figure 1 This is a schematic diagram of an automatic verification method for audit data integrity based on zero-knowledge proof, provided as an embodiment of this application. Detailed Implementation

[0017] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0018] Please see Figure 1 The diagram illustrates a flowchart of an automatic verification method for audit data integrity based on zero-knowledge proofs, provided in one embodiment of this application. The method includes the following steps: Step S001: Collect multi-source audit data and convert it into a standardized numerical form that can be used for zero-knowledge proof computation, and establish the feature vector of the audit data.

[0019] Collect multi-source audit data, specifically including: using a log collection agent to capture operating system logs, application service logs, and database logs in real time; obtaining transaction records, user behavior records, and permission operation records by calling business system interfaces; continuously accessing system data through streaming data pipelines; and obtaining security event logs and alarm information through security audit devices.

[0020] The aforementioned multi-source audit data includes data in different formats. Each type of audit data undergoes refined preprocessing and is unified into a standardized numerical form that can be used for zero-knowledge proof computation.

[0021] Specifically: Numerical audit data is processed using a min-max normalization method, where the minimum and maximum values ​​are the minimum and maximum values ​​of the dataset containing the corresponding type of numerical audit data, respectively. One-hot encoding is used to map the categories of categorical audit data to binary vectors. Textual audit data is segmented according to predefined rules, and hash values ​​of fixed length are obtained using a hash function, which is then mapped byte-by-byte to an integer vector. Time-based audit data undergoes timestamp standardization, converting different time formats to Unix timestamps in seconds or milliseconds, and is divided into fixed-length time windows. Time is mapped to the corresponding time window number through rounding, achieving time alignment and segmentation. In this embodiment, the time window length is 5 minutes. For identifier-based audit data such as user IDs and device IDs, a hash mapping method is used to convert them to integer encoding. For structured or semi-structured audit data such as JSON or XML, key fields are extracted using field parsing methods and expanded into a fixed-structure vector according to a predefined field order. This completes the categorization processing of the audit data. Then, each audit data point is arranged sequentially into a feature vector of a preset dimension. The values ​​in the feature vector are mapped to a finite field through modular arithmetic to obtain standardized numerical data suitable for zero-knowledge proof computation.

[0022] It should be noted that finite field modular arithmetic requires integer input, while normalized numerical audit data are all floating-point data. Therefore, a magnification factor is set to... The floor value of the product of the normalized numerical audit data and the amplification factor is taken as the corresponding data of the numerical audit data in the eigenvector, and then mapped to the finite field.

[0023] At this point, audit data that can be used for zero-knowledge proof computation has been obtained.

[0024] Step S002: Generate an initial Merkle tree based on all audit data within the preset analysis period. Calculate the type fluctuation factor for each audit data based on the difference in the number of different types of audit data within the preset analysis period. Calculate the difference magnitude factor for each audit data based on the difference in the feature vectors of adjacent audit data, the number of times the node depth of the initial Merkle tree changes due to changes in the same type of audit data within the preset analysis period, and the path length from the corresponding leaf node to the root node in the initial Merkle tree. Combine the type fluctuation factor to determine the data variation coefficient of the audit data.

[0025] During the auditing process, the integrity and accuracy of audit data are the core foundation for ensuring the credibility of audit results. However, throughout the entire data storage and transmission process, multiple factors, such as insufficient trustworthiness of data storage providers, system security vulnerabilities, and improper control of multi-role data operation permissions, can threaten the integrity of audit data and easily lead to illegal data tampering. Furthermore, with increasingly stringent compliance management of data assets, audit verification scenarios must strictly avoid the risk of public disclosure of raw data.

[0026] Zero-knowledge proofs (ZKPs) can reliably verify data integrity without disclosing the original data, effectively meeting the dual needs of privacy protection and data verification, and providing a reliable technical path for audit data integrity verification and illegal tampering detection. However, existing zero-knowledge proof technologies suffer from significant computational overhead, making them unsuitable for the large volume and frequent updates of audit data. Each time audit data undergoes partial modification, addition, or deletion, a full-scale zero-knowledge proof update is required. Even with the introduction of a Merkle tree structure that supports incremental updates, only the computational cost of updating the data digest can be reduced. For the updated data digest, the circuit construction and proof update of the full zero-knowledge proof must still be completed, resulting in a persistently high overall computational overhead. Therefore, a highly efficient zero-knowledge proof incremental update method is urgently needed to adapt to the high-frequency, dynamic audit data update scenario.

[0027] Traditional zero-knowledge proofs rely heavily on the characteristics of the original data. If the data changes, the corresponding data characteristics will change accordingly, necessitating a full proof update and preventing efficient local updates. To address this, this application reduces the dependence of zero-knowledge proof construction on original data characteristics while enabling local updates, retaining necessary data feature verification capabilities. This achieves a dynamic balance between proof update efficiency and data integrity, security verification accuracy.

[0028] Current mainstream zero-knowledge proof auditing schemes generally process the original audit data in blocks, constructing a Merkle tree with each data block as a leaf node to generate a global data commitment. During the zero-knowledge proof verification phase, to prove that a single data block belongs to the current data set, a complete path constraint from that leaf node to the Merkle root node needs to be constructed in the proof circuit, verifying the correctness of the hash calculation logic layer by layer. Since the path length increases logarithmically with the data size, and each layer of hash operations needs to be converted into circuit constraints, the number of circuit constraints is enormous, resulting in extremely high computational overhead. Furthermore, when the audit data is dynamically updated, even a small change in data at a single leaf node will trigger a cascading update of all hash values ​​on that path, ultimately causing a change in the Merkle root node. The original input foundation of the zero-knowledge proof becomes invalid, requiring the complete proof to be regenerated, which cannot support efficient incremental updates.

[0029] In fact, audit data consists of multiple types of business data. The data types mentioned in this article specifically refer to the business operation types corresponding to the audit data, and the data update patterns of different operation types differ significantly. The generation cost of zero-knowledge proofs is positively correlated with the frequency and volume of data updates. The more frequently the data is updated and the more changes are made, the greater the impact on the cost of proof reconstruction. Therefore, it is necessary to classify the data based on its dynamic update characteristics.

[0030] Specifically, audit data updates exhibit significant localized incremental characteristics. In most scenarios, only a small number of data records are modified, added, or deleted, while the vast majority of historical data remains unchanged. Simultaneously, audit data contains a large amount of highly repetitive transaction data with consistent logical rules. This type of data is driven by fixed business operations, and the change characteristics of similar data are highly consistent. Based on this characteristic, statistical analysis is performed on all audit data within a preset analysis period, and an initial Merkle tree is generated using a Merkle tree construction algorithm. Subsequently, the degree of change in audit data for different operation types can be measured based on the initial Merkle tree structure, and a chained structure is used to process audit data with excessive overhead. The aforementioned transaction data containing a large amount of highly repetitive, logically consistent transaction data includes batch transfer records.

[0031] In this embodiment, the preset analysis period is set to 1 hour.

[0032] For any audit data within a preset analysis period, the number of audit data of the same type as the audit data within the preset analysis period is denoted as the first quantity; the number of preset analysis periods that contain audit data of the same type as the audit data before the preset analysis period is denoted as the second quantity; the average of the number of all audit data of the same type among audit data of different types within the preset analysis period is denoted as the third quantity; the square of the first quantity is used as the numerator; the sum of the product of the second and third quantities and the preset division-by-zero parameter is used as the denominator; and the value of the fraction is denoted as the type fluctuation factor of the audit data.

[0033] When calculating the type volatility factor, only numerical values ​​are substituted; no units are substituted during the calculation. Specifically, when there is only one type of audit data within an analysis period, the corresponding type volatility factor is set to 0.

[0034] The purpose of the preset division by zero parameter is to prevent the denominator from being 0. In this embodiment, the preset division by zero parameter is set to 1.

[0035] For any audit data within a preset analysis period, the ratio of the Euclidean distance between the audit data and the feature vector of the preceding adjacent audit data to the number of dimensions of the feature vector is denoted as the first ratio. Audit data of any type within the preset analysis period is denoted as feature type audit data. The ratio of the number of changes that cause a change in the initial Merkle tree node depth to the total number of changes that cause a change in the initial Merkle tree node depth among all change operations of the feature type audit data is denoted as the tree depth variation coefficient of the feature type audit data. The normalized value of the average path length from the leaf node to the initial Merkle tree root node corresponding to all change operations of the feature type audit data is calculated and denoted as the average path cost coefficient of the feature type audit data. The sum of the first ratio, the tree depth variation coefficient, and the average path cost coefficient of any audit data within the preset analysis period is denoted as the difference magnitude factor of the arbitrary audit data.

[0036] It should be noted that this embodiment uses the maximum-minimum normalization method to calculate the normalized value of the average path length. In the maximum-minimum normalization method, the maximum and minimum values ​​are the maximum and minimum path lengths from the leaf nodes to the initial Merkle tree root node, respectively. The difference between the maximum and minimum values ​​is summed with a preset non-zero small constant as the denominator to calculate the normalized value. In this embodiment, the preset non-zero small constant is set to a value of [value missing]. In practical applications, implementers may use other methods from existing technologies, such as the tanh function or the sigmoid function, to calculate the normalized value; no restrictions are imposed here.

[0037] The tree depth variation coefficient of feature category audit data is used to characterize the impact of changes in feature category audit data on the overall hierarchical structure of the initial Merkle tree. It can quantify the probability and characteristics of changes in feature category audit data leading to changes in the hierarchical structure of the initial Merkle tree.

[0038] The tree depth variation coefficient of feature type audit data is used to characterize the cost of the initial Merkle tree path change caused by the update of feature type audit data, and can quantify the cost impact of feature type audit data update on zero-knowledge proof circuit reconstruction.

[0039] The product of the type fluctuation factor and the difference magnitude factor of the audit data is denoted as the data variation coefficient of the audit data.

[0040] It is important to understand that during the proof generation process of ZKP, the impact of data updates on ZKP is mainly caused by the update frequency and the magnitude of change. Therefore, this application measures the fluctuations from the perspectives of update frequency and magnitude of change to measure the impact of audit data changes on the computational cost of the initial Merkle tree and obtain the data variation coefficient of the audit data.

[0041] At this point, the data variation coefficient of the audit data has been obtained.

[0042] Step S003: Based on the data variation coefficients of all audit data within the preset analysis period, filter low-frequency, medium-frequency, and high-frequency change audit data; perform optimal grouping and merging of low-frequency and medium-frequency change audit data, and construct a static Merkle tree. Relying on the zero-knowledge proof mechanism, complete the integrity verification of audit data through the consistency of Merkle path verification and root hash; construct a chain commitment structure based on the hash value of the corresponding node in the initial Merkle tree of high-frequency change audit data. When data is updated, the node encrypted fingerprint and chain structure are updated synchronously and uploaded to the cloud. At the same time, when data is updated, the encrypted change amount is uploaded to the cloud, and the legality verification of the commitment is completed based on the cloud encrypted data; generate an aggregate commitment fingerprint of all audit data within the preset analysis period to achieve integrity and security verification of audit data.

[0043] The impact of changes in different audit data on the initial Merkle tree and the computational cost vary. Different commitment structures, proof construction methods, and update strategies need to be adopted for different audit data according to the degree of impact, so as to achieve the goal of "localizing highly variable data and stabilizing low-variable data", thereby reducing the overall computational cost of ZKP.

[0044] Clustering of the data variation coefficients of all audit data within a preset analysis period yields three clusters, named high-variance, medium-variance, and low-variance clusters in descending order of the mean of all data variation coefficients contained within each cluster. The maximum value of the data variation coefficient in the low-variance cluster is used as the stability threshold, and the minimum value of the data variation coefficient in the high-variance cluster is used as the high-frequency threshold. The mean of the data variation coefficients of audit data of the same type is denoted as the average variation coefficient. When the average variation coefficient is less than the stability threshold, all audit data corresponding to the average variation coefficient are marked as low-frequency variation audit data; when the average variation coefficient is greater than the high-frequency threshold, all audit data corresponding to the average variation coefficient are marked as high-frequency variation audit data; when the average variation coefficient is greater than or equal to the stability threshold and less than or equal to the high-frequency threshold, all audit data corresponding to the average variation coefficient are marked as medium-frequency variation audit data.

[0045] In this embodiment, the K-means clustering algorithm is used to implement clustering. Clustering is a well-known technique and will not be described in detail here.

[0046] For low-frequency and medium-frequency change audit data, a data merging strategy is adopted to construct standardized data blocks, and a static Merkle tree is constructed based on each data block to form a static Merkle tree structure that adapts to both low-frequency and medium-frequency change audit data.

[0047] Specifically, all low-frequency and medium-frequency change audit data determined by the preset analysis period are used as input. The optimal data combination is solved through the optimization algorithm. Each optimal data combination is treated as an independent data block, and a static Merkle tree is constructed with each data block as a leaf node.

[0048] The basic construction method and optimization algorithm of the Merkle tree are well-known technologies and will not be described in detail here. In this embodiment, the goal of the optimization algorithm is to minimize the total number of data combinations generated in the end, and the constraint is that the sum of the data variation coefficients of all audit data in any combination does not exceed a preset high-frequency threshold.

[0049] For low-frequency and medium-frequency change audit data, a static tree structure is generated using the aforementioned static Merkle tree construction method, and integrity proof is completed based on the existing zero-knowledge proof mechanism. During verification, the hash value of the root node of the static Merkle tree is used as the common input, and the Merkle path verification is completed through the audit data with private input. It is verified that the private input data can be used to recover the hash value of the valid root node through standard Merkle tree operations.

[0050] At this point, a static Merkle tree is constructed for the low-frequency change audit data and the medium-frequency change audit data, and the integrity verification of the low-frequency change audit data and the medium-frequency change audit data is completed based on the zero-knowledge proof mechanism.

[0051] High-frequency change audit data is characterized by frequent updates and strong randomness of changes. If a traditional Merkle tree structure is used, each update of high-frequency change audit data triggers a cascading hash change along the entire tree path, generating numerous circuit constraints and resulting in extremely high computational overhead for zero-knowledge proof reconstruction. Therefore, a chained commitment structure is constructed for high-frequency change audit data to reduce the verification overhead of dynamic updates. Furthermore, when implementing integrity verification of heterogeneous audit data based on zero-knowledge proofs, a differentiated structural verification scheme is adopted for high-frequency change audit data, different from that used for low-frequency and medium-frequency change audit data.

[0052] When constructing the chain commitment structure for high-frequency change audit data for the first time, it is necessary to extract the feature information of each high-frequency change audit data. Specifically, the hash value of the corresponding node in the initial Merkle tree of the high-frequency change audit data is used as the initial commitment value of the corresponding leaf node in the chain structure. All high-frequency change audit data are traversed to complete the construction of the chain commitment structure, and the completed chain commitment structure is stored in the cloud server.

[0053] In the Merkle tree, the hash value of the corresponding node is the cryptographic fingerprint of the node.

[0054] When the high-frequency change audit data corresponding to any leaf node in the chain commitment structure is updated for the first time, the updated value of the high-frequency change audit data is the sum of the original value and the data change amount. Simultaneously, the encrypted fingerprint of the leaf node in the chain commitment structure is updated to the sum of the encrypted value of the original value and the encrypted value of the change amount. A hash operation is then performed on the updated node's encrypted fingerprint and the node's initial commitment value to generate the updated commitment value of the node. The chain structure is updated level by level in the above manner, and the updated chain structure and the encrypted data change amount corresponding to this update are simultaneously uploaded to the cloud server for storage.

[0055] Since the node encrypted fingerprints and structural data stored in the cloud are all encrypted, the original audit data is never leaked. During the audit verification phase, the auditor only needs to retrieve the node's initial commitment value, initial encrypted fingerprint, and encrypted data changes from the cloud storage. Relying on the additivity of additive homomorphic encryption, the updated data encrypted fingerprint is restored by adding the original encrypted data value and the encrypted changes. Then, combined with hash concatenation verification logic, the legality verification of the updated node commitment value is completed, achieving integrity verification without leakage of original data.

[0056] For high-frequency change audit data, a chain-like commitment structure is used to generate progressively updated node commitment values. When the high-frequency change audit data is updated, the updated data value is obtained by adding the original data value to the data change amount. Leveraging the properties of additive homomorphic encryption, the updated data encrypted fingerprint is obtained by adding the original data encrypted fingerprint to the change amount encrypted fingerprint. Simultaneously, two types of constraints are added to the zero-knowledge proof circuit: first, the encrypted result of the difference between the updated data amount and the original data is equivalent to the encrypted result of the data change amount; second, the latest commitment value is generated by concatenating the updated data encrypted fingerprint with the previous round's commitment value and then performing a hash operation.

[0057] Thus, a homomorphic encrypted chain structure is built for high-frequency change audit data to achieve efficient privacy verification.

[0058] Finally, a globally unified aggregate commitment fingerprint is constructed. Specifically, the static Merkle tree root hash values ​​corresponding to low-frequency and medium-frequency change audit data and the final node commitment values ​​of the chain commitment structure of high-frequency change audit data are concatenated and hashed to generate a global root commitment value. This global root commitment value is then used as the aggregate commitment fingerprint of all audit data within a preset analysis period.

[0059] The aggregated commitment fingerprint is the unified state fingerprint of all audit data within the preset analysis period. The aggregated commitment fingerprint realizes the closed-loop verification of the integrity of all audit data under the heterogeneous structure.

[0060] Thus, based on zero-knowledge proof, a closed-loop system for the integrity of full audit data and verification of privacy and security are achieved under heterogeneous structures.

[0061] The above description is only a preferred embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the principles of this application should be included within the protection scope of this application.

Claims

1. An automatic verification method for audit data integrity based on zero-knowledge proof, characterized in that, The method includes the following steps: Collect multi-source audit data and convert it into a standardized numerical form that can be used for zero-knowledge proof computation, and establish a feature vector of the audit data; Based on all audit data within the preset analysis period, an initial Merkle tree is generated. Based on the difference in the number of different types of audit data within the preset analysis period, the type fluctuation factor of each audit data is calculated. Based on the difference in the feature vectors of adjacent audit data, the number of times the node depth of the initial Merkle tree changes due to the change operation of the same type of audit data within the preset analysis period, and the path length from the corresponding leaf node to the root node in the initial Merkle tree, the difference amplitude factor of each audit data is calculated. Combined with the type fluctuation factor, the data variation coefficient of the audit data is determined. Based on the data variation coefficients of all audit data within a preset analysis period, low-frequency, medium-frequency, and high-frequency change audit data are filtered out. The low-frequency and medium-frequency change audit data are optimally grouped and merged, and a static Merkle tree is constructed. Relying on zero-knowledge proof mechanisms, the integrity of the audit data is verified through the consistency of the Merkle path check and the root hash. Based on the hash values ​​of the corresponding nodes of the high-frequency change audit data in the initial Merkle tree, a chain-like commitment structure is constructed. When data is updated, the node's encrypted fingerprint and chain structure are simultaneously updated and uploaded to the cloud. At the same time, the encrypted change amount is uploaded to the cloud when data is updated, and the legality of the commitment is verified based on the cloud-encrypted data. An aggregated commitment fingerprint of all audit data within the preset analysis period is generated to achieve integrity and security verification of the audit data. The method for filtering the low-frequency, medium-frequency, and high-frequency change audit data is as follows: Cluster the data variation coefficients of all audit data within the preset analysis period to obtain three clusters. These clusters are named high-variance cluster, medium-variance cluster, and low-variance cluster in descending order of the mean of all data variation coefficients contained within each cluster. The maximum value of the data variation coefficient in the low-variance cluster is used as the stability threshold, and the minimum value of the data variation coefficient in the high-variance cluster is used as the high-frequency threshold. The average value of the coefficient of variation of the same type of audit data is recorded as the average coefficient of variation. When the average coefficient of variation is less than the stability threshold, all audit data corresponding to the average coefficient of variation are marked as low-frequency change audit data; when the average coefficient of variation is greater than the high-frequency threshold, all audit data corresponding to the average coefficient of variation are marked as high-frequency change audit data; otherwise, all audit data corresponding to the average coefficient of variation are marked as medium-frequency change audit data. The specific method for constructing the chain commitment structure is as follows: The hash value of the node corresponding to the high-frequency change audit data in the initial Merkle tree is used as the initial commitment value of the leaf node corresponding to the high-frequency change audit data in the chain structure; all high-frequency change audit data are traversed to construct the chain commitment structure.

2. The automatic verification method for audit data integrity based on zero-knowledge proof according to claim 1, characterized in that, The calculation method for the volatility factor of the audit data type is as follows: For any audit data within the preset analysis period, the number of audit data of the same type as the audit data within the preset analysis period is recorded as the first quantity; The number of preset analysis periods that contain audit data of the same type as the audit data before the preset analysis period is denoted as the second number; The average number of all audit data of the same type within the pre-defined analysis period, which is different from the audit data type, is recorded as the third quantity. The square of the first quantity is used as the numerator, and the sum of the product of the second and third quantities and the preset division by zero parameter is used as the denominator. The value of the fraction is recorded as the type fluctuation factor of any audit data.

3. The automatic verification method for audit data integrity based on zero-knowledge proof according to claim 1, characterized in that, The method for calculating the difference magnitude factor of the audit data is as follows: For any audit data within the preset analysis period, the ratio of the Euclidean distance between the audit data and the feature vector of the previous adjacent audit data to the number of dimensions of the feature vector is denoted as the first ratio. Record any type of audit data within the preset analysis period as feature type audit data, and calculate the tree depth variation coefficient of feature type audit data based on the number of times the initial Merkle tree node depth changes due to the feature type audit data change operation. Calculate the average path cost coefficient of the feature type audit data based on the path length from the corresponding leaf node to the root node in the initial Merkle tree. The sum of the first ratio of any audit data within the preset analysis period, the tree depth variation coefficient of the corresponding type of audit data, and the average path cost coefficient is denoted as the difference magnitude factor of any audit data.

4. The automatic verification method for audit data integrity based on zero-knowledge proof according to claim 3, characterized in that, The tree depth variation coefficient of the feature type audit data is: the ratio of the number of changes that cause a change in the initial Merkle tree node depth to the total number of changes that cause a change in the initial Merkle tree node depth among all change operations of the feature type audit data.

5. The automatic verification method for audit data integrity based on zero-knowledge proof according to claim 3, characterized in that, The average path cost coefficient of the feature type audit data is: the normalized value of the average path length from the leaf node to the root node of the initial Merkle tree corresponding to all the change operations of the feature type audit data.

6. The automatic verification method for audit data integrity based on zero-knowledge proof according to claim 1, characterized in that, The data variation factor of the audit data is the product of the type fluctuation factor and the difference magnitude factor of the audit data.

7. The automatic verification method for audit data integrity based on zero-knowledge proof according to claim 1, characterized in that, The specific method for constructing the static Merkle tree is as follows: Find the optimal data combination of all low-frequency and medium-frequency change audit data determined by the preset analysis period, treat each optimal data combination as an independent data block, and construct a static Merkle tree with each data block as a leaf node.

8. The automatic verification method for audit data integrity based on zero-knowledge proof according to claim 1, characterized in that, The specific method for generating the aggregated commitment fingerprint is as follows: The static Merkle tree root hash value corresponding to the low-frequency and medium-frequency change audit data and the final node commitment value of the chain commitment structure of the high-frequency change audit data are concatenated and generated into an aggregate commitment fingerprint through hash operation.

Citation Information

Patent Citations

  • Cloud storage data integrity auditing method based on zero-knowledge proof and password accumulator

    CN121098499A

  • Decentralized identity authentication method combining Merkel tree and zero-knowledge proof and related equipment

    CN121644085A