CN115801474A - Privacy calculation-based power transaction method and system, power utilization end and power generation end - Google Patents

Privacy calculation-based power transaction method and system, power utilization end and power generation end Download PDF

Info

Publication number
CN115801474A
CN115801474A CN202310105315.1A CN202310105315A CN115801474A CN 115801474 A CN115801474 A CN 115801474A CN 202310105315 A CN202310105315 A CN 202310105315A CN 115801474 A CN115801474 A CN 115801474A
Authority
CN
China
Prior art keywords
current power
consumer
current
power generator
iteration
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
CN202310105315.1A
Other languages
Chinese (zh)
Other versions
CN115801474B (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.)
Tianju Dihe Suzhou Technology Co ltd
Original Assignee
Tianju Dihe Suzhou Technology 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 Tianju Dihe Suzhou Technology Co ltd filed Critical Tianju Dihe Suzhou Technology Co ltd
Priority to CN202310105315.1A priority Critical patent/CN115801474B/en
Publication of CN115801474A publication Critical patent/CN115801474A/en
Application granted granted Critical
Publication of CN115801474B publication Critical patent/CN115801474B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention discloses an electric power transaction method and system based on privacy calculation, a power utilization end and a power generation end, and relates to the technical field of computers. The method comprises the following steps: calculating a ciphertext of a second consensus factor of the current power generator and the current power consumer in the current iteration according to the ciphertext of the first consensus factor of the current power generator and the current power consumer and the ciphertext of the electric quantity transmitted by the current power generator to the current power consumer; receiving a second consensus factor obtained by decryption of the electric power trading platform, and calculating the electric quantity obtained by the current power consumer from the current power generator in the current iteration; and if the current power consumer meets the first stop condition in the current iteration, determining whether each power consumer and each power generator meet the second stop condition in the same iteration turn, if so, obtaining the target power consumption, and otherwise, sending a ciphertext of a second consensus factor, a ciphertext of the power obtained by the current power consumer from the current power generator and a convergence identifier of the current power consumer to the current power generator. The implementation can protect the privacy of the nodes.

Description

