CN111786978A - Electric power data aggregation acquisition method and device, computer equipment and storage medium - Google Patents

Electric power data aggregation acquisition method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN111786978A
CN111786978A CN202010576007.3A CN202010576007A CN111786978A CN 111786978 A CN111786978 A CN 111786978A CN 202010576007 A CN202010576007 A CN 202010576007A CN 111786978 A CN111786978 A CN 111786978A
Authority
CN
China
Prior art keywords
data packet
public key
parameter
random number
intelligent electric
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
CN202010576007.3A
Other languages
Chinese (zh)
Other versions
CN111786978B (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.)
Shenzhen Sunwin Intelligent Co Ltd
Original Assignee
Shenzhen Sunwin Intelligent 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 Shenzhen Sunwin Intelligent Co Ltd filed Critical Shenzhen Sunwin Intelligent Co Ltd
Priority to CN202010576007.3A priority Critical patent/CN111786978B/en
Publication of CN111786978A publication Critical patent/CN111786978A/en
Application granted granted Critical
Publication of CN111786978B publication Critical patent/CN111786978B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
    • H04L63/0442Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload wherein the sending and receiving network entities apply asymmetric encryption, i.e. different keys for encryption and decryption
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/0823Network architectures or network communication protocols for network security for authentication of entities using certificates
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/083Network architectures or network communication protocols for network security for authentication of entities using passwords
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/008Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols involving homomorphic encryption
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0861Generation of secret information including derivation or calculation of cryptographic keys or passwords
    • H04L9/0869Generation of secret information including derivation or calculation of cryptographic keys or passwords involving random numbers or seeds
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/30Public key, i.e. encryption algorithm being computationally infeasible to invert or user's encryption keys not requiring secrecy
    • H04L9/3066Public key, i.e. encryption algorithm being computationally infeasible to invert or user's encryption keys not requiring secrecy involving algebraic varieties, e.g. elliptic or hyper-elliptic curves
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3263Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving certificates, e.g. public key certificate [PKC] or attribute certificate [AC]; Public key infrastructure [PKI] arrangements

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computing Systems (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Mathematical Analysis (AREA)
  • General Physics & Mathematics (AREA)
  • Algebra (AREA)
  • Mathematical Optimization (AREA)
  • Mathematical Physics (AREA)
  • Pure & Applied Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Remote Monitoring And Control Of Power-Distribution Networks (AREA)

Abstract

The invention relates to a method, a device, computer equipment and a storage medium for collecting electric power data in an aggregation manner, wherein the method comprises the steps of setting and initializing system parameters to obtain a public key and a private key of an intelligent electric meter, calculating the public key and the private key, and collecting the public key and the private key; creating a region to obtain a region common public key; acquiring the electricity consumption quantity of the intelligent electric meter encrypted by adopting an addition homomorphic encryption technology to obtain a data packet; calculating a tag parameter for the data packet to obtain a first tag parameter; judging whether the data packet is obtained by calculation of the intelligent electric meter or not by adopting the first label parameter; if so, performing aggregation processing on the data packet to obtain an aggregated data packet; calculating a label parameter for the aggregated data packet to obtain a second label parameter; judging whether the aggregated data packet meets the requirements or not by adopting the second label parameter; and if so, processing the aggregated data packet to form power data. According to the invention, invasion of the privacy of the user is avoided, the reliability of the power data transmission process is improved, and the privacy protection effect of the user is improved.

Description

Electric power data aggregation acquisition method and device, computer equipment and storage medium
Technical Field
The invention relates to safety information of a smart power grid, in particular to a method and a device for collecting power data in an aggregation manner, computer equipment and a storage medium.
Background
The smart city integrates, orchestrates and fuses various resources or systems of the city by using technologies such as internet of things, 5G communication, cloud computing and big data processing, so that the resource utilization and city operation efficiency are improved, the city management and service capacity is enhanced, and the development quality and the resident living standard of the city are further improved. The construction of the smart city can be detailed into various branch fields of the city, such as transportation, water, electricity and gas resource supply and management, government affair service, medical guarantee, public safety maintenance and the like. The fundamental factor for promoting the reliable operation of the smart city in various fields is still reliable, real-time and safe data transmission and efficient data processing.
The electric power is the flowing blood of the city, and the normal operation of each service department in the city, the industrial production in the city and the daily life of people cannot be supported by the electric power. A branched area of power supply and management in smart cities is called a smart grid. Due to the characteristic that the power resources are difficult to store, the smart power grid is beneficial to balancing power supply and demand at any time and reducing power resource waste through real-time monitoring and scientific management of power grid data. In addition, the power company can divide the power utilization interval more reasonably and increase the income. The government department can make more accurate assessment on local regional economic development according to real-time power consumption and monthly power consumption, and economic policies are favorably formulated. The user can also clearly master the electricity utilization condition of the user at each moment, so that the electricity charge expense is reduced.
The requirement for data real-time performance makes the smart meter deployed in the home of the user need to send the power consumption in the previous time period to the power company at short time intervals. The power consumption of all the users in the previous time period is summarized, and the power company can obtain the total power consumption in the previous time period of the whole area or city. However, the electric power company and the government department only need to know the total city electricity consumption in each time period, and the electricity consumption of each user in each time period is only known by the user, otherwise, the privacy of the user can be leaked and is lost, but the current security protection mechanism for the electric power data uses the same secret key for encryption when aggregating the electric power data, and does not consider the threat brought by the internal malicious user, so that the electric power data of other users of the smart grid can be snooped by utilizing the traversal inside of the smart grid, and therefore, the privacy protection effect is weak.
Therefore, it is necessary to design a new method to avoid invading the privacy of the user, improve the reliability of the power data transmission process, and improve the privacy protection effect of the user.
Disclosure of Invention
The invention aims to overcome the defects of the prior art and provides a method, a device, computer equipment and a storage medium for collecting electric power data in an aggregation manner.
In order to achieve the purpose, the invention adopts the following technical scheme: the power data aggregation acquisition method comprises the following steps:
setting and initializing system parameters to obtain a public key and a private key of the intelligent electric meter, calculating the public key and the private key, and collecting the public key and the private key;
creating a region about the smart meter to obtain a region common public key;
acquiring the electricity consumption quantity of intelligent electric meters from different areas after encryption by using an addition homomorphic encryption technology to obtain a data packet;
calculating a tag parameter for the data packet to obtain a first tag parameter;
verifying by adopting the first label parameter to judge whether the data packet is obtained by calculation of an intelligent electric meter;
if the data packet is calculated by the intelligent electric meter, performing aggregation processing on the data packet to obtain an aggregated data packet;
calculating a label parameter for the aggregated data packet to obtain a second label parameter;
verifying by adopting the second label parameter to judge whether the aggregated data packet meets the requirement;
and if the aggregated data packet meets the requirements, processing the aggregated data packet to form power data.
The further technical scheme is as follows: after the recovering the aggregate data packet to form power data, the method further includes:
judging whether a malicious user exists or not;
if the malicious user exists, generating a reminding notice, and sending the notice to the terminal so that the terminal can trace the intelligent electric meter corresponding to the malicious user;
and if no malicious user exists, entering an ending step.
The further technical scheme is as follows: the setting and initializing system parameters to obtain a public key and a private key of the smart electric meter, a public key and a private key are calculated, and a public key and a private key are collected, and the setting and initializing system comprises the following steps:
setting a prime number, a finite field with the prime number as an order, elliptic curve bilinear mapping on the finite field, setting a system security parameter and a multiplication cycle group with the system security parameter as an order, selecting three generating elements on the multiplication cycle group, and defining two one-way hash functions;
selecting a first random number, a second random number and a third random number to obtain a private key of the intelligent electric meter, a calculation private key and a collection private key;
taking a product of the first random number and a first generator in the three generators on the multiplication cyclic group as a public key of the intelligent electric meter, taking a product of the second random number and a second generator in the three generators on the multiplication cyclic group as a calculation public key, and taking a product of the third random number and a third generator in the three generators on the multiplication cyclic group as a collection public key;
calculating a digital certificate of the intelligent ammeter according to the third random number, the ID number of the intelligent ammeter and the public key of the intelligent ammeter, and calculating a digital certificate of data collection according to the third random number and the public key;
and integrating the multiplication cycle group, the system security parameters, the three generators, the two one-way hash functions and the collected public key to obtain the system public parameters.
The further technical scheme is as follows: the creating of the region about the smart meter to obtain the region common public key comprises the following steps:
creating an area about the smart meters so that the smart meters in the corresponding area broadcast the self ID numbers, the public keys and the digital certificates to the corresponding area;
and confirming according to the broadcasted self ID number, the public key and the digital certificate, and summing according to the confirmed public key of the intelligent electric meter to obtain the common public key of the region.
The further technical scheme is as follows: the method for acquiring the electricity consumption quantity of the intelligent electric meters from different areas after being encrypted by the addition homomorphic encryption technology to obtain the data packet comprises the following steps:
and sending the electricity consumption data acquisition request to enable the smart meters in different areas to select a fourth random number, taking the product of the fourth random number and a first generation element in the three generation elements on the multiplication cyclic group as a first encryption parameter, generating a ciphertext according to the first random number, the first generation element in the three generation elements on the multiplication cyclic group, the fourth random number and the area common public key, signing the ciphertext, and sending the ciphertext to form a data packet.
The further technical scheme is as follows: the processing the aggregate packet to form power data comprises:
recovering the aggregated data packet to obtain a recovery result;
the recovery results are added to obtain power data.
The further technical scheme is as follows: the judging whether a malicious user exists includes:
judgment of e (C)1,PKi)=e(Di,g1) Whether or not it is true, wherein,
Figure BDA0002551017740000041
Figure BDA0002551017740000042
riis a fourth random number, g1For the first of the three generators, PK, on the multiplication cycle groupiThe public key of the intelligent electric meter is used for sending the data packet;
if e (C)1,PKi)=e(Di,g1) If yes, no malicious user exists;
if e (C)1,PKi)=e(Di,g1) If not, the user has malicious intent.
The invention also provides a power data aggregation acquisition device, which comprises:
the parameter setting unit is used for setting and initializing system parameters to obtain a public key and a private key of the intelligent electric meter, calculating the public key and the private key and collecting the public key and the private key;
the system comprises an area creating unit, a public key generating unit and a public key generating unit, wherein the area creating unit is used for creating areas related to the intelligent electric meters so as to obtain an area public key;
the data packet obtaining unit is used for obtaining the electricity consumption quantity of the intelligent electric meters from different areas after being encrypted by the addition homomorphic encryption technology to obtain data packets;
the first calculation unit is used for calculating the label parameters of the data packets to obtain first label parameters;
the first verification unit is used for verifying by adopting the first label parameter so as to judge whether the data packet is obtained by calculation of the intelligent electric meter;
the aggregation unit is used for performing aggregation processing on the data packet to obtain an aggregated data packet if the data packet is obtained by calculation of the intelligent electric meter;
the second calculation unit is used for calculating the label parameters of the aggregated data packet to obtain second label parameters;
the second verification unit is used for verifying by adopting the second label parameter so as to judge whether the aggregated data packet meets the requirement;
and the recovery processing unit is used for processing the aggregation data packet to form power data if the aggregation data packet meets the requirement.
The invention also provides computer equipment which comprises a memory and a processor, wherein the memory is stored with a computer program, and the processor realizes the method when executing the computer program.
The invention also provides a storage medium storing a computer program which, when executed by a processor, is operable to carry out the method as described above.
Compared with the prior art, the invention has the beneficial effects that: according to the method, the corresponding private key and the corresponding public key are generated by creating parameters, the area is created to obtain the common public key of the area, the intelligent electric meter encrypts the electricity consumption data by adopting a homomorphic encryption technology to form a data packet, the first verification is carried out when the data packet is received, the aggregation encryption is carried out only after the verification is passed, the aggregation data packet is formed, the second verification is carried out on the aggregation data packet, the recovery is carried out only after the verification is passed, the encryption is carried out by adopting an addition homomorphic encryption technology, the ciphertext of the real-time electricity consumption data of a plurality of users can be directly added, the safety of an encryption algorithm is based on the problem of the mathematical difficulty of discrete logarithm on an elliptic curve, the higher safety is realized under the same key length, the invasion of the user privacy is avoided, the reliability in the transmission process of the electricity data is improved.
The invention is further described below with reference to the accompanying drawings and specific embodiments.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic view of an application scenario of a power data aggregation acquisition method according to an embodiment of the present invention;
fig. 2 is a schematic flow chart of a power data aggregation acquisition method according to an embodiment of the present invention;
fig. 3 is a schematic sub-flow diagram of a power data aggregation acquisition method according to an embodiment of the present invention;
fig. 4 is a schematic sub-flow diagram of a power data aggregation acquisition method according to an embodiment of the present invention;
fig. 5 is a schematic sub-flow diagram of a power data aggregation acquisition method according to an embodiment of the present invention;
fig. 6 is a schematic flow chart of a power data aggregation acquisition method according to another embodiment of the present invention;
fig. 7 is a schematic block diagram of an electric power data aggregation acquisition apparatus provided in an embodiment of the present invention;
fig. 8 is a schematic block diagram of an electric power data aggregation acquisition device according to another embodiment of the present invention;
FIG. 9 is a schematic block diagram of a computer device provided by an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in the specification of the present invention and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be further understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
Referring to fig. 1 and fig. 2, fig. 1 is a schematic view of an application scenario of a power data aggregation collection method according to an embodiment of the present invention. Fig. 2 is a schematic flow chart of a power data aggregation acquisition method according to an embodiment of the present invention. The power data aggregation acquisition method is applied to a server. The server performs data interaction with the intelligent electric meter and the terminal, the intelligent electric meter performs encryption of self power consumption data according to parameters set by the server, the server collects and verifies the data, the verification is performed by performing encryption processing and addition again, results are sent to the terminal to be displayed, and when malicious users modify data packets of the intelligent electric meter amount, the server can verify the data packets only by one formula.
In this embodiment, the smart meter is deployed in a user home and is used for monitoring the power consumption of the user in real time. And at intervals, the intelligent electric meter encrypts and transmits the electricity consumption of the previous period. The real-time data in the intelligent electric meter can only be known by the user, but the user can do hands and feet on the intelligent electric meter to achieve the purpose of missed payment of the electric charge.
In this embodiment, the data collection unit of the server is used to collect real-time electricity consumption of a certain block in a large city. It also has an important function of preventing the control center from directly obtaining the real-time electricity consumption ciphertext of the user. The data collection unit of the server is used to decrypt and collect real-time total electricity usage data for the city, which is generally considered to be trusted.
Fig. 2 is a schematic flow chart of a power data aggregation acquisition method according to an embodiment of the present invention. As shown in fig. 2, the method includes the following steps S110 to S210.
S110, setting and initializing system parameters to obtain a public key and a private key of the smart electric meter, calculating the public key and the private key, and collecting the public key and the private key.
In this embodiment, the public key and the private key of the smart meter are used for encrypting the electricity consumption data to be sent by the smart meter; the public key and the private key are calculated and are used for encrypting the data packet in the process of aggregation processing; the aggregate public and private keys refer to the keys used by the server to encrypt data.
In an embodiment, referring to fig. 3, the step S110 may include steps S111 to S115.
S111, setting a prime number, a finite field with the prime number as an order, performing bilinear mapping on an elliptic curve on the finite field, setting a system security parameter and a multiplication cycle group with the system security parameter as the order, selecting three generating elements on the multiplication cycle group, and defining two one-way hash functions.
In this embodiment, the parameter p is set to be an arbitrary large prime number, and the parameter F is set to be a large prime numberpFor finite fields of prime order, parameter E (F)p) Is a finite field FpThe above elliptic curve bilinear mapping is performed, the parameter q is a system security parameter, which can be generally set to 112, 160, etc., the parameter G is a q-factorial cyclic group, and the parameter G is a q-factorial cyclic group1,g2,g3Three arbitrarily selected generators of the q-factorial cyclic group G are respectively provided. In addition, two one-way hash functions H are defined here1:
Figure BDA0002551017740000071
H2{0,1} → G. These parameters are defined for use in encryption and authentication of data transmission during subsequent interactions.
S112, selecting the first random number, the second random number and the third random number to obtain a private key of the intelligent electric meter, a calculation private key and a collection private key.
In the present embodiment, the symbol SM is usediThe intelligent ammeter is represented by any one of the intelligent ammeters, the symbol DC is represented by a data collection unit in the server, and the symbol CC is represented by a control center in the server. Smart electric meter SMiSelecting parameters
Figure BDA0002551017740000072
As any random number, a first random number is formed, namely a private key of the intelligent electric meter; data collection unit DC selection parameters
Figure BDA0002551017740000073
As an arbitrary random number, thereby forming a second random number, i.e. calculating the private key; control center CC selection parameters
Figure BDA0002551017740000074
As an arbitrary random number, a third random number is formed, i.e., the private key is assembled.
And S113, taking the product of the first random number and the first generator in the three generators on the multiplication cyclic group as the public key of the intelligent electric meter, taking the product of the second random number and the second generator in the three generators on the multiplication cyclic group as the calculation public key, and taking the product of the third random number and the third generator in the three generators on the multiplication cyclic group as the collection public key.
In the present embodiment, the parameter PK is calculatedi=xi·g1As a smart meter SMiSimilarly, the parameter PK is calculatedDC=xDC·g1Calculating the parameter PK as a public key of the data collection Unit DCCC=xCC·g1As a public key of the control center.
And S114, calculating the digital certificate of the intelligent electric meter according to the third random number, the ID number of the intelligent electric meter and the public key of the intelligent electric meter, and calculating the digital certificate of data collection according to the third random number and the calculated public key.
In this embodiment, the digital certificate is mainly used for signing a ciphertext formed after encryption.
Control center calculation parameter Certi=xCC·H2(IDi||PKi) As a smart meter SMiThe calculation parameter CertDC=xCC·H2(IDDC||PKDC) As a digital certificate for the data collection unit DC.
S115, integrating a multiplication cycle group, system security parameters, three generators, two one-way hash functions and a collection public key to obtain system public parameters.
In this embodiment, the system common parameter refers to a security parameter shared by both the smart meter and the server. Wherein the system common parameter param ═ { G, q, G ═ G1,g2,g3,H1,H2,PKCC}。
And S120, creating a region related to the smart meter to obtain a region common public key.
In the present embodiment, the area common public key is a key used for encryption before transmission of the electricity consumption data of all the smart meters in a certain area.
A plurality of users are divided into a residential area, and all real-time electric quantity data of the intelligent electric meters in the residential area are collected in an aggregation mode, so that necessary parameters need to be created and set.
In an embodiment, referring to fig. 4, the step S120 may include steps S121 to S122.
And S121, creating an area related to the smart meter, so that the smart meter in the corresponding area broadcasts the self ID number, the public key and the digital certificate to the corresponding area.
In this embodiment, when the smart electric meters in each region broadcast to the corresponding region, that is, confirm the identity of the smart electric meter, confirm that the smart electric meter belongs to the region, and only after confirming all the smart electric meter identities in a certain region again, the common public key of the region can be calculated.
And S122, confirming according to the broadcasted self ID number, the public key and the digital certificate, and summing according to the confirmed public key of the intelligent electric meter to obtain the common public key of the region.
The setting parameter n is the number of residents in the residential area, that is, n smart meters exist in the residential area. Each intelligent electric meter { SMi}i∈[1,n]Broadcast transmission (ID) to the areai,PKi,Certi) And all other electric meters in the residential area are allowed to acquire.
Each smart meter SM in the areaiVerifying whether the following equation holds:
Figure BDA0002551017740000081
when the formula is established, all the intelligent electric meters SM in the residential areaiAnd if the formula is not established, the intelligent electric meter is not in the area and should be removed. Each intelligent electric meter { SMi}i∈[1,n]The common public key APK of the residential area is calculated,
Figure BDA0002551017740000082
the security of the encryption algorithm of this embodiment is based on the difficult problem of discrete logarithm mathematics on the elliptic curve, and compared, there is higher security under equal key length, realizes avoiding invading user's privacy, improves the reliability in the electric power data transmission process, and promotes user's privacy protection effect.
S130, acquiring the electricity consumption quantity of the intelligent electric meters from different areas after encryption by adopting an addition homomorphic encryption technology to obtain a data packet.
In this embodiment, the data packet refers to electricity consumption data that is sent by each smart meter and is encrypted by its own public key.
Specifically, the electricity consumption data acquisition request is sent so that the smart meters in different areas select a fourth random number, the product of the fourth random number and a first generation element of three generation elements on the multiplication cyclic group is taken as a first encryption parameter, a ciphertext is generated according to the first random number, the first generation element of the three generation elements on the multiplication cyclic group, the fourth random number and the area common public key, and the ciphertext is signed and then sent to form a data packet.
Specifically, each smart meter SMiThe power consumption data in the previous time period is periodically encrypted, so that the requirement of the system on the real-time performance of the power consumption data is met, and the data is prevented from being stolen in the transmission process. Defining a parameter miFor smart meters SMiAnd recording the electricity consumption data recorded in the last time period. Each smart meter SMiFirst, a parameter is selected
Figure BDA0002551017740000091
Is a random number, thereby forming a fourth random number. Subsequently, a first encryption parameter is calculated
Figure BDA0002551017740000092
And calculate
Figure BDA0002551017740000093
As a ciphertext. Smart electric meter SMiCalculating the parameter sigmai=xi·g2+xihi·g3As a signature of a ciphertext, wherein
Figure BDA0002551017740000094
Figure BDA0002551017740000095
As parameters of the tag, parameters
Figure BDA0002551017740000096
And recording the time stamp of the real-time electric quantity data. Smart electric meter SMiWill be parameter
Figure BDA0002551017740000097
And the electricity consumption quantity after being encrypted by adopting an addition homomorphic encryption technology is sent to a data collection unit of the server.
The addition homomorphic encryption technology is utilized, the power consumption ciphertexts of any number of users can be directly added, the decrypted result is the added power consumption data result, the whole aggregation encryption efficiency is improved, the invasion of the privacy of the users is avoided, and the reliability of the power data transmission process is improved.
S140, calculating the label parameter of the data packet to obtain a first label parameter.
After receiving each intelligent electric meter { SMi}i∈[1,n]Outgoing packet { PiAnd fourthly, after the cryptographs of all the real-time electricity consumption in the residential area are subjected to aggregation processing by the data collection unit DC, the cryptographs are sent to the control center CC for recovery processing.
Specifically, data packet P sent by all intelligent electric meters in the residential area is receivedi}i∈[1,n]Thereafter, the data collection unit first calculates the label parameters
Figure BDA0002551017740000098
I.e. the first tag parameter.
S150, verifying by adopting the first label parameter to judge whether the data packet is obtained by calculation of the intelligent electric meter.
In particular, a verification equation is employed
Figure BDA0002551017740000099
And if the data packet is not generated, discarding the data packet.
S160, if the data packet is calculated by the intelligent electric meter, discarding the data packet;
s170, if the data packet is calculated by the intelligent electric meter, performing aggregation processing on the data packet to obtain an aggregated data packet.
Whether the verification data packet is calculated by the intelligent electric meter or not is set at the position, so that a malicious user can be prevented from sending false data.
The data collection unit carries out aggregation processing and calculation on the data packet of the real-time electricity consumption ciphertext in the residential area
Figure BDA0002551017740000101
This is used as the aggregate ciphertext, wherein,
Figure BDA0002551017740000102
similarly, the data collection unit DC needs to sign the aggregation cryptogram before sending it to the control center CC, and calculates the parameter σDC=xDC·g2+xDC·hDC·g3Signatures as aggregate ciphertext, in which parameters
Figure BDA0002551017740000103
For tag parameters, parameter IDDCNumbering identity, parameters of data collection unit DC
Figure BDA0002551017740000104
For aggregating the time stamps generated for the ciphertext data, the data collection unit DC sends the parameters to the control center CC
Figure BDA0002551017740000105
As an aggregate packet.
And S180, calculating the label parameter of the aggregated data packet to obtain a second label parameter.
The control center CC obtains the real-time electricity consumption data of the whole city by decrypting the aggregation ciphertext, and simultaneously avoids obtaining the real-time electricity consumption data of any single user.
In this embodiment, the aggregate packet P is received from the data collection unit DCDCThereafter, the control center CC first calculates the tag parameters
Figure BDA0002551017740000106
I.e. the second tag parameter.
And S190, verifying by adopting the second label parameter to judge whether the aggregated data packet meets the requirement.
In the present embodiment, equation e (σ) is verifiedDC,g1)=e(g2,PKDC)e(hDC·PKDC,g3) And if the equation is established, receiving and trusting the aggregated data packet, otherwise, discarding the received aggregated data packet.
Double verification is set to ensure that the data packet transmitted to the control center is data which is from the intelligent electric meter and subjected to aggregation encryption, and is trusted data to ensure reliability in the power data transmission process.
And S200, if the aggregated data packet meets the requirement, processing the aggregated data packet to form power data.
In this embodiment, the power data refers to the sum of real-time power consumption data of all the users.
In an embodiment, referring to fig. 5, the step S200 may include steps S201 to S202.
S201, recovering the aggregated data packet to obtain a recovery result.
In this embodiment, the recovery result refers to the electricity consumption data obtained by encrypting the aggregated data packet with the help of the decrypted content sent by the smart meter.
And S202, adding the recovery results to obtain power data.
In the present embodiment, the power data is data obtained by adding the results obtained after recovery.
In particular, smart meter SMiFirst, partial calculation of parameters is performed
Figure BDA0002551017740000111
The parameter σ' x is then calculatedi·g2+xi·h′i·g3Signatures as part of ciphertext, in which the parameters
Figure BDA0002551017740000112
Figure BDA0002551017740000113
As parameters of the tag, parameters
Figure BDA0002551017740000114
The timestamp is decrypted for the part. Smart electric meter SMiWill be parameter
Figure BDA0002551017740000115
Figure BDA0002551017740000116
As part of the decrypted data packets, are sent to the control center CC via the data collection unit DC. Upon receipt of partially decrypted packet P'iThereafter, the control center CC first calculates the label parameters
Figure BDA0002551017740000117
And verifies whether the following equation holds:
Figure BDA0002551017740000118
Figure BDA0002551017740000119
if so, the control center CC accepts the information from the smart meter SMiThe transmitted decrypted data is considered trusted, otherwise the data is discarded. If about all smart meters SMi}i∈[1,n]If all the verifications are true, the control center CC carries out calculation
Figure BDA00025510177400001110
And recovering the sum of the real-time electricity consumption data of all the users.
S210, if the aggregated data packet does not meet the requirement, discarding the aggregated data packet.
The security of the encryption algorithm of this embodiment is based on the difficult problem of discrete logarithm mathematics on the elliptic curve, and compared, there is higher security under equal key length, realizes avoiding invading user's privacy, improves the reliability in the electric power data transmission process, and promotes user's privacy protection effect.
The control center does not directly receive and decrypt the real-time power consumption ciphertext of the user so as to avoid invading the privacy of the user, the control center can master the total power consumption amount of each time period of the whole urban power grid system by using a homomorphic encryption technology, and the interactive parties adopt a digital signature technology to verify the reliability of data.
The above-mentioned power data aggregation collection method generates the corresponding private key and public key by creating the parameters, creates the region, so as to obtain the common public key of the region, the intelligent ammeter adopts homomorphic encryption technology to encrypt the electricity utilization data to form a data packet, carrying out first verification when receiving the data packet, carrying out aggregation encryption after the verification is passed, forming an aggregation data packet, and the aggregated data packet is verified for the second time, and is recovered after passing the verification, and is encrypted by adopting an addition homomorphic encryption technology, the cryptographs of the real-time electricity consumption data of a plurality of users can be directly added, and the safety of the encryption algorithm is based on the problem of the discrete logarithm mathematical difficulty on the elliptic curve, have higher security under equal key length, realize avoiding invading user's privacy, improve the reliability in the electric power data transmission process, and promote user's privacy protection effect.
Fig. 6 is a schematic flow chart of a power data aggregation acquisition method according to another embodiment of the present invention. As shown in fig. 6, the power data aggregation collection method of the embodiment includes steps S310 to S430. Steps S310 to S410 are similar to steps S110 to S210 in the above embodiments, and are not described herein again. The added steps S420 to S430 in the present embodiment are explained in detail below.
And S420, judging whether a malicious user exists or not.
In an embodiment, the step S420 may include steps S421 to S423.
S421, judgment e (C)1,PKi)=e(Di,g1) Whether or not it is true, wherein,
Figure BDA0002551017740000121
Figure BDA0002551017740000122
riis a fourth random number, g1For the first of the three generators, PK, on the multiplication cycle groupiIntelligent electric power for transmitting data packetA table public key;
s422, if e (C)1,PKi)=e(Di,g1) If yes, no malicious user exists;
s423, if e (C)1,PKi)=e(Di,g1) If not, the user has malicious intent.
S430, if the malicious user exists, generating a reminding notification, and sending the notification to the terminal so that the terminal can trace the smart electric meter corresponding to the malicious user;
and if no malicious user exists, entering an ending step.
In the aggregated data recovery algorithm, the user may manipulate the smart meter, i.e. cause the smart meter to send a smaller DiThereby achieving the purpose of paying the electric charge without leakage. For this behavior, the control center verifies the following equation e (C) for a certain suspicious user1,PKi)=e(Di,g1) Whether or not this is true. If the result is positive, the intelligent electric meter SM is explainediEmitted DiThe value of (A) is reliable. Otherwise, the intelligent electric meter SM is explainediThe user manipulates the electricity meter. If a malicious user is suspected to operate the electric meter and modify the electricity consumption information, only one equation verification is needed to determine whether the electricity consumption information is true, and the efficiency is high.
Fig. 7 is a schematic block diagram of an electric power data aggregation acquisition apparatus 300 according to an embodiment of the present invention. As shown in fig. 7, the present invention further provides an electric power data aggregation collection device 300 corresponding to the above electric power data aggregation collection method. The power data aggregation collection device 300 includes a unit for executing the above power data aggregation collection method, and the device may be configured in a server. Specifically, referring to fig. 7, the electric power data aggregation and collection device 300 includes a parameter setting unit 301, a region creating unit 302, a data packet obtaining unit 303, a first calculating unit 304, a first verifying unit 305, an aggregating unit 306, a second calculating unit 307, a second verifying unit 308, and a recovery processing unit 309.
The parameter setting unit 301 is configured to set and initialize system parameters to obtain a public key and a private key of the smart meter, calculate the public key and the private key, and collect the public key and the private key; the region creating unit 302 is used for creating a region related to the smart meter so as to obtain a region common public key; the data packet obtaining unit 303 is configured to obtain the electricity consumption amount of the smart meters from different areas, which is encrypted by using an addition homomorphic encryption technology, to obtain a data packet; a first calculating unit 304, configured to calculate a tag parameter for the data packet to obtain a first tag parameter; a first verifying unit 305, configured to perform verification using the first tag parameter to determine whether the data packet is calculated by the smart meter; the aggregation unit 306 is configured to aggregate the data packets to obtain aggregated data packets if the data packets are calculated by the smart meter; a second calculating unit 307, configured to calculate a tag parameter for the aggregated data packet to obtain a second tag parameter; a second verifying unit 308, configured to perform verification using the second tag parameter to determine whether the aggregated data packet meets the requirement; a recovery processing unit 309, configured to process the aggregate data packet to form power data if the aggregate data packet meets the requirement.
In an embodiment, the parameter setting unit 301 includes a setting subunit, a selecting subunit, a public key obtaining subunit, a certificate calculating subunit, and an integrating subunit.
The device comprises a setting subunit, a system safety parameter and a multiplication cycle group, wherein the setting subunit is used for setting a prime number, a finite field with the prime number as an order, elliptic curve bilinear mapping on the finite field, setting a system safety parameter and the multiplication cycle group with the system safety parameter as the order, selecting three generating elements on the multiplication cycle group and defining two one-way hash functions; the selecting subunit is used for selecting a first random number, a second random number and a third random number to obtain a private key of the intelligent electric meter, a calculation private key and a convergence private key; the public key obtaining subunit is used for taking a product of the first random number and a first generating element in the three generating elements on the multiplication cyclic group as the public key of the intelligent electric meter, taking a product of the second random number and a second generating element in the three generating elements on the multiplication cyclic group as a calculation public key, and taking a product of the third random number and a third generating element in the three generating elements on the multiplication cyclic group as a collection public key; the certificate calculation subunit is used for calculating the digital certificate of the intelligent ammeter according to the third random number, the ID number of the intelligent ammeter and the public key of the intelligent ammeter, and calculating the digital certificate of data collection according to the third random number and the calculated public key; and the integration subunit is used for integrating the multiplication cycle group, the system security parameter, the three generators, the two one-way hash functions and the collected public key to obtain a system public parameter.
In an embodiment, the area creation unit 302 includes a creation subunit and a summation subunit.
The system comprises a creating subunit, a sending subunit and a receiving subunit, wherein the creating subunit is used for creating areas related to the smart meters so that the smart meters in the corresponding areas broadcast self ID numbers, public keys and digital certificates to the corresponding areas; and the summing subunit is used for confirming according to the broadcasted self ID number, the public key and the digital certificate, and summing according to the confirmed public key of the intelligent electric meter to obtain the common public key of the region.
In an embodiment, the data packet obtaining unit 303 is configured to send the power consumption data obtaining request, so that the smart meters in different areas select a fourth random number, take a product of the fourth random number and a first generator in the three generators in the multiplication cyclic group as a first encryption parameter, generate a ciphertext according to the first random number, the first generator in the three generators in the multiplication cyclic group, the fourth random number, and the area common public key, sign the ciphertext, and send the ciphertext to form the data packet.
In one embodiment, the recovery processing unit 309 includes a recovery subunit and an addition subunit.
A recovery subunit, configured to recover the aggregated data packet to obtain a recovery result; and the addition subunit is used for adding the recovery results to obtain the power data.
Fig. 8 is a schematic block diagram of an electric power data aggregation acquisition apparatus 300 according to another embodiment of the present invention. As shown in fig. 8, the electric power data aggregation collection device 300 of the present embodiment is added with a malicious determination unit 310 and a reminding unit 311 on the basis of the above embodiments.
A malicious judgment unit 310, configured to judge whether there is a malicious user, and if there is no malicious user, enter an end step; and the reminding unit 311 is configured to generate a reminding notification if the malicious user exists, and send the reminding notification to the terminal, so that the terminal can trace the smart meter corresponding to the malicious user.
Specifically, a malice determination unit 310 for determining e (C)1,PKi)=e(Di,g1) Whether or not it is true, wherein,
Figure BDA0002551017740000141
riis a fourth random number, g1For the first of the three generators, PK, on the multiplication cycle groupiThe public key of the intelligent electric meter is used for sending the data packet; if e (C)1,PKi)=e(Di,g1) If yes, no malicious user exists; if e (C)1,PKi)=e(Di,g1) If not, the user has malicious intent.
It should be noted that, as can be clearly understood by those skilled in the art, the specific implementation process of the above-mentioned power data aggregation acquisition apparatus 300 and each unit may refer to the corresponding description in the foregoing method embodiment, and for convenience and brevity of description, no further description is provided herein.
The above-mentioned power data aggregation collection apparatus 300 may be implemented in the form of a computer program, and the computer program may be run on a computer device as shown in fig. 9.
Referring to fig. 9, fig. 9 is a schematic block diagram of a computer device according to an embodiment of the present application. The computer device 500 may also be a server, where the server may be an independent server or a server cluster composed of a plurality of servers.
Referring to fig. 9, the computer device 500 includes a processor 502, memory, and a network interface 505 connected by a system bus 501, where the memory may include a non-volatile storage medium 503 and an internal memory 504.
The non-volatile storage medium 503 may store an operating system 5031 and a computer program 5032. The computer programs 5032 include program instructions that, when executed, cause the processor 502 to perform a power data aggregation collection method.
The processor 502 is used to provide computing and control capabilities to support the operation of the overall computer device 500.
The internal memory 504 provides an environment for the operation of the computer program 5032 in the non-volatile storage medium 503, and when the computer program 5032 is executed by the processor 502, the processor 502 may be enabled to execute a power data aggregation collection method.
The network interface 505 is used for network communication with other devices. Those skilled in the art will appreciate that the configuration shown in fig. 9 is a block diagram of only a portion of the configuration associated with the present application and does not constitute a limitation of the computer device 500 to which the present application may be applied, and that a particular computer device 500 may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
Wherein the processor 502 is configured to run the computer program 5032 stored in the memory to implement the following steps:
setting and initializing system parameters to obtain a public key and a private key of the intelligent electric meter, calculating the public key and the private key, and collecting the public key and the private key; creating a region about the smart meter to obtain a region common public key; acquiring the electricity consumption quantity of intelligent electric meters from different areas after encryption by using an addition homomorphic encryption technology to obtain a data packet; calculating a tag parameter for the data packet to obtain a first tag parameter; verifying by adopting the first label parameter to judge whether the data packet is obtained by calculation of an intelligent electric meter; if the data packet is calculated by the intelligent electric meter, performing aggregation processing on the data packet to obtain an aggregated data packet; calculating a label parameter for the aggregated data packet to obtain a second label parameter; verifying by adopting the second label parameter to judge whether the aggregated data packet meets the requirement; and if the aggregated data packet meets the requirements, processing the aggregated data packet to form power data.
In an embodiment, after the step of recovering the aggregate data packet to form the power data is implemented, the processor 502 further implements the following steps:
judging whether a malicious user exists or not; if the malicious user exists, generating a reminding notice, and sending the notice to the terminal so that the terminal can trace the intelligent electric meter corresponding to the malicious user; and if no malicious user exists, entering an ending step.
In an embodiment, when the processor 502 implements the steps of setting and initializing system parameters to obtain a public key and a private key of the smart meter, calculating the public key and the private key, and collecting the public key and the private key, the following steps are specifically implemented:
setting a prime number, a finite field with the prime number as an order, elliptic curve bilinear mapping on the finite field, setting a system security parameter and a multiplication cycle group with the system security parameter as an order, selecting three generating elements on the multiplication cycle group, and defining two one-way hash functions; selecting a first random number, a second random number and a third random number to obtain a private key of the intelligent electric meter, a calculation private key and a collection private key; taking a product of the first random number and a first generator in the three generators on the multiplication cyclic group as a public key of the intelligent electric meter, taking a product of the second random number and a second generator in the three generators on the multiplication cyclic group as a calculation public key, and taking a product of the third random number and a third generator in the three generators on the multiplication cyclic group as a collection public key; calculating a digital certificate of the intelligent ammeter according to the third random number, the ID number of the intelligent ammeter and the public key of the intelligent ammeter, and calculating a digital certificate of data collection according to the third random number and the public key; and integrating the multiplication cycle group, the system security parameters, the three generators, the two one-way hash functions and the collected public key to obtain the system public parameters.
In an embodiment, when the step of creating the area for the smart meter to obtain the area common public key is implemented by the processor 502, the following steps are specifically implemented:
creating an area about the smart meters so that the smart meters in the corresponding area broadcast the self ID numbers, the public keys and the digital certificates to the corresponding area; and confirming according to the broadcasted self ID number, the public key and the digital certificate, and summing according to the confirmed public key of the intelligent electric meter to obtain the common public key of the region.
In an embodiment, when the processor 502 obtains the electricity consumption amount of the smart meters from different areas encrypted by the homomorphic encryption technology to obtain the data packet, the following steps are specifically implemented:
and sending the electricity consumption data acquisition request to enable the smart meters in different areas to select a fourth random number, taking the product of the fourth random number and a first generation element in the three generation elements on the multiplication cyclic group as a first encryption parameter, generating a ciphertext according to the first random number, the first generation element in the three generation elements on the multiplication cyclic group, the fourth random number and the area common public key, signing the ciphertext, and sending the ciphertext to form a data packet.
In an embodiment, when implementing the step of processing the aggregation data packet to form power data, the processor 502 specifically implements the following steps:
recovering the aggregated data packet to obtain a recovery result; the recovery results are added to obtain power data.
In an embodiment, when the processor 502 implements the step of determining whether there is a malicious user, the following steps are specifically implemented:
judgment of e (C)1,PKi)=e(Di,g1) Whether or not it is true, wherein,
Figure BDA0002551017740000171
Figure BDA0002551017740000172
riis a fourth random number, g1For the first of the three generators, PK, on the multiplication cycle groupiThe public key of the intelligent electric meter is used for sending the data packet; if e (C)1,PKi)=e(Di,g1) If yes, no malicious user exists; if e (C)1,PKi)=e(Di,g1) If not, the user has malicious intent.
It should be understood that, in the embodiment of the present Application, the Processor 502 may be a Central Processing Unit (CPU), and the Processor 502 may also be other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field-Programmable Gate arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, and the like. Wherein a general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
It will be understood by those skilled in the art that all or part of the flow of the method implementing the above embodiments may be implemented by a computer program instructing associated hardware. The computer program includes program instructions, and the computer program may be stored in a storage medium, which is a computer-readable storage medium. The program instructions are executed by at least one processor in the computer system to implement the flow steps of the embodiments of the method described above.
Accordingly, the present invention also provides a storage medium. The storage medium may be a computer-readable storage medium. The storage medium stores a computer program, wherein the computer program, when executed by a processor, causes the processor to perform the steps of:
setting and initializing system parameters to obtain a public key and a private key of the intelligent electric meter, calculating the public key and the private key, and collecting the public key and the private key; creating a region about the smart meter to obtain a region common public key; acquiring the electricity consumption quantity of intelligent electric meters from different areas after encryption by using an addition homomorphic encryption technology to obtain a data packet; calculating a tag parameter for the data packet to obtain a first tag parameter; verifying by adopting the first label parameter to judge whether the data packet is obtained by calculation of an intelligent electric meter; if the data packet is calculated by the intelligent electric meter, performing aggregation processing on the data packet to obtain an aggregated data packet; calculating a label parameter for the aggregated data packet to obtain a second label parameter; verifying by adopting the second label parameter to judge whether the aggregated data packet meets the requirement; and if the aggregated data packet meets the requirements, processing the aggregated data packet to form power data.
In an embodiment, after the step of recovering the aggregated data packet to form power data is implemented by the processor by executing the computer program, the following steps are further implemented:
judging whether a malicious user exists or not; if the malicious user exists, generating a reminding notice, and sending the notice to the terminal so that the terminal can trace the intelligent electric meter corresponding to the malicious user; and if no malicious user exists, entering an ending step.
In an embodiment, when the processor executes the computer program to implement the setting and initialize the system parameters to obtain the public key and the private key of the smart meter, calculate the public key and the private key, and collect the public key and the private key, the following steps are specifically implemented:
setting a prime number, a finite field with the prime number as an order, elliptic curve bilinear mapping on the finite field, setting a system security parameter and a multiplication cycle group with the system security parameter as an order, selecting three generating elements on the multiplication cycle group, and defining two one-way hash functions;
selecting a first random number, a second random number and a third random number to obtain a private key of the intelligent electric meter, a calculation private key and a collection private key; taking a product of the first random number and a first generator in the three generators on the multiplication cyclic group as a public key of the intelligent electric meter, taking a product of the second random number and a second generator in the three generators on the multiplication cyclic group as a calculation public key, and taking a product of the third random number and a third generator in the three generators on the multiplication cyclic group as a collection public key; calculating a digital certificate of the intelligent ammeter according to the third random number, the ID number of the intelligent ammeter and the public key of the intelligent ammeter, and calculating a digital certificate of data collection according to the third random number and the public key; and integrating the multiplication cycle group, the system security parameters, the three generators, the two one-way hash functions and the collected public key to obtain the system public parameters.
In an embodiment, when the step of creating the area for the smart meter to obtain the area common public key is implemented by the processor executing the computer program, the following steps are specifically implemented:
creating an area about the smart meters so that the smart meters in the corresponding area broadcast the self ID numbers, the public keys and the digital certificates to the corresponding area; and confirming according to the broadcasted self ID number, the public key and the digital certificate, and summing according to the confirmed public key of the intelligent electric meter to obtain the common public key of the region.
In an embodiment, when the processor executes the computer program to obtain the electricity consumption amount of the smart meters from different areas encrypted by the homomorphic encryption technology to obtain the data packet, the following steps are specifically implemented:
and sending the electricity consumption data acquisition request to enable the smart meters in different areas to select a fourth random number, taking the product of the fourth random number and a first generation element in the three generation elements on the multiplication cyclic group as a first encryption parameter, generating a ciphertext according to the first random number, the first generation element in the three generation elements on the multiplication cyclic group, the fourth random number and the area common public key, signing the ciphertext, and sending the ciphertext to form a data packet.
In an embodiment, when the processor executes the computer program to implement the step of processing the aggregated data packet to form the power data, the processor specifically implements the following steps:
recovering the aggregated data packet to obtain a recovery result; the recovery results are added to obtain power data.
In an embodiment, when the processor executes the computer program to implement the step of determining whether there is a malicious user, the following steps are specifically implemented:
judgment of e (C)1,PKi)=e(Di,g1) Whether or not it is true, wherein,
Figure BDA0002551017740000191
Figure BDA0002551017740000192
riis a fourth random number, g1For the first of the three generators, PK, on the multiplication cycle groupiThe public key of the intelligent electric meter is used for sending the data packet; if e (C)1,PKi)=e(Di,g1) If yes, no malicious user exists; if e (C)1,PKi)=e(Di,g1) If not, the user has malicious intent.
The storage medium may be a usb disk, a removable hard disk, a Read-Only Memory (ROM), a magnetic disk, or an optical disk, which can store various computer readable storage media.
Those of ordinary skill in the art will appreciate that the elements and algorithm steps of the examples described in connection with the embodiments disclosed herein may be embodied in electronic hardware, computer software, or combinations of both, and that the components and steps of the examples have been described in a functional general in the foregoing description for the purpose of illustrating clearly the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative. For example, the division of each unit is only one logic function division, and there may be another division manner in actual implementation. For example, various elements or components may be combined or may be integrated into another system, or some features may be omitted, or not implemented.
The steps in the method of the embodiment of the invention can be sequentially adjusted, combined and deleted according to actual needs. The units in the device of the embodiment of the invention can be merged, divided and deleted according to actual needs. In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a storage medium. Based on such understanding, the technical solution of the present invention essentially or partially contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a terminal, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention.
While the invention has been described with reference to specific embodiments, the invention is not limited thereto, and various equivalent modifications and substitutions can be easily made by those skilled in the art within the technical scope of the invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. The electric power data aggregation acquisition method is characterized by comprising the following steps:
setting and initializing system parameters to obtain a public key and a private key of the intelligent electric meter, calculating the public key and the private key, and collecting the public key and the private key;
creating a region about the smart meter to obtain a region common public key;
acquiring the electricity consumption quantity of intelligent electric meters from different areas after encryption by using an addition homomorphic encryption technology to obtain a data packet;
calculating a tag parameter for the data packet to obtain a first tag parameter;
verifying by adopting the first label parameter to judge whether the data packet is obtained by calculation of an intelligent electric meter;
if the data packet is calculated by the intelligent electric meter, performing aggregation processing on the data packet to obtain an aggregated data packet;
calculating a label parameter for the aggregated data packet to obtain a second label parameter;
verifying by adopting the second label parameter to judge whether the aggregated data packet meets the requirement;
and if the aggregated data packet meets the requirements, processing the aggregated data packet to form power data.
2. The method for collecting power data aggregation according to claim 1, wherein after recovering the aggregated data packet to form power data, the method further comprises:
judging whether a malicious user exists or not;
if the malicious user exists, generating a reminding notice, and sending the notice to the terminal so that the terminal can trace the intelligent electric meter corresponding to the malicious user;
and if no malicious user exists, entering an ending step.
3. The method for collecting the power data in an aggregation manner according to claim 2, wherein the setting and initializing system parameters to obtain a public key and a private key of the smart meter, a calculation public key and a private key, and a collection public key and a private key comprises:
setting a prime number, a finite field with the prime number as an order, elliptic curve bilinear mapping on the finite field, setting a system security parameter and a multiplication cycle group with the system security parameter as an order, selecting three generating elements on the multiplication cycle group, and defining two one-way hash functions;
selecting a first random number, a second random number and a third random number to obtain a private key of the intelligent electric meter, a calculation private key and a collection private key;
taking a product of the first random number and a first generator in the three generators on the multiplication cyclic group as a public key of the intelligent electric meter, taking a product of the second random number and a second generator in the three generators on the multiplication cyclic group as a calculation public key, and taking a product of the third random number and a third generator in the three generators on the multiplication cyclic group as a collection public key;
calculating a digital certificate of the intelligent ammeter according to the third random number, the ID number of the intelligent ammeter and the public key of the intelligent ammeter, and calculating a digital certificate of data collection according to the third random number and the public key;
and integrating the multiplication cycle group, the system security parameters, the three generators, the two one-way hash functions and the collected public key to obtain the system public parameters.
4. The power data aggregation collection method according to claim 3, wherein the creating a region for the smart meters to obtain a region common public key comprises:
creating an area about the smart meters so that the smart meters in the corresponding area broadcast the self ID numbers, the public keys and the digital certificates to the corresponding area;
and confirming according to the broadcasted self ID number, the public key and the digital certificate, and summing according to the confirmed public key of the intelligent electric meter to obtain the common public key of the region.
5. The method for collecting the power data in an aggregation manner according to claim 4, wherein the step of obtaining the electricity consumption quantity of the smart meters from different areas after the smart meters are encrypted by using an addition homomorphic encryption technology to obtain the data packet comprises the following steps:
and sending the electricity consumption data acquisition request to enable the smart meters in different areas to select a fourth random number, taking the product of the fourth random number and a first generation element in the three generation elements on the multiplication cyclic group as a first encryption parameter, generating a ciphertext according to the first random number, the first generation element in the three generation elements on the multiplication cyclic group, the fourth random number and the area common public key, signing the ciphertext, and sending the ciphertext to form a data packet.
6. The method for collecting power data aggregation according to claim 1, wherein the processing the aggregation data packet to form power data includes:
recovering the aggregated data packet to obtain a recovery result;
the recovery results are added to obtain power data.
7. The method for collecting power data aggregation according to claim 5, wherein the determining whether the malicious user exists comprises:
judgment of e (C)1,PKi)=e(Di,g1) Whether or not it is true, wherein,
Figure FDA0002551017730000031
Figure FDA0002551017730000032
riis a fourth random number, g1For the first of the three generators, PK, on the multiplication cycle groupiThe public key of the intelligent electric meter is used for sending the data packet;
if e (C)1,PKi)=e(Di,g1) If yes, no malicious user exists;
if e (C)1,PKi)=e(Di,g1) If not, the user has malicious intent.
8. Electric power data aggregation collection system, its characterized in that includes:
the parameter setting unit is used for setting and initializing system parameters to obtain a public key and a private key of the intelligent electric meter, calculating the public key and the private key and collecting the public key and the private key;
the system comprises an area creating unit, a public key generating unit and a public key generating unit, wherein the area creating unit is used for creating areas related to the intelligent electric meters so as to obtain an area public key;
the data packet obtaining unit is used for obtaining the electricity consumption quantity of the intelligent electric meters from different areas after being encrypted by the addition homomorphic encryption technology to obtain data packets;
the first calculation unit is used for calculating the label parameters of the data packets to obtain first label parameters;
the first verification unit is used for verifying by adopting the first label parameter so as to judge whether the data packet is obtained by calculation of the intelligent electric meter;
the aggregation unit is used for performing aggregation processing on the data packet to obtain an aggregated data packet if the data packet is obtained by calculation of the intelligent electric meter;
the second calculation unit is used for calculating the label parameters of the aggregated data packet to obtain second label parameters;
the second verification unit is used for verifying by adopting the second label parameter so as to judge whether the aggregated data packet meets the requirement;
and the recovery processing unit is used for processing the aggregation data packet to form power data if the aggregation data packet meets the requirement.
9. A computer device, characterized in that the computer device comprises a memory, on which a computer program is stored, and a processor, which when executing the computer program implements the method according to any of claims 1 to 7.
10. A storage medium, characterized in that the storage medium stores a computer program which, when executed by a processor, implements the method according to any one of claims 1 to 7.
CN202010576007.3A 2020-06-22 2020-06-22 Electric power data aggregation acquisition method and device, computer equipment and storage medium Active CN111786978B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010576007.3A CN111786978B (en) 2020-06-22 2020-06-22 Electric power data aggregation acquisition method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010576007.3A CN111786978B (en) 2020-06-22 2020-06-22 Electric power data aggregation acquisition method and device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111786978A true CN111786978A (en) 2020-10-16
CN111786978B CN111786978B (en) 2022-10-28

