CN116668066B - Smart grid privacy protection method and device based on blockchain, nonvolatile storage medium and electronic device - Google Patents

Smart grid privacy protection method and device based on blockchain, nonvolatile storage medium and electronic device Download PDF

Info

Publication number
CN116668066B
CN116668066B CN202310416341.6A CN202310416341A CN116668066B CN 116668066 B CN116668066 B CN 116668066B CN 202310416341 A CN202310416341 A CN 202310416341A CN 116668066 B CN116668066 B CN 116668066B
Authority
CN
China
Prior art keywords
user
information
block
miner
virtual
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.)
Active
Application number
CN202310416341.6A
Other languages
Chinese (zh)
Other versions
CN116668066A (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.)
North China Electric Power University
Original Assignee
North China Electric Power University
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 North China Electric Power University filed Critical North China Electric Power University
Priority to CN202310416341.6A priority Critical patent/CN116668066B/en
Publication of CN116668066A publication Critical patent/CN116668066A/en
Application granted granted Critical
Publication of CN116668066B publication Critical patent/CN116668066B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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/0407Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the identity of one or more communicating identities is hidden
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • G06F21/6245Protecting personal data, e.g. for financial or medical purposes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Systems or methods specially adapted for specific business sectors, e.g. utilities or tourism
    • G06Q50/06Electricity, gas or water supply
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/06Network architectures or network communication protocols for network security for supporting key management in a packet data network
    • 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
    • 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/06Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
    • H04L9/0643Hash functions, e.g. MD5, SHA, HMAC or f9 MAC
    • 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
    • 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
    • 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/50Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using hash chains, e.g. blockchains or hash trees
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y04INFORMATION OR COMMUNICATION TECHNOLOGIES HAVING AN IMPACT ON OTHER TECHNOLOGY AREAS
    • Y04SSYSTEMS INTEGRATING TECHNOLOGIES RELATED TO POWER NETWORK OPERATION, COMMUNICATION OR INFORMATION TECHNOLOGIES FOR IMPROVING THE ELECTRICAL POWER GENERATION, TRANSMISSION, DISTRIBUTION, MANAGEMENT OR USAGE, i.e. SMART GRIDS
    • Y04S40/00Systems for electrical power generation, transmission, distribution or end-user application management characterised by the use of communication or information technologies, or communication or information technology specific aspects supporting them
    • Y04S40/20Information technology specific aspects, e.g. CAD, simulation, modelling, system security

Abstract

The invention discloses a block chain-based intelligent power grid privacy protection method, which comprises the following steps: generating a secret key, namely generating a public key and a private key for each user by using the secret key generator, and taking the public key as a virtual ID of the user; data collection, namely collecting the electricity consumption and other information of a user at intervals of a specific period of time; after receiving the broadcast information, other users use a bloom filter to carry out message verification; the miner selects, and a user serving as the miner is selected through a miner selection algorithm; after a miner is selected, all transactions are recorded in a new block of a block chain, and the miner can send the new block to other users for block verification; and (3) block verification, wherein each user verifies the authenticity of the information recorded in the received block, and after verification, the power consumption information is sent to a power supply company. By the method, the user electricity privacy can be protected, the integrity of the electricity data can be guaranteed, and the user electricity data can be effectively uploaded to a power supply company.

Description

