Smart Grid Data Security Interaction System

Through the smart grid alliance chain and the data demand alliance chain combined with the interstellar file system, the smart grid private key encryption and re-encryption strategies are used to solve the problem of insufficient data security in the smart grid, and secure data interaction and privacy protection are achieved, and data processing efficiency is improved.

CN118118153BActive Publication Date: 2025-08-29CHINA SOUTHERN POWER GRID COMPANY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410315010.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-03-19
Publication Date
2025-08-29
Estimated Expiration
2044-03-19

AI Technical Summary

Technical Problem

There are problems with insufficient data security in smart grids, including weak privacy, poor security sharing and excessive load in cloud centers, resulting in unsafe data interactions.

Method used

The smart grid alliance chain and data demand alliance chain are combined with the interstellar file system, and the power consumption data is encrypted through the smart meter private key, and distributed key generation and re-encryption strategies are used to achieve secure storage and decryption of data, and the security of data sharing is ensured in combination with the notary mechanism.

Benefits of technology

It realizes security and privacy protection of smart grid data interaction, ensures the security of data during transmission and storage, reduces data redundant transmission, and improves data processing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118118153B_ABST
    Figure CN118118153B_ABST
Patent Text Reader

Abstract

The present application relates to a smart grid data security interaction system. It includes a smart grid consortium chain and a data demand consortium chain, both of which are connected to an interplanetary file system. The smart grid consortium chain includes smart meters and regional control consortium chains, with each regional control consortium chain corresponding to at least one smart meter. The regional control consortium chain is used to determine the smart meter's private key based on the smart meter's attributes, encrypt the smart meter's electricity usage data plaintext based on the smart meter's private key, obtain electricity usage data ciphertext, and store the electricity usage data ciphertext in the interplanetary file system. The data demand consortium chain is used to obtain electricity usage data ciphertext from the interplanetary file system, decrypt the electricity usage data ciphertext based on the smart meter's attributes using the smart meter's private key, obtain secret shards corresponding to the attributes, aggregate the secret shards, and obtain decrypted electricity usage data corresponding to the smart meter. This system can ensure the security of smart grid data interaction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of smart grid technology, and in particular to a smart grid data security interaction system. Background Art

[0002] Smart grid is a power system based on advanced information and communication technologies, which aims to improve the efficiency, reliability and safety of the power system, enhance the monitoring of power loads and equipment conditions, and support the integration of renewable energy and intelligent energy management.

[0003] At present, smart grids need to achieve large-scale data throughput and secure sharing of data among multiple parties. In addition, smart grids may also face malicious attacks. Traditional smart grids have problems such as weak privacy, poor security sharing, and excessive load on cloud centers. Using traditional smart grids for data interaction makes it difficult to ensure the security of data interaction.

[0004] Therefore, there is a problem of insufficient security in the current smart grid. Summary of the Invention

[0005] Based on this, it is necessary to provide a relatively secure smart grid data security interaction system, method, computer equipment, computer-readable storage medium and computer program product to address the above technical problems.

[0006] In a first aspect, the present application provides a smart grid data security interaction system, comprising a smart grid alliance chain and a data demand alliance chain, both of which are connected to an interplanetary file system; the smart grid alliance chain includes smart meters and regional control alliance chains, each of which corresponds to at least one smart meter;

[0007] The regional control alliance chain is used to determine a smart meter private key according to the attributes of the smart meter, encrypt the plaintext electricity usage data of the smart meter according to the smart meter private key to obtain ciphertext of the electricity usage data, and store the ciphertext of the electricity usage data in the interstellar file system;

[0008] The data demand alliance chain is used to obtain the electricity usage data ciphertext from the interplanetary file system, decrypt the electricity usage data ciphertext with the smart meter private key according to the attributes of the smart meter, obtain the secret shards corresponding to the attributes, aggregate the secret shards, and obtain the decrypted electricity usage data corresponding to the smart meter.

[0009] In one embodiment, the smart grid alliance chain is further used to determine public parameters based on the input security parameters, and obtain the master key and the first public key of the regional control alliance chain based on the public parameters.

[0010] In one embodiment, the smart grid alliance chain is further used to determine the smart meter private key corresponding to each attribute in the authorized attribute set of the smart meter, and record each smart meter private key in the regional control alliance chain.

[0011] In one embodiment, the smart grid alliance chain is also used to construct an access policy based on the authorization attribute set, encrypt the plaintext of the electricity usage data according to the access policy, and obtain the ciphertext of the electricity usage data and the authentication formula corresponding to the ciphertext of the electricity usage data.

[0012] In one embodiment, the power grid dispatching center is further used to integrate the fingerprint, first hash value and data attributes corresponding to the plaintext of the electricity consumption data into an encryption object for encryption, determine the second public key based on the encryption result, and if the second public key matches the first public key, store the ciphertext of the electricity consumption data in the interstellar file system.

[0013] In one embodiment, the smart grid alliance chain is further configured to send a second hash value to the power grid dispatching center upon receiving a cross-chain data sharing request from the data demand alliance chain;

[0014] The power grid dispatching center is further configured to obtain the electricity consumption data ciphertext from the interplanetary file system when the second hash value matches the first hash value.

[0015] In one embodiment, the power grid dispatching center is further used to increase the notary points of the candidate notary if the candidate notary correctly responds to the cross-chain data sharing request, and reduce the notary points of the candidate notary if the candidate notary incorrectly responds to the cross-chain data sharing request, and determine the target notary from the candidate notaries based on the notary points.

[0016] In one embodiment, the power grid dispatching center is further configured to generate a re-encryption strategy based on the authorization attribute set of the smart meter and the private key of the smart meter, and send the re-encryption strategy and the ciphertext of the electricity usage data of the smart meter to the target notary;

[0017] The target notary is further configured to re-encrypt the electricity usage data ciphertext according to the re-encryption strategy to obtain a re-encrypted ciphertext corresponding to the electricity usage data ciphertext.

[0018] In one embodiment, the target notary is further configured to transmit the re-encrypted ciphertext to the data demand node through an off-chain channel according to the requirements of the data demand consortium chain.

[0019] In one embodiment, the data demand alliance chain is also used to collect the attribute functions of each data demand node, so that each data demand node downloads the re-encrypted ciphertext from the interplanetary file system and the data demand alliance chain according to the attribute function.

[0020] In a second aspect, the present application also provides a smart grid data security interaction method, comprising:

[0021] Determine the smart meter private key based on the attributes of the smart meter;

[0022] Encrypting the plaintext electricity usage data of the smart meter according to the private key of the smart meter to obtain ciphertext of the electricity usage data;

[0023] The encrypted electricity usage data is stored in the interplanetary file system.

[0024] In a third aspect, the present application further provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps described in the second aspect when executing the computer program.

[0025] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, which implements the steps described in the second aspect above when the computer program is executed by a processor.

[0026] In a fifth aspect, the present application also provides a computer program product, comprising a computer program, which implements the steps described in the second aspect above when executed by a processor.

