Smart grid data tiered sharing method supporting forward security and auditability
Patent Information
- Application Number
- CN202610865747.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-16
- Publication Date
- 2026-10-16
AI Technical Summary
[0004]本发明的目的在于提供一种支持前向安全与审计追溯的智能电网数据分级共享方法,旨在解决现有智能电网数据共享中密钥泄露导致历史数据失密、数据共享粒度单一、权限管控粗放、高敏感数据访问无全流程可审计追溯机制的技术问题
[0012]1. It has stringent forward security protection capabilities: Based on the hash chain key evolution protocol, this invention extends forward security features to the level of data encryption random factors. Through the mechanism of unidirectional iterative updating of seeds and keys and destroying historical key materials, it ensures that after the current key is leaked, attackers cannot reverse deduce the encryption parameters of any historical period, thus fully protecting the irreversible recovery of historical random parameters stored in the cloud.
Smart Images

Figure CN122933053A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of smart grid data security sharing and cloud computing and edge computing collaborative security technology, specifically involving a smart grid data hierarchical sharing method that supports forward security and audit traceability. Background Technology
[0002] In a smart grid architecture that integrates cloud computing and edge computing, the aggregation and sharing of massive amounts of user electricity consumption data faces severe security challenges, primarily including user privacy breaches, data tampering, and abuse of access permissions. Existing solutions still have significant shortcomings in areas such as protecting historical data after key leaks, fine-grained access control for multi-granularity data sharing, and end-to-end auditability of access to highly sensitive data.
[0003] Existing technologies cannot guarantee the security of historical power grid data in scenarios involving key leaks, lack a multi-level, refined data sharing mechanism adapted to smart grid operations, and lack mandatory audit and traceability measures for high-privilege individual data access, making it difficult to meet the stringent requirements of scenarios such as judicial investigations, fault diagnosis, and compliant operations. To address these shortcomings, this invention proposes a smart grid data fusion and sharing scheme for a cloud-edge collaborative architecture. This scheme relies on a hash chain-based random factor forward evolution mechanism, a three-layer hierarchical data sharing mechanism, and an audit lock-based mandatory access control mechanism to overcome the deficiencies of existing technologies. Summary of the Invention
[0004] The purpose of this invention is to provide a hierarchical data sharing method for smart grids that supports forward security and audit traceability. It aims to address the technical problems in existing smart grid data sharing, such as key leakage leading to historical data loss, limited data sharing granularity, coarse access control, and the lack of a full-process auditable and traceable mechanism for access to highly sensitive data. This invention aims to achieve three core objectives: ensuring the irreversible recovery of historical random parameters in current key leakage scenarios, mitigating privacy risks caused by key exposure; achieving hierarchical and controllable sharing of data at the regional, group, and individual levels, balancing data availability and privacy security; and enabling full-process tracking, non-repudiation, and least privilege control for high-privilege individual data access, meeting the requirements for compliant smart grid operation. This invention is applicable to business scenarios such as real-time regional load monitoring, user group electricity consumption pattern analysis, high-privilege individual data audit access, and cross-domain data services in smart grids under a cloud-edge collaborative architecture.
[0005] This invention includes the following steps:
[0006] Step 1: System initialization and forward security key distribution. The key and policy center completes the initialization of system password parameters. The smart meter terminal iteratively updates the random seed based on a one-way hash chain in time slots, destroys historical seeds locally, generates time slot-level encryption random factors based on the key derivation function, and uses the Paillier algorithm to encrypt the electricity consumption data of a single terminal. The key and policy center periodically broadcasts evolution parameters to achieve seed iterative updates and stops parameter broadcasting for abnormal terminals to achieve key expiration control.
[0007] Step 2: Multi-level data encryption and edge aggregation. The smart meter terminal collects the plaintext of electricity consumption in a single user's time slot and reuses the random factor generated in Step 1 to complete homomorphic encryption. The single-user ciphertext is then uploaded to the edge aggregation node. Without decryption, the edge aggregation node completes the aggregation of ciphertext within the region based on Paillier homomorphic addition and uploads the aggregated ciphertext to the cloud server for persistent storage.
[0008] Step 3: Group statistical data hierarchical sharing and conversion. The data service provider initiates a group data sharing request to the control center. The control center retrieves the multi-region aggregated ciphertext from the cloud server and completes secondary homomorphic aggregation to generate the group aggregated ciphertext. The control center splits the key and the policy center system master key into multiple sub-keys and distributes them to the agent collaboration node cluster. The agent collaboration node cluster completes the distributed ciphertext permission conversion based on threshold agent re-encryption. The control center outputs the group statistical ciphertext with matching permissions to the data service provider.
[0009] Step 4: Individual Detailed Data Audit Lock Authorization Access. The data service provider sends an individual data access request to the control center with the terminal identity, access timestamp, and local engineer's digital signature. After verification, the control center adds its own authorized signature to form a double-signed message and forwards it to the audit service terminal. The audit service terminal verifies the double signature, writes it to the audit log, and generates an audit lock credential. The control center calls the key and combines it with the policy center to generate a one-time temporary re-encryption key based on the hash value of the audit lock credential. The cloud server uses a threshold proxy re-encryption algorithm to re-encrypt the individual ciphertext based on the temporary key. The data service provider decrypts the re-encrypted ciphertext to obtain the individual electricity consumption details.
[0010] Step 5: Closed-loop audit and archiving of access behavior. After the data service provider completes the decryption, it pushes an access success message to the audit service terminal. The audit service terminal supplements the access results and completion time to update the audit log, verifies the integrity of the log, and solidifies the audit credentials to complete the archiving.
[0011] Compared with the prior art, the present invention has the following superior technical effects:
[0012] 1. It has stringent forward security protection capabilities: Based on the hash chain key evolution protocol, this invention extends forward security features to the level of data encryption random factors. Through the mechanism of unidirectional iterative updating of seeds and keys and destroying historical key materials, it ensures that after the current key is leaked, attackers cannot reverse deduce the encryption parameters of any historical period, thus fully protecting the irreversible recovery of historical random parameters stored in the cloud.
[0013] 2. Achieve multi-granular, refined, and hierarchical data sharing: This invention constructs a three-level differentiated data sharing model of regional aggregation, group statistics, and individual details, matching the hierarchical business needs of macro load monitoring, group electricity consumption analysis, and individual audit access. Through differentiated cryptographic strategies such as edge homomorphic aggregation, cloud-based ciphertext conversion, and mandatory audit authorization, it balances data sharing efficiency with hierarchical privacy protection capabilities.
[0014] 3. Achieve audit-driven mandatory compliance access: This invention innovatively introduces audit lock technology, using audit log credentials as a necessary prerequisite for generating temporary re-encryption keys, thereby upgrading access control from traditional administrative review to mandatory cryptographic verification. All individual data access is fully traceable, auditable, and non-repudiable, strictly adhering to the principle of least privilege and meeting the compliance requirements of the power industry.
[0015] 4. Possesses anti-collusion and anti-single point of failure characteristics: This invention relies on a distributed cluster of agent collaboration nodes to complete the ciphertext conversion operation, and realizes distributed secure computing based on a threshold mechanism. A single node cannot independently decrypt or snoop on the data, effectively resisting internal collusion attacks and single point of failure risks, and improving the overall stability and security of the system. Attached Figure Description
[0016] Figure 1 The system model used in this method. Detailed Implementation
[0017] The following section will introduce the overall system architecture and entity functions.
[0018] like Figure 1 The diagram shows a cloud-edge collaborative smart grid data fusion and sharing system applying the method of this invention. The system divides data access security levels into three layers from low to high: a regional aggregation layer, a group statistics layer, and an individual details layer, adapting to different business data granularity requirements. The system comprises eight core functional entities, each with its own division of labor and collaboration. Their specific components and functions are as follows:
[0019] 1. Key and Policy Center (KPC): The core key and policy management entity of the system, responsible for the generation, distribution, and periodic updating of the system root key, as well as the formulation and management of global data access policies, and undertaking core tasks such as dynamic re-encryption key generation and terminal key expiration control.
[0020] 2. Smart Meter Terminal (SMT): User-side terminal equipment deployed on the power user side, responsible for collecting real-time electricity consumption data, completing data encryption and signature upload based on forward security mechanism, periodically iterating and updating key seeds and encryption keys and destroying historical key materials.
[0021] 3. Edge Aggregator (EA): An edge-side preprocessing node deployed at the edge of the regional network. It is responsible for verifying the legitimacy of the source of electricity meter data within the region, without decrypting the encrypted electricity meter data within the region, and generating regional aggregated encrypted data.
[0022] 4. Control Center (CC): The system scheduling center, responsible for responding to various data access requests, executing global access control policies, and coordinating the entire process of key generation, audit verification, and ciphertext conversion.
[0023] 5. Cloud Server (CS): A cloud-based storage and computing platform that provides scalable computing power and storage resources for persistent storage of encrypted aggregated data, group statistical data, and full-process audit logs, and responds to cloud-based encrypted re-encryption and data retrieval requests.
[0024] 6. Data Service Requester (DSR): The main user of data, who requests power data of different granularities from the system according to business needs to realize value-added services such as regional load monitoring and group power consumption pattern analysis.
[0025] 7. Proxy Collaboration Node (PCN): A distributed secure computing cluster composed of multiple independent nodes. It uses a distributed threshold algorithm to perform ciphertext conversion and decryption operations. A single node cannot decrypt or spy on data independently, thus resisting collusion attacks and single points of failure.
[0026] 8. Audit Services Terminal (AS): A trusted third-party audit entity that is specifically responsible for signature verification of individual detailed data access requests, audit log recording, audit lock credential generation, and registration of access completion status to ensure that high-privilege access behavior is traceable and non-repudiable.
[0027] This invention discloses a hierarchical data sharing method for smart grids that supports forward security and audit traceability. Based on the aforementioned cloud-edge collaborative multi-entity system, the overall technical solution comprises five core steps: system initialization and forward security key distribution, multi-level data encryption and edge aggregation, hierarchical sharing and conversion of group statistical data, authorized access via audit locks for individual detailed data, and closed-loop audit archiving of access behavior. This invention achieves irreversible recovery of historical random parameters through a hash chain-based random factor forward evolution mechanism, realizes multi-granularity privacy-controlled sharing through a three-level hierarchical data sharing model, and achieves full-process auditing and minimum access control for individual data access through an audit lock-bound dynamic temporary key mechanism. Ultimately, it achieves efficient, secure, and compliant hierarchical sharing of smart grid data.
[0028] The following is a detailed explanation of each step.
[0029] Step 1: System Initialization and Forward Secure Key Distribution
[0030] Step-by-step function summary: Complete the initial configuration of system basic parameters, cryptographic components, and hash functions; construct a forward-secure random seed and key evolution system based on hash chain; realize the periodic iterative update of terminal encryption parameters, automatic destruction of historical parameters, and control of abnormal terminal key failure; and provide forward-secure key support for end-to-end data encryption and secure sharing.
[0031] S1.1 System Basic Parameter Establishment: The Key and Policy Center (KPC) selects system security parameters, generates the system master key, initializes the Paillier cryptographic operation component, selects a one-way hash function for key derivation, and completes the establishment of the system's basic security environment.
[0032] S1.2, Forward Secure Random Seed Iterative Update: The smart meter terminal SMT uses time slot t as the update unit, where time slot t is the smallest time unit for encrypted update of power grid data; a preset one-way hash function is used to randomly seed the key of the previous time period. Perform iterative evolution; generate random seeds for the current time period. The iterative formula is: After the calculation is completed, the smart meter terminal SMT is immediately and securely destroyed locally. To prevent the back-décorration of historical seeds, and to focus on the seeds of the current time slot. It remains locally on the terminal for generating the encrypted random factor for the current time slot and as the seed for the next cycle. Iteration.
[0033] S1.3, Generating Encrypted Random Factors: The smart meter terminal (SMT) calls the Key Derivation Function (KDF). The KDF is a dedicated key derivation function that generates encrypted random parameters based on seed parameter mapping, used to generate the random seed for the current time slot. Mapped to random factors that satisfy the Paillier encryption requirements This embodiment uses the HKDF algorithm based on HMAC-SHA256, and its calculation process is as follows: .
[0034] in, Indicates the random seed for the current time slot. This represents the unique identifier of the smart meter terminal. Represents the current timestamp. Generated. As a Paillier encryption random perturbation parameter, it is used to ensure that the same plaintext is encrypted at different times to generate different ciphertexts, thereby improving the system's resistance to replay attacks and statistical analysis.
[0035] S1.4 Forward Secure Data Encryption: The smart meter terminal (SMT) calls the Paillier public key pk, where pk is the system public key for the Paillier homomorphic encryption algorithm; for the plaintext data of electricity consumption during the current period... Encryption is performed, among which This represents the real-time electricity consumption data collected by the i-th smart meter terminal in time slot t.
[0036] Smart meter terminal SMT utilizes the current time slot random factor Perform Paillier encryption to generate the corresponding single-user ciphertext. The calculation formula is as follows: .
[0037] in, Indicates the current time slot The corresponding random encryption factor. g is the Paillier generator, and N is the modulus.
[0038] S1.5 Periodic Random Seed Evolution Update: The system performs key updates at fixed time intervals (15 minutes in this embodiment). The Key and Policy Center (KPC) calculates the public evolution parameters for the current period and broadcasts them to all online smart meter terminals (SMTs). The smart meter terminal (SMT) combines the currently stored key seed with the public evolution parameters and iteratively calculates the random seed for the next period using a one-way hash function. .
[0039] S1.6 Key Update and Terminal Failure Control: After the smart meter terminal SMT generates a new cycle key, it exports the random factor for the next cycle. For smart meter terminals whose permissions need to be revoked, KPC stops broadcasting subsequent cycle evolution parameters to them, preventing the terminal from completing key iteration and automatically invalidating the key. After the terminal key iteration is interrupted, subsequent data uploaded by the terminal is considered invalid and is rejected by the system, achieving closed-loop management of abnormal terminal permissions.
[0040] Step Two: Multi-level Data Encryption and Edge Aggregation
[0041] Step-by-step functional summary: Based on the forward-secure random factor evolution mechanism in step one, the encrypted upload of user-side electricity consumption data is completed. Relying on the Paillier homomorphic addition characteristic of the edge aggregation node, the regional encrypted batch aggregation is achieved without decryption, generating regional-level encrypted data and storing it in the cloud, realizing privacy-secure data collection and efficient aggregation in the regional load monitoring scenario.
[0042] S2.1 User-side data acquisition and parameter initialization: The smart meter terminal (SMT) acquires plaintext data of the current time slot electricity consumption of a single user. Let represent the electricity consumption data collected by the i-th smart meter terminal in time slot t; the corresponding forward security random factor is generated iteratively based on the current time slot t. .
[0043] S2.2 Single-Terminal Homomorphic Encryption: The smart meter terminal (SMT) uses Paillier public key pk and a random factor. right Perform homomorphic encryption to generate single-user ciphertext. The encryption formula is: After encryption is completed, the random seed from the previous time slot is securely destroyed to ensure that historical ciphertext cannot be traced back.
[0044] S2.3, Encrypted Data Edge Upload: Each smart meter terminal SMT will encrypt the generated single-user ciphertext. Upload to the edge aggregation node EA corresponding to the region.
[0045] S2.4 Homomorphic Aggregation of Regional Ciphertexts: The edge aggregation node EA utilizes the homomorphic addition property of the Paillier algorithm to perform batch accumulation and aggregation of ciphertexts from all terminals within the region without decrypting individual user ciphertexts, generating regional aggregated ciphertexts. The aggregation formula is: ,in Let J be the set of valid smart meter terminals in the j-th region.
[0046] S2.5, Aggregated Ciphertext Cloud Storage: Edge aggregation node EA will aggregate the generated regional ciphertext. The data is uploaded to a cloud server (CS) for persistent storage, providing data support for subsequent population statistical analysis and regional load monitoring.
[0047] Step 3: Hierarchical sharing and conversion of group statistical data
[0048] Step-by-step function summary: Analyze business needs based on user group electricity consumption patterns, retrieve aggregated encrypted data from multiple regions in the cloud, and complete encrypted access control and group data aggregation through system master key sharding and distributed computing with agent collaboration nodes. Generate group statistical encrypted data that can be decrypted by data service providers, and realize secure sharing of medium-granularity power grid data.
[0049] S3.1 Group Data Sharing Request Initiation: The Data Service Provider (DSR) initiates a group data sharing access request to the Control Center (CC) based on the electricity consumption pattern analysis needs of the target user group (community users, industrial users, etc.).
[0050] S3.2 Multi-region aggregated ciphertext retrieval: The control center (CC) parses the group range in the request and retrieves the aggregated ciphertext of all regions corresponding to the target group from the cloud server (CS).
[0051] S3.3, Group Ciphertext Aggregation Operation: The Control Center (CC) performs Paillier homomorphic aggregation operation on the retrieved aggregated ciphertexts from multiple regions to generate the group aggregated ciphertext corresponding to the target group. The calculation formula is as follows:
[0052] in, Let m represent the ciphertext aggregated in the j-th region, m represent the number of regions contained in the target group G, and N is the modulus in the Paillier cryptosystem.
[0053] According to the Paillier property of additive homomorphism, we have: ;
[0054] in, This represents the total electricity consumption of the j-th region. Therefore, the group aggregation ciphertext corresponds to the encrypted result of the total electricity consumption of all users in the target group.
[0055] Suppose that the target group G contains m regions, then the corresponding region aggregate ciphertext set is represented as: .
[0056] Its corresponding plaintext is: ,in This represents the total electricity consumption data for the j-th region.
[0057] Therefore, the group-aggregated ciphertext is essentially a secondary homomorphic aggregation result based on the region-aggregated ciphertext, realizing the data granularity transformation from the region layer to the group layer.
[0058] S3.4 Distributed Ciphertext Access Control: The Control Center (CC) invokes the system master key sharding technology to split the system master key into multiple sub-key fragments, each held by a separate PCN cluster of agent collaborating nodes. Combined with a threshold algorithm or agent re-encryption technology, distributed ciphertext conversion is performed on the aggregated ciphertext, achieving distributed secure threshold decryption. A single node cannot independently complete the decryption operation; once the ciphertext conversion is complete, the total electricity consumption data for the group can be restored. .
[0059] S3.5, Secure sharing of group data: The control center (CC) outputs group statistical ciphertext with DSR decryption permissions adapted to the data service provider, completing secure sharing of multi-granular data at the group level.
[0060] Step 4: Authorize access to individual detailed data audit lock
[0061] Functional Overview: To address the high-security access requirements of individual electricity consumption details with high privileges, a three-party dual-signature authorization mechanism of DSR, CC, and AS is constructed. An audit lock credential is generated through the audit service terminal, and the audit credential is strongly bound to a temporary re-encryption key to achieve mandatory access control of "audit first, authorization later, and a single-use valid temporary key," ensuring compliant and traceable access to sensitive individual data.
[0062] S4.1, Signed Access Request Submission: The Data Service Provider (DSR) initiates an Individual Data Access Request (Req) to the Control Center (CC), the request containing the unique identifier of the target meter. Reason for access, timestamp of access request Engineer digital signature .
[0063] S4.2 Two-layer signature authorization forwarding: The control center (CC) verifies the validity of the DSR signature and access reason. After successful verification, it appends its own authorization signature. A double-signature request message is generated. And forward it to the Audit Service Terminal (AS).
[0064] S4.3, Audit Dual Signature Verification: The Audit Service Terminal (AS) verifies the engineer's signature separately. Signature with control center The validity of the signature is checked; if any signature is invalid, the request will be rejected directly. If the verification is successful, the complete request information will be appended to the audit log.
[0065] S4.4, Audit Lock Credential Generation: The audit service terminal AS calculates the hash value H of the current audit log, where H is a unique verification value for the integrity of the audit log; it then signs H using its own private key SK to generate an audit signature. ; the voucher As an audit lock, it is returned to the control center (CC). A private key exclusive to the Audit Service Terminal (AS).
[0066] S4.5, Audit Binding Temporary Key Generation: After receiving a valid audit lock credential, the Control Center (CC) instructs the KPC to generate a one-time temporary re-encryption key. The calculation formula is as follows:
[0067] in, This represents a one-time temporary re-encryption key, and Hash(·) represents a cryptographic one-way hash function. This embodiment uses SHA-256 for implementation. This indicates the current audit log hash value. Indicates the identity of the target user. Represents the current timestamp. (Symbol) This indicates a string concatenation operation.
[0068] By introducing the audit log hash value as a binding parameter, the generated temporary re-encryption key is uniquely matched with the current audit access request, thereby realizing an access control mechanism of "one-time authorization, one-time use, and full traceability".
[0069] S4.6 Individual Ciphertext Re-encryption: The cloud server CS uses a temporary re-encryption key and T-PRE (Threshold Proxy Re-Encryption) technology to re-encrypt the target individual ciphertext. Perform a re-encryption operation to generate re-encrypted ciphertext that can be decrypted by DSR; the ciphertext conversion can only be completed if a valid audit lock credential exists.
[0070] S4.7 Decryption and Access to Individual Detailed Data: The data service provider DSR decrypts the re-encrypted ciphertext to obtain the plaintext data of the user's individual electricity consumption details, thus completing compliant access to high-privilege individual data.
[0071] Step 5: Archive Closed-Loop Audit of Access Behavior
[0072] Step-by-step function summary: After completing the status feedback, log update and compliance archiving after accessing individual detailed data, the single audit access transaction is closed, the audit credentials of the whole process are solidified, the access behavior is non-repudiable and traceable throughout the process, and the compliance management requirements of smart grid are met.
[0073] S5.1 Access Success Status Feedback: After successfully decrypting and obtaining individual detailed data, the data service provider DSR pushes an access success message to the audit service terminal AS.
[0074] S5.2 Audit Transaction Closed-Loop Update: After receiving the access success message, the audit service terminal AS registers the completion time, access result, and operation subject information of this access, updates the full-process audit log, and closes the audit transaction corresponding to this data access.
[0075] S5.3 Audit Log Compliance Archiving: The Audit Service Terminal (AS) performs integrity verification on the entire process log of this access, solidifies the tamper-proof audit credentials, and completes the closed-loop archiving of the single smart grid data hierarchical sharing and audit traceability process.
Claims
1. A method for hierarchical data sharing in smart grids supporting forward security and audit traceability, characterized in that, This method operates on a cloud-edge collaborative smart grid data fusion and sharing system. The system comprises eight entities: a key and policy center, smart meter terminals, edge aggregation nodes, a control center, a cloud server, data service providers, a proxy collaboration node cluster, and an audit service terminal. The entity communication relationships are as follows: the key and policy center, control center, cloud server, and proxy collaboration node cluster communicate bidirectionally with each other; smart meter terminals unidirectionally upload encrypted data to their respective edge aggregation nodes; edge aggregation nodes unidirectionally upload aggregated encrypted data to the cloud server; data service providers and audit service terminals complete cross-entity indirect communication through the control center; and the proxy collaboration node cluster maintains point-to-point intranet communication among its internal nodes. The method comprises five steps performed sequentially: Step 1: System initialization and forward security key distribution. The key and policy center completes the initialization of system password parameters. The smart meter terminal iteratively updates the random seed based on a one-way hash chain in time slots, destroys historical seeds locally, generates time slot-level encryption random factors based on the key derivation function, and uses the Paillier algorithm to encrypt the electricity consumption data of a single terminal. The key and policy center periodically broadcasts evolution parameters to achieve seed iterative updates and stops parameter broadcasting for abnormal terminals to achieve key expiration control. Step 2: Multi-level data encryption and edge aggregation. The smart meter terminal collects the plaintext of electricity consumption in a single user's time slot and reuses the random factor generated in Step 1 to complete homomorphic encryption. The single-user ciphertext is then uploaded to the edge aggregation node. Without decryption, the edge aggregation node completes the aggregation of ciphertext within the region based on Paillier homomorphic addition and uploads the aggregated ciphertext to the cloud server for persistent storage. Step 3: Group statistical data hierarchical sharing and conversion. The data service provider initiates a group data sharing request to the control center. The control center retrieves the multi-region aggregated ciphertext from the cloud server and completes secondary homomorphic aggregation to generate the group aggregated ciphertext. The control center splits the key and the policy center system master key into multiple sub-keys and distributes them to the agent collaboration node cluster. The agent collaboration node cluster completes the distributed ciphertext permission conversion based on threshold agent re-encryption. The control center outputs the group statistical ciphertext with matching permissions to the data service provider. Step 4: Individual Detailed Data Audit Lock Authorization Access. The data service provider sends an individual data access request to the control center with the terminal identity, access timestamp, and local engineer's digital signature. After verification, the control center adds its own authorized signature to form a double-signed message and forwards it to the audit service terminal. The audit service terminal verifies the double signature, writes it to the audit log, and generates an audit lock credential. The control center calls the key and combines it with the policy center to generate a one-time temporary re-encryption key based on the hash value of the audit lock credential. The cloud server uses a threshold proxy re-encryption algorithm to re-encrypt the individual ciphertext based on the temporary key. The data service provider decrypts the re-encrypted ciphertext to obtain the individual electricity consumption details. Step 5: Closed-loop audit and archiving of access behavior. After the data service provider completes the decryption, it pushes an access success message to the audit service terminal. The audit service terminal supplements the access results and completion time to update the audit log, verifies the integrity of the log, and solidifies the audit credentials to complete the archiving.
2. The method according to claim 1, characterized in that, Step one includes the following sub-steps: S1.1 The Key and Policy Center selects system security parameters, generates the system master key, and initializes the Paillier cryptographic operation component and the key-derived one-way hash function. S1.2 The smart meter terminal uses the time slot as the smallest update unit, and generates the current time slot random seed iteratively through a one-way hash function. After the iteration is completed, the previous time slot random seed is destroyed locally and securely. S1.3 The smart meter terminal calls the key export function to generate an encrypted random factor adapted to the Paillier algorithm by combining the current time slot random seed, terminal identity identifier, and time slot number. S1.4 The smart meter terminal calls the Paillier algorithm system public key and combines it with the time slot encryption random factor to homomorphically encrypt the plaintext of a single user's current electricity consumption. S1.5 The Key and Policy Center broadcasts the key evolution parameters to the online smart meter terminals at fixed intervals; S1.6 The Key and Policy Center stops broadcasting evolution parameters to abnormal terminals, interrupts terminal key iteration to achieve automatic key expiration, and the system rejects subsequent data uploaded by the expired terminal.
3. The method according to claim 1, characterized in that, Step two includes the following sub-steps: S2.1 The smart meter terminal collects the plaintext of the electricity consumption of a single user in the current time slot and retrieves the encrypted random factor of the current time slot completed in step one iteration. S2.2 The smart meter terminal uses the Paillier public key and the current random factor to complete the homomorphic encryption of the electricity consumption plaintext, and after encryption, the random seed of the previous time slot is securely destroyed; S2.3 The smart meter terminal uploads the encrypted single-user ciphertext point-to-point to the edge aggregation node of the home area; S2.
4. Edge aggregation nodes do not decrypt single-user ciphertexts, but rely on Paillier homomorphic addition to complete the batch aggregation of all legitimate terminal ciphertexts within the region. S2.5 The edge aggregation node uploads the regional aggregated ciphertext to the cloud server to complete persistent encrypted storage.
4. The method according to claim 1, characterized in that, Step three includes the following sub-steps: S3.1 The data service provider analyzes the needs based on the electricity consumption patterns of the target user group and initiates a targeted group data sharing access request to the control center; S3.2 The control center parses the requested group space range and retrieves the aggregated ciphertext of all areas within the range from the cloud server; S3.3 The control center performs a second Paillier homomorphic aggregation on multiple sets of regional aggregated ciphertexts to generate the overall aggregated ciphertext of the target group; S3.4 The control center splits the system master key into fragment keys and distributes them to the agent collaboration node cluster, and uses a threshold algorithm to carry out distributed encrypted permission conversion; S3.5 The control center outputs group statistical ciphertext that matches permissions and can be directly decrypted to the data service provider, completing group-level data sharing.
5. The method according to claim 1, characterized in that, Step four includes the following sub-steps: S4.1 The data service provider constructs an individual data access request that includes the target meter's identity, access reason, request timestamp, and engineer's digital signature; S4.2 The control center verifies the compliance of the request and the validity of the engineer's signature. After the verification is passed, it adds its own authorized signature, generates a double-signature request message, and forwards it to the audit service terminal. S4.3 The audit service terminal independently verifies the legality of the dual signatures. If all signatures are valid, the complete request is recorded in the audit log; otherwise, the access request is rejected directly. S4.4 The audit service terminal calculates the hash verification value of the current audit log, signs it with the terminal's private key, generates an audit lock credential, and sends it back to the control center. S4.5 The control center combines the audit lock credential hash value, target terminal identifier, and request timestamp to generate a one-time temporary re-encryption key; S4.6 After the cloud server verifies the validity of the audit lock credential, it uses the threshold proxy re-encryption algorithm to rewrite the individual ciphertext permissions. S4.7 The data service provider decrypts the re-encrypted ciphertext after rewriting the permissions and reads the plaintext data of individual electricity consumption details.
6. The method according to claim 1, characterized in that, Step five includes the following sub-steps: S5.1 After the data service provider completes the reading of individual detailed data, it pushes a successful access status receipt to the audit service terminal. S5.2 The audit service terminal enters the access completion time, operation subject, and access result, and updates the corresponding audit log entries in a closed loop. S5.3 The audit service terminal verifies the integrity of the entire audit log, solidifies the tamper-proof audit credentials, and completes the compliance archiving.
7. The method according to claim 2, characterized in that, Step 1: The random seed is generated using a one-way hash iteration, with the following formula: ;in This is the random seed from the previous time slot. t is the random seed for the current time slot, t is the minimum update time slot for power grid data encryption, and Hash is a cryptographic one-way hash function.
8. The method according to claim 7, characterized in that, The user-side ciphertext is generated using Paillier homomorphic encryption, with the encryption formula being: ;in For single-user encrypted messages, For single-user time slot t power consumption plaintext, Let g be the encryption random factor for the i-th smart meter terminal in time slot t, g be the generator of the Paillier algorithm, and N be the modulus of the Paillier algorithm. The encryption random factor is generated by the HKDF algorithm, and the generation formula is as follows: , It serves as a unique identifier for smart meter terminals.
9. The method according to claim 8, characterized in that, The formula for region ciphertext aggregation in step two is: ;in For the j-th region, aggregate the ciphertext. Let j be the set of legal online smart meter terminals in region j; the group ciphertext aggregation formula in step three is: ,in The encrypted text is aggregated for the target group, where m is the number of areas covered by the target group.
10. The method according to claim 1, characterized in that, Step 4: Formula for generating a one-time temporary re-encryption key. ;in A one-time temporary re-encryption key. For audit log integrity hash value, The original timestamp of the access request.