Smart grid privacy protection method and device based on blockchain, nonvolatile storage medium and electronic device
Technical Field
The invention relates to the field of computer network communication, in particular to a block chain-based intelligent power grid privacy protection method and device and application thereof.
Background
With the progress of information and communication technology (ict), intelligent applications such as intelligent home, intelligent metering, intelligent parking, intelligent building and the like are gradually developed. All of these applications, as well as other applications not mentioned herein, are based on the need for electrical energy. For example, various devices operating in intelligent home require power supply, and it is also important to collect the power consumption data of a user in real time after the power supply company meets the power consumption requirements of the user. Smart meters are smart devices that a power company installs at a customer's home and can collect electricity data in real time, measure, collect, and analyze the electricity data, and communicate the data to the power company on demand or on schedule in near real time. Based on the collected data, the power company may provide dynamic pricing, customers may benefit from this offer by modifying their power usage behavior, which will help customers dynamically adjust their power usage to avoid alarming, and in addition, the power company may utilize the collected data to improve its services.
However, if such data is not properly protected, data collected and transmitted to the power company in near real time may reveal the privacy of the user. For example, by intermediately stealing user power usage, a hacker may analyze the user's power usage profile and may determine if the user is at home and cause damage (e.g., theft).
Therefore, how to protect the privacy of the user and to timely and accurately upload the electricity consumption data of the user to the power supply company is a problem to be solved.
Disclosure of Invention
In view of the above, the technical problem to be solved by the invention is to overcome the defect of insufficient confidentiality of the existing power consumption data transmission, thereby providing a smart grid privacy protection method based on block chains.
According to a first aspect, an embodiment of the present invention discloses a blockchain-based smart grid privacy protection method, including: generating a secret key, namely generating a public key and a private key for each user by using a secret Key Generator (KG), and taking the public key as a virtual ID of the user; collecting data, namely collecting the electricity consumption and other information of the user at intervals of a specific period of time, and broadcasting the information to other users after encryption processing; after receiving the broadcast information, other users use a bloom filter to carry out message verification; the miner selects, and a user serving as the miner is selected through a miner selection algorithm; after a miner is selected, all transactions (electricity consumption data) are recorded in a new block of the blockchain, and the miner can send the new block to other users for block verification; and (3) block verification, wherein each user verifies the authenticity of the information recorded in the received block, and after verification, the power consumption information is sent to a power supply company.
Optionally, the key generation process includes: the KG initializes the system by generating a key for each user, who first sends each user its unique identifier (true identity) to the KG for registration, and when the user sends its identifier to the KG, it runs the elliptic curve cryptography algorithm implemented by the KG described above to generate the public and private keys. Then, the user takes the public key as the virtual ID, and in addition, the KG is also responsible for creating a bloom filter to quickly and efficiently judge whether the ID belongs to the system.
Optionally, the data collection includes: during the data collection process, the identity of the user is masked by using a virtual ID for each user instead of using the user's real identity. It is assumed that a new block is generated every 10 minutes, and thus, every 10 minutes, every user (smart meter) concatenates its electricity consumption data, time stamp, and virtual ID thereof (the user's public key as its virtual ID), then hashes the concatenated data, and encrypts the result of the operation using the private key. A digital signature is then obtained from the encrypted data and the public key. Finally, the electricity consumption data, the time stamp, the virtual ID, and the encryption information are transmitted to all users in a plaintext form.
Optionally, the identity authentication includes: when the user receives data generated by the data collection section from another user, hash operation is performed on the power consumption data, the time stamp, and the virtual ID. It then decrypts the encrypted information generated by the data collection section using the sender's public key. The message is authentic if the obtained hash value is equal to the decrypted hash value.
Optionally, the miner selection includes: a threshold is set and a user who uses more than this threshold will become a mineworker. If there are multiple users, all of these users will act as miners.
Optionally, the block generating includes: after selecting the mineworker, all transactions (electricity usage data) are recorded in a new block of the blockchain, and the mineworker will send the new block to other users for block verification. The mineworker records the following information in the block header: hash of previous block, timestamp, root hash, and virtual ID.
Optionally, the block verification includes: after receiving the new block sent by the miner, the user must verify the authenticity of the information recorded in the received block, and after verification, if there is no error information in the block, each user will add the new block to the account book stored in its data set, and then if all users agree to the record in the new block, the miner will send the electricity consumption information to the power supply company.
The invention also discloses a smart grid privacy protection device based on the blockchain, which is characterized in that:
a key generation module: generating a public key and a private key for each user by using a Key Generator (KG), and taking the public key as a virtual I D of the user;
and a data collection module: collecting the electricity consumption and other information of the user at intervals of a specific period, splicing the information, then carrying out encryption processing by using a private key, and finally broadcasting to other users;
identity authentication module: after receiving the broadcast information, other users decrypt the encrypted information by using the public key, compare the decrypted information with information generated by carrying out hash operation on the user electricity consumption data, the time stamp and the virtual ID transmitted in the plaintext, if the decrypted information is consistent with the information, the information is not tampered during transmission, and meanwhile, a bloom filter is used for verifying whether the virtual ID exists in the electric power system;
a miner selection module: selecting a user serving as a miner through a miner selection algorithm;
the block generation module: after selecting miners, all transactions are recorded in a new block of the blockchain, and the miners send the new block to other users for block verification; the mineworker records the following information in the block header: hash of previous block, timestamp, root hash, virtual ID;
block verification module: after receiving the new block sent by the miner, the user must verify the authenticity of the information recorded in the received block, and after verification, if there is no error information in the block, each user will add the new block to the account book stored in its data set, and then if all users agree to the record in the new block, the miner will send the electricity consumption information to the power supply company.
The invention also discloses a nonvolatile storage medium, which is characterized in that the nonvolatile storage medium comprises a stored program, wherein the program controls equipment where the nonvolatile storage medium is located to execute the method when running.
The invention also discloses an electronic device which is characterized by comprising a processor and a memory; the memory has stored therein computer readable instructions, and the processor is configured to execute the computer readable instructions, wherein the computer readable instructions perform the method described above when executed.
Advantageous effects
By introducing an elliptic curve encryption algorithm to generate a public key and a private key to replace an RSA algorithm with higher complexity when collecting electricity data, the calculated amount of an ammeter is reduced, and a secret key can be generated quickly; by adopting the virtual ID, the privacy of the user is protected; and the block chain technology is introduced to record the electric quantity data, so that the integrity of the electric quantity data is ensured.
Drawings
FIG. 1 is a flowchart of a specific example of a blockchain-based smart grid privacy protection method in an embodiment of the present invention;
FIG. 2 is a flow chart of the selection of miners in an embodiment of the present invention
FIG. 3 is a diagram of a new block according to an embodiment of the present invention;
fig. 4 is a schematic diagram of a network model deployed in an embodiment of the present invention.
Detailed Description
The embodiment of the invention discloses a smart grid privacy protection method based on a blockchain, which comprises the following steps as shown in fig. 1:
step 101: generating a secret key, namely generating a public key and a private key for each user by using a secret Key Generator (KG), and taking the public key as a virtual ID of the user;
the public key and the private key are generated as follows:
elliptic curve Ep (a, b):
y 2 =x 3 +ax+b(modp)
where p is a prime number, (x, y) is a point on the elliptic curve and x, y E [0, p-1 ]]A, b are arbitrary constants and 4a 3 +27b 2 ≠0;
An elliptic curve Ep (a, b) is selected, and a point on the elliptic curve is taken as a base point G, and n is the order of G.
The true ID of the user is A, and the private key k is taken as
k=Amodn
Then generate a public key PK in which
PK=kG
Illustratively, the data splicing and hash operation in step 102 is as follows:
E sk =SHA256(d+t stamp +PK)
wherein SHA256 is hash operation with hash value length of 256 bits, d is user power consumption data, t stamp For time stamp, PK is virtual ID, d, t of user are added stamp And performing hash operation after PK splicing to obtain 256-bit data.
Step 102: collecting data, namely collecting the electricity consumption and other information of the user at intervals of a specific period, splicing the information, then carrying out encryption processing by using a private key, and finally broadcasting the information to other users; during the data collection process, the identity of the user is masked by using a virtual ID for each user instead of using the user's real identity. It is assumed that a new block is generated every 10 minutes, and thus, every 10 minutes, every user (smart meter) concatenates its electricity consumption data, time stamp, and virtual ID thereof (the user's public key as its virtual ID), then hashes the concatenated data, and encrypts the result of the operation using the private key. A digital signature is then obtained from the encrypted data and the public key. Finally, the electricity consumption data, the time stamp, the virtual ID, and the encryption information are transmitted to all users in a plaintext form.
Step 103: after receiving the broadcast information, other users decrypt the encrypted information by using a public key, compare the decrypted information with information generated by carrying out hash operation on the user electricity consumption data, the timestamp and the virtual ID transmitted in the plaintext, if the decrypted information is consistent with the information, the information is not tampered in the transmission process, and meanwhile, a bloom filter is used for verifying whether the virtual ID exists in the power system;
illustratively, the virtual ID verification process using a bloom filter of step 103 is as follows:
for an array composed of n bits, each element of the array is initialized to 0. Given a virtual ID, i independent hash functions h1, h2, h3, hi are first selected, and the hash value for the given virtual ID is calculated using the following formula:
index=hi(ID)modn
then, the value of the corresponding bit in the array is assigned 1, the operation is performed on the virtual ID during the inspection, the result is compared with the array, if the corresponding bit numbers are all 1, the virtual ID exists in the power system, otherwise, the virtual ID does not exist.
Step 104: the miner selects, through the miner selection algorithm, the user as the miner: fig. 2 is a flow chart of selecting a miner in an embodiment of the invention, wherein the threshold is set as a miner node first, then the electricity consumption of each user is collected and compared, and if the electricity consumption is greater than the threshold, the miner node is set.
Step 105: after a miner is selected, all transactions (electricity consumption data) are recorded in a new block of the blockchain, and the miner can send the new block to other users for block verification; the mineworker records the following information in the block header: the hash value, timestamp, root hash value and virtual ID of the previous block, and the new block diagram is shown in fig. 3. The hash value of the previous block is calculated as follows:
H1=SHA256(Head1)
where H1 is the hash value of the previous block, SHA256 is a hash operation with a hash value length of 256 bits, and Head1 is the value of the previous block header.
Step 106: block verification includes: after receiving the new block sent by the miner, the user must verify the information recorded in the received block, including checking whether the syntax of the new block data structure is correct, whether the electric quantity of the generating node of the new block head is greater than the threshold value of the miner node, whether the block size is within the allowable range, etc. After verification, if there is no erroneous information in the block, each user will add this new block to the ledger maintained in its dataset, and then if all users agree to the records in this new block, the miners will send the electricity usage information to the power company.
The invention also discloses a smart grid privacy protection device based on the blockchain, which is characterized in that:
a key generation module: generating a public key and a private key for each user by using a Key Generator (KG), and taking the public key as a virtual I D of the user;
and a data collection module: collecting the electricity consumption and other information of the user at intervals of a specific period, splicing the information, then carrying out encryption processing by using a private key, and finally broadcasting to other users;
identity authentication module: after receiving the broadcast information, other users decrypt the encrypted information by using the public key, compare the decrypted information with information generated by carrying out hash operation on the user electricity consumption data, the time stamp and the virtual ID transmitted in the plaintext, if the decrypted information is consistent with the information, the information is not tampered during transmission, and meanwhile, a bloom filter is used for verifying whether the virtual ID exists in the electric power system;
a miner selection module: selecting a user serving as a miner through a miner selection algorithm;
the block generation module: after selecting miners, all transactions are recorded in a new block of the blockchain, and the miners send the new block to other users for block verification; the mineworker records the following information in the block header: hash of previous block, timestamp, root hash, virtual ID;
block verification module: after receiving the new block sent by the miner, the user must verify the authenticity of the information recorded in the received block, and after verification, if there is no error information in the block, each user will add the new block to the account book stored in its data set, and then if all users agree to the record in the new block, the miner will send the electricity consumption information to the power supply company.
For small scale deployments, fig. 4 shows a network model consisting of three layers. The first layer is a sensing layer in which our smart meter is installed for collecting data related to electricity usage. Each smart meter sends its electricity consumption data to the mineworker node selected according to the threshold, and the mineworker aggregates all the data sent and forwards it to the upper layer, corresponding to steps 101-106. The second layer is a network layer, and the data collected by the intelligent electric meter is relayed by the gateway and sent to the power supply company for charging. Communication between the smart meter and the gateway may rely on the use of an emerging low power wide area network, such as LoRaWAN, sigFox, NB-I oT, etc., while the gateway communicates with the power company using a secure standard I P connection. The third layer is a data management layer for processing data sent by the intelligent ammeter.
In summary, the elliptic curve encryption algorithm is introduced to generate the public key and the private key to replace the RSA algorithm with higher complexity when the electricity consumption data are collected, so that the calculated amount of the ammeter is reduced and the secret key can be quickly generated; by adopting the virtual ID, the privacy of the user is protected; and the block chain technology is introduced to record the electric quantity data, so that the integrity of the electric quantity data is ensured.
The foregoing has shown and described the basic principles, principal features and advantages of the invention. It will be understood by those skilled in the art that the present invention is not limited to the embodiments described above, and that the above embodiments and descriptions are merely illustrative of the principles of the present invention, and various changes and modifications may be made therein without departing from the spirit and scope of the invention, which is defined by the appended claims. The scope of the invention is defined by the appended claims and equivalents thereof.