Family

ID=72756088

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010576007.3A Active CN111786978B (en) 2020-06-22 2020-06-22 Electric power data aggregation acquisition method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111786978B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114218318A (en) * 2022-02-21 2022-03-22 国网山东省电力公司乳山市供电公司 Data processing system and method for electric power big data
CN114221809A (en) * 2021-12-14 2022-03-22 北方工业大学 Abnormal data resisting and privacy protecting data aggregation system and method

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104767763A (en) * 2015-04-28 2015-07-08 湖北工业大学 Privacy protecting area user electricity quantity aggregation system and method for intelligent power grid
CN105844172A (en) * 2016-03-22 2016-08-10 湖北工业大学 Multi-community multi-dimensional user electric quantity clustering system and method with privacy protection
US20170019248A1 (en) * 2014-09-30 2017-01-19 Kabushiki Kaisha Toshiba Homomorphic Based Method For Distributing Data From One or More Metering Devices To Two or More Third Parties
CN110489982A (en) * 2019-08-08 2019-11-22 北京珞安科技有限责任公司 A kind of smart grid data aggregate and encryption method with forward security
CN111082920A (en) * 2019-12-27 2020-04-28 西南石油大学 Non-interactive verifiable multi-type encrypted data aggregation method facing smart power grid

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170019248A1 (en) * 2014-09-30 2017-01-19 Kabushiki Kaisha Toshiba Homomorphic Based Method For Distributing Data From One or More Metering Devices To Two or More Third Parties
CN104767763A (en) * 2015-04-28 2015-07-08 湖北工业大学 Privacy protecting area user electricity quantity aggregation system and method for intelligent power grid
CN105844172A (en) * 2016-03-22 2016-08-10 湖北工业大学 Multi-community multi-dimensional user electric quantity clustering system and method with privacy protection
CN110489982A (en) * 2019-08-08 2019-11-22 北京珞安科技有限责任公司 A kind of smart grid data aggregate and encryption method with forward security
CN111082920A (en) * 2019-12-27 2020-04-28 西南石油大学 Non-interactive verifiable multi-type encrypted data aggregation method facing smart power grid

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
张少敏等: "智能电网下保护用户隐私的无证书环签密方案", 《电力系统自动化》, vol. 42, no. 03, 10 February 2018 (2018-02-10), pages 118 - 135 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114221809A (en) * 2021-12-14 2022-03-22 北方工业大学 Abnormal data resisting and privacy protecting data aggregation system and method
CN114221809B (en) * 2021-12-14 2024-01-26 北方工业大学 Data aggregation system and method for resisting abnormal data and protecting privacy
CN114218318A (en) * 2022-02-21 2022-03-22 国网山东省电力公司乳山市供电公司 Data processing system and method for electric power big data