Privacy calculation-based power transaction method and system, power utilization end and power generation end
Technical Field
The invention relates to the technical field of computers, in particular to a power transaction method and system based on privacy calculation, a power utilization end and a power generation end.
Background
There are numerous nodes in a distributed power system and the power trading scheme is generally determined by a constrained global optimization algorithm. Namely, under the condition that constraint conditions are ensured to be met, an optimal solution with the lowest global cost is found, so that the cost generated by the power system is the lowest.
An existing power system generally adopts a centralized computing architecture as shown in fig. 1 to perform optimization computation, data required by the computation are concentrated into a centralized computing node, the centralized computing node uniformly computes an optimal solution, and the optimal solution is fed back to nodes A, B, C, D and E in the power system.
However, data of other nodes are disclosed to the centralized computing node, so that the privacy of the nodes cannot be protected, and the data security is low.
Disclosure of Invention
In view of this, embodiments of the present invention provide a power transaction method and system, a power consumption end and a power generation end based on privacy calculation, which can protect the privacy of nodes and improve data security.
In a first aspect, an embodiment of the present invention provides a power transaction method based on privacy computation, including:
receiving a ciphertext of a first consensus factor of a current power generator and a current power consumer, which is obtained by previous iteration and sent by the current power generator, a ciphertext of electric quantity transmitted by the current power generator and the current power consumer, and a convergence identifier of the current power generator; the cipher text of the first consensus factor of the current power generator and the current power consumer and the cipher text of the electric quantity transmitted by the current power generator to the current power consumer are obtained by homomorphic encryption;
calculating a ciphertext of a second consensus factor of the current power generator and the current power consumer in the current iteration according to the ciphertext of the first consensus factor of the current power generator and the current power consumer and the ciphertext of the electric quantity transmitted by the current power generator to the current power consumer;
sending the ciphertext of the second consensus factor of the current power generator and the current power consumer to an electric power trading platform so that the electric power trading platform decrypts the ciphertext of the second consensus factor of the current power generator and the current power consumer;
receiving a second consensus factor of the current power generator and the current power consumer, which is obtained by decrypting by the electric power transaction platform;
calculating the electric quantity acquired by the current power consumer from the current power producer in the current iteration according to a second consensus factor of the current power producer and the current power consumer;
determining whether the current power consumer meets a first stop condition in current iteration, if so, determining whether each power consumer and each power generator meet a second stop condition in the same iteration turn according to the convergence identifier of each power generator and the convergence identifier of each power consumer, if so, determining that the electric quantity acquired by the current power consumer from the current power generator is a target electric quantity, if the current power consumer does not meet the first stop condition in current iteration, or each power consumer and each power generator do not meet the second stop condition in the same iteration turn, using a public key provided by the electric power trading platform to perform homomorphic encryption on the electric quantity acquired by the current power consumer from the current power generator, and transmitting a ciphertext of a second consensus factor of the current power generator and the current power consumer, a ciphertext of the electric quantity acquired by the current power consumer from the current power generator and the convergence identifier of the current power consumer to the current power generator.
In a second aspect, an embodiment of the present invention provides a power transaction method based on privacy calculation, including:
receiving a ciphertext of a second consensus factor of the current power generator and the current power consumer, which is obtained by the previous iteration and sent by the current power consumer, a ciphertext of electric quantity acquired by the current power consumer from the current power generator and a convergence identifier of the current power consumer; the cipher text of the second consensus factor of the current power generator and the current power consumer and the cipher text of the electric quantity acquired by the current power consumer from the current power generator are obtained by homomorphic encryption;
calculating the ciphertext of the first consensus factor of the current power generator and the current power consumer in the current iteration according to the ciphertext of the second consensus factor of the current power generator and the current power consumer and the ciphertext of the electric quantity acquired by the current power consumer from the current power generator;
sending the ciphertext of the first consensus factor of the current power generator and the current power consumer to an electric power trading platform so that the electric power trading platform decrypts the ciphertext of the first consensus factor of the current power generator and the current power consumer;
receiving a first common recognition factor of the current power generator and the current power consumer obtained by decryption of the power trading platform;
calculating the electric quantity transmitted by the current power generation direction to the current power consumer in the current iteration according to the first common identification factor of the current power generator and the current power consumer;
determining whether the current power generator meets a third stop condition in current iteration, if so, determining whether each power consumer and each power generator meet a fourth stop condition in the same iteration turn according to the convergence identifier of each power generator and the convergence identifier of each power consumer, if so, determining that the electric quantity transmitted to the current power generator in the current power generation direction is a target electric quantity, if the current power generator does not meet the third stop condition in current iteration, or each power consumer and each power generator do not meet the fourth stop condition in the same iteration turn, using a public key provided by the power trading platform to homomorphically encrypt the electric quantity transmitted to the current power consumer in the current power generation direction, and transmitting a ciphertext of a first common identification factor of the current power generator and the current power consumer, a ciphertext of the electric quantity transmitted to the current power generator in the current power generation direction and the convergence identifier of the current power generator to the current power consumer.
In a third aspect, an embodiment of the present invention provides a power transaction method based on privacy computation, including:
receiving a ciphertext of a first consensus factor of a current power generator and a current power consumer, which is sent by the current power generator;
decrypting the ciphertext of the first consensus factor of the current power generator and the current power consumer based on homomorphic encryption;
sending the decrypted first consensus factor of the current power generator and the current power consumer to the current power generator;
receiving a ciphertext of a second consensus factor of the current power generator and the current power consumer, which is sent by the current power consumer;
based on homomorphic encryption, decrypting a ciphertext of a second consensus factor of the current power generator and the current power consumer;
and sending the decrypted second consensus factor of the current power generator and the current power consumer to the current power consumer.
In a fourth aspect, an embodiment of the present invention provides a power consumption terminal, including:
the receiving module is configured to receive a ciphertext of a first consensus factor of a current power generator and a current power consumer, which is sent by the current power generator and obtained by previous iteration, a ciphertext of transmission electric quantity of the current power consumer in the current power generation direction, and a convergence identifier of the current power generator; the cipher text of the first consensus factor of the current power generator and the current power consumer and the cipher text of the electric quantity transmitted by the current power generator to the current power consumer are obtained by homomorphic encryption;
the calculation module is configured to calculate a ciphertext of a second consensus factor of the current power generator and the current power consumer in the current iteration according to the ciphertext of the first consensus factor of the current power generator and the current power consumer and the ciphertext of the electric quantity transmitted by the current power generator to the current power consumer; sending the ciphertext of the second consensus factor of the current power generator and the current power consumer to an electric power trading platform so that the electric power trading platform decrypts the ciphertext of the second consensus factor of the current power generator and the current power consumer; receiving a second consensus factor of the current power generator and the current power consumer obtained by decrypting by the power trading platform; calculating the electric quantity acquired by the current power consumer from the current power consumer in the current iteration according to the second consensus factor of the current power consumer and the current power consumer;
the determining module is configured to determine whether the current power consumer meets a first stop condition in current iteration, if so, determine whether each power consumer and each power generator meet a second stop condition in the same iteration turn according to the convergence identifier of each power generator and the convergence identifier of each power consumer, if so, determine that the electric quantity acquired by the current power consumer from the current power generator is a target electric quantity, if the current power consumer does not meet the first stop condition in current iteration, or each power consumer and each power generator do not meet the second stop condition in the same iteration turn, use a public key provided by the electric power trading platform to homomorphically encrypt the electric quantity acquired by the current power consumer from the current power generator, and send a ciphertext of a second consensus factor between the current power generator and the current power consumer, a ciphertext of the electric quantity acquired by the current power consumer from the current power generator and the convergence identifier of the current power consumer to the current power generator.
In a fifth aspect, an embodiment of the present invention provides a power generation end, including:
the receiving module is configured to receive a ciphertext of a second consensus factor of the current power generator and the current power consumer, which is sent by the current power consumer and obtained by the previous iteration, a ciphertext of electric quantity acquired by the current power consumer from the current power generator, and a convergence identifier of the current power consumer; the cipher text of the second consensus factor of the current power generator and the current power consumer and the cipher text of the electric quantity acquired by the current power consumer from the current power generator are obtained by homomorphic encryption;
the calculation module is configured to calculate a ciphertext of a first consensus factor of the current power generator and the current power consumer in the current iteration according to a ciphertext of a second consensus factor of the current power generator and the current power consumer and a ciphertext of electric quantity acquired by the current power consumer from the current power generator; sending the ciphertext of the first common identification factor of the current power generator and the current power consumer to an electric power trading platform so that the electric power trading platform decrypts the ciphertext of the first common identification factor of the current power generator and the current power consumer; receiving a first common identification factor of the current power generator and the current power consumer obtained by decrypting the power trading platform; calculating the electric quantity transmitted by the current power generation direction to the current power consumer in the current iteration according to the first common identification factor of the current power generator and the current power consumer;
and the determining module is configured to determine whether the current power generator meets a third stopping condition in current iteration, if so, determine whether each power consumer and each power generator meet a fourth stopping condition in the same iteration turn according to the convergence identifier of each power generator and the convergence identifier of each power consumer, if so, determine that the electric quantity transmitted to the current power generator by the current power generator is a target electric quantity, if the current power generator does not meet the third stopping condition in the current iteration, or each power consumer and each power generator do not meet the fourth stopping condition in the same iteration turn, use a public key provided by the power trading platform to perform homomorphic encryption on the electric quantity transmitted to the current power consumer by the current power generator, and transmit a ciphertext of a first common factor between the current power generator and the current power consumer, a ciphertext of the electric quantity transmitted to the current power consumer by the current power generator and the convergence identifier of the current power generator to the current power consumer.
In a sixth aspect, an embodiment of the present invention provides an electric power transaction platform, including:
the receiving module is configured to receive a ciphertext of a first consensus factor of a current power generator and a current power consumer, which is sent by the current power generator; receiving a ciphertext of a second consensus factor of the current power generator and the current power consumer, which is sent by the current power consumer;
the decryption module is configured to decrypt the ciphertext of the first consensus factor of the current power generator and the current power consumer based on homomorphic encryption; decrypting a ciphertext of a second consensus factor of the current power generator and the current power consumer based on homomorphic encryption;
the transmitting module is configured to transmit the decrypted first consensus factor of the current power generator and the current power consumer to the current power generator; and sending the decrypted second consensus factor of the current power generator and the current power consumer to the current power consumer.
In a seventh aspect, an embodiment of the present invention provides a power transaction system based on privacy computation, including: the electricity utilization end, the electricity generation end and the electric power transaction platform are described in the embodiment.
In an eighth aspect, an embodiment of the present invention provides an electronic device, including:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement a method as in any one of the embodiments described above.
In a ninth aspect, the present invention provides a computer readable medium, on which a computer program is stored, and when the program is executed by a processor, the method according to any one of the above embodiments is implemented.
One embodiment of the above invention has the following advantages or benefits: by adopting a decentralized computing architecture, optimized computation is decomposed into a plurality of nodes to be executed, the nodes only know own characteristic data, the nodes do not know computation parameters of the other side, and information exchanged during synchronization between the nodes is hidden through a homomorphic encryption algorithm, so that the privacy of the nodes can be protected, and the data security is improved. Considering that the performance of each step of iterative computation is poor when the step is executed in a ciphertext mode, the embodiment of the invention decrypts an intermediate result generated in the iterative computation process through the electric power transaction platform, and executes subsequent steps by using a plaintext, so that the computation efficiency can be improved.
Further effects of the above-mentioned non-conventional alternatives will be described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
FIG. 1 is a schematic diagram of a centralized computing architecture provided by one embodiment of the present invention;
fig. 2 is a flowchart of a power transaction method based on privacy calculation applied to a power consumer according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a power trading system based on privacy calculations provided by an embodiment of the present invention;
fig. 4 is a flowchart of a power transaction method based on privacy calculation applied to a power generation end according to an embodiment of the present invention;
fig. 5 is a flowchart of a power transaction method based on privacy computation applied to a power transaction platform according to an embodiment of the present invention;
fig. 6 is a schematic diagram of a power consuming terminal according to an embodiment of the present invention;
FIG. 7 is a schematic diagram of a power generation terminal provided by one embodiment of the present invention;
FIG. 8 is a schematic diagram of an electrical trading platform provided in one embodiment of the present invention;
fig. 9 is a schematic structural diagram of a computer system suitable for implementing a terminal device or a server according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present invention are described below with reference to the accompanying drawings, in which various details of embodiments of the invention are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
In a distributed power system, the cost of a single node is typically calculated from a cost function.
One of the cost functions is as follows:
Figure SMS_1
wherein ,
Figure SMS_2
used for representing the generating capacity of the power generation party or the power consumption of the power utilization party,
Figure SMS_3
Figure SMS_4
the parameters of the cost function are determined by the power generation or utilization properties of the nodes, such as carbon emission generated by the power generation or utilization, the pollution degree to the environment and the like.
And determining an electric power trading scheme, namely calculating the generated energy or the used energy of each node when the total cost of the electric power system is the lowest. At the same time, the optimal solution needs to satisfy a specific constraint condition, e.g., constraint condition 1 is
Figure SMS_5
The constraint condition 1 represents that the target generated energy obtained by optimization is in the range of the upper limit and the lower limit of the generated energy and the target power consumption obtained by optimization is in the range of the upper limit and the lower limit of the power consumption; the constraint 2 is: the amount of power transmitted by the power generator m to the power consumer n is equal to the amount of power obtained by the power consumer n from the power generator m.
The existing method generally determines the target electricity consumption and the target power generation amount in a centralized manner, but the method cannot protect the privacy of the nodes and easily causes data leakage.
In view of this, as shown in fig. 2, an embodiment of the present invention provides a power transaction method based on privacy calculation, including:
step 201: and receiving a ciphertext of a first consensus factor of the current power generator and the current power consumer, which is obtained by the previous iteration and sent by the current power generator, a ciphertext of the transmission electric quantity of the current power consumer in the current power generation direction and a convergence identifier of the current power generator.
And the ciphertext of the first consensus factor of the current power generator and the current power consumer and the ciphertext of the electric quantity transmitted by the current power generator to the current power consumer are obtained by homomorphic encryption.
The method is applied to the power utilization end which is used by power consumers, and the embodiment of the invention takes the current power generation party as an example for explanation in consideration of the fact that a plurality of power generation parties exist. The first consensus factor is an intermediate result generated by the current power generator in the iterative process, the second consensus factor is an intermediate result generated by the current power consumer in the iterative process, and the generated first consensus factor and the generated second consensus factor may have differences for different optimization algorithms. And the convergence identifier of the current power generator obtained by the previous iteration is used for representing whether the previous iteration result of the current power generator converges or not.
Referring to the system shown in FIG. 3, an embodiment of the present invention employs a decentralized computing architecture.
Step 202: and calculating the ciphertext of the second consensus factor of the current power generator and the current power consumer in the current iteration according to the ciphertext of the first consensus factor of the current power generator and the current power consumer and the ciphertext of the electric quantity transmitted by the current power generator to the current power consumer.
Step 203: and sending the ciphertext of the second consensus factor of the current power generator and the current power consumer to the electric power trading platform so that the electric power trading platform decrypts the ciphertext of the second consensus factor of the current power generator and the current power consumer.
And the private key is stored in the electric power transaction platform, each node uses the corresponding public key to perform homomorphic encryption, and the electric power transaction platform uses the private key to decrypt the ciphertext. The nodes comprise a power generation party and a power utilization party.
Step 204: and receiving a second consensus factor of the current power generator and the current power consumer, which is obtained by decrypting by the power trading platform.
Subsequent calculation steps will be performed using the plaintext of the second consensus factor.
Step 205: and calculating the electric quantity acquired by the current power consumer from the current power producer in the current iteration according to the second consensus factor of the current power producer and the current power consumer.
Step 206: and (4) determining whether the current power consumer meets a first stop condition in the current iteration, if so, executing step 207, and otherwise, executing step 209.
The first stop condition may be adjusted according to an actual service requirement, for example, the first stop condition is that an iteration round reaches a set number threshold, or that an electric quantity acquired by a current power consumer from a current power generator in the current iteration is greater than a set electric quantity threshold, and the like. The second stop condition is similar to the first stop condition, and the second stop condition may be that the iteration rounds of each power consumer and each power generator reach the set number threshold, or that the power consumption of each power consumer and the power generation amount of each power generator reach the set electric quantity threshold in the same iteration round.
Step 207: and determining whether each power consumer and each power generator meet a second stop condition in the same iteration turn according to the convergence identifier of each power generator and the convergence identifier of each power consumer, if so, executing a step 208, and otherwise, executing a step 209.
Step 208: and determining the electric quantity acquired by the current power consumer from the current power generator as the target electric quantity.
Step 209: and using a public key provided by the electric power transaction platform to perform homomorphic encryption on the electric quantity acquired by the current power consumer from the current power generator, and sending a ciphertext of a second consensus factor of the current power generator and the current power consumer, the ciphertext of the electric quantity acquired by the current power consumer from the current power generator and a convergence identifier of the current power consumer to the current power generator.
The embodiment of the invention adopts a decentralized computing architecture, the optimized computation is decomposed into a plurality of nodes for execution, the nodes only know the characteristic data of the nodes, the nodes do not know the computation parameters of the other side, and the information exchanged during the synchronization of the nodes is hidden through a homomorphic encryption algorithm, so that the privacy of the nodes can be protected, and the data security is improved. Considering that the performance of each step of iterative computation is poor when the step is executed in a ciphertext mode, the embodiment of the invention decrypts an intermediate result generated in the iterative computation process through the electric power transaction platform, and executes subsequent steps by using a plaintext, so that the computation efficiency can be improved.
For convenience of description, the following embodiments describe the optimization process in detail by taking an RCI (delayed Consensus + Innovation) algorithm as an example only. The embodiment of the invention is also suitable for optimization algorithms containing constraint conditions, such as Lagrange relaxation and the like.
In an embodiment of the present invention, calculating a ciphertext of a second consensus factor of the current power generator and the current power consumer at the current iteration according to a ciphertext of a first consensus factor of the current power generator and the current power consumer and a ciphertext of an electric quantity transmitted by the current power generator to the current power consumer includes:
calculating a ciphertext of a second consensus factor of the current power generator and the current power consumer of the current iteration based on formula 1;
equation 1 includes:
Figure SMS_6
wherein ,
Figure SMS_7
a second consensus factor ciphertext for characterizing the current power generator and the current power consumer for the (k + 1) th iteration,
Figure SMS_8
a second consensus factor characterizing a current generator and a current consumer for a kth iteration,
Figure SMS_9
a ciphertext of a first consensus factor for characterizing a current power generator and a current power consumer of a kth iteration,
Figure SMS_10
the current power consumer used for representing the k iteration acquires the power from the current power generator,
Figure SMS_11
a ciphertext for representing the amount of power transmitted by the current power generator to the current consumer for the kth iteration,
Figure SMS_12
and
Figure SMS_13
is a parameter for controlling the iteration step in the previous iteration.
The embodiment of the invention adopts homomorphic encryption to obtain the ciphertext of the second consensus factor so as to improve the privacy and the safety of data.
In an embodiment of the present invention, calculating the electric quantity obtained by the current power consumer from the current power consumer in the current iteration according to a second consensus factor between the current power consumer and the current power consumer includes:
calculating the upper limit of the constraint factor of the current power utilization in the current iteration according to the formula 2;
the formula 2 includes:
Figure SMS_14
calculating the lower limit of the constraint factor of the current power utilization in the current iteration according to the formula 3;
equation 3 includes:
Figure SMS_15
according to formulas 4-6, calculating the electric quantity acquired by the current power consumer from the current power generator in the current iteration;
equation 4 includes:
Figure SMS_16
equation 5 includes:
Figure SMS_17
equation 6 includes:
Figure SMS_18
wherein ,
Figure SMS_26
an upper limit of a constraint factor for characterizing the current power usage in the (k + 1) th iteration,
Figure SMS_23
an upper limit of a constraint factor for characterizing a current power usage in a kth iteration,
Figure SMS_30
Figure SMS_29
for the parameter controlling the iteration step in the kth iteration,
Figure SMS_38
used for representing the electricity consumption of the current power consumers,
Figure SMS_28
the upper limit of the electricity consumption used for representing the current electricity user;
Figure SMS_33
a lower limit of a constraint factor for characterizing the current power usage in the (k + 1) th iteration,
Figure SMS_20
a lower bound of a constraint factor characterizing the current power usage in the kth iteration,
Figure SMS_35
the lower limit of the electricity consumption used for representing the current power consumers,
Figure SMS_19
a second consensus factor for characterizing the current generator and the current consumer for the (k + 1) th iteration,
Figure SMS_31
Figure SMS_25
parameters characterizing the power cost function of the current consumer,
Figure SMS_34
the method is used for representing the electric quantity acquired by the current power consumer from the current power generator,
Figure SMS_22
for characterizing the amount of power currently drawn by the consumer from the generator l,
Figure SMS_32
for characterizing a set of power generators other than n,
Figure SMS_27
Figure SMS_37
as an intermediate variable of the iterative process,
Figure SMS_24
for characterizingThe current power consumer for the (k + 1) th iteration acquires the power from the current power generator,
Figure SMS_36
the current power consumer used for representing the k iteration acquires the power from the current power generator,
Figure SMS_21
and the method is used for characterizing the electricity consumption of the current power consumer in the k iteration.
In one embodiment of the invention, the first stop condition comprises:
Figure SMS_39
wherein ,
Figure SMS_40
Figure SMS_41
and
Figure SMS_42
the three convergence thresholds can be set according to the service requirement.
Because the node cannot judge whether the ciphertext shared by other nodes is obtained by correct calculation of the iterative process, the iterative process is prevented from being tampered, in one embodiment of the invention, the method further comprises the following steps:
receiving an iterative process zero-knowledge proof of the previous iteration sent by the current power generator;
verifying whether the previous iteration process of the current power generator is correct or not according to an iteration process zero knowledge proof of the previous iteration sent by the current power generator, and if so, calculating a second consensus factor ciphertext of the current power generator and the current power consumer according to a ciphertext of a first consensus factor of the current power generator and the current power consumer and a ciphertext of electric quantity transmitted by the current power generator to the current power consumer;
and when the current power consumer does not meet the first stop condition in the current iteration, or each power consumer and each power generator do not meet the second stop condition in the same iteration turn, generating an iterative process zero-knowledge proof of the current iteration of the current power consumer, and sending the iterative process zero-knowledge proof of the current iteration of the current power consumer to the current power generator.
The embodiment of the invention verifies the authenticity of the iterative process through the zero knowledge proof of the iterative process, and ensures the correctness of the optimization process.
Each node can generate a corresponding iteration process zero-knowledge proof after each iteration so as to ensure that data transmitted by other nodes is correct.
The circuit of the current iteration of the current power consumer, which is proved by zero knowledge in the iteration process, comprises one or two of the following constraints:
(1) Executing the current iteration of the current power consumer by using a ciphertext of a first consensus factor of the current power producer and the current power consumer, which is obtained by the previous iteration and sent by the current power producer, a ciphertext of the transmission electric quantity of the current power producer in the current power producer and a convergence identifier of the current power producer;
(2) And performing current iteration of the current power consumer according to the execution steps of the optimization algorithm.
The constraints in the circuit for zero knowledge proof of the iterative process are not limited to the above-mentioned items, and can also be determined according to actual business requirements. Wherein the disclosure variables may include: the method comprises the steps that any one or more of a ciphertext of a first consensus factor of a current power generator and a current power consumer, a ciphertext of electric quantity transmitted by the current power generator to the current power consumer and a convergence identifier of the current power generator are obtained through previous iteration and sent by the current power generator, and any one or more of a ciphertext of a second consensus factor of the current power generator and the current power consumer, a ciphertext of electric quantity obtained by the current power consumer from the current power generator and a convergence identifier of the current power consumer are obtained through level iteration.
The private variables may include:
Figure SMS_43
Figure SMS_44
Figure SMS_45
Figure SMS_46
Figure SMS_47
and
Figure SMS_48
the private variable may also be other intermediate variables involved in the iterative process.
In one embodiment of the invention, the method further comprises:
receiving an optimization result zero-knowledge proof sent by a current power generator;
verifying whether the target generated energy transmitted by the current power generation direction to the current power consumer is correct or not according to the zero-knowledge proof of the optimization result sent by the current power generator, and informing other power generators and other power consumers of the verification result;
and when each power consumer and each power generator meet a second stop condition in the same iteration turn, generating an optimization result zero knowledge proof of the current power consumer, and sending the optimization result zero knowledge proof of the current power consumer to the current power generator.
The embodiment of the invention verifies the authenticity of the optimization result through the zero knowledge proof of the optimization result, and ensures the correctness of the optimization result. The power consumer can send the verification result to other nodes in the power system so as to improve the data security of the power system.
The current circuit proved by the optimization result of the power consumer with zero knowledge comprises one or two of the following constraints:
(1)
Figure SMS_49
i.e. the available power is in the upper and lower limit ranges.
(2) The electric quantity acquired by the current power consumer from the current power generator is equal to the electric quantity transmitted by the current power generator to the current power consumer.
The constraints in the circuit for which zero knowledge proof of the optimization results is not limited to the above-mentioned items, but may also be determined according to actual business requirements. Wherein the disclosure variables may include: the power generation direction transmits the power to the power consumer, and the power consumer obtains the power from the power generator.
The private variables may include:
Figure SMS_50
Figure SMS_51
any one or more of them.
As shown in fig. 4, an embodiment of the present invention provides a power transaction method based on privacy calculation, including:
step 401: and receiving a ciphertext of a second consensus factor of the current power generator and the current power consumer, which is obtained by previous iteration and sent by the current power consumer, a ciphertext of electric quantity acquired by the current power consumer from the current power generator and a convergence identifier of the current power consumer.
And the ciphertext of the second consensus factor of the current power generator and the current power consumer and the ciphertext of the electric quantity acquired by the current power consumer from the current power generator are obtained by homomorphic encryption.
The method is applied to a power generation end, the power generation end is used by a power generation party, and the embodiment of the invention takes the current power utilization party as an example for explanation in consideration of the fact that a plurality of power utilization parties exist. And the convergence identifier of the current power utilization party obtained by the previous iteration is used for representing whether the previous iteration result of the current power generation party is converged or not.
Embodiments of the present invention employ a decentralized computing architecture as shown in fig. 3.
Step 402: and calculating the ciphertext of the first consensus factor of the current power generator and the current power consumer in the current iteration according to the ciphertext of the second consensus factor of the current power generator and the current power consumer and the ciphertext of the electric quantity acquired by the current power consumer from the current power generator.
Step 403: and sending the ciphertext of the first common identification factor of the current power generator and the current power consumer to the electric power trading platform so that the electric power trading platform decrypts the ciphertext of the first common identification factor of the current power generator and the current power consumer.
Step 404: and receiving a first common identification factor of the current power generator and the current power consumer obtained by decrypting by the power trading platform.
Subsequent calculation steps will be performed using the plain text of the first consensus factor.
Step 405: and calculating the electric quantity transmitted by the current power generation direction to the current power consumer in the current iteration according to the first common identification factor of the current power generator and the current power consumer.
Step 406: and determining whether the current power generator meets a third stop condition in the current iteration, if so, executing step 407, and otherwise, executing step 409.
The third stopping condition may be adjusted according to an actual service requirement, for example, the third stopping condition is that the iteration round reaches a set number threshold, or the electric quantity acquired by the current power generation direction to the current power generation party in the current iteration is greater than a set electric quantity threshold, and the like. The fourth stop condition is similar to the third stop condition, and the fourth stop condition may be that each power consumer and each power generator reach a set threshold number of times in an iteration round, or that the power consumption of each power consumer and the power generation amount of each power generator reach a set threshold amount of power in the same iteration round.
Step 407: and determining whether each power consumer and each power generator meet a fourth stop condition in the same iteration turn according to the convergence identifier of each power generator and the convergence identifier of each power consumer, if so, executing step 408, and otherwise, executing step 409.
Step 408: and determining the electric quantity transmitted to the current power generation party from the current power generation direction as a target power generation quantity.
Step 409: and using a public key provided by the electric power trading platform to homomorphically encrypt the electric quantity transmitted by the current power consumer to the current power generation direction, and sending a ciphertext of a first consensus factor between the current power generator and the current power consumer, a ciphertext of the electric quantity transmitted by the current power consumer to the current power generation direction and a convergence identifier of the current power generator to the current power consumer.
The embodiment of the invention can protect the privacy of the node and improve the data security.
Still taking the RCI algorithm as an example, the optimization process on the power generator side will be explained.
In an embodiment of the present invention, calculating a ciphertext of a first consensus factor of a current power generator and a current power consumer at a current iteration according to a ciphertext of a second consensus factor of the current power generator and the current power consumer and a ciphertext of an electric quantity acquired by the current power consumer from the current power generator by the current power generator includes:
calculating a ciphertext of a first consensus factor of a current power generator and a current power consumer of grade iteration based on a formula 7;
equation 7 includes:
Figure SMS_52
wherein ,
Figure SMS_53
a ciphertext of a first consensus factor for characterizing the current power generator and the current power consumer for the (k + 1) th iteration,
Figure SMS_54
a first consensus factor characterizing a current power generator and a current power consumer for a kth iteration,
Figure SMS_55
a ciphertext of a second consensus factor for characterizing the current power generator and the current power consumer for the kth iteration,
Figure SMS_56
for characterizing the amount of power currently transmitted by the current power consumer in the current power generation direction of the kth iteration,
Figure SMS_57
a ciphertext for representing the amount of power obtained from the previous power generator by the current power utilization direction of the kth iteration,
Figure SMS_58
and
Figure SMS_59
is a parameter for controlling the iteration step in the previous iteration.
The embodiment of the invention adopts homomorphic encryption to obtain the ciphertext of the first consensus factor so as to improve the privacy and the safety of data.
In an embodiment of the present invention, calculating the amount of power transmitted to the current power consumer from the current power generation direction in the current iteration according to a first consensus factor between the current power generator and the current power consumer includes:
calculating the upper limit of the constraint factor of the current power generator in the grade iteration according to a formula 8;
equation 8 includes:
Figure SMS_60
calculating the lower limit of the constraint factor of the current power generator in the current iteration according to the formula 9;
equation 9 includes:
Figure SMS_61
calculating the electric quantity transmitted to the current power generator from the current power generation direction in the current iteration according to the formula 10-12;
equation 10 includes:
Figure SMS_62
equation 11 includes:
Figure SMS_63
equation 12 includes:
Figure SMS_64
wherein ,
Figure SMS_74
the upper limit of the constraint factor used to characterize the current power generator in the (k + 1) th iteration,
Figure SMS_68
an upper limit of a constraint factor for characterizing a current power generator in a kth iteration,
Figure SMS_79
Figure SMS_71
for the parameter controlling the iteration step in the kth iteration,
Figure SMS_82
used for representing the power generation amount of the current power generation party,
Figure SMS_70
the upper limit of the generated energy used for representing the current power generation party;
Figure SMS_81
the lower bound of the constraint factor characterizing the current power generator in the (k + 1) th iteration,
Figure SMS_67
a lower bound of a constraint factor characterizing the current power generator in the kth iteration,
Figure SMS_78
the lower limit of the electricity consumption used for representing the current power generation side,
Figure SMS_65
a first consensus factor for characterizing the current power generator and the current power consumer for the (k + 1) th iteration,
Figure SMS_76
Figure SMS_66
parameters characterizing the power cost function of the current power generator,
Figure SMS_77
for characterizing the amount of power transmitted by the current power consumer to the current power generation direction,
Figure SMS_73
is used for representing the electric quantity obtained from the current power generation party m to the power utilization party q,
Figure SMS_80
for characterizing a set of consumers other than m,
Figure SMS_72
Figure SMS_84
as an intermediate variable of the iterative process,
Figure SMS_75
for characterizing the amount of power transmitted by the current power consumer in the current power generation direction of the (k + 1) th iteration,
Figure SMS_83
for characterizing the amount of power currently transmitted by the current power consumer in the current power generation direction of the kth iteration,
Figure SMS_69
for characterizing the amount of power generated by the current power generator in the kth iteration.
In one embodiment of the invention, the third stop condition comprises:
Figure SMS_85
wherein ,
Figure SMS_86
Figure SMS_87
and
Figure SMS_88
the three convergence thresholds can be set according to the service requirement.
Because the node cannot judge whether the ciphertext shared by other nodes is obtained by correct calculation of the iterative process, the iterative process is prevented from being tampered, in one embodiment of the invention, the method further comprises the following steps:
receiving an iterative process zero-knowledge proof of the previous iteration sent by the current power consumer;
verifying whether the previous iteration process of the current power consumer is correct or not according to the iteration process zero knowledge proof of the previous iteration sent by the current power consumer, if so, executing the cryptograph of the second consensus factor of the current power generator and the current power consumer and the cryptograph of the electric quantity obtained by the current power consumer from the current power generator, and calculating the cryptograph of the first consensus factor of the current power generator and the current power consumer of the current iteration;
and when the current power generator does not meet the first stop condition in the current iteration, or each power consumer and each power generator do not meet the second stop condition in the same iteration turn, generating an iteration process zero knowledge proof of the current iteration of the current power generator, and sending the iteration process zero knowledge proof of the current iteration of the current power generator to the current power consumer.
The embodiment of the invention verifies the authenticity of the iterative process through the zero knowledge proof of the iterative process, and ensures the correctness of the optimization process.
Each node can generate a corresponding iteration process zero-knowledge proof after each iteration so as to ensure that data transmitted by other nodes is correct.
The circuit of the current iteration of the current power generator with zero knowledge proof of the iteration process comprises one or two of the following constraints:
(1) The current iteration of the current power generator is executed by using a ciphertext of a second consensus factor of the current power generator and the current power consumer, which is obtained by the previous iteration sent by the current power consumer, the ciphertext of electric quantity acquired by the current power consumer from the current power consumer and a convergence identifier of the current power consumer;
(2) And the current iteration of the current power generator is carried out according to the execution steps of the optimization algorithm.
The constraints in the circuit for zero knowledge proof of the iterative process are not limited to the above-mentioned items, and can also be determined according to actual business requirements. Wherein the disclosure variables may include: the method comprises the steps that a ciphertext of a second consensus factor of a current power generator and a current power consumer, which is obtained by the current power consumer in the previous iteration, a ciphertext of electric quantity acquired by the current power consumer from the current power consumer and a convergence identifier of the current power consumer are obtained, and one or more of the ciphertext of a first consensus factor of the current power generator and the current power consumer, the ciphertext of the electric quantity transmitted by the current power generator to the current power generator and the convergence identifier of the current power generator are obtained in the current iteration.
The private variables may include:
Figure SMS_89
Figure SMS_90
Figure SMS_91
Figure SMS_92
Figure SMS_93
and
Figure SMS_94
the private variable may also be other intermediate variables involved in the iterative process.
In one embodiment of the invention, the method further comprises:
receiving an optimization result zero-knowledge proof sent by a current power consumer;
verifying whether the target generated energy obtained by the current power consumer from the current power producer is correct or not according to the zero-knowledge proof of the optimization result sent by the current power consumer, and informing other power producers and other power consumers of the verification result;
and when each power consumer and each power generator meet a second stop condition in the same iteration turn, generating an optimization result zero-knowledge proof of the current power generator, and transmitting the optimization result zero-knowledge proof of the current power generator to the current power consumer.
The embodiment of the invention verifies the authenticity of the optimization result through the zero knowledge proof of the optimization result, and ensures the correctness of the optimization result. The power generator may send the verification result to other nodes in the power system to improve data security of the power system.
The circuit of the current power generation party with the optimization result of zero knowledge proof comprises one or two of the following constraints:
(1)
Figure SMS_95
namely, the power generation amount is within the upper and lower limit ranges.
(2) The electric quantity acquired by the current power consumer from the current power generator is equal to the electric quantity transmitted by the current power generator to the current power consumer.
The constraints in the circuit for which zero knowledge proof of the optimization results is not limited to the above-mentioned items, but may also be determined according to actual business requirements. Wherein the disclosure variables may include: the power generation direction transmits the power to the power consumer, and the power consumer obtains the power from the power generator.
The private variables may include:
Figure SMS_96
Figure SMS_97
any one or more of them.
As shown in fig. 5, an embodiment of the present invention provides a power transaction method based on privacy calculation, including:
step 501: and receiving a ciphertext of a first consensus factor of the current power generator and the current power consumer, which is sent by the current power generator.
Step 502: and decrypting the ciphertext of the first consensus factor of the current power generator and the current power consumer based on homomorphic encryption.
Step 503: and sending the decrypted first consensus factor of the current power generator and the current power consumer to the current power generator.
Step 504: and receiving a ciphertext of a second consensus factor of the current power generator and the current power consumer, which is sent by the current power consumer.
Step 505: and based on homomorphic encryption, decrypting the ciphertext of the second consensus factor of the current power generator and the current power consumer.
Step 506: and sending the decrypted second consensus factor of the current power generator and the current power consumer to the current power consumer.
The method is applied to the electric power transaction platform, the electric power transaction platform can store the private key used by homomorphic encryption and provide the public key for each power generation party and each power utilization party in the electric power system, so that each node can perform homomorphic encryption based on the public key, the privacy and the safety of the node can be protected, and the iteration efficiency can be improved.
As shown in fig. 6, an embodiment of the present invention provides a power consumption terminal, including:
the receiving module 601 is configured to receive a ciphertext of a first consensus factor between a current power generator and a current power consumer, a ciphertext of transmission electric quantity of the current power consumer in the current power generation direction, and a convergence identifier of the current power generator, which are sent by the current power generator and obtained by previous iteration; the cipher text of the first consensus factor of the current power generator and the current power consumer and the cipher text of the electric quantity transmitted by the current power generator to the current power consumer are obtained by homomorphic encryption;
the calculating module 602 is configured to calculate a ciphertext of a second consensus factor of the current power generator and the current power consumer at the current iteration according to the ciphertext of the first consensus factor of the current power generator and the current power consumer and the ciphertext of the electric quantity transmitted by the current power generator to the current power consumer; sending the ciphertext of the second consensus factor of the current power generator and the current power consumer to the electric power trading platform so that the electric power trading platform decrypts the ciphertext of the second consensus factor of the current power generator and the current power consumer; receiving a second consensus factor of the current power generator and the current power consumer obtained by decryption of the power trading platform; calculating the electric quantity acquired by the current power consumer from the current power consumer in the current iteration according to a second consensus factor of the current power consumer and the current power consumer;
the determining module 603 is configured to determine whether the current power consumer meets a first stop condition in the current iteration, if so, determine whether each power consumer and each power generator meet a second stop condition in the same iteration round according to the convergence identifier of each power generator and the convergence identifier of each power consumer, if so, determine that the electric quantity acquired by the current power consumer from the current power generator is a target electric quantity, if the current power consumer does not meet the first stop condition in the current iteration round, or each power consumer and each power generator do not meet the second stop condition in the same iteration round, use a public key provided by the power trading platform to homomorphically encrypt the electric quantity acquired by the current power consumer from the current power generator, and send a ciphertext of a second consensus factor between the current power generator and the current power consumer, a ciphertext of the electric quantity acquired by the current power consumer from the current power generator and the convergence identifier of the current power consumer to the current power generator.
In an embodiment of the present invention, the calculating module 602 is configured to calculate a ciphertext of a second consensus factor of the current power generator and the current power consumer in the current iteration based on formula 1;
equation 1 includes:
Figure SMS_98
wherein ,
Figure SMS_99
a second consensus factor ciphertext for characterizing the current power generator and the current power consumer for the (k + 1) th iteration,
Figure SMS_100
a second consensus factor characterizing the current generator and the current consumer for the kth iteration,
Figure SMS_101
a ciphertext of a first consensus factor for characterizing a current power generator and a current power consumer of a kth iteration,
Figure SMS_102
the current power consumer used for representing the k iteration acquires the power from the current power generator,
Figure SMS_103
a ciphertext for representing the power transmitted by the current power generation direction to the current power consumer for the kth iteration,
Figure SMS_104
and
Figure SMS_105
is a parameter for controlling the iteration step in the previous iteration.
In an embodiment of the present invention, the calculating module 602 is configured to calculate an upper limit of the constraint factor of the current power consumer in the current iteration according to formula 2;
the formula 2 includes:
Figure SMS_106
calculating the lower limit of the constraint factor of the current power utilization in the current iteration according to the formula 3;
equation 3 includes:
Figure SMS_107
according to formulas 4-6, calculating the electric quantity acquired by the current power consumer from the current power generator in the current iteration;
equation 4 includes:
Figure SMS_108
equation 5 includes:
Figure SMS_109
equation 6 includes:
Figure SMS_110
wherein ,
Figure SMS_114
an upper limit of a constraint factor for characterizing the current power usage in the (k + 1) th iteration,
Figure SMS_113
an upper limit of a constraint factor for characterizing a current power usage in a kth iteration,
Figure SMS_123
Figure SMS_115
for the parameter controlling the iteration step in the kth iteration,
Figure SMS_126
used for representing the electricity consumption of the current power consumers,
Figure SMS_121
the upper limit of the electricity consumption used for representing the current electricity user;
Figure SMS_129
a lower bound of a constraint factor characterizing the current power usage in the (k + 1) th iteration,
Figure SMS_117
a lower bound of a constraint factor characterizing the current power usage in the kth iteration,
Figure SMS_124
the lower limit of the electricity consumption used for representing the current power consumers,
Figure SMS_111
a second consensus factor for characterizing the current generator and the current consumer for the (k + 1) th iteration,
Figure SMS_122
Figure SMS_119
parameters characterizing the power cost function of the current consumer,
Figure SMS_125
the method is used for representing the electric quantity acquired by the current power consumer from the current power generator,
Figure SMS_120
for characterizing the current power utilizationThe amount of electricity obtained by the electricity generating party l,
Figure SMS_127
for characterizing a set of power generators other than n,
Figure SMS_118
Figure SMS_130
as an intermediate variable of the iterative process,
Figure SMS_116
the current power consumer used for representing the (k + 1) th iteration acquires the power from the current power generator,
Figure SMS_128
the current power consumer used for representing the k iteration acquires the power from the current power generator,
Figure SMS_112
and the method is used for characterizing the electricity consumption of the current power consumer in the k iteration.
In one embodiment of the invention, the first stop condition comprises:
Figure SMS_131
wherein ,
Figure SMS_132
Figure SMS_133
and
Figure SMS_134
three convergence thresholds.
In one embodiment of the invention, the determining module 603 is configured to receive an iterative process zero knowledge proof of its previous iteration sent by the current power generator; verifying whether the previous iteration process of the current power generator is correct or not according to an iteration process zero knowledge proof of the previous iteration sent by the current power generator, if so, calculating a second consensus factor ciphertext of the current power generator and the current power consumer according to a ciphertext of a first consensus factor of the current power generator and the current power consumer and a ciphertext of electric quantity transmitted by the current power generator and the current power consumer; and when the current power consumer does not meet the first stop condition in the current iteration, or each power consumer and each power generator do not meet the second stop condition in the same iteration turn, generating an iterative process zero-knowledge proof of the current iteration of the current power consumer, and sending the iterative process zero-knowledge proof of the current iteration of the current power consumer to the current power generator.
In an embodiment of the present invention, the determining module 603 is configured to receive a zero-knowledge proof of the optimization result sent by the current power generator; verifying whether the target generated energy transmitted by the current power consumer in the current power generation direction is correct according to the zero-knowledge proof of the optimization result sent by the current power generator, and informing other power generators and other power consumers of the verification result; and when each power consumer and each power generator meet a second stop condition in the same iteration turn, generating an optimization result zero knowledge proof of the current power consumer, and sending the optimization result zero knowledge proof of the current power consumer to the current power generator.
As shown in fig. 7, an embodiment of the present invention provides a power generation terminal, including:
the receiving module 701 is configured to receive a ciphertext of a second consensus factor between the current power generator and the current power consumer, which is sent by the current power consumer and obtained in the previous iteration, a ciphertext of electric quantity acquired by the current power consumer from the current power generator, and a convergence identifier of the current power consumer; the cipher text of the second consensus factor of the current power generator and the current power consumer and the cipher text of the electric quantity acquired by the current power consumer from the current power generator are obtained by homomorphic encryption;
the calculating module 702 is configured to calculate a ciphertext of a first consensus factor between the current power generator and the current power consumer at the current iteration according to a ciphertext of a second consensus factor between the current power generator and the current power consumer and a ciphertext of electric quantity acquired by the current power consumer from the current power generator; sending the ciphertext of the first common identification factor of the current power generator and the current power consumer to the electric power trading platform so that the electric power trading platform decrypts the ciphertext of the first common identification factor of the current power generator and the current power consumer; receiving a first common identification factor of a current power generator and a current power consumer obtained by decryption of a power trading platform; calculating the electric quantity transmitted by the current power generation direction to the current power consumer in the current iteration according to the first common identification factor of the current power generator and the current power consumer;
the determining module 703 is configured to determine whether the current power generator satisfies a third stop condition in the current iteration, if so, determine whether each power consumer and each power generator satisfy a fourth stop condition in the same iteration turn according to the convergence flag of each power generator and the convergence flag of each power consumer, if so, determine that the amount of power transmitted to the current power generator by the current power generator is a target amount of power generation, if the current power generator does not satisfy the third stop condition in the current iteration, or each power consumer and each power generator do not satisfy the fourth stop condition in the same iteration turn, use a public key provided by the power trading platform to homomorphically encrypt the amount of power transmitted to the current power consumer by the current power generator, and send a ciphertext of a first common factor between the current power generator and the current power consumer, a ciphertext of the amount of power transmitted to the current power consumer, and the convergence flag of the current power generator to the current power consumer.
In an embodiment of the present invention, the calculating module 702 is configured to calculate a ciphertext of a first consensus factor of a current power generator and a current power consumer of the rank iteration based on formula 7;
equation 7 includes:
Figure SMS_135
wherein ,
Figure SMS_136
a ciphertext of a first consensus factor for characterizing the current power generator and the current power consumer for the (k + 1) th iteration,
Figure SMS_137
a first consensus factor characterizing a current power generator and a current power consumer for a kth iteration,
Figure SMS_138
a ciphertext of a second consensus factor for characterizing the current power generator and the current power consumer for the kth iteration,
Figure SMS_139
for characterizing the amount of power currently transmitted by the current power consumer in the current power generation direction of the kth iteration,
Figure SMS_140
a ciphertext for representing the amount of power obtained from the previous power generator by the current power utilization direction of the kth iteration,
Figure SMS_141
and
Figure SMS_142
is a parameter for controlling the iteration step in the previous iteration.
In one embodiment of the invention, the calculation module 702 is configured to calculate an upper limit of the constraint factor of the current power generator in the rank iteration according to equation 8;
equation 8 includes:
Figure SMS_143
calculating the lower limit of the constraint factor of the current power generator in the current iteration according to the formula 9;
equation 9 includes:
Figure SMS_144
calculating the electric quantity transmitted to the current power generator from the current power generation direction in the current iteration according to the formula 10-12;
equation 10 includes:
Figure SMS_145
equation 11 includes:
Figure SMS_146
equation 12 includes:
Figure SMS_147
wherein ,
Figure SMS_158
the upper limit of the constraint factor used to characterize the current power generator in the (k + 1) th iteration,
Figure SMS_151
an upper limit of a constraint factor for characterizing a current power generator in a kth iteration,
Figure SMS_162
Figure SMS_152
for the parameter controlling the iteration step in the kth iteration,
Figure SMS_160
used for representing the power generation amount of the current power generation party,
Figure SMS_157
the upper limit of the generated energy used for representing the current power generation party;
Figure SMS_163
the lower bound of the constraint factor characterizing the current power generator in the (k + 1) th iteration,
Figure SMS_156
a lower bound of a constraint factor characterizing the current power generator in the kth iteration,
Figure SMS_166
the lower limit of the electricity consumption used for representing the current power generation side,
Figure SMS_149
for characterizingA first consensus factor between the current power generator and the current power consumer for the (k + 1) th iteration,
Figure SMS_159
Figure SMS_154
parameters characterizing the power cost function of the current power generator,
Figure SMS_164
for characterizing the amount of power transmitted by the current power consumer to the current power generation direction,
Figure SMS_150
is used for representing the electric quantity obtained from the current power generation party m to the power utilization party q,
Figure SMS_161
for characterizing a set of consumers other than m,
Figure SMS_153
Figure SMS_167
as an intermediate variable of the iterative process,
Figure SMS_155
for characterizing the amount of power transmitted by the current power consumer in the current power generation direction of the (k + 1) th iteration,
Figure SMS_165
for characterizing the amount of power transmitted by the current consumer in the current power generation direction of the kth iteration,
Figure SMS_148
for characterizing the amount of power generated by the current power generator in the kth iteration.
In one embodiment of the invention, the third stop condition comprises:
Figure SMS_168
wherein ,
Figure SMS_169
Figure SMS_170
and
Figure SMS_171
three convergence thresholds.
In an embodiment of the present invention, the determining module 703 is configured to receive an iterative process zero-knowledge proof of a previous iteration of the current consumer; verifying whether the previous iteration process of the current power consumer is correct or not according to the iteration process zero knowledge proof of the previous iteration sent by the current power consumer, if so, executing the cryptograph of the second consensus factor of the current power generator and the current power consumer and the cryptograph of the electric quantity obtained by the current power consumer from the current power generator, and calculating the cryptograph of the first consensus factor of the current power generator and the current power consumer of the current iteration; and when the current power generator does not meet the first stop condition in the current iteration, or each power consumer and each power generator do not meet the second stop condition in the same iteration turn, generating an iteration process zero knowledge proof of the current iteration of the current power generator, and sending the iteration process zero knowledge proof of the current iteration of the current power generator to the current power consumer.
In an embodiment of the present invention, the determining module 703 is configured to receive a zero-knowledge proof of the optimization result sent by the current power consumer; verifying whether the target generated energy obtained by the current power consumer from the current power generator is correct or not according to the zero-knowledge proof of the optimization result sent by the current power consumer, and informing other power generators and other power consumers of the verification result; and when each power consumer and each power generator meet a second stop condition in the same iteration turn, generating an optimization result zero knowledge proof of the current power generator, and transmitting the optimization result zero knowledge proof of the current power generator to the current power consumer.
As shown in fig. 8, an embodiment of the present invention provides an electric power transaction platform, including:
the receiving module 801 is configured to receive a ciphertext of a first consensus factor of a current power generator and a current power consumer, which is sent by the current power generator; receiving a ciphertext of a second consensus factor of the current power generator and the current power consumer, which is sent by the current power consumer;
the decryption module 802 is configured to decrypt ciphertext of a first consensus factor of the current power generator and the current power consumer based on homomorphic encryption; based on homomorphic encryption, decrypting a ciphertext of a second consensus factor of the current power generator and the current power consumer;
a sending module 803, configured to send the decrypted first consensus factor between the current power generator and the current power consumer to the current power generator; and sending the decrypted second consensus factor of the current power generator and the current power consumer to the current power consumer.
As shown in fig. 3, an embodiment of the present invention provides a power transaction system based on privacy calculation, including: the power consumption end 301 of any embodiment, the power generation end 302 of any embodiment, and the power trading platform 303 of any embodiment. The electric power transaction system comprises a plurality of power utilization ends and a plurality of power generation ends, and fig. 3 shows only one power utilization end and one power generation end.
An embodiment of the present invention provides an electronic device, including:
one or more processors;
a storage device for storing one or more programs,
when the one or more programs are executed by the one or more processors, the one or more processors are caused to implement the method of any of the embodiments as described above.
Embodiments of the present invention provide a computer-readable medium, on which a computer program is stored, which when executed by a processor implements the method according to any of the above embodiments.
Referring now to FIG. 9, shown is a block diagram of a computer system 900 suitable for use with a terminal device implementing an embodiment of the present invention. The terminal device shown in fig. 9 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 9, the computer system 900 includes a Central Processing Unit (CPU) 901 that can perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM) 902 or a program loaded from a storage section 908 into a Random Access Memory (RAM) 903. In the RAM 903, various programs and data necessary for the operation of the system 900 are also stored. The CPU901, ROM 902, and RAM 903 are connected to each other via a bus 904. An input/output (I/O) interface 905 is also connected to bus 904.
The following components are connected to the I/O interface 905: an input portion 906 including a keyboard, a mouse, and the like; an output section 907 including components such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage portion 908 including a hard disk and the like; and a communication section 909 including a network interface card such as a LAN card, a modem, or the like. The communication section 909 performs communication processing via a network such as the internet. The drive 910 is also connected to the I/O interface 905 as necessary. A removable medium 911 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 910 as necessary, so that a computer program read out therefrom is mounted into the storage section 908 as necessary.
In particular, according to the embodiments of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication section 909 and/or installed from the removable medium 911. The above-described functions defined in the system of the present invention are executed when the computer program is executed by a Central Processing Unit (CPU) 901.
It should be noted that the computer readable medium shown in the present invention can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present invention, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules described in the embodiments of the present invention may be implemented by software or hardware. The described modules may also be provided in a processor, which may be described as: a processor includes a sending module, an obtaining module, a determining module, and a first processing module. The names of these modules do not form a limitation on the modules themselves in some cases, and for example, the sending module may also be described as a "module sending a picture acquisition request to a connected server".
The above-described embodiments should not be construed as limiting the scope of the invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions can occur, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (19)

