Zk-SNARK-based power grid data security cleaning and credibility verification method
Through Groth16 zero-knowledge proof and KZG polynomial commitment technology, a zk-SNARK-based power grid data security cleansing and trusted verification method is constructed, which solves the problems of privacy leakage and weak verification capabilities of power grid dispatching data during the cleansing process, realizes efficient data processing and verification, and improves the privacy protection and real-time performance of the system.
Patent Information
- Application Number
- CN202510819399.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-19
- Publication Date
- 2025-09-19
AI Technical Summary
During the cleaning process, power grid dispatching data faces high risks of privacy leakage, weak verification capabilities, and low system throughput, making it difficult to achieve data integrity verification and privacy protection without leaking the original data content.
Using Groth16 zero-knowledge proof and KZG polynomial commitment technology, a zk-SNARK-based power grid data security cleansing and trusted verification method is constructed. Zero-knowledge proof is generated through local preprocessing to prove that the data cleansing operation meets the constraints and has not been tampered with. Verification can be completed within milliseconds.
It significantly improves the privacy protection capability and verification efficiency of dispatching data processing, improves the concurrent processing performance of the system, and builds a highly reliable and real-time power grid data processing system.
Smart Images

Figure CN120675718A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of power system data processing and privacy protection, and specifically relates to a zk-SNARK-based power grid data security cleansing and trusted verification method. This method is suitable for sensitive dispatching data processing scenarios in power grid dispatching centers, power market platforms, and distributed energy management systems. It can achieve integrity verification and privacy protection of dispatching data without leaking the original dispatching data content, effectively solving the problems of lack of verifiability and high risk of privacy leakage in the dispatching data cleansing process in the existing technology. Background Art
[0002] Traditional privacy protection technologies include homomorphic encryption, federated learning, and blockchain technology. Although homomorphic encryption can be used for calculations in the ciphertext domain, it leads to high latency and low throughput due to the expansion of ciphertext and multiple large-scale encryption operations. Secure multi-party computing requires frequent multiple rounds of interaction, and the communication overhead increases exponentially with the number of nodes, making it unsuitable for millions of time series data. Federated learning continuously synchronizes gradients, which puts high bandwidth pressure and converges slowly due to the non-independent and identically distributed data. Differential privacy noise is injected into the vulnerable grid load characteristics and privacy loss accumulates. Blockchain can ensure that it cannot be tampered with, but it brings additional storage and query overhead due to insufficient on-chain storage and cross-period correlation processing capabilities.
[0003] Zero-knowledge proof is a cryptographic protocol that can prove the authenticity of a proposition without revealing any information other than the fact that the proposition is true. Its security relies on completeness and reliability, and the verification process is zero-leakage. Groth16 expresses the circuit as R1CS and uses elliptic curve bilinear pairing operations to generate a non-interactive proof of only about 200 bytes, which takes milliseconds to verify. KZG polynomial commitment can package large-scale constraints and support efficient batch verification, which is suitable for scenarios such as power grid scheduling that have extremely high requirements for real-time, accuracy and privacy.
[0004] Power grid dispatch data is highly time-series, high-dimensional, and highly sensitive, requiring local cleansing before formal use. This includes physical constraint verification, gap filling, and outlier removal. However, the cleansing process itself is difficult to verify externally, and dispatch data cannot be directly disclosed, leading to a "trusted but unverifiable" contradiction.
[0005] To this end, a mechanism is urgently needed that can both protect data privacy and provide external verifiability for local scrubbing operations. This paper combines Groth16 with KZG zero-knowledge proof technology to propose an efficient and verifiable privacy data scrubbing method that balances security, real-time performance, and system scalability, making it suitable for building a trusted power grid dispatch data processing system. Summary of the Invention
[0006] The technical problem to be solved by the present invention is to address the problems of high privacy leakage risk, weak verification capability, and low system throughput in the power grid dispatching data cleaning process. A power grid dispatching privacy data cleaning and verification method based on Groth16 zero-knowledge proof and KZG polynomial commitment is proposed. After the data holder completes the preprocessing of the physical rules and statistical constraints of multi-source dispatching data locally, the method constructs a zero-knowledge proof to prove that "the data cleaning operation has been completed strictly in accordance with the constraints and has not been tampered with or skipped." The proof is small in size and has a fast verification speed. The verifier can complete the legitimacy verification of the data cleaning process within milliseconds without obtaining the original sensitive data. This method can significantly improve the privacy protection capability, verification efficiency and system concurrent processing performance of dispatching data processing, providing technical support for building a highly reliable and real-time power grid data processing system. To solve the above technical problems, the technical solution of the present invention is as follows:
[0007] A zk-SNARK-based power grid data security cleansing and trustworthy verification method, the data cleansing method comprising:
[0008] S1. Current transformers (CTs), voltage transformers (PTs), measurement and control terminals, telecontrol devices, and synchronized phasor measurement units (PMUs) in the power system collect operating status data in real time and transmit it to the dispatching master station through the dispatching automation system, generating raw grid dispatch data.
[0009] S2. Perform local preprocessing on the collected grid dispatch data. This preprocessing includes range verification of physical quantities at each time point, reasonableness determination based on changes in readings at adjacent moments, interpolation of missing entries and verification of the reasonableness of the interpolation results, and establishment of a sliding time window around the current moment to detect outliers, thereby generating cleaned data.
[0010] S3 calculates the hash value of the preprocessed data and generates sub-constraints;
[0011] S4. Convert all sub-constraints into a codable algebraic constraint system and use the Rank-1 constraint system to represent the overall constraint;
[0012] S5. Generate a zk-SNARK proof based on the algebraic constraint system;
[0013] S6. The verification end verifies the proof using the zk-SNARK proof and public parameters, and determines whether the preprocessed data satisfies the predefined cleaning rules based on the verification result.
[0014] Furthermore, the acquisition equipment in step S1 includes current transformers, voltage transformers, measurement and control terminals, telecontrol devices and synchronous phasor measurement units, which are responsible for collecting multi-dimensional operating data such as bus voltage, current, active and reactive power, frequency, phase angle, etc.; each device completes synchronous sampling at a set frequency, and the collected data is encrypted and transmitted through the dispatching communication network, and is aggregated in real time to the database or cache module of the dispatching master station as the basic input for subsequent data processing and verification.
[0015] Furthermore, in step S2, the constraint circuit of the zero-knowledge proof uses corresponding Boolean auxiliary variables to convert this decision logic into a polynomial equality constraint, ensuring that the data marked as abnormal can pass the range verification circuit constraint.
[0016] Furthermore, in dynamic rate verification, the difference method of adjacent time data is used to determine whether the change between each pair of adjacent readings exceeds the preset maximum allowable range, and the data exceeding the range is marked as abnormal data;
[0017] In the zero-knowledge proof constraint circuit, the mutation jump decision logic is converted into a polynomial constraint that can be executed in the circuit using the corresponding Boolean auxiliary variables.
[0018] Furthermore, for time series entries that have been marked as missing, indicator variables are introduced to replace the missing values with the output values of the predefined interpolation function;
[0019] The interpolation result is verified inside the zero-knowledge circuit to see whether it meets the physical rationality constraints. When the interpolation meets the conditions, the corresponding constraints are considered to have passed, otherwise it is considered an exception.
[0020] Furthermore, in the sliding window outlier detection, a time window is formed by extending a certain length forward and backward from the current time as the center, and the average level and fluctuation range of all data in the window are calculated;
[0021] Compare whether the deviation between the current moment data and the window average value exceeds the set multiple multiplied by the fluctuation amplitude. If it exceeds, it is determined to be an outlier. The judgment result is used to assign the corresponding auxiliary variable when constraining construction.
[0022] Furthermore, in step S3, the cleaned complete power dispatching data is input into a standard cryptographic hash function for calculation to obtain a hash value.
[0023] Furthermore, in step S4, the hash value is passed as a public input to the zk-SNARK circuit for integrity verification, so as to ensure consistency verification of the same data inside and outside the circuit.
[0024] Furthermore, in step S5, all logical judgments in the static range constraints, dynamic change rate constraints, missing value interpolation constraints and outlier detection constraints are converted into equivalent polynomial equations through Boolean auxiliary variables, and are integrated with the hash integrity constraints to construct a single Rank-1 constraint system, which is then used for circuit compilation of zero-knowledge proof.
[0025] Furthermore, in step S6, Groth is used as the zk-SNARK proof generation protocol, and security parameters are used to generate a proof key and a verification key in the trusted initialization phase.
[0026] When the submitter uses the cleaned grid dispatch data and its auxiliary information as a private witness vector, a proof π is generated for subsequent verification by the verifier. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] Figure 1 A schematic diagram of the processing flow of a zk-SNARK-based power grid data security cleansing and trusted verification method provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0028] In order to better understand the above technical solution, the above technical solution will be described in detail below in conjunction with the drawings and specific implementation methods of the specification. Although the drawings show exemplary embodiments of the present disclosure, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to technical personnel in this field.
[0029] like Figure 1 As shown, an embodiment of the present invention proposes a method for cleaning power grid dispatch privacy data based on zero-knowledge proof fusion, the method comprising the following steps:
[0030] Step 1: Obtain grid dispatching data at collection points such as substations and distribution rooms through plant-side data collection devices such as PMUs, RTUs, and smart meters;
[0031] Step 2: Locally perform range verification, neighboring time difference rationality judgment, missing value interpolation and verification, and sliding window outlier detection on the power grid dispatch data to generate cleaned data;
[0032] Step 3: Calculate the hash value of the cleaned data to generate sub-constraints, then convert all sub-constraints into a codable algebraic form and integrate them into a Rank-1 constraint system;
[0033] Step 4: Generate a zk-SNARK proof based on the algebraic constraint system;
[0034] Step 5: Input the cleaned complete power dispatch data into a standard cryptographic hash function to calculate and obtain a hash value;
[0035] Step 6: During the trusted initialization phase, the proof key and verification key are generated using security parameters. The submitter constructs a private witness vector using the cleansed data and auxiliary information, and generates proof parameters to verify the correctness of the cleansing behavior.
[0036] In a preferred embodiment of the present invention, the above step 1, obtaining dispatch data, includes: deploying power system plant-side data acquisition devices at each substation, distribution room, and on-site collection point, such as high-precision synchronized phasor measurement units, telecontrol terminal units, and smart energy meters, and these devices synchronously collect multi-source dispatch data such as bus voltage, current, active power, reactive power, frequency, and phase angle at a sampling frequency of 50 Hz or higher;
[0037] The collected dispatching data is synchronized with the GPS clock and transmitted back in real time in an encrypted channel to the local data processing unit deployed in each substation or distribution room via standard communication protocols in the power industry such as IEC61850 and DNP3, providing high-trust and high-integrity original data support for subsequent local preprocessing and zero-knowledge proof generation.
[0038] In a preferred embodiment of the present invention, in the above step 2, the local grid dispatching data is sequentially subjected to static verification, dynamic rate verification, missing value interpolation and rationality verification, and sliding window outlier detection to generate cleaned data;
[0039] Static verification of data may include: classifying and numbering physical quantities of type i, including active power, bus voltage, frequency, etc., where i refers to different types of power monitoring data, according to physical characteristics;
[0040] Pre-set reasonable upper and lower limits {L i ,U i}, when the reading of the i-th physical quantity at time t satisfy When setting a Boolean auxiliary variable Indicates whether the data point passes the static range check. This means that the data point is marked as abnormal and included in the subsequent manual or automated alarm process;
[0041] In order to constrain and ensure that the data is within the physical upper and lower limits and provide a verifiable Boolean variable for subsequent proof generation, the zero-knowledge proof circuit is Polynomial equality is enforced.
[0042] Dynamic rate checking of data may include:
[0043] When performing dynamic rate verification, consider the instantaneous power or frequency jump. Under the device response capability and scheduling strategy, preset the maximum change amplitude of each physical quantity δ i , through the formula Check, when the absolute value of the difference between the readings of the i-th type of physical quantity at time t and t-1 does not exceed the preset δ i When the Boolean auxiliary variable Assign a value of 1, otherwise Assign a value of 0;
[0044] When interpolating missing values and checking rationality, for the reading of the i-th physical quantity at time t that is marked as missing due to communication packet loss, measurement failure, etc., we first introduce the indicator variable The remaining moments are marked as 0, and the predefined Lagrange interpolation function is used. For two adjacent points Calculate candidate values;
[0045] Then according to the formula The interpolation result and the original value are unified to complete the missing value replacement, so that if and only if The interpolation result is used only when the original data is not changed; then the replaced data is used locally. Perform static range checking separately and dynamic rate This ensures that the interpolation results can fill data gaps while meeting physical upper and lower limits and device response rate constraints;
[0046] Finally, the above interpolation and verification logic are uniformly encoded as polynomial equality constraints in the zero-knowledge proof circuit. w is the witness vector, ensuring The interpolation results are verified in real time, thereby achieving accurate repair of missing data and full process verifiability.
[0047] In a preferred embodiment of the present invention, in order to capture statistical anomalies in the power grid dispatching data, the window mean and standard deviation of all the i-th type of physical quantity sampling values in the window {tw,...,t+w} with half-width w extending before and after the current time t are calculated:
[0048] Then, outliers are detected by comparing the deviation of the current reading with the window statistic: When true, the Boolean auxiliary variable When , it means that the point is not an outlier. When the point is an outlier, in the zero-knowledge proof circuit, the logic represented above is uniformly encoded as the following polynomial equality constraint: The marked outliers can be used to dynamically adjust ki Or trigger a system alarm, thereby further improving the robustness of the pre-processing module;
[0049] Through the above-mentioned sliding window outlier detection and the four-level verification of the aforementioned range check, rate check and interpolation check, the local preprocessing module finally outputs cleaned data that meets both physical rationality and statistical consistency, providing reliable guarantees for hash binding and zero-knowledge proof generation.
[0050] In the preferred embodiment of the present invention, in step 3, after completing the static range check, dynamic rate verification, missing value interpolation and sliding window outlier detection of the power grid dispatch data, the cleaned data is obtained.
[0051] The system then uses a standard cryptographic hash function to calculate the integrity sub-constraint H = Hash (X clean ) and uses H as the common input to bind the data consistency inside and outside the circuit. At the same time, the Boolean auxiliary variables generated in each sub-step and their corresponding decision logic are converted into algebraic constraints;
[0052] Construct Rank-1 constraint A for the j-th sub-constraint j (w)·B j (w)-C j (w) = 0, where the witness vector Contains all cleaned data, interpolation results, window statistics, auxiliary variables, and hash values.
[0053] Finally, during the circuit compilation phase of the Groth16 proof generation protocol, all of the above sub-constraints are integrated with the hash integrity constraint into a single Rank-1 constraint system, enabling end-to-end composable and verifiable encoding of the entire process of power grid dispatch data cleaning, laying a solid foundation for the efficient generation of compact zero-knowledge proofs.
[0054] In a preferred embodiment of the present invention, in step 4 above, after completing the compilation of the Rank-1 Constraint System (R1CS) for sub-constraints such as static range, dynamic rate, missing value interpolation, and outlier detection, the Groth16 protocol is called to load the circuit into the proof generation module;
[0055] Perform trusted initialization with security parameter λ: Generate the proof key pk and verification key vk, where Represented by all sub-constraints A j (w)·B j (w)-C j The circuit composed of (w)=0 and the hash integrity constraint.
[0056] In a preferred embodiment of the present invention, the above step 5 is to clean the data set generated by local preprocessing. Call the standard cryptographic hash function SHA-256 to calculate the integrity hash value: H = hash (X clean ), H and the system preset physical upper and lower limits {L i ,U i}、Speed threshold δ i , outlier coefficient k i etc. together constitute the common input: used to bind data consistency inside and outside the circuit.
[0057] In the preferred embodiment of the present invention, in step 6, the submitter uses the public input u and the private witness vector Call π=Prove(pk,u,ω) to generate a non-interactive proof π of approximately 200 bytes, which formally guarantees that the data satisfies all algebraic constraints in R1CS without revealing the private witness ω.
[0058] The verifier subsequently calls Verify(vk,μ,π). If all constraints are met, Verify(vk,μ,π) = 1 and the proof is received. When Verify(vk,μ,π) = 0, the data is judged to be abnormal. This method can complete compliance judgment in milliseconds.
[0059] The above description does not limit the present invention in any form. Although the present invention has been disclosed through the above embodiments, it is not intended to limit the present invention. Any technician familiar with the profession can make some changes or modifications to equivalent embodiments of equivalent changes using the technical contents disclosed above without departing from the scope of the technical solution of the present invention. However, any simple modifications, equivalent changes and modifications made to the above embodiments based on the technical essence of the present invention without departing from the content of the technical solution of the present invention are still within the scope of the technical solution of the present invention.
Claims
1. A zk-SNARK-based method for secure cleansing and trusted verification of power grid data, the data cleansing method comprising: S1. Current transformers (CTs), voltage transformers (PTs), measurement and control terminals, telecontrol devices, and synchronized phasor measurement units (PMUs) in the power system collect operating status data in real time and transmit it to the dispatching master station through the dispatching automation system, generating raw grid dispatch data. S2. Perform local preprocessing on the collected grid dispatch data. This preprocessing includes range verification of physical quantities at each time point, reasonableness determination based on changes in readings at adjacent moments, interpolation of missing entries and verification of the reasonableness of the interpolation results, and establishment of a sliding time window around the current moment to detect outliers, thereby generating cleaned data. S3. Calculate the hash value of the preprocessed data to generate sub-constraints; S4. Convert all sub-constraints into a codable algebraic constraint system and use the Rank-1 constraint system to represent the overall constraint; S5. Generate a zk-SNARK proof based on the algebraic constraint system; S6. The verification end verifies the proof using the zk-SNARK proof and public parameters, and determines whether the preprocessed data satisfies the predefined cleaning rules based on the verification result.
2. The method according to claim 1, wherein: The acquisition equipment in step S1 includes current transformers, voltage transformers, measurement and control terminals, telecontrol devices, and synchronous phasor measurement units, which are responsible for collecting multi-dimensional operating data such as bus voltage, current, active and reactive power, frequency, and phase angle. Each device completes synchronous sampling at a set frequency. The collected data is encrypted and transmitted through the dispatching communication network and aggregated in real time to the database or cache module of the dispatching master station as the basic input for subsequent data processing and verification.
3. The method according to claim 1, wherein: In step S2, the constraint circuit of the zero-knowledge proof uses the corresponding Boolean auxiliary variables to convert the decision logic into a polynomial equality constraint, ensuring that the data marked as abnormal can pass the range verification circuit constraint.
4. The method according to claim 1, wherein: In dynamic rate verification, the difference method of adjacent time data is used to determine whether the change between each pair of adjacent readings exceeds the preset maximum allowable range, and the data exceeding the range is marked as abnormal data; In the zero-knowledge proof constraint circuit, the mutation jump decision logic is converted into a polynomial constraint that can be executed in the circuit using the corresponding Boolean auxiliary variables.
5. The method according to claim 1, wherein: For time series entries marked as missing, an indicator variable is introduced to replace the missing values with the output values of the predefined interpolation function; The interpolation result is verified inside the zero-knowledge circuit to see whether it meets the physical rationality constraints. When the interpolation meets the conditions, the corresponding constraints are considered to have passed, otherwise it is considered an exception.
6. The method according to claim 1, wherein: In the sliding window outlier detection, a time window is formed by extending a certain length forward and backward from the current time as the center, and the average level and fluctuation range of all data in the window are calculated; Compare whether the deviation between the current moment data and the window average value exceeds the set multiple multiplied by the fluctuation amplitude. If it exceeds, it is determined to be an outlier. The judgment result is used to assign the corresponding auxiliary variable when constraining construction.
7. The method according to claim 1, wherein: In step S3, the cleaned complete power dispatching data is input into a standard cryptographic hash function for calculation to obtain a hash value.
8. The method according to claim 1, wherein: In step S4, the hash value is passed as a public input to the zk-SNARK circuit for integrity verification to ensure consistent verification of the same data both inside and outside the circuit.
9. The method according to claim 1, wherein: In step S5, all logical judgments in the static range constraint, dynamic change rate constraint, missing value interpolation constraint and outlier detection constraint are converted into equivalent polynomial equations through Boolean auxiliary variables, and integrated with the hash integrity constraint to construct a single Rank-1 constraint system, which is then used for circuit compilation of zero-knowledge proof.
10. The method according to claim 1, wherein: In step S6, Groth is used as the zk-SNARK proof generation protocol, and security parameters are used to generate a proof key and a verification key in a trusted initialization phase; When the submitter uses the cleaned grid dispatch data and its auxiliary information as a private witness vector, a proof π is generated for subsequent verification by the verifier.
Citation Information
Cited By
RPA script verification method and system, storage medium and equipment
CN120874039A
Medical marketing data sharing method and system based on block chain
CN121233557A