[0027] The above-mentioned smart grid data security interaction system, method, computer equipment, storage medium and computer program product determine the smart meter private key according to the attributes of the smart meter through the regional control alliance chain, encrypt the plaintext electricity consumption data of the smart meter according to the smart meter private key to obtain the electricity consumption data ciphertext, and store the electricity consumption data ciphertext in the interstellar file system. The data demand alliance chain obtains the electricity consumption data ciphertext from the interstellar file system, decrypts the electricity consumption data ciphertext with the smart meter private key according to the attributes of the smart meter, obtains the secret shards corresponding to the attributes, aggregates the secret shards, and obtains the decrypted electricity consumption data corresponding to the smart meter; for smart meters under the management of the regional control alliance chain, the electricity consumption data can be encrypted and decrypted according to the attributes to ensure the security of smart grid data interaction. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following briefly introduces the drawings required for use in the embodiments or related technical descriptions. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0029] Figure 1 A schematic diagram of a smart grid data security interaction system according to an embodiment;

[0030] Figure 2 Schematic diagram of a smart grid alliance chain in one embodiment;

[0031] Figure 3 1. A flowchart of a method for secure data interaction in a smart grid based on dual alliance chains and encryption technology in one embodiment;

[0032] Figure 4 FIG. 1 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0033] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.

[0034] In an exemplary embodiment, Figure 1 As shown, a smart grid data security interaction system is provided, including a smart grid alliance chain 101 and a data demand alliance chain 105, both of which are connected to an interplanetary file system 103; the smart grid alliance chain 101 includes smart meters 106 and regional control alliance chains 107, and each regional control alliance chain 107 corresponds to at least one smart meter 106;

[0035] The regional control consortium chain 107 is used to determine the private key of the smart meter 106 according to the attributes of the smart meter 106, encrypt the plaintext electricity usage data of the smart meter 106 according to the private key of the smart meter to obtain the ciphertext of the electricity usage data, and store the ciphertext of the electricity usage data in the interplanetary file system 103;

[0036] The data demand alliance chain 105 is used to obtain the electricity consumption data ciphertext from the interstellar file system 103, decrypt the electricity consumption data ciphertext with the smart meter private key according to the attributes of the smart meter 106, obtain the secret shards corresponding to the attributes, aggregate the secret shards, and obtain the decrypted electricity consumption data corresponding to the smart meter 106.

[0037] Among them, the smart grid alliance chain can be an alliance chain composed of smart grid devices as nodes.

[0038] Among them, the data demand alliance chain can be an alliance chain composed of data demanders as nodes, among which the data demanders can be power data research institutions.

[0039] Among them, the smart meter can be a meter that automatically collects user electricity consumption data. The attributes of the smart meter can be the type of smart meter, installation location, etc., among which the installation location includes but is not limited to installation in commercial areas, residential areas or industrial areas.

[0040] Among them, the regional control alliance chain can be an alliance chain composed of control devices of smart meters in a designated area as nodes, including but not limited to regional control alliance chains in commercial areas, residential areas and industrial areas.

[0041] The plaintext electricity usage data may be the original unencrypted electricity usage data collected, and the ciphertext electricity usage data may be the encrypted electricity usage data.

[0042] Among them, multiple IPFSs form an IPFS cluster.

[0043] Optionally, the smart grid data security interaction system may include a smart grid consortium chain, a grid dispatch center, an InterPlanetary File System (IPFS), a notary, and a data demand consortium chain. The smart grid consortium chain may include multiple regional control consortium chains, each of which is connected to multiple smart meters in a designated area. These smart meters in a designated area may have the same attributes. The regional control consortium chain determines the smart meter private key for each smart meter based on the attributes and encrypts the plaintext electricity usage data collected by the corresponding smart meter using the smart meter private key to obtain ciphertext electricity usage data. The regional control consortium chain may also store the ciphertext electricity usage data in IPFS upon verification by the control center consortium chain. When a node in the data demand consortium chain needs to obtain smart grid electricity usage data, the data demand consortium chain can obtain the ciphertext electricity usage data from IPFS, decrypt the ciphertext electricity usage data using the corresponding smart meter private key based on the attributes of the smart meter, and aggregate the obtained secret shards to obtain the decrypted electricity usage data.

[0044] Figure 2 A schematic diagram of a smart grid alliance chain is provided, wherein the control center alliance chain 102 can be a grid dispatch center, the control center alliance chain 102 is connected to multiple regional control alliance chains 107, and each regional control alliance chain 107 is connected to multiple smart meters 106. Figure 2 ,Smart grid data security interaction can include the following steps:

[0045] Step S1, initialization of smart grid alliance chain coefficient setting parameters. Input security parameters into the smart grid alliance chain , get the public parameters ,in, is a A large prime number of bit length, and It is the The multiplicative cyclic group of , determines the bilinear pairing mapping relationship , for The random generator of the group. For smart meters, define the authorization attribute set ,in, is the attribute name, For each attribute value, the attribute name can be the installation location of the smart meter, and the attribute value can be a character representing a commercial area, residential area, or industrial area. Building a collision-resistant hash function , the formula is as follows:

[0046]

[0047] Step S2: The smart grid alliance chain performs distributed key generation based on CP-ABE (Ciphertext Policy Attribute Based Encryption). Specifically, the number of LCs (Local Control) is set to , set the number of SMs (Smart Meters) in each LC to , for each , select a random number and Get the master key:

[0048]

[0049] calculate The public key is:

[0050]

[0051] For each , pick a random number ,calculate , , for each attribute in the authorization attribute set ,calculate , the attribute-based private key is:

[0052]

[0053] Will of{ , }Recorded Among them Identify the smart meter and then publish all public parameters. All nodes on the smart grid alliance chain can call the public parameters.

[0054] Step S3: encrypt the electricity usage data of the smart meter. Select random number As a secret, the electricity consumption data is plaintext ,calculate , Build access policies based on a set of authorization attributes ,in, , Based on the authorization attribute set The resulting linear key sharing matrix, Indicates Each row of is mapped to the mapping function of the corresponding attribute. Select a random selection vector ,right Each line Calculate inner product For each leaf node attribute, calculate The attribute-based electricity consumption data ciphertext is obtained as follows:

[0055]

[0056] For each Assigning a unique identifier , select Timestamp , the calculation authentication formula is as follows:

[0057]

[0058] Will Send to , complete data encryption.

[0059] Step S4, IPFS performs data storage. When a new smart meter is registered for the first time, the master key Generate and store private keys , used to encrypt power data and data objects. When new power data encryption requests are received, the grid dispatch center integrates the file fingerprint, hash value, and other data attributes such as attribute restrictions, data number, version number, and creation time into an encrypted object. This encrypted object is then sent to the DSC (Data Storage Contract) for processing. Upon receiving the new power data request, the DSC invokes the IACC (Identity Authority Control Contract) to calculate the public key. This is then compared with the public key stored in the BDMC (Blockchain Data Management Contract). If verified, a mapping of the data-related information is added to the contract and the encrypted object is stored in IPFS.

[0060] In step S5, IPFS data is acquired. Nodes in the data demand consortium chain sign the request information, including their identity, node attributes, and requested data. The signature is sent to the BDMC contract for verification of the node's identity. If confirmed, the request information is written to the power data request list, requesting cross-chain data sharing.

