CN113407981A - Energy consumption data processing method based on zero knowledge proof - Google Patents

Energy consumption data processing method based on zero knowledge proof Download PDF

Info

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
Application number
CN202110954361.XA
Other languages
Chinese (zh)
Other versions
CN113407981B (en
Inventor
戴铁潮
陈建
黄建平
张旭东
毛冬
冯珺
梅峰
潘司晨
刘瀚琳
沈桂竹
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
State Grid Zhejiang Electric Power Co Ltd
Information and Telecommunication Branch of State Grid Zhejiang Electric Power Co Ltd
Original Assignee
State Grid Zhejiang Electric Power Co Ltd
Information and Telecommunication Branch of State Grid Zhejiang Electric Power Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by State Grid Zhejiang Electric Power Co Ltd, Information and Telecommunication Branch of State Grid Zhejiang Electric Power Co Ltd filed Critical State Grid Zhejiang Electric Power Co Ltd
Priority to CN202110954361.XA priority Critical patent/CN113407981B/en
Publication of CN113407981A publication Critical patent/CN113407981A/en
Application granted granted Critical
Publication of CN113407981B publication Critical patent/CN113407981B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting 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/6245Protecting personal data, e.g. for financial or medical purposes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting 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

Energy consumption data processing method based on zero knowledge proof
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 u
Figure 64007DEST_PATH_IMAGE001
Where 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
Figure 590934DEST_PATH_IMAGE002
Conversion of R1CS instance to QAP instance
Figure 573934DEST_PATH_IMAGE003
Wherein 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,
Figure 234722DEST_PATH_IMAGE004
Figure 376991DEST_PATH_IMAGE005
Figure 465032DEST_PATH_IMAGE006
Figure 935328DEST_PATH_IMAGE007
Figure 399807DEST_PATH_IMAGE008
Figure 147315DEST_PATH_IMAGE009
Figure 406258DEST_PATH_IMAGE010
Figure 363849DEST_PATH_IMAGE011
Wherein t is a randomly selected sampling point, calculating a middle vector
Figure 366441DEST_PATH_IMAGE012
Figure 217722DEST_PATH_IMAGE013
And
Figure 913145DEST_PATH_IMAGE014
the calculation process is as follows:
Figure 358033DEST_PATH_IMAGE015
wherein,
Figure 898736DEST_PATH_IMAGE016
Figure 617906DEST_PATH_IMAGE017
、…、
Figure 218651DEST_PATH_IMAGE018
is an element in a preset credible domain D, j is
Figure 150835DEST_PATH_IMAGE014
The value of j is a positive integer ranging from 0 to M-2,
Figure 495229DEST_PATH_IMAGE019
representing the first element of vector a at the sample point t,
Figure 321103DEST_PATH_IMAGE020
representing the first element of vector B at the sample point t,
Figure 92749DEST_PATH_IMAGE021
representing the first element of the vector C at the sample point t,
Figure 308967DEST_PATH_IMAGE022
the second of vector A at sample point t
Figure 394735DEST_PATH_IMAGE023
The number of the elements is one,
Figure 12798DEST_PATH_IMAGE024
representing the vector B at the sample point t
Figure 33975DEST_PATH_IMAGE023
The number of the elements is one,
Figure 737489DEST_PATH_IMAGE025
representing the vector C at the sampling point t
Figure 158106DEST_PATH_IMAGE023
The value range of i is a positive integer between 1 and N-1;
computing
Figure 833938DEST_PATH_IMAGE026
Figure 212966DEST_PATH_IMAGE027
Figure 466093DEST_PATH_IMAGE028
And
Figure 955980DEST_PATH_IMAGE029
the calculation process is as follows:
Figure 220740DEST_PATH_IMAGE030
wherein,
Figure 505090DEST_PATH_IMAGE031
is composed of
Figure 183196DEST_PATH_IMAGE032
The coefficient of the j-th term of (1),
Figure 289824DEST_PATH_IMAGE033
Figure 736986DEST_PATH_IMAGE034
the i-th element of the vector u is represented,
Figure 129921DEST_PATH_IMAGE035
representing intermediate vectors
Figure 295323DEST_PATH_IMAGE036
The (i) th element of (a),
Figure 189330DEST_PATH_IMAGE037
representing intermediate vectors
Figure 756577DEST_PATH_IMAGE014
The jth element of (1), r and s are random numbers selected by energy-consuming enterprises as proving parties;
forming a vector according to the calculation result
Figure 117151DEST_PATH_IMAGE038
As proof of zero knowledge.
Optionally, the first element of the vector u is constantly 1.
Optionally, the S600 includes:
determining bilinear pairing mappings
Figure 707533DEST_PATH_IMAGE039
Figure 342913DEST_PATH_IMAGE040
Figure 312138DEST_PATH_IMAGE041
In order to map the input variables of e,
Figure 374771DEST_PATH_IMAGE042
is the output variable of map e;
according to energy big data center receptionZero knowledge proof of
Figure 186870DEST_PATH_IMAGE043
Authentication
Figure 360362DEST_PATH_IMAGE044
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.
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, respectively
Figure 636623DEST_PATH_IMAGE001
Where 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
Figure 932475DEST_PATH_IMAGE002
Conversion of R1CS instance to QAP instance
Figure 294186DEST_PATH_IMAGE045
Wherein 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,
Figure 209052DEST_PATH_IMAGE004
Figure 339819DEST_PATH_IMAGE005
Figure 554376DEST_PATH_IMAGE006
Figure 403383DEST_PATH_IMAGE007
Figure 856361DEST_PATH_IMAGE008
Figure 841634DEST_PATH_IMAGE009
Figure 416972DEST_PATH_IMAGE010
Figure 815593DEST_PATH_IMAGE011
Wherein t is random selectionTaking the sampling points, calculating the intermediate vector
Figure 134578DEST_PATH_IMAGE046
Figure 177621DEST_PATH_IMAGE013
And
Figure 923860DEST_PATH_IMAGE014
the calculation process is as follows:
Figure 294930DEST_PATH_IMAGE047
wherein,
Figure 152027DEST_PATH_IMAGE016
Figure 111893DEST_PATH_IMAGE017
、…、
Figure 966716DEST_PATH_IMAGE018
is an element in a preset credible domain D, j is
Figure 277612DEST_PATH_IMAGE014
The value of j is a positive integer ranging from 0 to M-2,
Figure 717DEST_PATH_IMAGE019
representing the first element of vector a at the sample point t,
Figure 18352DEST_PATH_IMAGE020
representing the first element of vector B at the sample point t,
Figure 371973DEST_PATH_IMAGE021
representing the first element of the vector C at the sample point t,
Figure 717635DEST_PATH_IMAGE022
the second of vector A at sample point t
Figure 916535DEST_PATH_IMAGE023
The number of the elements is one,
Figure 585414DEST_PATH_IMAGE024
representing the vector B at the sample point t
Figure 313198DEST_PATH_IMAGE023
The number of the elements is one,
Figure 395424DEST_PATH_IMAGE025
representing the vector C at the sampling point t
Figure 398015DEST_PATH_IMAGE023
The value range of i is a positive integer between 1 and N-1;
computing
Figure 124662DEST_PATH_IMAGE026
Figure 898714DEST_PATH_IMAGE027
Figure 140340DEST_PATH_IMAGE028
And
Figure 884305DEST_PATH_IMAGE029
the calculation process is as follows:
Figure 793355DEST_PATH_IMAGE048
wherein,
Figure 456418DEST_PATH_IMAGE031
is composed of
Figure 450918DEST_PATH_IMAGE032
The coefficient of the j-th term of (1),
Figure 529733DEST_PATH_IMAGE033
Figure 230973DEST_PATH_IMAGE034
the i-th element of the vector u is represented,
Figure 2620DEST_PATH_IMAGE035
representing intermediate vectors
Figure 294536DEST_PATH_IMAGE036
The (i) th element of (a),
Figure 442621DEST_PATH_IMAGE037
representing intermediate vectors
Figure 998367DEST_PATH_IMAGE014
The jth element of (1), r and s are random numbers selected by energy-consuming enterprises as proving parties;
forming a vector according to the calculation result
Figure DEST_PATH_IMAGE049
As proof of zero knowledge.
Finally, the energy big data center proves according to the received zero knowledge
Figure 534391DEST_PATH_IMAGE049
Authentication
Figure 972325DEST_PATH_IMAGE050
If it is correct, where e is bilinear pairing mapping, which can be expressed as
Figure 658521DEST_PATH_IMAGE039
Figure 334353DEST_PATH_IMAGE040
Figure 447803DEST_PATH_IMAGE041
In order to map the input variables of e,
Figure 451662DEST_PATH_IMAGE042
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 u
Figure 635691DEST_PATH_IMAGE001
Where 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
Figure 168303DEST_PATH_IMAGE002
Conversion of R1CS instance to QAP instance
Figure 445832DEST_PATH_IMAGE001
Wherein 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 center
Figure 114711DEST_PATH_IMAGE003
Wherein t is a randomly selected sampling point, calculating a middle vector
Figure 576916DEST_PATH_IMAGE004
Figure 331245DEST_PATH_IMAGE005
And
Figure 333836DEST_PATH_IMAGE006
the calculation process is as follows:
Figure 185118DEST_PATH_IMAGE007
wherein,
Figure 880541DEST_PATH_IMAGE008
is an element in a predetermined trusted domain D, j is
Figure 59850DEST_PATH_IMAGE006
The value of j is a positive integer ranging from 0 to M-2,
Figure 866132DEST_PATH_IMAGE009
representing the first element of vector a at the sample point t,
Figure 588231DEST_PATH_IMAGE010
representing the first element of vector B at the sample point t,
Figure 188977DEST_PATH_IMAGE011
representing the first element of the vector C at the sample point t,
Figure 121161DEST_PATH_IMAGE012
represents the i +1 th element of vector a at the sample point t,
Figure 465554DEST_PATH_IMAGE013
represents the i +1 th element of vector B at the sample point t,
Figure 291428DEST_PATH_IMAGE014
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;
computing
Figure 63075DEST_PATH_IMAGE015
And
Figure 279293DEST_PATH_IMAGE016
the calculation process is as follows:
Figure 365060DEST_PATH_IMAGE017
wherein,
Figure 983123DEST_PATH_IMAGE018
is composed of
Figure 1371DEST_PATH_IMAGE019
The coefficient of the j-th term of (1),
Figure 704884DEST_PATH_IMAGE020
Figure 125501DEST_PATH_IMAGE021
Figure 801333DEST_PATH_IMAGE022
Figure 914783DEST_PATH_IMAGE023
respectively vector A, B, C at the sample point t,
Figure 167910DEST_PATH_IMAGE024
the i-th element of the vector u is represented,
Figure 657797DEST_PATH_IMAGE025
representing intermediate vectors
Figure 188135DEST_PATH_IMAGE026
The (i) th element of (a),
Figure 738065DEST_PATH_IMAGE027
representing intermediate vectors
Figure 150592DEST_PATH_IMAGE028
The jth element of (1), r and s are random numbers selected by energy-consuming enterprises as proving parties;
forming a vector according to the calculation result
Figure 991640DEST_PATH_IMAGE029
As proof of zero knowledge.
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 mappings
Figure 438802DEST_PATH_IMAGE030
In order to map the input variables of e,
Figure 97317DEST_PATH_IMAGE031
is the output variable of map e;
according to zero knowledge proof received by energy big data center
Figure 262719DEST_PATH_IMAGE032
Authentication
Figure 828829DEST_PATH_IMAGE033
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.
CN202110954361.XA 2021-08-19 2021-08-19 Energy consumption data processing method based on zero knowledge proof Active CN113407981B (en)

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)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
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

Patent Citations (3)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
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