1. A power transaction method based on privacy calculation is characterized by comprising the following steps:
receiving a ciphertext of a first consensus factor of a current power generator and a current power consumer, which is obtained by previous iteration and sent by the current power generator, a ciphertext of electric quantity transmitted by the current power generator and the current power consumer, and a convergence identifier of the current power generator; the cipher text of the first consensus factor of the current power generator and the current power consumer and the cipher text of the electric quantity transmitted by the current power generator to the current power consumer are obtained by homomorphic encryption;
calculating the ciphertext of a second consensus factor of the current power generator and the current power consumer in the current iteration according to the ciphertext of the first consensus factor of the current power generator and the current power consumer and the ciphertext of the electric quantity transmitted by the current power generator to the current power consumer;
sending the ciphertext of the second consensus factor of the current power generator and the current power consumer to an electric power trading platform so that the electric power trading platform decrypts the ciphertext of the second consensus factor of the current power generator and the current power consumer;
receiving a second consensus factor of the current power generator and the current power consumer obtained by decrypting by the power trading platform;
calculating the electric quantity acquired by the current power consumer from the current power producer in the current iteration according to a second consensus factor of the current power producer and the current power consumer;
determining whether the current power consumer meets a first stop condition in current iteration, if so, determining whether each power consumer and each power generator meet a second stop condition in the same iteration turn according to the convergence identifier of each power generator and the convergence identifier of each power consumer, if so, determining that the electric quantity acquired by the current power consumer from the current power generator is a target electric quantity, if the current power consumer does not meet the first stop condition in current iteration, or each power consumer and each power generator do not meet the second stop condition in the same iteration turn, using a public key provided by the electric power trading platform to perform homomorphic encryption on the electric quantity acquired by the current power consumer from the current power generator, and transmitting a ciphertext of a second consensus factor of the current power generator and the current power consumer, a ciphertext of the electric quantity acquired by the current power consumer from the current power generator and the convergence identifier of the current power consumer to the current power generator.
2. The method of claim 1,
calculating the ciphertext of the second consensus factor of the current power generator and the current power consumer in the current iteration according to the ciphertext of the first consensus factor of the current power generator and the current power consumer and the ciphertext of the electric quantity transmitted by the current power generator and the current power consumer, and the calculating comprises the following steps:
calculating a ciphertext of a second consensus factor of the current power generator and the current power consumer of the current iteration based on formula 1;
equation 1 includes:
Figure QLYQS_1
wherein ,
Figure QLYQS_2
a second consensus factor ciphertext for characterizing the current power generator and the current power consumer for the (k + 1) th iteration,
Figure QLYQS_3
a second consensus factor characterizing the current generator and the current consumer for the kth iteration,
Figure QLYQS_4
a ciphertext of a first consensus factor for characterizing a current power generator and a current power consumer of a kth iteration,
Figure QLYQS_5
the current power consumer used for representing the k iteration acquires the power from the current power generator,
Figure QLYQS_6
a ciphertext for representing the power transmitted by the current power generation direction to the current power consumer for the kth iteration,
Figure QLYQS_7
and
Figure QLYQS_8
is a parameter for controlling the iteration step in the previous iteration.
3. The method of claim 1,
calculating the electric quantity acquired by the current power consumer from the current power consumer in the current iteration according to the second consensus factor of the current power consumer and the current power consumer, wherein the calculation comprises the following steps:
calculating the upper limit of the constraint factor of the current power utilization in the current iteration according to formula 2;
the formula 2 includes:
Figure QLYQS_9
calculating the lower limit of the constraint factor of the current power consumer in the current iteration according to formula 3;
equation 3 includes:
Figure QLYQS_10
according to formulas 4-6, calculating the electric quantity acquired by the current power consumer from the current power generator in the current iteration;
equation 4 includes:
Figure QLYQS_11
equation 5 includes:
Figure QLYQS_12
equation 6 includes:
Figure QLYQS_13
wherein ,
Figure QLYQS_24
an upper limit of a constraint factor for characterizing the current power usage in the (k + 1) th iteration,
Figure QLYQS_20
an upper limit of a constraint factor for characterizing the current power usage in a kth iteration,
Figure QLYQS_27
Figure QLYQS_21
for the parameter controlling the iteration step in the kth iteration,
Figure QLYQS_33
for characterizing the current power usage amount of the electricity consumer,
Figure QLYQS_22
the upper limit of the electricity consumption used for representing the current electricity consumer;
Figure QLYQS_29
a lower limit of a constraint factor characterizing the current power usage in the (k + 1) th iteration,
Figure QLYQS_23
a lower bound of a constraint factor characterizing the current power usage in a kth iteration,
Figure QLYQS_32
a lower limit of the power consumption for characterizing the current power consumer,
Figure QLYQS_14
a second consensus factor for characterizing the current generator and the current consumer for the (k + 1) th iteration,
Figure QLYQS_25
Figure QLYQS_16
parameters characterizing a power cost function of the current power consumer,
Figure QLYQS_28
for characterizing the amount of power obtained by the current consumer from the current power generator,
Figure QLYQS_19
for characterizing theThe amount of power currently obtained by the electricity consumer from the electricity generator l,
Figure QLYQS_26
for characterizing a set of power generators other than n,
Figure QLYQS_17
Figure QLYQS_30
as an intermediate variable of the iterative process,
Figure QLYQS_18
the current power consumer used for representing the (k + 1) th iteration acquires the power from the current power generator,
Figure QLYQS_31
the current power consumer used for representing the k iteration acquires the power from the current power generator,
Figure QLYQS_15
and the method is used for characterizing the electricity consumption of the current power consumer in the k iteration.
4. The method of claim 3,
the first stop condition includes:
Figure QLYQS_34
wherein ,
Figure QLYQS_35
Figure QLYQS_36
and
Figure QLYQS_37
there are three convergence thresholds.
5. The method of claim 1, further comprising:
receiving an iterative process zero-knowledge proof of the previous iteration sent by the current power generator;
verifying whether the previous iteration process of the current power generator is correct or not according to an iteration process zero knowledge proof of the previous iteration sent by the current power generator, if so, executing the ciphertext of a second consensus factor of the current power generator and the current power consumer according to the ciphertext of the first consensus factor of the current power generator and the current power consumer and the ciphertext of the electric quantity transmitted by the current power generator to the current power consumer, and calculating the ciphertext of the second consensus factor of the current power generator and the current power consumer in the current iteration;
and when the current power consumer does not meet a first stop condition in the current iteration, or each power consumer and each power generator do not meet a second stop condition in the same iteration turn, generating an iterative process zero knowledge proof of the current iteration of the current power consumer, and sending the iterative process zero knowledge proof of the current iteration of the current power consumer to the current power generator.
6. The method of claim 1, further comprising:
receiving an optimization result zero-knowledge proof sent by the current power generator;
verifying whether the target power generation amount transmitted by the current power generation party to the current power utilization party is correct according to a zero-knowledge proof of the optimization result sent by the current power generation party, and informing other power generation parties and other power utilization parties of the verification result;
and when each power consumer and each power generator meet a second stop condition in the same iteration turn, generating an optimization result zero knowledge proof of the current power consumer, and sending the optimization result zero knowledge proof of the current power consumer to the current power generator.
7. A power transaction method based on privacy calculation is characterized by comprising the following steps:
receiving a ciphertext of a second consensus factor of the current power generator and the current power consumer, which is obtained by the previous iteration and sent by the current power consumer, a ciphertext of electric quantity acquired by the current power consumer from the current power generator and a convergence identifier of the current power consumer; the cipher text of the second consensus factor of the current power generator and the current power consumer and the cipher text of the electric quantity acquired by the current power consumer from the current power generator are obtained by homomorphic encryption;
calculating the ciphertext of the first consensus factor of the current power generator and the current power consumer in the current iteration according to the ciphertext of the second consensus factor of the current power generator and the current power consumer and the ciphertext of the electric quantity acquired by the current power consumer from the current power generator;
sending the ciphertext of the first common identification factor of the current power generator and the current power consumer to an electric power trading platform so that the electric power trading platform decrypts the ciphertext of the first common identification factor of the current power generator and the current power consumer;
receiving a first common identification factor of the current power generator and the current power consumer obtained by decrypting the power trading platform;
calculating the electric quantity transmitted by the current power generation direction to the current power consumer in the current iteration according to the first common identification factor of the current power generator and the current power consumer;
determining whether the current power generator meets a third stop condition in current iteration, if so, determining whether each power consumer and each power generator meet a fourth stop condition in the same iteration turn according to the convergence identifier of each power generator and the convergence identifier of each power consumer, if so, determining that the electric quantity transmitted to the current power generator in the current power generation direction is a target electric quantity, if the current power generator does not meet the third stop condition in current iteration, or each power consumer and each power generator do not meet the fourth stop condition in the same iteration turn, using a public key provided by the power trading platform to homomorphically encrypt the electric quantity transmitted to the current power consumer in the current power generation direction, and transmitting a ciphertext of a first common identification factor of the current power generator and the current power consumer, a ciphertext of the electric quantity transmitted to the current power generator in the current power generation direction and the convergence identifier of the current power generator to the current power consumer.
8. The method of claim 7,
calculating the ciphertext of the first consensus factor of the current power generator and the current power consumer in the current iteration according to the ciphertext of the second consensus factor of the current power generator and the ciphertext of the second consensus factor of the current power consumer and the ciphertext of the electric quantity acquired by the current power consumer from the current power generator, and the calculating comprises the following steps:
calculating a ciphertext of a first consensus factor of a current power generator and a current power consumer of the grade iteration based on a formula 7;
equation 7 includes:
Figure QLYQS_38
wherein ,
Figure QLYQS_39
a ciphertext of a first consensus factor for characterizing the current power generator and the current power consumer for the (k + 1) th iteration,
Figure QLYQS_40
a first consensus factor characterizing a current power generator and a current power consumer for a kth iteration,
Figure QLYQS_41
a ciphertext of a second consensus factor for characterizing a current power generator and a current power consumer for a kth iteration,
Figure QLYQS_42
for characterizing the amount of power currently transmitted by the current power consumer in the current power generation direction of the kth iteration,
Figure QLYQS_43
a ciphertext for representing the amount of power obtained from the previous power generator by the current power utilization direction of the kth iteration,
Figure QLYQS_44
and
Figure QLYQS_45
is a parameter for controlling the iteration step in the previous iteration.
9. The method of claim 7,
calculating the electric quantity transmitted by the current power generation direction to the current power consumer in the current iteration according to the first common identification factor of the current power generator and the current power consumer, wherein the calculation comprises the following steps:
calculating the upper limit of the constraint factor of the current power generator in the grade iteration according to a formula 8;
equation 8 includes:
Figure QLYQS_46
calculating the lower limit of the constraint factor of the current power generator in the current iteration according to a formula 9;
equation 9 includes:
Figure QLYQS_47
calculating the electric quantity transmitted to the current power generator from the current power generation direction in the current iteration according to the formula 10-12;
the formula 10 includes:
Figure QLYQS_48
equation 11 includes:
Figure QLYQS_49
equation 12 includes:
Figure QLYQS_50
wherein ,
Figure QLYQS_56
an upper limit of a constraint factor characterizing the current power generator in the (k + 1) th iteration,
Figure QLYQS_52
an upper limit of a constraint factor characterizing the current power generator in the kth iteration,
Figure QLYQS_64
Figure QLYQS_55
for the parameter controlling the iteration step in the kth iteration,
Figure QLYQS_70
for characterizing the amount of power generated by the current power generator,
Figure QLYQS_58
the upper limit of the generated energy used for representing the current power generation party;
Figure QLYQS_65
a lower limit of a constraint factor characterizing the current power generator in the (k + 1) th iteration,
Figure QLYQS_59
a lower bound of a constraint factor characterizing the current generator in the kth iteration,
Figure QLYQS_68
a lower limit of power usage for characterizing the current power generation,
Figure QLYQS_51
first consensus factor for characterizing current power generator and current power consumer of (k + 1) th iteration,
Figure QLYQS_62
Figure QLYQS_53
A parameter characterizing a power cost function of the current power generator,
Figure QLYQS_63
for characterizing the amount of power transmitted by the current power generation direction to the current power consumer,
Figure QLYQS_57
is used for representing the electric quantity obtained from the current power generation direction m to the power consumer q,
Figure QLYQS_69
for characterizing a set of consumers other than m,
Figure QLYQS_60
Figure QLYQS_67
as an intermediate variable of the iterative process,
Figure QLYQS_61
for characterizing the amount of power transmitted by the current power consumer in the current power generation direction of the (k + 1) th iteration,
Figure QLYQS_66
for characterizing the amount of power currently transmitted by the current power consumer in the current power generation direction of the kth iteration,
Figure QLYQS_54
for characterizing the amount of power generated by the current power generator in the kth iteration.
10. The method of claim 9,
the third stop condition includes:
Figure QLYQS_71
wherein ,
Figure QLYQS_72
Figure QLYQS_73
and
Figure QLYQS_74
three convergence thresholds.
11. The method of claim 7, further comprising:
receiving an iterative process zero-knowledge proof of the previous iteration sent by the current power consumer;
verifying whether the previous iteration process of the current power consumer is correct or not according to an iteration process zero knowledge proof of the previous iteration sent by the current power consumer, if so, executing the ciphertext according to a second common identification factor of the current power generator and the current power consumer and the ciphertext of the electric quantity acquired by the current power consumer from the current power generator, and calculating the ciphertext of a first common identification factor of the current power generator and the current power consumer in the current iteration;
and when the current power generator does not meet a first stop condition in the current iteration, or each power consumer and each power generator do not meet a second stop condition in the same iteration turn, generating an iteration process zero knowledge proof of the current iteration of the current power generator, and sending the iteration process zero knowledge proof of the current iteration of the current power generator to the current power consumer.
12. The method of claim 7, further comprising:
receiving an optimization result zero-knowledge proof sent by the current power consumer;
verifying whether the target power generation amount obtained by the current power consumer from the current power generator is correct or not according to the zero-knowledge proof of the optimization result sent by the current power consumer, and informing other power generators and other power consumers of the verification result;
and when each power consumer and each power generator meet a second stop condition in the same iteration turn, generating an optimization result zero knowledge proof of the current power generator, and sending the optimization result zero knowledge proof of the current power generator to the current power consumer.
13. A power transaction method based on privacy calculation is characterized by comprising the following steps:
receiving a ciphertext of a first consensus factor of a current power generator and a current power consumer, which is sent by the current power generator;
decrypting the ciphertext of the first consensus factor of the current power generator and the current power consumer based on homomorphic encryption;
sending the decrypted first consensus factor of the current power generator and the current power consumer to the current power generator;
receiving a ciphertext of a second consensus factor of the current power generator and the current power consumer, which is sent by the current power consumer;
based on homomorphic encryption, decrypting a ciphertext of a second consensus factor of the current power generator and the current power consumer;
and sending the decrypted second consensus factor of the current power generator and the current power consumer to the current power consumer.
14. A power terminal, comprising:
the receiving module is configured to receive a ciphertext of a first consensus factor of a current power generator and a current power consumer, which is sent by the current power generator and obtained by previous iteration, a ciphertext of transmission electric quantity of the current power consumer in the current power generation direction, and a convergence identifier of the current power generator; the cryptograph of the first consensus factor between the current power generator and the current power consumer and the cryptograph of the electric quantity transmitted by the current power generator to the current power consumer are obtained by homomorphic encryption;
the calculation module is configured to calculate a ciphertext of a second consensus factor of the current power generator and the current power consumer in the current iteration according to the ciphertext of the first consensus factor of the current power generator and the current power consumer and the ciphertext of the electric quantity transmitted by the current power generator to the current power consumer; sending the ciphertext of the second consensus factor of the current power generator and the current power consumer to an electric power trading platform so that the electric power trading platform decrypts the ciphertext of the second consensus factor of the current power generator and the current power consumer; receiving a second consensus factor of the current power generator and the current power consumer obtained by decrypting by the power trading platform; calculating the electric quantity acquired by the current power consumer from the current power consumer in the current iteration according to the second consensus factor of the current power consumer and the current power consumer;
the determining module is configured to determine whether the current power consumer meets a first stop condition in current iteration, if so, determine whether each power consumer and each power generator meet a second stop condition in the same iteration turn according to the convergence identifier of each power generator and the convergence identifier of each power consumer, if so, determine that the electric quantity acquired by the current power consumer from the current power generator is a target electric quantity, if the current power consumer does not meet the first stop condition in current iteration, or each power consumer and each power generator do not meet the second stop condition in the same iteration turn, use a public key provided by the electric power trading platform to homomorphically encrypt the electric quantity acquired by the current power consumer from the current power generator, and send a ciphertext of a second consensus factor between the current power generator and the current power consumer, a ciphertext of the electric quantity acquired by the current power consumer from the current power generator and the convergence identifier of the current power consumer to the current power generator.
15. A power generation terminal, comprising:
the receiving module is configured to receive a ciphertext of a second consensus factor of the current power generator and the current power consumer, which is sent by the current power consumer and obtained by the previous iteration, a ciphertext of electric quantity acquired by the current power consumer from the current power generator, and a convergence identifier of the current power consumer; the cipher text of the second consensus factor of the current power generator and the current power consumer and the cipher text of the electric quantity acquired by the current power consumer from the current power generator are obtained by homomorphic encryption;
the calculation module is configured to calculate a ciphertext of a first consensus factor of the current power generator and the current power consumer at the current iteration according to a ciphertext of a second consensus factor of the current power generator and the current power consumer and a ciphertext of electric quantity acquired by the current power consumer from the current power generator; sending the ciphertext of the first common identification factor of the current power generator and the current power consumer to an electric power trading platform so that the electric power trading platform decrypts the ciphertext of the first common identification factor of the current power generator and the current power consumer; receiving a first common recognition factor of the current power generator and the current power consumer obtained by decryption of the power trading platform; calculating the electric quantity transmitted by the current power generation direction to the current power consumer in the current iteration according to the first common identification factor of the current power generator and the current power consumer;
a determining module configured to determine whether the current power generator satisfies a third stop condition in a current iteration, if so, determine whether each power consumer and each power generator satisfy a fourth stop condition in the same iteration turn according to a convergence identifier of each power generator and a convergence identifier of each power consumer, if so, determine that the electric quantity transmitted by the current power generator to the current power generator is a target electric quantity, if the current power generator does not satisfy the third stop condition in the current iteration turn, or each power consumer and each power generator do not satisfy the fourth stop condition in the same iteration turn, use a public key provided by the power trading platform to homomorphically encrypt the electric quantity transmitted by the current power generator to the current power consumer, and transmit a ciphertext of a first common factor between the current power generator and the current power consumer, a ciphertext of the electric quantity transmitted by the current power generator to the current power consumer and the convergence identifier of the current power generator.
16. An electric power trading platform, comprising:
the receiving module is configured to receive a ciphertext of a first consensus factor of a current power generator and a current power consumer, which is sent by the current power generator; receiving a ciphertext of a second consensus factor of the current power generator and the current power consumer, which is sent by the current power consumer;
the decryption module is configured to decrypt the ciphertext of the first consensus factor of the current power generator and the current power consumer based on homomorphic encryption; based on homomorphic encryption, decrypting a ciphertext of a second consensus factor of the current power generator and the current power consumer;
the transmitting module is configured to transmit the decrypted first consensus factor of the current power generator and the current power consumer to the current power generator; and sending the decrypted second consensus factor of the current power generator and the current power consumer to the current power consumer.
17. A privacy-computation-based power transaction system, comprising: the electricity consumer terminal of claim 14, the electricity generator terminal of claim 15, the electricity trading platform of claim 16.
18. An electronic device, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-13.
19. A computer-readable medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1-13.
CN202310105315.1A 2023-02-13 2023-02-13 Power transaction method and system based on privacy calculation, power utilization end and power generation end Active CN115801474B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310105315.1A CN115801474B (en) 2023-02-13 2023-02-13 Power transaction method and system based on privacy calculation, power utilization end and power generation end

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310105315.1A CN115801474B (en) 2023-02-13 2023-02-13 Power transaction method and system based on privacy calculation, power utilization end and power generation end

Publications (2)

Publication Number Publication Date
CN115801474A true CN115801474A (en) 2023-03-14
CN115801474B CN115801474B (en) 2023-06-20

Family

ID=85431002

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310105315.1A Active CN115801474B (en) 2023-02-13 2023-02-13 Power transaction method and system based on privacy calculation, power utilization end and power generation end

Country Status (1)

Country Link
CN (1) CN115801474B (en)

Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3203679A1 (en) * 2016-02-04 2017-08-09 ABB Schweiz AG Machine learning based on homomorphic encryption
CN107172043A (en) * 2017-05-15 2017-09-15 西安邮电大学 A kind of smart power grid user sale of electricity method based on homomorphic cryptography
CN108573438A (en) * 2018-05-09 2018-09-25 深圳汇创联合自动化控制有限公司 A kind of autonomous transaction system of custom power based on block chain
CN111429138A (en) * 2020-03-25 2020-07-17 中国工商银行股份有限公司 Block link point data safety interaction method and first interaction node
CN111931209A (en) * 2020-08-18 2020-11-13 金网络(北京)电子商务有限公司 Contract information verification method and device based on zero knowledge certification
CN112257102A (en) * 2020-09-28 2021-01-22 铭数科技(青岛)有限公司 Energy transaction privacy protection method based on block chain
CN113507513A (en) * 2021-06-30 2021-10-15 电子科技大学 Zk-snark-based ubiquitous power Internet of things transaction data management method
CN113691361A (en) * 2021-08-25 2021-11-23 上海万向区块链股份公司 Alliance chain privacy protection method and system based on homomorphic encryption and zero knowledge proof
CN113946868A (en) * 2021-10-27 2022-01-18 国网江苏省电力有限公司无锡供电分公司 Power demand response privacy protection calculation method based on block chain
CN114358782A (en) * 2021-12-06 2022-04-15 北京众享比特科技有限公司 Block chain transaction auditing method, device, equipment and storage medium
CN114493709A (en) * 2022-01-29 2022-05-13 国网能源研究院有限公司 Power demand response transaction subsidy calculation method, system and device
CN114547677A (en) * 2022-01-29 2022-05-27 国网青海省电力公司电力科学研究院 Multi-party electric power department collaborative user privacy protection and tracing method and system
CN114710258A (en) * 2022-03-01 2022-07-05 北京航空航天大学 Privacy calculation method and system for power data, electronic equipment and storage medium
CN115689747A (en) * 2022-10-25 2023-02-03 清华大学 Encryption method and device for transaction information in market transaction process of power system