Also Published As

Publication number Publication date
CN111786978B (en) 2022-10-28

Similar Documents

Publication Publication Date Title
CN110536259B (en) Lightweight privacy protection data multistage aggregation method based on fog calculation
CN111294366B (en) Statistical analysis method for aggregation of encrypted data for resisting secret key leakage in smart power grid
Alrawais et al. An attribute-based encryption scheme to secure fog communications
Li et al. PPMA: Privacy-preserving multisubset data aggregation in smart grid
Wang An identity-based data aggregation protocol for the smart grid
CN111147472B (en) Lightweight authentication method and system for intelligent electric meter under edge computing scene
Jo et al. Efficient and privacy-preserving metering protocols for smart grid systems
Ming et al. Efficient privacy-preserving multi-dimensional data aggregation scheme in smart grid
Mustafa et al. DEP2SA: A decentralized efficient privacy-preserving and selective aggregation scheme in advanced metering infrastructure
CN104219056A (en) Privacy protection type real-time electric charge collecting method for intelligent power grid
CN111800400B (en) Multi-dimensional multi-angle electricity data aggregation system based on fog
Shao et al. Dynamic data integrity auditing method supporting privacy protection in vehicular cloud environment
CN112202544B (en) Smart power grid data security aggregation method based on Paillier homomorphic encryption algorithm
Chu et al. Privacy-preserving smart metering with regional statistics and personal enquiry services
CN104639311A (en) Combining method and system for protecting power utilization privacy and integrity in smart power grid
CN111786978B (en) Electric power data aggregation acquisition method and device, computer equipment and storage medium
CN108390866A (en) Trusted remote method of proof based on the two-way anonymous authentication of dual-proxy
CN113254987B (en) Fault-tolerant time sequence data aggregation method capable of protecting privacy
CN117113420B (en) User power data privacy protection method and protection system for smart grid
CN107231353A (en) Batch authentication method based on binary tree in a kind of intelligent grid
Olakanmi PASS: a privacy-aware approach for secure smart metering in advanced metering infrastructure networks
CN113569261B (en) Power grid data processing method and device, electronic equipment and storage medium
CN115473623A (en) Method for safely aggregating multidimensional user data in smart power grid
CN113438562A (en) Intelligent electric meter data transmission method and system
CN114301612A (en) Information processing method, communication apparatus, and encryption apparatus

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