[0061] After receiving a cross-chain data sharing request from a node in the data demand alliance chain, the smart grid alliance chain DSSC (Data Sharing (Storage) Contract) performs an authority check. If the check passes, the request information is stored in the power data sharing list and the corresponding file fingerprint and hash value are returned.

[0062] The power grid dispatch center receives the request information from the DSSC and retrieves the corresponding encrypted object from the IPFS. If the power data hash value matches the query hash value, the corresponding power data ciphertext is retrieved from the IPFS. The file fingerprint, hash value, and other data attributes of the power data ciphertext are then sent to the notary.

[0063] In step S6, the control center consortium chain conducts a distributed cross-chain notary election based on a points system. Notaries for both consortium chains are jointly elected and updated from the regional control consortium chain and the data demand consortium chain. Cross-chain notary elections can be conducted based on a points system. The points update rule is as follows: First, a points list is assigned to the nodes to be selected within the smart grid consortium chain. All node points are initialized to random integers between 5 and 10. The node's point percentage determines its probability of selection. Each time a data request is correctly processed, the node's points increase by 0.5. Otherwise, if an error occurs, the node's points decrease by 1. When a node's points reach the upper limit of 20, they are reset to 10 points, allowing more nodes to become notaries. If a node's points are deducted to 0, it will not be eligible to become a consensus node.

[0064] Step S7: The notary public re-encrypts the ciphertext and distributes it to the data demand alliance chain. The power grid dispatching center uses the private key of the smart grid alliance chain node to and authorization attribute set to generate the proxy re-encryption key The re-encryption strategy sends the ciphertext and re-encryption strategy to different notaries for re-encryption. Select a random number , construct a random polynomial function based on the identity and authorization attribute value of the data demand alliance chain to construct the attribute function For ciphertext and private key , divide it into different parts and assign different notaries to each part The notary obtains the re-encryption key based on the encryption requirements. The notary public will check the ciphertext Perform secondary encryption and finally obtain the re-encrypted ciphertext In the process of re-encrypting the ciphertext, there are Notaries participated Re-encryption without sharing the ciphertext .

[0065] Step S8: The data demand alliance chain obtains the multi-party shared data. The power grid dispatching center obtains the multi-party identity from the data request information, and the power grid dispatching center uses the private key Generate proxy re-encryption keys , and construct a random polynomial function based on the multi-party identity identification and authorization attribute value of the data demand alliance chain to construct the attribute function The power grid dispatch center randomly selects the request node from the data demand alliance chain Nodes will require ciphertext and re-encryption keys Randomly assigned to a notary Notary Public Receive the corresponding encrypted power data file and use the proxy re-encryption key The ciphertext data is re-encrypted to obtain the proxy re-encrypted ciphertext. The notary transmits the re-encrypted ciphertext data to the data demand node through the off-chain channel based on the demand ID of the data demand alliance chain.

[0066] Step S9: Data requirement alliance chain ciphertext reconstruction. Each data demand node receives the encrypted power data file, and the data demand alliance chain collects the attribute functions corresponding to the data demand node. Polynomial value, and decrypt the attribute value. The attribute function Upload to the public IPFS cluster and data demand alliance chain, and each node downloads the data it requests from the data demand alliance chain and public IPFS cluster. During this process, each node is unaware of the smart grid metadata and the power data content requested by other data demanders.

[0067] Step S10: decrypt the ciphertext of the data demand alliance chain. The data demand node in the data demand alliance chain uses the private key Decrypt the power data. , calculate the secret shard:

[0068]

[0069] Aggregate secret shards for preliminary decryption:

[0070]

[0071] According to the decrypted value of the node Calculate the required power data in plain text :

[0072]

[0073] but It is the decrypted electricity usage data.

[0074] The above-mentioned smart grid data security interaction system determines the smart meter private key according to the attributes of the smart meter through the regional control alliance chain, encrypts the plaintext electricity consumption data of the smart meter according to the smart meter private key, obtains the electricity consumption data ciphertext, and stores the electricity consumption data ciphertext in the interstellar file system. The data demand alliance chain obtains the electricity consumption data ciphertext from the interstellar file system, decrypts the electricity consumption data ciphertext with the smart meter private key according to the attributes of the smart meter, obtains the secret shards corresponding to the attributes, aggregates the secret shards, and obtains the decrypted electricity consumption data corresponding to the smart meter; for the smart meters under the management of the regional control alliance chain, the electricity consumption data can be encrypted and decrypted according to the attributes to ensure the security of smart grid data interaction.

[0075] In an exemplary embodiment, the smart grid alliance chain is further used to determine public parameters based on the input security parameters, and obtain the master key and the first public key of the regional control alliance chain based on the public parameters.

[0076] Among them, the first public key can be the public key originally generated by the smart grid alliance chain.

[0077] Optionally, security parameters can be input to the smart grid alliance chain , get the public parameters ,in, is a A large prime number of bit length, and It is the The multiplicative cyclic group of , determines the bilinear pairing mapping relationship , for The random generator of the group. For smart meters, define the authorization attribute set ,in, is the attribute name, For each attribute value Building a collision-resistant hash function , the formula is as follows:

[0078]

[0079] The smart grid alliance chain generates distributed keys based on CP-ABE. Specifically, the number of LCs can be set to , set the number of SMs in each LC to , for each , select a random number and Get the master key of LC:

[0080]

[0081] and calculate The first public key is:

[0082]

[0083] In this embodiment, the smart grid alliance chain determines the public parameters based on the input security parameters, and obtains the master key and the first public key of the regional control alliance chain based on the public parameters, which can provide data preparation for the encryption of smart meter electricity consumption data and ensure the smooth encryption of electricity consumption data.

[0084] In an exemplary embodiment, the smart grid alliance chain is further used to determine the smart meter private key corresponding to each attribute in the authorized attribute set of the smart meter, and record each smart meter private key in the regional control alliance chain.

[0085] Optionally, the smart grid alliance chain can be targeted at each , pick a random number ,calculate , , for each attribute in the authorization attribute set ,calculate , the corresponding smart meter private key is:

[0086]

[0087] Smart grid alliance chain can also of{ , }Recorded After that, all public parameters are published and all nodes on the smart grid alliance chain can call the public parameters.

[0088] In this embodiment, the smart grid alliance chain determines the smart meter private key corresponding to each attribute in the authorized attribute set of the smart meter, and records the private key of each smart meter in the regional control alliance chain. This allows the regional control alliance chain to obtain the private key of each smart meter connected to it, realize the encryption of the electricity consumption data of all smart meters, and ensure the security of data interaction.

[0089] In an exemplary embodiment, the smart grid alliance chain is also used to construct an access policy based on the authorization attribute set, encrypt the plaintext electricity usage data according to the access policy, and obtain the ciphertext of the electricity usage data and the authentication formula corresponding to the ciphertext of the electricity usage data.