Claims (4)

1. A smart grid privacy protection method based on a blockchain is characterized by comprising the following steps:
step 101: generating a secret key, namely generating a public key and a private key for each user by using a secret Key Generator (KG), and taking the public key as a virtual ID of the user; the public key and the private key are generated as follows:
elliptic curve Ep (a, b):
y 2 =x 3 +ax+b(modp)
where p is a prime number, (x, y) is a point on the elliptic curve and x, y E [0, p-1 ]]A, b are arbitrary constants and 4a 3 +27b 2 Not equal to 0; selecting an elliptic curve Ep (a, b), and taking a point on the elliptic curve as a base point G, wherein n is the order of G;
the true ID of the user is A, and the private key k is taken as
k=A(modn)
Then generate a public key PK in which
PK=kG
The data splicing and hash operation process in the step 102 is as follows:
E sk =SHA256(d+t stamp +PK)
wherein SHA256 is hash operation with hash value length of 256 bits, d is user power consumption data, t stamp For time stamp, PK is virtual ID, d, t of user are added stamp Performing hash operation after PK splicing to obtain 256-bit data;
step 102: and collecting data, namely collecting the electricity consumption and other information of the user at intervals of a specific period, splicing the information, then carrying out encryption processing by using a private key, and finally broadcasting the information to other users: the data collection includes: masking the identity of the user during data collection by using a virtual ID for each user instead of using the user's real identity; setting to generate a new block every 10 minutes, so that every 10 minutes each user splices the power consumption data, the time stamp and the virtual ID thereof, then carries out hash operation on the spliced data, and encrypts an operation result by using a private key; obtaining a digital signature according to the encrypted data and the public key; finally, sending the electricity consumption data, the time stamp, the virtual ID and the encryption information to all users in a plaintext form;
step 103: after receiving the broadcast information, other users decrypt the encrypted information by using the public key, compare the decrypted information with information generated by carrying out hash operation on the user electricity consumption data, the timestamp and the virtual ID transmitted in the plaintext, if the decrypted information is consistent with the information, the information is not tampered in the transmission process, and meanwhile, a bloom filter is used for verifying whether the virtual ID exists in the power system: for an array consisting of n bits, initializing each element of the array to 0; given a virtual ID, i independent hash functions h1, h2, h3, hi are first selected, and the hash value for the given virtual ID is calculated using the following formula: index=hi (ID) mod n
Then, the value of the corresponding bit in the array is assigned 1, the operation is carried out on the virtual ID during the inspection, the result is compared with the array, if the corresponding bit numbers are all 1, the virtual ID exists in the power system, otherwise, the virtual ID does not exist;
step 104: the miner selects, and a user serving as the miner is selected through a miner selection algorithm; the miner selection includes: setting a threshold value, and enabling a user with the electricity consumption larger than the threshold value to become a miner; if there are multiple users, all of these users will act as miners;
step 105: after a miner is selected, all transactions are recorded in a new block of a block chain, and the miner can send the new block to other users for block verification; the mineworker records the following information in the block header: hash of previous block, timestamp, root hash, virtual ID;
step 106: block verification: after receiving the new block sent by the miner, the user must verify the authenticity of the information recorded in the received block, and after verification, if there is no error information in the block, each user will add the new block to the account book stored in its data set, and then if all users agree to the record in the new block, the miner will send the electricity consumption information to the power supply company.
2. The intelligent power grid privacy protection device based on the blockchain is based on the intelligent power grid privacy protection method based on the blockchain, and is characterized in that:
a key generation module: generating a public key and a private key for each user by using a Key Generator (KG), and taking the public key as a virtual ID of the user;
and a data collection module: collecting the electricity consumption and other information of the user at intervals of a specific period, splicing the information, then carrying out encryption processing by using a private key, and finally broadcasting to other users;
identity authentication module: after receiving the broadcast information, other users decrypt the encrypted information by using the public key, compare the decrypted information with information generated by carrying out hash operation on the user electricity consumption data, the time stamp and the virtual ID transmitted in the plaintext, if the decrypted information is consistent with the information, the information is not tampered during transmission, and meanwhile, a bloom filter is used for verifying whether the virtual ID exists in the electric power system;
a miner selection module: selecting a user serving as a miner through a miner selection algorithm;
the block generation module: after selecting miners, all transactions are recorded in a new block of the blockchain, and the miners send the new block to other users for block verification; the mineworker records the following information in the block header: hash of previous block, timestamp, root hash, virtual ID;
block verification module: after receiving the new block sent by the miner, the user must verify the authenticity of the information recorded in the received block, and after verification, if there is no error information in the block, each user will add the new block to the account book stored in its data set, and then if all users agree to the record in the new block, the miner will send the electricity consumption information to the power supply company.
3. A non-volatile storage medium comprising a stored program, wherein the program when run controls a device in which the non-volatile storage medium resides to perform the method of claim 1.
4. An electronic device comprising a processor and a memory; the memory has stored therein computer readable instructions for execution by the processor, wherein the computer readable instructions when executed perform the method of claim 1.
CN202310416341.6A 2023-04-18 2023-04-18 Smart grid privacy protection method and device based on blockchain, nonvolatile storage medium and electronic device Active CN116668066B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310416341.6A CN116668066B (en) 2023-04-18 2023-04-18 Smart grid privacy protection method and device based on blockchain, nonvolatile storage medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310416341.6A CN116668066B (en) 2023-04-18 2023-04-18 Smart grid privacy protection method and device based on blockchain, nonvolatile storage medium and electronic device

Publications (2)

Publication Number Publication Date
CN116668066A CN116668066A (en) 2023-08-29
CN116668066B true CN116668066B (en) 2024-03-08

Family

ID=87716097

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310416341.6A Active CN116668066B (en) 2023-04-18 2023-04-18 Smart grid privacy protection method and device based on blockchain, nonvolatile storage medium and electronic device

Country Status (1)

Country Link
CN (1) CN116668066B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117395279B (en) * 2023-10-18 2024-03-19 广州北星科技有限公司 Building intelligent energy management system based on Internet of things

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101344074B1 (en) * 2012-11-19 2013-12-24 순천향대학교 산학협력단 Smart grid data transaction scheme for privacy
CN110189128A (en) * 2019-06-06 2019-08-30 西安安盟智能科技股份有限公司 A kind of algorithm and device of the distributed common recognition quickly generated for block
CN110741372A (en) * 2017-06-07 2020-01-31 区块链控股有限公司 Computer-implemented system and method for managing transactions on a blockchain network
WO2022041895A1 (en) * 2020-08-28 2022-03-03 长沙理工大学 Blockchain-based power transaction system, transaction method and bill query method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101344074B1 (en) * 2012-11-19 2013-12-24 순천향대학교 산학협력단 Smart grid data transaction scheme for privacy
CN110741372A (en) * 2017-06-07 2020-01-31 区块链控股有限公司 Computer-implemented system and method for managing transactions on a blockchain network
CN110189128A (en) * 2019-06-06 2019-08-30 西安安盟智能科技股份有限公司 A kind of algorithm and device of the distributed common recognition quickly generated for block
WO2022041895A1 (en) * 2020-08-28 2022-03-03 长沙理工大学 Blockchain-based power transaction system, transaction method and bill query method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
赵乙桥.基于环签密的智能电表完整隐私保护研究.2018,第32-42页. *

Also Published As

Publication number Publication date
CN116668066A (en) 2023-08-29

Similar Documents

Publication Publication Date Title
CN109325331B (en) Big data acquisition transaction system based on block chain and trusted computing platform
US9866376B2 (en) Method, system, and device of provisioning cryptographic data to electronic devices
CN111131148B (en) Aggregation method and system capable of protecting privacy data and facing smart power grid
JP3558488B2 (en) Cryptographic communication system
CN1708942B (en) Secure implementation and utilization of device-specific security data
CN110460439A (en) Information transferring method, device, client, server-side and storage medium
CA2560570A1 (en) Authentication between device and portable storage
CN111832066B (en) Block chain assisted V2G security authentication and privacy data aggregation method
CN101771699A (en) Method and system for improving SaaS application security
CN116668066B (en) Smart grid privacy protection method and device based on blockchain, nonvolatile storage medium and electronic device
CN111343164B (en) Data encryption method and device applied to electric energy meter and storage medium
CN109104724A (en) A kind of data ciphering method and device for device upgrade
CN111783078A (en) Android platform security chip control system
CN111435390A (en) Safety protection method for operation and maintenance tool of power distribution terminal
CN113312608A (en) Electric power metering terminal identity authentication method and system based on timestamp
CN101582765B (en) User bound portable trusted mobile device
CN114726536A (en) Timestamp generation method and device, electronic equipment and storage medium
CN109302286B (en) Fido equipment key index generation method
CN107844707B (en) Card data management method and card data management system
CN111435389A (en) Power distribution terminal operation and maintenance tool safety protection system
CN109995519A (en) A kind of quantum key traffic service method and system
Li Enabling Secure and Privacy Preserving Communications in Smart Grids
CN108933659A (en) A kind of authentication system and verification method of smart grid
KR20200143034A (en) Certificate-based security electronic watt hour meter
KR20130036522A (en) System for preventing counterfeit and falsification of metering data in cloud computing service

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