Patent Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3203679A1 (en) * 2016-02-04 2017-08-09 ABB Schweiz AG Machine learning based on homomorphic encryption
CN107172043A (en) * 2017-05-15 2017-09-15 西安邮电大学 A kind of smart power grid user sale of electricity method based on homomorphic cryptography
CN108573438A (en) * 2018-05-09 2018-09-25 深圳汇创联合自动化控制有限公司 A kind of autonomous transaction system of custom power based on block chain
CN111429138A (en) * 2020-03-25 2020-07-17 中国工商银行股份有限公司 Block link point data safety interaction method and first interaction node
CN111931209A (en) * 2020-08-18 2020-11-13 金网络(北京)电子商务有限公司 Contract information verification method and device based on zero knowledge certification
CN112257102A (en) * 2020-09-28 2021-01-22 铭数科技(青岛)有限公司 Energy transaction privacy protection method based on block chain
CN113507513A (en) * 2021-06-30 2021-10-15 电子科技大学 Zk-snark-based ubiquitous power Internet of things transaction data management method
CN113691361A (en) * 2021-08-25 2021-11-23 上海万向区块链股份公司 Alliance chain privacy protection method and system based on homomorphic encryption and zero knowledge proof
CN113946868A (en) * 2021-10-27 2022-01-18 国网江苏省电力有限公司无锡供电分公司 Power demand response privacy protection calculation method based on block chain
CN114358782A (en) * 2021-12-06 2022-04-15 北京众享比特科技有限公司 Block chain transaction auditing method, device, equipment and storage medium
CN114493709A (en) * 2022-01-29 2022-05-13 国网能源研究院有限公司 Power demand response transaction subsidy calculation method, system and device
CN114547677A (en) * 2022-01-29 2022-05-27 国网青海省电力公司电力科学研究院 Multi-party electric power department collaborative user privacy protection and tracing method and system
CN114710258A (en) * 2022-03-01 2022-07-05 北京航空航天大学 Privacy calculation method and system for power data, electronic equipment and storage medium
CN115689747A (en) * 2022-10-25 2023-02-03 清华大学 Encryption method and device for transaction information in market transaction process of power system

Also Published As

Publication number Publication date
CN115801474B (en) 2023-06-20

Similar Documents

Publication Publication Date Title
CN107483212B (en) Method for generating digital signature by cooperation of two parties
US8667292B2 (en) Privacy-preserving metering with low overhead
Kim et al. A secure smart-metering protocol over power-line communication
CN112380578A (en) Edge computing framework based on block chain and trusted execution environment
EP2582085A1 (en) Generating implicit certificates
JP2007049708A (en) System and method for updating keys used for public key cryptography
CN109104279A (en) A kind of encryption method of electric power data, system and terminal device
US9166790B2 (en) Commission information generator for making processes on communication performed by another computer
US20170272244A1 (en) Public-key encryption system
US20180034630A1 (en) Public-key encryption system
CN105897784B (en) Internet-of-things terminal equipment encryption communication method and device
US20130091362A1 (en) Generating implicit certificates
CN110597836B (en) Information inquiry request response method and device based on block chain network
US20180302220A1 (en) User attribute matching method and terminal
CN115203749B (en) Data transaction method and system based on block chain
Qin et al. Simultaneous authentication and secrecy in identity-based data upload to cloud
CN114125831B (en) 5G smart grid user side data acquisition method and system based on proxy re-encryption
CN109547413A (en) The access control method of convertible data cloud storage with data source authentication
CN117150523A (en) Distributed power negotiation privacy protection method and device and electronic equipment
Jiang et al. Secure and privacy-preserving energy trading scheme based on blockchain
CN111159727B (en) Multi-party cooperation oriented Bayes classifier safety generation system and method
US10116439B2 (en) Encrypted data computation system, device, and program
CN115801474B (en) Power transaction method and system based on privacy calculation, power utilization end and power generation end
CN115412246A (en) Method, device, equipment and storage medium for inadvertent transmission
CN1981477A (en) Method of providing digital certificate functionality

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