[0090] Optionally, Select random number As a secret, the electricity consumption data is plaintext ,calculate , The smart grid alliance chain can build access policies based on the authorized attribute set. ,in, , Based on the authorization attribute set The resulting linear key sharing matrix, Indicates Each row of is mapped to the mapping function of the corresponding attribute. Select a random selection vector ,right Each line Calculate inner product For each leaf node attribute, calculate The attribute-based electricity consumption data ciphertext is obtained as follows:

[0091]

[0092] For each Assigning a unique identifier , select Timestamp , the calculation authentication formula is as follows:

[0093]

[0094] Will Send to , complete data encryption.

[0095] In this embodiment, the smart grid alliance chain constructs an access policy based on the authorization attribute set, encrypts the plaintext of electricity usage data according to the access policy, obtains the ciphertext of electricity usage data and the authentication formula corresponding to the ciphertext of electricity usage data, and can encrypt the electricity usage data according to the attributes of the smart meter to ensure the security of electricity data interaction.

[0096] In an exemplary embodiment, the power grid dispatching center is also used to integrate the fingerprint, first hash value and data attributes corresponding to the plaintext of the electricity consumption data into an encryption object for encryption, determine the second public key based on the encryption result obtained, and if the second public key matches the first public key, store the ciphertext of the electricity consumption data in the interstellar file system.

[0097] The second public key may be a public key generated according to the encryption result.

[0098] The first hash value may be the original hash value of the power grid dispatching center.

[0099] Optionally, when new power data encryption requests are received, the grid dispatch center can integrate the file fingerprint, first hash value, and other data attributes corresponding to the plaintext power data, such as attribute restrictions, data number, version number, and creation time, into an encrypted object, encrypt it, and send it to the DSC for processing. Upon receiving the new power data request, the DSC invokes IACC to calculate the second public key, compares it with the first public key stored in the BDMC, and if the second public key is the same as the first, the verification passes. A mapping of the data-related information is added to the contract, and the ciphertext of the power data is stored in IPFS.

[0100] In this embodiment, the power grid dispatching center integrates the fingerprint, first hash value and data attributes corresponding to the plaintext of the electricity consumption data into an encryption object for encryption, and determines the second public key based on the encryption result. If the second public key matches the first public key, the ciphertext of the electricity consumption data is stored in the InterPlanetary File System, and the security of the ciphertext of the electricity consumption data stored in IPFS can be determined.

[0101] In an exemplary embodiment, the smart grid alliance chain is also used to send a second hash value to the power grid dispatching center upon receiving a cross-chain data sharing request from the data demand alliance chain; the power grid dispatching center is also used to obtain the electricity consumption data ciphertext from the interstellar file system when the second hash value matches the first hash value.

[0102] The second hash value may be a hash value returned by the smart grid alliance chain to the grid dispatching center.

[0103] Optionally, the nodes in the data demand alliance chain sign the request information such as identity, node attributes, and request data. The signature is sent to the BDMC contract to verify the node identity. If the verification is correct, the request information is written into the power data request list to request cross-chain data sharing. After the smart grid alliance chain DSSC receives the cross-chain data sharing request from the node in the data demand alliance chain, it performs an authority check on the cross-chain data sharing request. If the check passes, the request information is stored in the power data sharing list and the corresponding file fingerprint and second hash value are returned to the power grid dispatching center. The power grid dispatching center returns the request information from DSSC and obtains the corresponding encrypted object from IPFS. If the first hash value and the second hash value of the encrypted object are the same, the corresponding power data ciphertext is obtained from IPFS.

[0104] In this embodiment, when the smart grid alliance chain receives a cross-chain data sharing request from the data demand alliance chain, it sends a second hash value to the power grid dispatching center. When the second hash value matches the first hash value, the power grid dispatching center obtains the electricity consumption data ciphertext from the interplanetary file system, which can prevent the electricity consumption data ciphertext in IPFS from being illegally read.

[0105] In an exemplary embodiment, the power grid dispatching center is also used to increase the notary points of the candidate notary when the candidate notary correctly responds to the cross-chain data sharing request, and reduce the notary points of the candidate notary when the candidate notary incorrectly responds to the cross-chain data sharing request, and determine the target notary from the candidate notaries based on the notary points.

[0106] The candidate notary can be a notary node to be determined, and the target notary can be a consensus node that is finally determined.

[0107] Optionally, the power grid dispatching center can first initialize the points of each candidate notary to a random integer between 5 and 10 within the smart grid alliance chain. Each time the candidate notary correctly processes a data request, the point will be increased by 0.5. Conversely, each time the candidate notary incorrectly processes a data request, the point will be reduced by 1. When the candidate notary's points reach the upper limit of 20, their points will be reset to 10 points. When the candidate notary's points are deducted to 0 points, the node will not be able to become the target notary. Finally, the candidate notary whose points exceed the preset threshold can be used as the target notary.

[0108] In this embodiment, the power grid dispatching center increases the notary points of the candidate notary if the candidate notary correctly responds to the cross-chain data sharing request, and reduces the notary points of the candidate notary if the candidate notary incorrectly responds to the cross-chain data sharing request. Based on the notary points, the target notary is determined from the candidate notaries. The reliability of the notary can be assessed based on the points system, the frequency of replacing reliable notaries can be reduced, and the consensus efficiency can be improved.

[0109] In an exemplary embodiment, the power grid dispatching center is further used to generate a re-encryption strategy based on the authorization attribute set of the smart meter and the private key of the smart meter, and send the re-encryption strategy and the ciphertext of the electricity usage data of the smart meter to the target notary; the target notary is further used to re-encrypt the ciphertext of the electricity usage data according to the re-encryption strategy to obtain the re-encrypted ciphertext corresponding to the ciphertext of the electricity usage data.

[0110] Optionally, the grid dispatch center can use the private key of the smart grid alliance chain node and authorization attribute set to generate the proxy re-encryption key The re-encryption strategy of the smart meter electricity data ciphertext and re-encryption strategy is sent to different target notaries for re-encryption. , construct a random polynomial function based on the identity and authorization attribute value of the data demand alliance chain to construct the attribute function For electricity data ciphertext and private key , divide it into different parts and assign different target notaries to each part The target notary obtains the re-encryption key according to the encryption requirements. , and encrypt the electricity data Perform secondary encryption and finally obtain the re-encrypted ciphertext In the process of re-encrypting the ciphertext, there are Target notaries participate together Re-encryption without sharing the ciphertext .

[0111] In this embodiment, the power grid dispatching center generates a re-encryption strategy based on the authorization attribute set and the smart meter private key of the smart meter, and sends the re-encryption strategy and the ciphertext of the electricity usage data of the smart meter to the target notary. The target notary re-encrypts the electricity usage data ciphertext according to the re-encryption strategy to obtain the re-encrypted ciphertext corresponding to the electricity usage data ciphertext. The electricity usage data ciphertext can be re-encrypted to further ensure the security of data interaction.

[0112] In an exemplary embodiment, the target notary is also used to transmit the re-encrypted ciphertext to the data demand node through an off-chain channel according to the requirements of the data demand consortium chain.

[0113] Optionally, the grid dispatching center obtains multiple party identities from the data request information, and the grid dispatching center uses the private key Generate proxy re-encryption keys , and construct a random polynomial function based on the multi-party identity identification and authorization attribute value of the data demand alliance chain to construct the attribute function The power grid dispatch center randomly selects the request node from the data demand alliance chain Nodes will require ciphertext and re-encryption keys Randomly assigned to target notary Target Notary Receive the corresponding electronic data ciphertext and use the proxy to re-encrypt the key The electricity consumption data ciphertext is re-encrypted to obtain the re-encrypted ciphertext. The target notary can also transmit the re-encrypted ciphertext to the corresponding data demand node through the off-chain channel based on the demand ID (identification) of the data demand alliance chain.

[0114] In this embodiment, the target notary will transmit the re-encrypted ciphertext to the data demand node through the off-chain channel according to the needs of the data demand alliance chain, which can ensure the efficiency of data interaction.

[0115] In an exemplary embodiment, the data demand alliance chain is also used to collect the attribute functions of each data demand node, so that each data demand node downloads the re-encrypted ciphertext from the InterPlanetary File System and the data demand alliance chain according to the attribute function.

[0116] Optionally, the data demand alliance chain can collect the attribute functions corresponding to each data demand node ,Will Upload to the public IPFS cluster and data demand alliance chain, each data demand node downloads the part of data it requests from the data demand alliance chain and public IPFS cluster. In this process, each data demand node does not know the smart grid metadata and the power data content requested by other data demanders. Data demand nodes can also use private keys to Decrypt the ciphertext of electricity consumption data. , calculate the secret shard:

[0117]

[0118] Aggregate secret shards for preliminary decryption:

[0119]

[0120] Decrypted value of the node according to the data requirement Calculate and decrypt electricity consumption data :

[0121]

[0122] In this embodiment, the data demand alliance chain collects the attribute functions of each data demand node, so that each data demand node downloads the re-encrypted ciphertext from the interstellar file system and the data demand alliance chain according to the attribute function, which can ensure the security of the re-encrypted ciphertext transmission.

[0123] In order to facilitate those skilled in the art to have a deeper understanding of the embodiments of the present application, a specific example will be used for illustration below.

[0124] like Figure 3 As shown, this application proposes a smart grid data security interaction method based on dual alliance chains and encryption technology, including a dual alliance chain framework consisting of a distributed smart grid alliance chain and a data demand alliance chain. The specific steps are as follows:

[0125] Step S301: Distributed smart grid alliance chain data encryption.

[0126] The Smart Grid Consortium Chain integrates blockchain and edge computing technologies and consists of four functional components: smart meters, regional control consortium chains, control center consortium chains, and the InterPlanetary File System. The Smart Grid Consortium Chain utilizes ciphertext attribute-based encryption technology. First, system parameters are calculated to initialize the system parameters. The regional control consortium chain verifies the electricity usage data collected by the smart meters and establishes attribute access permissions. The electricity data is encrypted based on the attribute access permission tree. The control center consortium chain performs statistical analysis on the electricity usage data of the regional control consortium chains, verifies data integrity, and implements centralized data encryption management. The Smart Grid Consortium Chain encrypts and stores electricity data files in a private InterPlanetary File System cluster, and stores information such as file hash values ​​and file fingerprints on-chain.

[0127] Step S302: The cross-consortium chain signature notary agent re-encrypts.

[0128] A voting contract based on a distributed notary creates a points system, electing a group of trusted nodes as notaries from the distributed smart grid consortium chain and the data demand consortium chain. The notary invokes the identity control contract to authenticate the identities of both parties sharing data and then signs them. When the number of signatures reaches a preset number, the notary downloads the corresponding power data file ciphertext from the consortium chain and IPFS cluster based on the request content. Using the proxy re-encryption key provided by the power grid dispatch center, the ciphertext is re-encrypted and then encrypted using an attribute-based symmetric transformation. The notary then transmits the re-encrypted power data file off-chain. The recipient recovers the ciphertext using a symmetric transformation based on the attribute access rules and decrypts it using their private key to obtain the plaintext power data, completing data sharing.

[0129] Step S303: Data demand alliance chain data is shared by multiple parties.

[0130] The nodes of the Data Demand Alliance Chain can be power data research institutions. Each institution publishes a data request from the Data Demand Alliance Chain, obtains IPFS file fingerprints, upload node IDs and other information based on attribute permissions, and downloads and decrypts the corresponding power data files from the public IPFS cluster.

[0131] This application proposes a dual alliance chain framework of a distributed smart grid alliance chain and a data demand alliance chain. It uses the distributed file storage system IPFS combined with the alliance chain to achieve efficient storage of power data; realizes cross-chain multi-party data sharing of power data through distributed signature notary technology; introduces attribute-based encryption technology to rationally integrate power data; and combines the proxy re-encryption technology based on attribute-based symmetric transformation to achieve hierarchical access rights and secure cross-chain multi-party sharing of power data.

[0132] Specifically, for step S301, this application uses a smart grid alliance chain based on blockchain and edge computing technology, such as Figure 2 As shown, it includes 4 parts: smart meter, regional control alliance chain, control center alliance chain and interstellar file system.

[0133] Smart Meters (SMs): Smart meters are installed in commercial, residential, and industrial areas to collect users' electricity consumption data. Each meter collects all the electricity data ciphertexts generated in the area and the corresponding authentication information, and sends the electricity data ciphertexts to the corresponding regional control alliance chain for data encryption based on the ciphertext attributes.

[0134] Local Control (LC) consortium chain: The power grid is divided into multiple regions, with each region receiving corresponding SMs list data from a specific local control consortium chain. First, the LC checks the integrity of the encrypted data and performs batch verification. Second, the LC performs edge-level power data encryption based on ciphertext attributes, generating edge-level aggregated ciphertext and signatures. Finally, the encrypted power data secrets based on ciphertext attributes are stored in IPFS, and the returned IPFS file fingerprint and hash value are sent to the control center consortium chain for long-term storage.

[0135] Control Center Consortium Chain (CC): The CC consortium chain is a power service provider or other organization that performs data analysis and grid control. The CC consortium chain stores the IPFS file fingerprint and hash value derived from the secret text of the regional CC consortium chain power data. Data integrity is verified using a specified field list and random number sequence, allowing flexible submission of data analysis requests to IPFS. After receiving the response data from IPFS, the CC consortium chain can efficiently verify proof of data ownership and perform various statistical analyses on the data, enabling system status monitoring and optimization of power generation and distribution. The CC consortium chain smart contract distributes public parameters and keys to all entities in the power system. Upon completing its designated tasks, the contract is taken offline.

[0136] InterPlanetary File System (IPFS): Verifies data uploaded by the regional control consortium chain / control center consortium chain and stores it in IPFS, returning the file fingerprint and hash value, which are then stored on the blockchain. When IPFS receives a data analysis query request from the control center consortium chain, it generates a data integrity verification certificate and returns the requested power encryption data to the control center consortium chain as a query response.

[0137] In step S302, notaries are a group of trusted nodes elected from the distributed smart grid consortium chain and the data demand consortium chain. Election is primarily accomplished through the creation of a voting contract. Depending on the signature method, the notary election mechanism in the smart grid consortium chain and the data demand consortium chain uses a multi-signature notary mechanism. In the local control consortium chain of the smart grid consortium chain, the notary election mechanism uses a distributed signature notary mechanism based on points, selecting reliable nodes with higher points as notaries. Notary nodes are responsible for ensuring that all nodes on the consortium chain requiring data sharing have valid identity authentication by invoking an authentication protocol and signing the corresponding documents on each node. When the number of signatures from a node reaches or exceeds a certain threshold, cross-chain operations can be performed. The notary node's main functions are to publish corresponding request information to the data analysis chain based on data requests from nodes in the data demand consortium chain; download the fingerprint of the required data file from the data analysis consortium chain; download and encrypt the required data file by sending the file fingerprint and request to the IPFS cluster; and publish the encrypted data file to the data demand consortium chain.

[0138] This application leverages blockchain and IPFS technologies to store, verify, and share power data in encrypted form. By introducing a notary public and combining proxy re-encryption with multi-party secure sharing technology, secure data sharing can be achieved among multiple nodes that do not trust each other.

[0139] Regarding step S303, this application realizes the secure sharing of multi-party data in the smart grid in the data demand alliance chain data. Each data provider performs corresponding data calculation and data analysis based on the data request information issued by the notary, and finally encrypts the data obtained using the public key of the data demand publishing node, uploads it to the IPFS cluster, and records the returned file fingerprint on the data analysis alliance chain; then sends the fingerprint of the ciphertext data file to the notary.

[0140] This application introduces a peer-to-peer encryption algorithm based on proxy re-encryption based on ciphertext attributes, and performs hierarchical and reasonable integration of ciphertext data based on attribute permissions, reducing redundant transmission of duplicate data, and improving usage efficiency and data processing efficiency while ensuring data integrity, privacy, and sharing.

[0141] This application uses the Blockchain Data Manage Contract (BDMC) of the Smart Grid Alliance Chain to manage and store shared power data. At the same time, this application uses the Blockchain Data Request Contract (BDRC) of the Data Demand Alliance Chain to execute power data access requests.

[0142] BDMC includes the Identity Control Contract (ICC) and the Data Management Contract (DMC). The BDMC contract mainly records all node IDs, corresponding public keys, registration time, and ICC and DMC contracts in the smart grid alliance chain.

[0143] BDRC includes the Identity Control Contract (ICC) and the Data Management Contract (DMC). The BDRC contract mainly records the IDs, registration time, and ICC and DMC contracts of all nodes in the data demand consortium chain.

[0144] ICC contracts are primarily used for node identity management, including the Notary CreationVote Contract (NCVC) and the Identity Authority Control Contract (IACC). The NCVC contract is primarily used to elect trusted nodes as notaries. The IACC contract is primarily used to authenticate the identities of nodes on the Smart Grid Consortium Chain and the Data Demand Consortium Chain, controlling the node's authority to manage power data.

[0145] The DMC contract primarily controls data interaction with the IPFS cluster, enabling management of power data protection, encryption, and sharing. DMC comprises the Data Storage Contract (DSC), the Data Sharing (Storage) Contract (DSSC), and the Attribute-Based Encryption Contract (ABEC). The DSC contract primarily stores attribute information for power data, including the IPFS file fingerprint, hash, and creation time of the power data object. The DSSC contract primarily stores archival information shared between the two consortium chains, including power data identifiers, node identities, and sharing time. The ABEC contract primarily handles key generation and encryption and decryption control for power data.

[0146] In step S301: the system settings of the smart grid alliance chain are initialized with parameters.

[0147] System input security parameters Get system public parameters ,in, is a A large prime number of bit length, and It is the The multiplicative cyclic group of , determines the bilinear pairing mapping relationship , for Random generator for the group.

[0148] Define a collection of authorization attributes ,in, is the attribute name, For each attribute value Building a collision-resistant hash function , the formula is as follows:

[0149]

[0150] In step S301: the smart grid alliance chain generates distributed keys based on the encryption algorithm of ciphertext attributes.

[0151] The system will regionally control the alliance chain The number of , control the smart meters in the alliance chain in each region The number of .

[0152] For each , select a random number and Get the master key:

[0153]

[0154] calculate The public key is:

[0155]

[0156] For each , pick a random number ,calculate , , for each attribute in the authorization attribute set ,calculate , the attribute-based private key is:

[0157]

[0158] Will of{ , }Recorded Finally, all public parameters are published, and all nodes on the alliance chain can call the public parameters.

[0159] In step S301: the power data of the smart meter is encrypted.

[0160] Select random number As a secret, the electricity consumption data is plaintext ,calculate , .

[0161] Build access policies based on a set of authorization attributes ,in, Based on the authorization attribute set The resulting linear key sharing matrix, Indicates Each row of is mapped to the mapping function of the corresponding attribute. Select a random selection vector ,right Each line Calculate inner product For each leaf node attribute, calculate The attribute-based ciphertext is:

[0162]

[0163] For each Assigning a unique identifier , select Timestamp , the calculation authentication formula is as follows:

[0164]

[0165] Will Send to , complete data encryption.

[0166] In step S301: the InterPlanetary File System stores data.

[0167] When a new smart meter is registered for the first time, a private key is generated and stored based on the consortium chain master key for encryption of power data and data objects.

[0168] When new power data encryption requests are received, the power grid dispatching center integrates the power encryption file fingerprint, power data hash value, and other data attributes such as attribute restrictions, data number, version number, creation time, etc. into an encrypted object, encrypts it, and sends it to the DSC contract for processing.

[0169] When the DSC contract receives a request for new power data, it calls the IACC contract to calculate the public key and compares it with the public key stored in the BDMC contract. If the verification is successful, a mapping of data-related information is added to the contract, and the encrypted object is stored in IPFS.

[0170] In step S302: data of the InterPlanetary File System is acquired.

[0171] The nodes in the data demand alliance chain sign information such as identity, node attributes, and requested data. The signature is sent to the BDMC contract to verify the node identity. If confirmed to be correct, the request information is written into the power data request list to request cross-chain data sharing.

[0172] After the smart grid alliance chain DSSC contract receives the cross-chain data sharing request from the node in the data demand alliance chain, it performs an authority check. If the check is passed, the request information is stored in the power data sharing list and the corresponding file fingerprint and hash value are returned.

[0173] The power grid dispatch center receives the request information from the DSSC and retrieves the corresponding encrypted object from the IPFS. If the power data hash value matches the query hash value, the corresponding power data ciphertext is retrieved from the IPFS. The power encrypted file fingerprint, power data hash value, and other data attributes are sent to the notary.

[0174] In step S302: the control center alliance chain conducts distributed cross-chain notary elections based on the points system.

[0175] Notaries for both consortium chains are jointly elected and updated from the distributed local control consortium chain and the data demand consortium chain. The cross-chain notary election system, based on a points system, adds a scoring system to assess notaries' reliability, reducing the frequency of replacement of reliable notaries and improving consensus efficiency.

[0176] The points update rule is as follows: First, a points list is assigned to the nodes to be selected within the consortium chain. All node points are initialized to random integers between 5 and 10. The node's points percentage determines its probability of selection. Each time a data request is correctly processed, the node's points increase by 0.5. Otherwise, if an error occurs, the node's points decrease by 1. When the node's points reach the upper limit of 20, the points are reset to 10, allowing more nodes to become notaries. If a node's points are deducted to 0, it will not be able to become a consensus node.

[0177] In step S302: the notary re-encrypts the ciphertext and distributes it to the data demand alliance chain.

[0178] The power grid dispatch center uses the private key of the smart grid alliance chain node and authorization attribute set to generate the proxy re-encryption key The ciphertext and re-encryption strategy are sent to different notaries for re-encryption.

[0179] Pick a random number , construct a random polynomial function based on the identity and authorization attribute value of the data demand alliance chain to construct the attribute function For ciphertext and private key , divide it into different parts and assign different notaries to each part .

[0180] The notary obtains the re-encryption key based on encryption requirements The notary public will check the ciphertext Perform secondary encryption and finally obtain the re-encrypted ciphertext .

[0181] In the process of ciphertext re-encryption, there are Notaries participated Re-encryption without sharing the ciphertext .

[0182] In step S303: the data demand alliance chain obtains multi-party shared data.

[0183] The power grid dispatching center obtains multiple party identities from the data request information, and the power grid dispatching center uses the private key Generate proxy re-encryption keys , and construct a random polynomial function based on the multi-party identity identification and authorization attribute value of the data demand alliance chain to construct the attribute function The power grid dispatch center randomly selects the request node from the data demand alliance chain Nodes will require ciphertext and re-encryption keys Randomly assigned to a notary .

[0184] notary public Receive the corresponding encrypted power data file and use the proxy re-encryption key The ciphertext data is re-encrypted to obtain the proxy re-encrypted ciphertext.

[0185] The notary transmits the double-encrypted ciphertext data to the data demand node through the off-chain channel based on the demand ID of the data demand alliance chain.

[0186] In step S303: the data requires the alliance chain ciphertext to be reconstructed.

[0187] Each data demand node receives the encrypted power data file, and the data demand alliance chain collects the attribute functions corresponding to the data demand node. Polynomial value and decrypt the attribute value.

[0188] The attribute function obtained Upload to the public IPFS cluster and data demand alliance chain, and each node downloads the data it requests from the data demand alliance chain and public IPFS cluster. During this process, each node is unaware of the smart grid metadata and the power data content requested by other data demanders.

[0189] In step S303: the data requires the alliance chain ciphertext to be decrypted.

[0190] Data demand node uses private key Decrypt the power data. , calculate the secret shard:

[0191]

[0192] Aggregate secret shards for preliminary decryption:

[0193]

[0194] According to the decrypted value of the node Calculate the required power data in plain text :

[0195]

[0196] This application proposes a dual alliance chain framework of a distributed smart grid alliance chain and a data demand alliance chain. It uses the distributed file storage system IPFS combined with the alliance chain to achieve efficient storage of power data; realizes cross-chain multi-party data sharing of power data through distributed signature notary technology; introduces attribute-based encryption technology to rationally integrate power data; and combines the proxy re-encryption technology based on attribute-based symmetric transformation to achieve hierarchical access rights and secure cross-chain multi-party sharing of power data.

[0197] In order to verify the effectiveness of the smart grid data security interaction method proposed in this application, this application conducts a basic functional analysis of security features and functional features. The electricity consumption data collected by the smart meter is encrypted based on attributes to obtain the fine-grained electricity consumption data results of the requested area. The overall correctness analysis of the scheme is performed on proxy re-encryption, repeatable re-encryption, batch re-encryption, lazy re-encryption, attribute revocation, user revocation, etc. This application implements basic security features: data confidentiality, data integrity, batch verification, user privacy protection and multi-region data aggregation. In addition, it is possible to choose to encrypt the corresponding electricity consumption data according to different attribute permissions, and obtain fine-grained user data according to attribute permissions, making the multi-party access scheme more flexible and practical.

[0198] In addition, this application extracts the attribute-based proxy re-encryption algorithm used in the scheme, sequentially generates attribute mapping change functions, re-encrypts ciphertext, and calculates the corresponding civilization for testing to verify the correctness of the scheme. This scheme uses smart contracts and symmetric transformations to replace third parties for key distribution and verification, avoiding factors such as insecure channels or untrustworthy third parties, improving the security of the scheme and resisting 51% attacks, Sybil attacks, replay attacks, and man-in-the-middle attacks.

[0199] To verify the efficiency of the smart grid data security interaction method proposed in this application, this application provides a detailed step-by-step analysis of the computational cost of cross-chain data sharing. For ease of understanding, the following symbols are defined: and denote point multiplication and power operation respectively, Indicates bilinear pairing calculation. In the algorithm, power operation is more complicated than point multiplication, and bilinear pairing calculation is more complicated than power operation, that is, .in addition, represents the size of the complete user set, Indicates the target user set size for sharing a file at a time. The analysis results are shown in Table 1. The computational cost of the algorithm is , which is independent of the size of the complete user set. The computational cost of the algorithm only involves bilinear pairing calculations during system establishment and decryption. The overall complexity of the algorithm is low, which improves the efficiency of secure data interaction in smart grids.

[0200] Table 1

[0201]

[0202] In summary, this application provides more data analysis functions and security features, which improves usage efficiency and data processing efficiency while ensuring data integrity, privacy, and sharing, and is more practical in smart grid deployment.

[0203] In one embodiment, a smart grid data security interaction method is provided, which is applied to Figure 2 Taking the regional control alliance chain in [1] as an example, the following steps are included:

[0204] Determine the smart meter private key based on the attributes of the smart meter;

[0205] Encrypting the plaintext electricity usage data of the smart meter according to the private key of the smart meter to obtain ciphertext of the electricity usage data;

[0206] The encrypted electricity usage data is stored in the interplanetary file system.

[0207] Optionally, the smart grid data security interaction system may include a smart grid consortium chain, a grid dispatch center, IPFS, a notary, and a data demand consortium chain. The smart grid consortium chain may include multiple regional control consortium chains, each of which is connected to multiple smart meters in a designated area. The multiple smart meters in a designated area may have the same attributes. The regional control consortium chain determines the smart meter private key for each smart meter based on the attributes, and encrypts the plaintext electricity usage data collected by the corresponding smart meter using the smart meter private key to obtain ciphertext electricity usage data. The regional control consortium chain may also store the ciphertext electricity usage data in IPFS upon verification by the control center consortium chain. When a node in the data demand consortium chain needs to obtain smart grid electricity usage data, the data demand consortium chain may obtain the ciphertext electricity usage data from IPFS, decrypt the ciphertext electricity usage data using the corresponding smart meter private key based on the attributes of the smart meter, aggregate the obtained secret shards, and obtain the decrypted electricity usage data.

[0208] Since the specific processing method of the regional control alliance chain has been described in detail in the above embodiment, it will not be repeated here.

[0209] The above-mentioned smart grid data security interaction method determines the smart meter private key according to the attributes of the smart meter, encrypts the plaintext electricity usage data of the smart meter according to the smart meter private key, obtains the ciphertext of the electricity usage data, and stores the ciphertext of the electricity usage data in the interstellar file system; it can encrypt and decrypt the electricity usage data according to the attributes of the smart meters under the management of the regional control alliance chain to ensure the security of smart grid data interaction.

[0210] It should be understood that, although the various steps in the flowcharts involved in the various embodiments described above are displayed in sequence according to the instructions of the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the flowcharts involved in the various embodiments described above can include multiple steps or multiple stages, and these steps or stages are not necessarily executed and completed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of steps or stages in other steps.

[0211] Based on the same inventive concept, embodiments of the present application also provide a smart grid data security interaction device for implementing the aforementioned smart grid data security interaction method. The solution provided by this device is similar to the solution described in the aforementioned method. Therefore, the specific limitations in one or more embodiments of the smart grid data security interaction device provided below can be found in the aforementioned limitations of the smart grid data security interaction method and will not be further elaborated here.

[0212] In an exemplary embodiment, a smart grid data security interaction device is provided, comprising: a private key module, an encryption module, and a storage module, wherein:

[0213] A private key module, used for determining a private key of a smart meter according to attributes of the smart meter;

[0214] An encryption module, configured to encrypt the plaintext electricity usage data of the smart meter according to the private key of the smart meter to obtain ciphertext electricity usage data;

[0215] The storage module is used to store the encrypted electricity usage data in the interplanetary file system.

[0216] Each module in the smart grid data security interaction device described above can be implemented in whole or in part through software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in hardware form, or can be stored in a computer device memory in software form, so that the processor can call and execute the corresponding operations of each module.

[0217] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Figure 4As shown. The computer device includes a processor, a memory, an input / output interface (I / O) and a communication interface. The processor, memory and input / output interface are connected via a system bus, and the communication interface is connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The database of the computer device is used to store smart grid data security interaction data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, a smart grid data security interaction method is implemented.

[0218] Those skilled in the art will understand that Figure 4 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.

[0219] In an exemplary embodiment, a computer device is further provided, including a memory and a processor. The memory stores a computer program, and the processor implements the steps in the above method embodiments when executing the computer program.

[0220] In an exemplary embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0221] In an exemplary embodiment, a computer program product is provided, including a computer program. When the computer program is executed by a processor, the steps in the above method embodiments are implemented.

[0222] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions.

[0223] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the above-mentioned embodiments. In particular, any reference to memory, database, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The databases involved in the various embodiments provided herein may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, distributed databases based on blockchains. The processors involved in the various embodiments provided herein may be, but are not limited to, general-purpose processors, central processing units (CPUs), graphics processing units (GPUs), digital signal processors (DSPs), programmable logic devices (PLDs), data processing logic devices based on quantum computing, and the like.

[0224] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0225] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present application. It should be noted that a person of ordinary skill in the art may make various modifications and improvements without departing from the spirit of the present application, and these modifications and improvements fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be determined by the appended claims.

Claims

1. A smart grid data security interaction system, characterized in that: The system includes a smart grid alliance chain, a data demand alliance chain, and a power grid dispatch center. The smart grid alliance chain and the data demand alliance chain are both connected to the InterPlanetary File System. The smart grid alliance chain includes smart meters and regional control alliance chains, and each regional control alliance chain corresponds to at least one smart meter. The regional control alliance chain is used to determine a smart meter private key according to the attributes of the smart meter, encrypt the plaintext electricity usage data of the smart meter according to the smart meter private key to obtain ciphertext of the electricity usage data, and store the ciphertext of the electricity usage data in the interstellar file system; The data demand consortium chain is used to obtain the electricity usage data ciphertext from the interplanetary file system, decrypt the electricity usage data ciphertext using the smart meter private key according to the attributes of the smart meter, obtain the secret shards corresponding to the attributes, aggregate the secret shards, and obtain the decrypted electricity usage data corresponding to the smart meter; The power grid dispatching center is configured to integrate the fingerprint, the first hash value, and the data attributes corresponding to the plaintext of the electricity usage data into an encryption object for encryption, determine a second public key based on the encryption result, and store the ciphertext of the electricity usage data in the interplanetary file system if the second public key matches the first public key; the first public key is the public key originally generated by the smart grid alliance chain; The smart grid alliance chain is further configured to send a second hash value to the power grid dispatching center upon receiving a cross-chain data sharing request from the data demand alliance chain; The power grid dispatching center is further configured to obtain the electricity consumption data ciphertext from the interplanetary file system when the second hash value matches the first hash value.

2. The system according to claim 1, wherein: The smart grid alliance chain is further used to determine public parameters based on the input security parameters, and obtain the master key and the first public key of the regional control alliance chain based on the public parameters.

3. The system according to claim 2, characterized in that The smart grid alliance chain is further used to determine the smart meter private key corresponding to each attribute in the authorized attribute set of the smart meter, and record each smart meter private key in the regional control alliance chain.

4. The system according to claim 3, characterized in that The smart grid alliance chain is also used to construct an access policy based on the authorization attribute set, encrypt the electricity usage data plaintext according to the access policy, and obtain the electricity usage data ciphertext and the authentication formula corresponding to the electricity usage data ciphertext.

5. The system according to claim 1, wherein: The power grid dispatching center is further configured to store the encrypted electricity usage data in the interplanetary file system when the second public key is the same as the first public key.

6. The system according to claim 1, wherein: The power grid dispatching center is further configured to obtain the ciphertext of the electricity consumption data from the interplanetary file system when the second hash value is the same as the first hash value.

7. The system according to claim 1, wherein: The power grid dispatching center is further configured to increase the notary points of the candidate notary if the candidate notary correctly responds to the cross-chain data sharing request, and reduce the notary points of the candidate notary if the candidate notary incorrectly responds to the cross-chain data sharing request, and determine a target notary from the candidate notaries based on the notary points.

8. The system according to claim 7, characterized in that The power grid dispatching center is further configured to generate a re-encryption strategy based on the authorization attribute set of the smart meter and the private key of the smart meter, and send the re-encryption strategy and the ciphertext of the electricity usage data of the smart meter to the target notary; The target notary is further configured to re-encrypt the electricity usage data ciphertext according to the re-encryption strategy to obtain a re-encrypted ciphertext corresponding to the electricity usage data ciphertext.

9. The system according to claim 8, characterized in that The target notary is further used to transmit the re-encrypted ciphertext to the data demand node through an off-chain channel according to the requirements of the data demand alliance chain.

10. The system according to claim 9, characterized in that The data demand alliance chain is also used to collect the attribute functions of each data demand node, so that each data demand node downloads the re-encrypted ciphertext from the interstellar file system and the data demand alliance chain according to the attribute function.

Citation Information

Patent Citations

  • Transaction information processing system, method and device thereof, computer equipment and storage medium

    CN111988325A

  • Intelligent power grid electricity utilization information encryption method and system based on attribute base

    CN115529123A