CN113407981A - Energy consumption data processing method based on zero knowledge proof - Google Patents
Energy consumption data processing method based on zero knowledge proof Download PDFInfo
- Publication number
- CN113407981A CN113407981A CN202110954361.XA CN202110954361A CN113407981A CN 113407981 A CN113407981 A CN 113407981A CN 202110954361 A CN202110954361 A CN 202110954361A CN 113407981 A CN113407981 A CN 113407981A
- Authority
- CN
- China
- Prior art keywords
- energy consumption
- consumption data
- proof
- certification
- vector
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000005265 energy consumption Methods 0.000 title claims abstract description 127
- 238000003672 processing method Methods 0.000 title claims abstract description 10
- 230000002427 irreversible effect Effects 0.000 claims abstract description 50
- 238000012795 verification Methods 0.000 claims abstract description 19
- 239000013598 vector Substances 0.000 claims description 52
- 238000000034 method Methods 0.000 claims description 29
- 230000008569 process Effects 0.000 claims description 18
- 238000012545 processing Methods 0.000 claims description 12
- 238000004364 calculation method Methods 0.000 claims description 11
- 230000005611 electricity Effects 0.000 claims description 7
- XLYOFNOQVPJJNP-UHFFFAOYSA-N water Substances O XLYOFNOQVPJJNP-UHFFFAOYSA-N 0.000 claims description 7
- 238000005070 sampling Methods 0.000 claims description 6
- 238000006243 chemical reaction Methods 0.000 claims description 5
- 238000013507 mapping Methods 0.000 claims description 5
- 230000009466 transformation Effects 0.000 claims description 3
- 238000004458 analytical method Methods 0.000 abstract description 9
- -1 electricity Substances 0.000 description 3
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 230000004927 fusion Effects 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 238000005259 measurement Methods 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 238000007781 pre-processing Methods 0.000 description 1
- 238000012549 training Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
- G06F21/602—Providing cryptographic facilities or services
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
- G06F21/62—Protecting access to data via a platform, e.g. using keys or access control rules
- G06F21/6218—Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
- G06F21/6245—Protecting personal data, e.g. for financial or medical purposes
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
- G06F21/64—Protecting data integrity, e.g. using checksums, certificates or signatures
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Health & Medical Sciences (AREA)
- Bioethics (AREA)
- General Health & Medical Sciences (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computer Hardware Design (AREA)
- Medical Informatics (AREA)
- Databases & Information Systems (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The invention provides an energy consumption data processing method based on zero knowledge proof, which comprises the following steps: acquiring original energy consumption data of an energy consumption enterprise based on a preset frequency; calculating a hash value of the original energy consumption data based on a hash algorithm, and taking the hash value as a first certification problem; determining an irreversible function according to the service requirement of the energy big data center, and obtaining a second proof problem of the original energy consumption data based on an irreversible encryption algorithm; and verifying whether the original energy consumption data is complete, if the original energy consumption data passes the verification, respectively calculating zero knowledge proofs of the first proof problem and the second proof problem, and if the zero knowledge proofs meet the verification conditions specified by the energy big data center, storing the second proof problem in the energy big data center. According to the invention, while original energy consumption data of energy consumption enterprises are not leaked, relevant information of real energy consumption data is acquired, and the real energy consumption data can be directly used for subsequent analysis business by the energy big data center.
Description
Technical Field
The invention belongs to the technical field of data privacy protection, and particularly relates to an energy consumption data processing method based on zero knowledge proof.
Background
At the present stage, a necessary verification process is lacked in the process of collecting and analyzing the energy consumption data of the energy consumption enterprises, and the energy consumption data of each energy consumption enterprise are collected in a plaintext mode, so that the process has the risk of revealing the privacy of the data of the energy consumption enterprises, the problem that the authenticity of the data transmitted from the energy consumption enterprises to the energy big data center is uncertain exists, and the macroscopic analysis result of the energy big data center on the energy consumption of the energy consumption enterprises is influenced. Therefore, zero-knowledge proof is increasingly applied to application scenarios for verifying energy consumption data. Zero-knowledge proof is a cryptographic algorithm that preserves privacy, enabling a verifier to believe that some assertion is correct without providing the verifier with any private information.
In the energy consumption field, the existing zero-knowledge proof is generally used for verifying the authenticity of an energy transaction, the proof information sent by a prover to a verifier is generally a hash value calculated by a hash algorithm, and the zero-knowledge proof confirms that the transaction is established. Because the energy big data center needs to analyze a series of energy consumption conditions according to energy consumption data of energy consuming enterprises, and the hash value cannot be directly used for the analysis business, even though the existing zero-knowledge proof mechanism is used, the energy big data center still needs to acquire the original energy consumption data of the energy consuming enterprises to perform subsequent analysis business, the requirement of not revealing privacy of the energy consuming enterprises cannot be really realized, and therefore the existing zero-knowledge proof cannot be directly applied to verification of authenticity of the energy consumption data.
Disclosure of Invention
In order to solve the defects in the prior art, the invention provides an energy consumption data processing method based on zero knowledge proof, which comprises the following steps:
s100: acquiring original energy consumption data of an energy consumption enterprise based on a preset frequency;
s200: calculating a hash value of the original energy consumption data based on a hash algorithm, and taking the hash value as a first certification problem;
s300: determining an irreversible function according to the service requirement of the energy big data center, wherein the output result of the irreversible function is data which can meet the service requirement and is calculated according to original energy consumption data, the irreversible encryption algorithm is formed by the irreversible function, the Hash algorithm in S200 and a randomly defined splicing rule, and a second certification problem of the original energy consumption data is obtained based on the irreversible encryption algorithm;
s400: verifying whether the original energy consumption data is complete according to the repeated part of the first certification problem and the second certification problem, if the original energy consumption data is complete, executing S500, and if not, refusing to perform zero knowledge certification;
s500: converting the first proof problem and the second proof problem into polynomial vectors based on Fourier inversion transformation, respectively calculating zero knowledge proofs of the first proof problem and the second proof problem by combining random numbers generated by the energy big data center, and sending the zero knowledge proofs and the second proof problem to the energy big data center;
s600: and if the zero knowledge proofs meet the verification conditions specified by the energy big data center, storing the second proof problem in the energy big data center, otherwise, judging that the original energy consumption data does not pass the authenticity verification, and refusing to store the second proof problem in the energy big data center.
Optionally, the S100 includes:
determining a data port of a water, electricity and gas metering instrument in an energy consumption enterprise, and acquiring dimension parameters of the data port;
and sending a data acquisition request to the data port based on a preset frequency, acquiring the metering data of the water, electricity and gas metering instrument, carrying out dimension unified processing on the metering data according to dimension parameters, and taking the processed metering data as original energy consumption data.
Optionally, the hash algorithm in S200 is an SHA-256 algorithm.
Optionally, the S300 includes:
the method comprises the steps of obtaining a function library pre-stored in an energy big data center, wherein the function library comprises a plurality of self-defined irreversible functions, and selecting one irreversible function from the function library according to the service requirement of the energy big data center;
randomly determining a splicing sequence rule of the first certification problem and the original energy consumption data, and combining the selected irreversible function and the Hash algorithm in the S200 to form an irreversible encryption algorithm;
inputting the original energy consumption data into a Hash algorithm in S200 to obtain a first character string, and inputting the original energy consumption data into an irreversible function to obtain a second character string;
and splicing the first character string and the second character string according to a splicing sequence rule in the irreversible encryption algorithm to obtain a second certification problem.
Optionally, the S400 includes:
and comparing the first certification problem with the second certification problem, and if the repeated part obtained by comparison is consistent with the first certification problem, verifying the integrity of the original energy consumption data.
Optionally, the S500 includes:
based on zkSNARKs zero-knowledge protocol, respectively converting the first certification problem and the second certification problem into a plurality of binary assignment formulas;
combining variables in the binary assignment into a vector u, and respectively converting the first certification problem and the second certification problem into R1CS instances according to the binary assignment and the vector uWhere N is the number of variables of the first proof question or the second proof question, M is the number of binary assignments, and a, b, and c are the vector sequences in the example of R1CS, respectively, so that ;
Conversion of R1CS instance to QAP instanceWherein A, B, C is in turn the inverse fourier transform of the vector sequence in the R1CS example;
acquiring a random number t generated by an energy big data center,、、、、、、、Wherein t is a randomly selected sampling point, calculating a middle vector、Andthe calculation process is as follows:
wherein,,、…、is an element in a preset credible domain D, j isThe value of j is a positive integer ranging from 0 to M-2,representing the first element of vector a at the sample point t,representing the first element of vector B at the sample point t,representing the first element of the vector C at the sample point t,the second of vector A at sample point tThe number of the elements is one,representing the vector B at the sample point tThe number of the elements is one,representing the vector C at the sampling point tThe value range of i is a positive integer between 1 and N-1;
wherein,is composed ofThe coefficient of the j-th term of (1),,the i-th element of the vector u is represented,representing intermediate vectorsThe (i) th element of (a),representing intermediate vectorsThe jth element of (1), r and s are random numbers selected by energy-consuming enterprises as proving parties;
Optionally, the first element of the vector u is constantly 1.
Optionally, the S600 includes:
determining bilinear pairing mappings,、In order to map the input variables of e,is the output variable of map e;
according to energy big data center receptionZero knowledge proof ofAuthenticationAnd if the first certification question and the second certification question are correct, judging that the first certification question and the second certification question pass authenticity verification.
The technical scheme provided by the invention has the beneficial effects that:
(1) on the basis of zkSNARKs zero-knowledge protocol, an energy big data center serving as a verifier can generate an irreversible encryption algorithm according to self business requirements and send the irreversible encryption algorithm to an energy consuming enterprise, the original energy consumption data of the energy consuming enterprise are not leaked, meanwhile, the energy big data center collects relevant information of real energy consumption data, meanwhile, the energy consuming enterprise can be directly used for subsequent analysis business by the energy big data center through proof generated by the irreversible encryption algorithm, and the problem that the energy analysis requirements cannot be met through traditional zero-knowledge proof is solved.
(2) The energy consumption enterprise serving as a prover generates two proving problems according to two different encryption methods, wherein the proving problem obtained by using the Hash algorithm can verify the integrity of original energy consumption data, the proving problem obtained by using a self-defined irreversible encryption algorithm can verify the authenticity of the original energy consumption data, and the characteristics of zero knowledge proving are combined, so that whether data transmitted to an energy consumption large data center is tampered or not can be checked under the condition that private data of the energy consumption enterprise is not leaked, and the authenticity of the data is improved.
Drawings
In order to more clearly illustrate the technical solution of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on the drawings without creative efforts.
Fig. 1 is a schematic flow chart of a zero-knowledge proof-based energy consumption data processing method according to an embodiment of the present invention;
fig. 2 is a schematic flow chart of the process of sending the zero knowledge proof to the energy big data center by the energy consuming enterprise.
Detailed Description
To make the structure and advantages of the present invention clearer, the structure of the present invention will be further described with reference to the accompanying drawings.
Example one
As shown in fig. 1, the present embodiment proposes an energy consumption data processing method based on zero knowledge proof, including:
s100: acquiring original energy consumption data of an energy consumption enterprise based on a preset frequency;
s200: calculating a hash value of the original energy consumption data based on a hash algorithm, and taking the hash value as a first certification problem;
s300: determining an irreversible function according to the service requirement of the energy big data center, wherein the output result of the irreversible function is data which can meet the service requirement and is calculated according to original energy consumption data, the irreversible encryption algorithm is formed by the irreversible function, the Hash algorithm in S200 and a randomly defined splicing rule, and a second certification problem of the original energy consumption data is obtained based on the irreversible encryption algorithm;
s400: verifying whether the original energy consumption data is complete according to the repeated part of the first certification problem and the second certification problem, if the original energy consumption data is complete, executing S500, and if not, refusing to perform zero knowledge certification;
s500: converting the first proof problem and the second proof problem into polynomial vectors based on Fourier inversion transformation, respectively calculating zero knowledge proofs of the first proof problem and the second proof problem by combining random numbers generated by the energy big data center, and sending the zero knowledge proofs and the second proof problem to the energy big data center;
s600: and if the zero knowledge proofs meet the verification conditions specified by the energy big data center, storing the second proof problem in the energy big data center, otherwise, judging that the original energy consumption data does not pass the authenticity verification, and refusing to store the second proof problem in the energy big data center.
At the present stage, an energy company often needs to obtain energy consumption data of each energy consuming enterprise to analyze an energy consumption situation, and adjust an energy marketing plan and an energy pricing strategy in time according to the energy consumption situation, where the energy consumption data in this embodiment mainly includes real-time consumption data of water, electricity, gas and other new energy of each energy consuming enterprise, and a real-time cost for purchasing the energy. In this embodiment, in order to achieve the above object, an energy big data center is established, and meters are installed inside each energy consuming enterprise for energy consumption monitoring, a data port of a water, electricity, and gas meter in the energy consuming enterprise is first determined, dimension parameters of the data port are obtained, a data acquisition request is sent to the data port based on a preset frequency, in this embodiment, the measurement data of the water, electricity, and gas meter is acquired according to a frequency of fifteen minutes each time, and performing dimension unified processing on the measured data according to the dimension parameters, specifically, acquiring a pre-established dimension conversion model corresponding to different dimensions, inputting the measured data into the dimension conversion model, so that the same energy consumption data has the same dimension, facilitating the subsequent energy consumption condition unified analysis of the energy big data center, and taking the processed measured data as original energy consumption data.
The conventional processing method is to directly transmit the original energy consumption data to an energy big data center for analysis and processing. However, two main problems of this process are that firstly the process of transmitting the energy consumption data of the energy consuming enterprise in a plaintext manner risks privacy disclosure, and secondly the authenticity of the data transmitted from the energy consuming enterprise to the energy big data center remains to be further questioned. The existence of the problems hinders the service quality of the energy big data center to a certain extent, and further influences data sharing and deep fusion between the government enterprises. Therefore, the present embodiment solves the above problem with zero knowledge proof. Zero-knowledge proof is a cryptographic algorithm that preserves privacy, enabling a verifier to believe that some assertion is correct without providing the verifier with any private information.
In this embodiment, two certification problems are respectively generated for zero knowledge certification on the basis of a conventional zero knowledge certification algorithm, a certification flow is shown in fig. 2, an energy consumption generation module and an energy consumption encryption module are both deployed in a server inside an energy consumption enterprise, an energy consumption verification module is deployed in an energy big data center, the energy consumption generation module can collect metering data collected by each instrument in the energy consumption enterprise, the energy consumption encryption module encrypts original energy consumption data X into a first certification problem and a second certification problem, and generates a certification method 'pi' to be sent to the energy consumption verification module, wherein a hash algorithm is used to encrypt X data to obtain the first certification problem Y = hash (X), the hash algorithm in this embodiment is SHA-256 algorithm, the energy consumption verification module located in the energy big data center sends a self-defined irreversible encryption function F to the energy consumption encryption module, and the energy consumption encryption module encrypts data of the X to obtain a second certification problem Z = F (X), wherein Z can be used for subsequent processing of the energy big data center.
In this embodiment, the following is specifically described for the generation process of the irreversible encryption function F:
the method comprises the steps of obtaining a function library pre-stored in an energy big data center, wherein the function library comprises a plurality of self-defined irreversible functions, and selecting one irreversible function from the function library according to the service requirement of the energy big data center. For example, the energy big data center has an application service for predicting energy cost, and includes a prediction model for predicting energy consumption conditions of energy consuming enterprises in a certain period of time in the future, total consumption cost of various energy resources of the energy consuming enterprises in a certain period of time is required to be acquired as training data of the prediction model, an irreversible function is selected based on the service requirement, the energy big data center sends the irreversible function to the energy consuming enterprises, the energy consuming enterprises can input original energy consumption data into the irreversible function, and output results are total consumption cost of the original energy consumption data corresponding to the various energy resources. Therefore, the irreversible function has the main function of sending the requirement of the energy big data on the data to the energy consuming enterprise, namely transferring partial processing operation of the energy big data center on the original energy consumption data to the inside of the energy consuming enterprise, and directly sending the data processing result meeting the business requirement to the energy big data center after the energy consuming enterprise carries out certain preprocessing on the original energy consumption data, so that the energy big data center can obtain the data required by the energy big data center in the subsequent application on the premise of not obtaining the original energy consumption data X of the energy consuming enterprise, and further the energy big data center can plan the energy marketing strategy according to the data.
In order to improve the irreversibility of the first certification problem, the embodiment also randomly determines the splicing sequence rule of the first certification problem and the original energy consumption data, and combines the selected irreversible function and the hash algorithm in S200 to form an irreversible encryption algorithm. The energy big data center sends the irreversible encryption algorithm to the energy consumption enterprise, and the energy consumption enterprise inputs the original energy consumption data into the irreversible encryption algorithm for calculation in the following process:
inputting the original energy consumption data into a Hash algorithm in S200 to obtain a first character string, and inputting the original energy consumption data into an irreversible function to obtain a second character string;
and splicing the first character string and the second character string according to a splicing sequence rule in the irreversible encryption algorithm to obtain a second certification problem. In this embodiment, the splicing order rule includes a front-back order of splicing the first character string and the second character string as a whole, and a front-back order of splicing the first character string and the second character string after segmenting the first character string at a preset character position. For example, the first character string is "3 a6fed5fc11392b3ee9f81caf017b48640d7458766a8eb0382899a605b41f2b 9", the second character string is "50000", the first character string is a hexadecimal character string with the length of 64, the splicing sequence rule specifies that the 8 th character string is split, two sub-character strings "3 a6fed5 f" and "c 11392b3ee9f 017b48640d7458766a8eb0382899a605b41f2b 9" of the first character string are obtained, and the two split sub-character strings are respectively spliced at the head and the tail of the second character string, and the spliced character string is the finally generated second problem, that is Z = f (x) =3a6fed5f5000011392b3ee9f 017 f 640 b 640d 640 b 8eb 3 f 4 a 0382899 f 3 b0382899 b9 b0382899 b 24 b).
In this embodiment, the irreversible cryptographic function further includes a hash algorithm used in S200, so as to ensure that the original energy consumption data used for respectively generating the first certification problem and the second certification problem are consistent, implement integrity verification on the original energy consumption data, and avoid the problem that data acquired by a subsequent energy big data center is inaccurate due to incomplete input original energy consumption data. And the energy big data center compares the first certification problem with the second certification problem, if the repeated part obtained by comparison is inconsistent with the first certification problem, the integrity check is not passed, the energy big data center refuses to receive the first certification problem and the second certification problem, and the subsequent zero-knowledge certification step is not performed any more. If the repeated part obtained by comparison is consistent with the first certification problem, namely the two hash values are the same, it indicates that X in the first certification problem Y = hash (X) and the second certification problem Z = f (X) is consistent, and the integrity of the original energy consumption data passes verification.
In this embodiment, a splicing sequence rule is further defined in the irreversible encryption function, so as to improve data security of the second certification problem in the process of sending the second certification problem to the energy big data center by the energy consuming enterprise, and avoid malicious stealing of related information by a third party.
After the integrity check is passed, the zero knowledge proof protocol based on the zkSNARKs version of Groth in the energy consumption verification module shown in FIG. 2 respectively performs zero knowledge proof on the first proof problem and the second proof problem. zkSNARKs are short for Zero-Knowledge base Non-Interactive orientation of Knowledge, and refer to a Non-Interactive proof structure that can prove that a person possesses some information. The specific zero knowledge proof process in this embodiment includes:
based on zkSNARKs zero-knowledge protocol, respectively converting a first certification problem and a second certification problem into a plurality of binary assignment formulas, wherein the binary assignment formulas are that Y = Hash (X) and Z = F (X) are respectively converted into single steps which are only binary variables and only consist of basic operations of addition, subtraction, multiplication, division and the like;
combining variables in the binary assignment into a vector u, wherein in order to express constants in the binary assignment, a first element of the vector u is constantly 1, and the vector u is combined with the binary assignmentu converts the first and second proof problems into R1CS instances, respectivelyWhere N is the number of variables of the first proof question or the second proof question, M is the number of binary assignments, and a, b, and c are the vector sequences in the example of R1CS, respectively, so that;
Conversion of R1CS instance to QAP instanceWherein A, B, C is the inverse fourier transform of the vector sequence in the R1CS example, and those skilled in the art should connect how to convert the R1CS example into the QAP example, which is not described herein again;
acquiring a random number t generated by an energy big data center,、、、、、、、Wherein t is random selectionTaking the sampling points, calculating the intermediate vector、Andthe calculation process is as follows:
wherein,,、…、is an element in a preset credible domain D, j isThe value of j is a positive integer ranging from 0 to M-2,representing the first element of vector a at the sample point t,representing the first element of vector B at the sample point t,representing the first element of the vector C at the sample point t,the second of vector A at sample point tThe number of the elements is one,representing the vector B at the sample point tThe number of the elements is one,representing the vector C at the sampling point tThe value range of i is a positive integer between 1 and N-1;
wherein,is composed ofThe coefficient of the j-th term of (1),,the i-th element of the vector u is represented,representing intermediate vectorsThe (i) th element of (a),representing intermediate vectorsThe jth element of (1), r and s are random numbers selected by energy-consuming enterprises as proving parties;
Finally, the energy big data center proves according to the received zero knowledgeAuthenticationIf it is correct, where e is bilinear pairing mapping, which can be expressed as,、In order to map the input variables of e,in order to output the variable of the mapping e, the mapping e is determined by the energy big data center in the embodiment. And if the first certification question and the second certification question are correct, judging that the first certification question and the second certification question pass authenticity verification. Therefore, if the first proving problem and the second proving problem are proved to be successful, the energy big data center serves as a verifier to authenticate that the energy consuming enterprise has real original energy consumption data, and Z = f (X) is stored to perform subsequent energy consumption comprehensive operation; and if any one of the first certification problem and the second certification problem fails to be certified, the energy big data center is used as a verifier to consider that the original energy consumption data of the energy consuming enterprise does not have authenticity, and the energy big data center refuses to store the data Z = f (X), and sends out an alarm.
Therefore, the irreversible encryption function generated through the process can realize special encryption of the original energy consumption data, the encrypted original energy consumption data can be used for further energy consumption calculation on the basis of ensuring the validity of zero knowledge proof, and the energy big data center can directly utilize Z to perform application services such as energy consumption analysis and the like in the subsequent process.
The sequence numbers in the above embodiments are merely for description, and do not represent the sequence of the assembly or the use of the components.
The above description is only exemplary of the present invention and should not be taken as limiting the invention, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims (8)
1. A zero-knowledge proof-based energy consumption data processing method is characterized by comprising the following steps:
s100: acquiring original energy consumption data of an energy consumption enterprise based on a preset frequency;
s200: calculating a hash value of the original energy consumption data based on a hash algorithm, and taking the hash value as a first certification problem;
s300: determining an irreversible function according to the service requirement of the energy big data center, wherein the output result of the irreversible function is data which can meet the service requirement and is calculated according to original energy consumption data, the irreversible encryption algorithm is formed by the irreversible function, the Hash algorithm in S200 and a randomly defined splicing rule, and a second certification problem of the original energy consumption data is obtained based on the irreversible encryption algorithm;
s400: verifying whether the original energy consumption data is complete according to the repeated part of the first certification problem and the second certification problem, if the original energy consumption data is complete, executing S500, and if not, refusing to perform zero knowledge certification;
s500: converting the first proof problem and the second proof problem into polynomial vectors based on Fourier inversion transformation, respectively calculating zero knowledge proofs of the first proof problem and the second proof problem by combining random numbers generated by the energy big data center, and sending the zero knowledge proofs and the second proof problem to the energy big data center;
s600: and if the zero knowledge proofs meet the verification conditions specified by the energy big data center, storing the second proof problem in the energy big data center, otherwise, judging that the original energy consumption data does not pass the authenticity verification, and refusing to store the second proof problem in the energy big data center.
2. The method for processing energy consumption data based on zero knowledge proof according to claim 1, wherein the S100 comprises:
determining a data port of a water, electricity and gas metering instrument in an energy consumption enterprise, and acquiring dimension parameters of the data port;
and sending a data acquisition request to the data port based on a preset frequency, acquiring the metering data of the water, electricity and gas metering instrument, carrying out dimension unified processing on the metering data according to dimension parameters, and taking the processed metering data as original energy consumption data.
3. The zero-knowledge-proof-based energy consumption data processing method according to claim 1, wherein the hash algorithm in the S200 is SHA-256 algorithm.
4. The method for processing energy consumption data based on zero knowledge proof according to claim 1, wherein the step S300 comprises:
the method comprises the steps of obtaining a function library pre-stored in an energy big data center, wherein the function library comprises a plurality of self-defined irreversible functions, and selecting one irreversible function from the function library according to the service requirement of the energy big data center;
randomly determining a splicing sequence rule of the first certification problem and the original energy consumption data, and combining the selected irreversible function and the Hash algorithm in the S200 to form an irreversible encryption algorithm;
inputting the original energy consumption data into a Hash algorithm in S200 to obtain a first character string, and inputting the original energy consumption data into an irreversible function to obtain a second character string;
and splicing the first character string and the second character string according to a splicing sequence rule in the irreversible encryption algorithm to obtain a second certification problem.
5. The method for processing energy consumption data based on zero knowledge proof according to claim 1, wherein the S400 comprises:
and comparing the first certification problem with the second certification problem, and if the repeated part obtained by comparison is consistent with the first certification problem, verifying the integrity of the original energy consumption data.
6. The method for processing energy consumption data based on zero knowledge proof according to claim 1, wherein the step S500 comprises:
based on zkSNARKs zero-knowledge protocol, respectively converting the first certification problem and the second certification problem into a plurality of binary assignment formulas;
combining variables in the binary assignment into a vector u, and respectively converting the first certification problem and the second certification problem into R1CS instances according to the binary assignment and the vector uWhere N is the number of variables of the first proof question or the second proof question, and M is binaryThe number of the assignment formulas, a, b and c are vector sequences in the example of R1CS respectively, so that;
Conversion of R1CS instance to QAP instanceWherein A, B, C is in turn the inverse fourier transform of the vector sequence in the R1CS example;
obtaining random numbers generated by energy big data centerWherein t is a randomly selected sampling point, calculating a middle vector、Andthe calculation process is as follows:
wherein,is an element in a predetermined trusted domain D, j isThe value of j is a positive integer ranging from 0 to M-2,representing the first element of vector a at the sample point t,representing the first element of vector B at the sample point t,representing the first element of the vector C at the sample point t,represents the i +1 th element of vector a at the sample point t,represents the i +1 th element of vector B at the sample point t,the i +1 th element of the vector C under the sampling point t is represented, and the value range of i is a positive integer between 1 and N-1;
wherein,is composed ofThe coefficient of the j-th term of (1),,、、respectively vector A, B, C at the sample point t,the i-th element of the vector u is represented,representing intermediate vectorsThe (i) th element of (a),representing intermediate vectorsThe jth element of (1), r and s are random numbers selected by energy-consuming enterprises as proving parties;
7. The method of claim 6, wherein the first element of the vector u is always 1.
8. The method for processing energy consumption data based on zero knowledge proof according to claim 6, wherein the S600 comprises:
determining bilinear pairing mappingsIn order to map the input variables of e,is the output variable of map e;
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110954361.XA CN113407981B (en) | 2021-08-19 | 2021-08-19 | Energy consumption data processing method based on zero knowledge proof |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110954361.XA CN113407981B (en) | 2021-08-19 | 2021-08-19 | Energy consumption data processing method based on zero knowledge proof |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113407981A true CN113407981A (en) | 2021-09-17 |
CN113407981B CN113407981B (en) | 2021-11-09 |
Family
ID=77688909
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110954361.XA Active CN113407981B (en) | 2021-08-19 | 2021-08-19 | Energy consumption data processing method based on zero knowledge proof |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113407981B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114064993A (en) * | 2021-11-16 | 2022-02-18 | 瀚云科技有限公司 | Energy data acquisition method and energy balance diagram construction method and device |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102446329A (en) * | 2010-10-08 | 2012-05-09 | 微软公司 | Privacy-preserving metering |
CN110795767A (en) * | 2019-11-12 | 2020-02-14 | 阳光电源股份有限公司 | Electric power transaction method, device and system and trusted cloud platform |
CN113037479A (en) * | 2021-03-25 | 2021-06-25 | 支付宝(杭州)信息技术有限公司 | Data verification method and device |
-
2021
- 2021-08-19 CN CN202110954361.XA patent/CN113407981B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102446329A (en) * | 2010-10-08 | 2012-05-09 | 微软公司 | Privacy-preserving metering |
CN110795767A (en) * | 2019-11-12 | 2020-02-14 | 阳光电源股份有限公司 | Electric power transaction method, device and system and trusted cloud platform |
CN113037479A (en) * | 2021-03-25 | 2021-06-25 | 支付宝(杭州)信息技术有限公司 | Data verification method and device |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114064993A (en) * | 2021-11-16 | 2022-02-18 | 瀚云科技有限公司 | Energy data acquisition method and energy balance diagram construction method and device |
Also Published As
Publication number | Publication date |
---|---|
CN113407981B (en) | 2021-11-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108683669B (en) | Data verification method and secure multi-party computing system | |
Zhao et al. | Dynamic and privacy-preserving reputation management for blockchain-based mobile crowdsensing | |
CN109657450B (en) | Method, device, medium, and electronic device for evaluation based on block chain | |
CN114818011B (en) | Federal learning method and system suitable for carbon credit evaluation and electronic equipment | |
Weng et al. | pvcnn: Privacy-preserving and verifiable convolutional neural network testing | |
CN112291062B (en) | Voting method and device based on block chain | |
CN113407981B (en) | Energy consumption data processing method based on zero knowledge proof | |
CN115333755A (en) | Multi-attribute identity authentication method based on continuous trust evaluation | |
CN114726502A (en) | Safety system based on Internet of things and big data | |
CN115150057A (en) | Integrity verification method for block chain cross-chain interactive data calculation result | |
CN113078993A (en) | Smart grid third-party privacy protection method based on improved homomorphic encryption algorithm | |
CN115277010A (en) | Identity authentication method, system, computer device and storage medium | |
Yang et al. | Accountable and verifiable secure aggregation for federated learning in IoT networks | |
CN115760399A (en) | Data privacy transaction method based on zero knowledge proof | |
CN114826572B (en) | Decentralized crowdsourcing method, system and terminal supporting attribute privacy protection | |
Wang et al. | zkfl: Zero-knowledge proof-based gradient aggregation for federated learning | |
Liang et al. | Decentralized crowdsourcing for human intelligence tasks with efficient on-chain cost | |
Yang et al. | PrivCrowd: A Secure Blockchain‐Based Crowdsourcing Framework with Fine‐Grained Worker Selection | |
US20240283659A1 (en) | Integrating identity tokens and privacy-preserving identity attribute attest | |
Guo et al. | A Novel Biometric Identification Scheme Based on Zero‐Knowledge Succinct Noninteractive Argument of Knowledge | |
Alrawais et al. | X. 509 check: A tool to check the safety and security of digital certificates | |
CN115765983A (en) | Group signature method and signature center group administrator node | |
Zhang et al. | Estimating Coherence Measures with Untrusted Devices | |
Wang et al. | Linking Souls to Humans with ZKBID: Accountable Anonymous Blockchain Accounts for Web 3.0 Decentralized Identity | |
CN118138229B (en) | Data acquisition and analysis method and system based on fusion base station |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |