Virtual power plant data protection method and system under block chain based on AES algorithm
By combining AES encryption algorithm with blockchain technology, the lack of data protection in virtual power plants in a decentralized environment is solved, and efficient data privacy protection and overall system security are achieved.
Patent Information
- Application Number
- CN202510241287.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2024-11-15
- Filing Date
- 2025-03-03
- Publication Date
- 2025-06-24
AI Technical Summary
When traditional virtual power plants deal with large-scale distributed data, they face the risks of unauthorized access, tampering and leakage, especially in decentralized environments, where traditional encryption technologies are difficult to effectively ensure data integrity and tamper-proof.
Combining AES encryption algorithm and blockchain technology, virtual power plant data is encrypted through AES, and the encrypted data is recorded and verified by blockchain to achieve comprehensive data protection.
It improves the effectiveness of data privacy protection, enhances the overall security and reliability of the system, prevents unauthorized access and leakage of data, and ensures the integrity and transparency of data.
Smart Images

Figure CN120197229A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a method and system for protecting virtual power plant data under a blockchain based on the AES algorithm, and belongs to the field of power data protection. Background Art
[0002] In recent years, in order to achieve the national "dual carbon" goal, large-scale distributed energy resources (such as wind energy and photovoltaic) have developed rapidly, and the proportion of renewable energy access in the power grid has continued to increase. However, due to the randomness and distribution of these energy resources, directly connecting to the power grid will increase the difficulty of the safe and stable operation of the power system. As an emerging power system management model, a virtual power plant (VPP) aggregates distributed energy resources (DERs) into an entity through digital technology, making it possible to integrate large-scale renewable energy. However, the problems faced by traditional virtual power plants include a large number of device accesses, huge amounts of data during operation, and distributed characteristics. These factors make information vulnerable to malicious tampering during transmission, resulting in issues such as opaque transaction processes and data privacy leaks gradually emerging, becoming a key factor restricting its further development.
[0003] In a virtual power plant, a large amount of power production, consumption, scheduling, and user information is involved. These data face risks of unauthorized access, tampering, and leakage during transmission and storage. Existing data protection methods usually rely on traditional encryption technologies and centralized data management models, but these methods have certain deficiencies in dealing with large-scale distributed data. For example, although traditional encryption technologies such as symmetric encryption (AES) perform well in protecting data privacy, their application effects in a decentralized environment are limited, especially lacking effective mechanisms in ensuring data integrity and anti-tampering. Summary of the Invention
[0004] The present invention provides a method and system for protecting virtual power plant data under a blockchain based on the AES algorithm, which solves the problems disclosed in the background art. A virtual power plant data protection strategy that combines the AES encryption algorithm with blockchain technology is proposed. The aim is to encrypt the data in the virtual power plant through the AES algorithm to ensure the security of the data during transmission and storage, and use blockchain technology to record and verify the encrypted data, thereby achieving comprehensive protection of power data and user information. This method not only improves the effectiveness of data privacy protection but also enhances the overall security and reliability of the system.
[0005] In order to solve the above technical problems, the technical solutions adopted by the present invention are as follows:
[0006] A virtual power plant data protection method based on the AES algorithm under the blockchain, characterized by including:
[0007] Obtain power data and generate an encryption request;
[0008] Perform AES encryption on the power data to generate encrypted data;
[0009] Store the encrypted data in the blockchain network;
[0010] When a user makes an access request, verify the user's identity. If the user identity verification passes, the user obtains access rights and extracts the stored encrypted data from the blockchain;
[0011] Decrypt the extracted encrypted data through the AES decryption algorithm.
[0012] Furthermore, the AES encryption method includes:
[0013] Use a random number generator to generate an AES key,
[0014] ;
[0015] Among them, is the original key, is the key for the th round, is the round constant, used to ensure the uniqueness of each round of keys;
[0016] Use the AES key to encrypt the data, store the encrypted data in the decentralized storage layer, and record the hash value and other metadata of the encrypted data on the blockchain;
[0017] AES encryption is divided into multiple rounds, and each round includes byte substitution - SubBytes, row shift - ShiftRows, column confusion - MixColumns, and round key addition - AddRoundKey,
[0018] ;
[0019] Among them, is the result after the th round of encryption; is the key used in the th round; In the last round of encryption, the step is omitted, and the final output ciphertext is ,
[0020] 。
[0021] Furthermore, the method of storing the encrypted data in the blockchain network is:
[0022] The encrypted data is uploaded to the blockchain network, and the data is packed into a data block. Each data block contains the encrypted power data and other metadata.
[0023] The blockchain network ensures the generation, verification, and consistency of blocks through a consensus algorithm; blockchain nodes verify and pack data blocks to generate new blocks and add them to the blockchain.
[0024] Furthermore, the blockchain network is responsible for controlling data access rights through smart contracts; only authorized users or systems can decrypt and access the encrypted data; the smart contract verifies access requests according to preset rules and grants corresponding permissions based on the identity or role of the user.
[0025] Furthermore, the method for decrypting the extracted encrypted data by the AES decryption algorithm includes:
[0026] Initial round key addition:
[0027] ;
[0028] where is the input in the first round of the decryption process, is the input ciphertext, is the round key of the 10th round;
[0029] 9-round decryption operation:
[0030] AES decryption is divided into multiple rounds, and each round includes inverse byte substitution - InvSubBytes(x), inverse shift rows - InvShiftRows(x), and inverse mix columns - InvMixColumns(x);
[0031]
[0032] where is the round key of the i-th round;
[0033] Final round:
[0034]
[0035] where is the decrypted ciphertext.
[0036] Correspondingly, the present invention also provides a virtual power plant data protection system based on the AES algorithm under the blockchain, including:
[0037] A virtual power plant control unit for obtaining power data and generating an encryption request;
[0038] An AES encryption module for AES-encrypting the power data to generate encrypted data;
[0039] A blockchain network for storing the encrypted data into the blockchain network;
[0040] A user authentication module for authenticating the user identity when the user makes an access request. If the user identity authentication is passed, the user obtains the access permission and extracts the stored encrypted data from the blockchain;
[0041] A decryption module for decrypting the extracted encrypted data through the AES decryption algorithm.
[0042] Further, the AES encryption module is provided with a random number generator and a key manager. The random number generator generates an AES key; the key manager is used for storing the key.
[0043] Further, the user authentication module is provided with a smart contract module for controlling the access permission.
[0044] Correspondingly, the present invention also provides a computer-readable storage medium storing one or more programs, characterized in that: the one or more programs include instructions which, when executed by a computing device, cause the computing device to execute any one of the methods according to the above methods.
[0045] Correspondingly, a computing device includes:
[0046] One or more processors, one or more memories, and one or more programs, wherein the one or more programs are stored in the one or more memories and configured to be executed by the one or more processors, and the one or more programs include instructions for executing any one of the methods according to the above methods.
[0047] The beneficial effects achieved by the present invention:
[0048] The present invention uses the AES symmetric encryption algorithm to encrypt the transaction data in the power market; combines the AES encryption algorithm with the virtual power plant under the blockchain. The complexity of the AES algorithm ensures that the ciphertext is more complex and chaotic when visualized; utilizes the powerful data encryption ability of the AES algorithm to effectively prevent unauthorized access and leakage of data in the virtual power plant, and ensures the confidentiality of the operation data and user information of the virtual power plant.
[0049] The blockchain technology provides a transparent and tamper-proof data record, ensuring the integrity and authenticity of the data during storage and transmission. The blockchain technology can prevent the data from being maliciously tampered with or forged, improving the reliability of data management.
[0050] The virtual power plant under the blockchain combined with the AES algorithm achieves multi-level data protection, addressing the possible deficiencies of a single encryption technology or a single data management mechanism in protecting data privacy. The system demonstrates higher protection capabilities in the face of various security threats. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] Figure 1 FIG. is a schematic diagram of the virtual power plant data protection system based on the blockchain of the present invention using the AES algorithm;
[0052] Figure 2 FIG. is a flowchart of the AES data encryption of the present invention;
[0053] Figure 3 FIG. is a visualization data comparison chart of the simulation tests of the AES and DES algorithms of the present invention;
[0054] Figure 4 FIG. is a histogram comparison chart of the simulation tests of the AES and DES algorithms of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0055] The present invention will be further described below with reference to the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solutions of the present invention and cannot be used to limit the protection scope of the present invention.
[0056] As Figure 1 shown, the virtual power plant data protection system based on the blockchain of the present invention using the AES algorithm includes a virtual power plant control unit, a blockchain network, and an AES encryption module. The virtual power plant control unit is responsible for generating and managing the power data of the virtual power plant, including power generation, load demand, etc.; the blockchain network is used to store and verify the power transaction data and related operation records of the virtual power plant. The AES encryption module is responsible for encrypting the data generated by the virtual power plant using AES and storing the encrypted data on the blockchain to protect data privacy.
[0057] In the AES encryption module, the virtual power plant control unit collects power data (such as power generation, equipment status, price, etc.). Before data transmission, the collected data is encrypted using the AES algorithm. The specific implementation can use AES encryption with 128-bit, 192-bit, or 256-bit keys. The encrypted data is uploaded through the blockchain network and stored in the blockchain. The blockchain nodes package the data blocks and generate blocks, ensuring the immutability and consistency of the data through a consensus algorithm. When data needs to be accessed, authorized users or systems extract the encrypted data from the blockchain and decrypt the data using the corresponding key through the AES decryption algorithm to restore the original information for use by the users or systems. The access rights are controlled by smart contracts to ensure that only authorized users can decrypt the data. As Figure 2 shown, the specific steps are as follows:
[0058] (1) Data encryption process
[0059] Step 1: Data collection. The virtual power plant control unit collects power-related data, including transaction number, power plant number, energy quantity, price, and transaction type.
[0060] Step 2: AES encryption processing. The collected data is encrypted through the AES encryption algorithm. According to the system requirements, the AES algorithm can use keys of 128 bits, 192 bits, or 256 bits for encryption.
[0061] a. Key generation:
[0062] Generate an AES key (such as 128, 192, or 256 bits) using a secure random number generator, as shown in formula (1). Store the key in a secure key management system and do not directly store it on the blockchain to avoid leakage.
[0063]
[0064] where, is the original key, is the key for the th round, is the round constant, used to ensure the uniqueness of each round of keys.
[0065] b. Data encryption:
[0066] Before the user uploads the data, encrypt the data using the AES key. Store the encrypted data in the decentralized storage layer and record the hash value of the encrypted data and other metadata (such as encryption algorithm type, key identifier, etc.) on the blockchain.
[0067] AES encryption can be divided into multiple rounds, and each round includes four basic steps, namely byte substitution (SubBytes), row shift (ShiftRows), column mixing (MixColumns), and round key addition (AddRoundKey), as shown in formula (2):
[0068]
[0069] where, is the result after the th round of encryption; is the key used in the th round. And, in the last round of encryption, the step is omitted, and the final ciphertext output is , as shown in formula (3):
[0070]
[0071] (2) Data storage process
[0072] Step 1: Data upload to the blockchain network. The encrypted data is uploaded to the blockchain network through the control unit of the virtual power plant. In the blockchain, the data will be packaged into a data block, and each data block contains the encrypted power data and other metadata.
[0073] Step 2: Blockchain consensus and packaging. The blockchain network ensures the generation, verification, and consistency of blocks through a consensus algorithm. Blockchain nodes verify and package the data blocks to generate new blocks and add them to the blockchain. At this time, the data has been permanently stored on the blockchain, and its security and integrity are guaranteed through encryption. The decentralized nature of the blockchain ensures the immutability of the data, and the transparency and consistency of the data are guaranteed through the distributed ledger.
[0074] Step 3: Smart contract controls access rights. The smart contract deployed on the blockchain is responsible for controlling data access rights. Only authorized users or systems can decrypt and access the encrypted data. The smart contract verifies the access request according to the preset rules and grants corresponding permissions based on the user's identity or role.
[0075] (3) Data decryption process
[0076] Step 1: Access request. When an authorized user or system needs to access the encrypted data, they initiate an access request. This request will be verified by the smart contract to ensure that the user has the permission to access the decrypted data. The smart contract verifies the access permission based on the user's identity information.
[0077] Step 2: Extract encrypted data. If the permission verification passes, the system will extract the stored encrypted data from the blockchain. At this time, the data is still in an encrypted state.
[0078] Step 3: AES decryption process. The extracted encrypted data (ciphertext) will be decrypted through the AES decryption algorithm. The decryption process uses the same key (128-bit, 192-bit, or 256-bit) as when encrypting. It should be noted that the decryption operation can only be performed by authorized users or systems. Therefore, even the ciphertext data stored on the blockchain cannot be decrypted by unauthorized visitors to obtain the plaintext data. The specific decryption steps include:
[0079] a. Initial round key addition:
[0080]
[0081] Among them, is the input of the first round in the decryption process, is the input ciphertext, is the round key for the 10th round.
[0082] b. 9-round decryption operation:
[0083] AES decryption can be divided into multiple rounds, and each round includes four basic steps, namely Inverse SubBytes(x), Inverse ShiftRows(x), and Inverse MixColumns(x).
[0084]
[0085] where is the round key for the i-th round.
[0086] c. The last round:
[0087]
[0088] where is the decrypted ciphertext.
[0089] Step 4: Data recovery and usage. The decrypted original data can be used by users or systems. For example, users can view power generation information, device status, or price data and make decisions based on this information.
[0090] For the convenience of verification, the present invention creates a simple virtual power plant transaction data set, such as information such as transaction ID, price, and transaction type. The specific information is shown in Table 1.
[0091] Table 1 Virtual power plant transaction data set
[0092]
[0093] By observation and analysis Figure 3 it can be seen that when the AES algorithm proposed by the present invention is applied to virtual power plant transaction data, compared with the original data without using the AES algorithm, the encrypted data loses the patterns and rules in the original data, and the ciphertext image shows a noise pattern closer to randomness, lacking obvious predictability, greatly reducing the readability of the data and having stronger randomness.
[0094] By observation and analysis Figure 4 it can be seen that the histogram shows the relative frequency of each ciphertext value, thereby observing the distribution of the ciphertext. The distribution of the data after AES encryption is closer to a uniform distribution, and the frequencies of different values in the histogram are closer. It is difficult for attackers to speculate on the original data by analyzing the patterns or statistical characteristics of the data, reducing the success probability of brute-force cracking and cryptographic analysis attacks (such as differential attacks and linear attacks), thereby reducing the risk of data leakage.
[0095] AES encryption ensures the privacy protection of data during storage and transmission on the blockchain. The immutability provided by the blockchain enhances data security. After combining AES encryption with blockchain technology, multi-level data protection is achieved, addressing the possible deficiencies of a single encryption technology or a single data management mechanism in protecting data privacy.
[0096] The above are only the preferred embodiments of the present invention. It should be noted that for those of ordinary skill in the art, without departing from the technical principle of the present invention, several improvements and modifications can be made, and these improvements and modifications should also be regarded as the protection scope of the present invention.
[0097] A computer-readable storage medium storing one or more programs, the one or more programs including instructions that, when executed by a computing device, cause the computing device to perform a method for protecting virtual power plant data under a blockchain based on the AES algorithm.
[0098] A computing device includes one or more processors, one or more memories, and one or more programs, wherein the one or more programs are stored in the one or more memories and configured to be executed by the one or more processors, and the one or more programs include instructions for performing a method for protecting virtual power plant data under a blockchain based on the AES algorithm.
[0099] Those skilled in the art should understand that the embodiments of the present invention can be provided as a method, a system, or a computer program product. Therefore, the present invention can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present invention can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk memories, CD-ROMs, optical memories, etc.) containing computer-usable program code.
[0100] The present invention is described with reference to the flowcharts and / or block diagrams of methods, apparatuses (systems), and computer program products according to embodiments of the present invention. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, as well as the combination of flows and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, such that the instructions executed by the processor of the computer or other programmable data processing devices generate means for implementing the functions specified in Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.
[0101] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to operate in a particular manner, such that the instructions stored in the computer-readable memory produce a manufacture including an instruction device that implements the functions specified in one or more of the processes and / or blocks Figure 1 of one or more of the processes and / or blocks Figure 1 specified in the flowchart.
[0102] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process, whereby the instructions executed on the computer or other programmable apparatus provide steps for implementing the functions specified in one or more of the processes and / or blocks Figure 1 of one or more of the processes and / or blocks Figure 1 specified in the flowchart.
[0103] The above are only embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention are included within the scope of the claims of the present invention pending approval of the application.
Claims
1. A virtual power plant data protection method under blockchain based on AES algorithm, characterized in that: include: Obtain power data and generate encrypted requests; Performing AES encryption on the power data to generate encrypted data; Store encrypted data into the blockchain network; When a user makes an access request, the user's identity is verified. If the user's identity verification is successful, the user obtains access rights and extracts the stored encrypted data from the blockchain; The extracted encrypted data is decrypted using the AES decryption algorithm.
2. According to the method for protecting virtual power plant data in blockchain based on AES algorithm according to claim 1, it is characterized in that: AES encryption methods include: Generate an AES key using a random number generator, ; in, is the original key, For the The key of the wheel, is the round constant, used to ensure the uniqueness of the key in each round; Encrypt the data using AES keys, store the encrypted data in a decentralized storage layer, and record the hash value and other metadata of the encrypted data on the blockchain; AES encryption is divided into multiple rounds, each of which includes byte replacement-SubBytes, row shift-ShiftRows, column confusion-MixColumns and round key addition-AddRoundKey. ; in, For the The result after round encryption; For the The key used in the last round of encryption is omitted. Steps, the final output ciphertext is , 。 3. According to the method for protecting virtual power plant data in blockchain based on AES algorithm according to claim 1, it is characterized in that: The methods for storing encrypted data in the blockchain network are: The encrypted data is uploaded to the blockchain network and packaged into a data block, each of which contains encrypted power data and other metadata; The blockchain network ensures the generation, verification, and consistency of blocks through a consensus algorithm; blockchain nodes verify and package data blocks to generate new blocks and add them to the blockchain.
4. According to claim 3, the virtual power plant data protection method under the blockchain based on the AES algorithm is characterized in that: The blockchain network is responsible for controlling data access rights through smart contracts; only authorized users or systems can decrypt and access encrypted data; the smart contract verifies access requests based on preset rules and grants corresponding permissions based on the user's identity or role.
5. The virtual power plant data protection method under the blockchain based on the AES algorithm according to claim 1 is characterized in that: The method of decrypting the extracted encrypted data using the AES decryption algorithm includes: Initial round key addition: ; in, is the input for the first round of the decryption process, is the input ciphertext, is the round key for the 10th round; 9 rounds of decryption operations: AES decryption is divided into multiple rounds, each round includes inverse byte substitution - InvSubBytes(x), inverse shift - InvShiftRows(x), inverse column confusion - InvMixColumns(x); ; in is the round key of the i-th round; Final Round: ; in is the decrypted ciphertext.
6. A virtual power plant data protection system under blockchain based on AES algorithm, characterized in that: include: A virtual power plant control unit, which is used to obtain power data and generate encrypted requests; An AES encryption module, used to perform AES encryption on the power data to generate encrypted data; Blockchain network, used to store encrypted data to the blockchain network; The user identity verification module is used to verify the user's identity when the user makes an access request. If the user identity verification is passed, the user obtains access rights and extracts the stored encrypted data from the blockchain; The decryption module is used to decrypt the extracted encrypted data using the AES decryption algorithm.
7. The virtual power plant data protection system based on the AES algorithm under the blockchain according to claim 6 is characterized in that: The AES encryption module is provided with a random number generator and a key manager. The random number generator generates an AES key; the key manager is used to store the key.
8. The virtual power plant data protection system based on the AES algorithm under the blockchain according to claim 6 is characterized in that: The user identity authentication module is provided with a smart contract module for controlling access rights.
9. A computer-readable storage medium storing one or more programs, characterized in that: The one or more programs include instructions which, when executed by a computing device, cause the computing device to perform any one of the methods according to claims 1 to 5 .
10. A computing device, characterized in that include: One or more processors, one or more memories, and one or more programs, wherein the one or more programs are stored in the one or more memories and are configured to be executed by the one or more processors, and the one or more programs include instructions for executing any of the methods according to claims 1 to 5.
Citation Information
Cited By
Virtual power plant platform data circulation system and method based on block chain
CN121071032A
Virtual power plant data aggregation method based on edge calculation and consensus mechanism
CN121567708A