Privacy-preserving computation-based methods and devices for sharing power data

By encrypting and managing access permissions for power data using privacy-preserving computation methods, the privacy and security issues in power data sharing are resolved, enabling efficient, flexible, and secure power data transmission during the data sharing process.

CN118862146BActive Publication Date: 2025-10-31STATE GRID SHANGHAI MUNICIPAL ELECTRIC POWER CO +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410845292.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-27
Publication Date
2025-10-31
Estimated Expiration
2044-06-27

AI Technical Summary

Technical Problem

Existing power data sharing methods have shortcomings in data privacy and security in dynamic and distributed environments. They lack flexible permission adjustments and fine-grained access control, resulting in low efficiency and difficulty in ensuring data integrity during the data sharing process.

Method used

A privacy-based computing approach is adopted, which generates keys through homomorphic encryption and encrypts power data, constructs a chain-like encrypted access log, dynamically updates access permissions, verifies data integrity, and builds a privacy computing service network in a microservice architecture for data synchronization and format conversion.

Benefits of technology

It improves the privacy and security of power data sharing, enhances the flexibility and efficiency of data sharing, ensures data integrity and credibility, and supports the robust operation of the power grid and the continuity of energy supply.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118862146B_ABST
    Figure CN118862146B_ABST
Patent Text Reader

Abstract

This invention relates to a method and apparatus for sharing electricity data based on privacy computing, comprising the following steps: S1, using homomorphic encryption to perform key generation and data encryption on the electricity data to obtain an encrypted electricity dataset; S2, using a hash function on the encrypted electricity dataset to generate a chained encrypted access log; S3, performing permission analysis on the chained encrypted access log to generate a dynamic permission configuration file; S4, encrypting and sequentially encoding the data in the dynamic permission configuration file and performing integrity verification; S5, performing decryption key matching and decryption on the data in the data integrity verification result to obtain privacy-protected electricity data; S6, building a privacy computing service network in a microservice architecture; S7, synchronizing the privacy-protected electricity data after data synchronization and format conversion to all electricity market participants through the privacy computing service network. Compared with existing technologies, this invention can improve the privacy and security of electricity data sharing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of data security technology, and in particular relates to a method and device for sharing power data based on privacy computing. Background Technology

[0002] Data can be securely transmitted and synchronized between different computing devices, networks, and applications through data sharing technologies, ensuring data accessibility and consistency while protecting data privacy and integrity. Data sharing technologies support various forms of data exchange, including file sharing, database synchronization, and real-time data streaming, and are widely used in cloud computing, distributed systems, and enterprise data management to optimize resource utilization, improve decision-making efficiency, and support complex collaborative processes.

[0003] Electricity data sharing is one specific application of data sharing technology in the power industry. It involves collecting, processing, and distributing data related to power system operation, such as electricity consumption, power supply status, and grid performance indicators. The aim is to improve grid operating efficiency, ensure energy supply stability, and support the development of smart grids. By sharing data, power companies can better predict demand, optimize resource allocation, and respond to emergencies, while providing consumers with more transparent services and optimized energy usage plans.

[0004] Chinese patent application 202311411585.1 proposes a power data sharing and analysis method based on differential privacy. Through homomorphic encryption and differential privacy technologies, it not only protects data privacy but also allows different samples to obtain different levels of privacy protection according to their privacy requirements, thereby achieving accurate prediction and shared display of power data and fully balancing the needs of data privacy and data analysis. However, this method is prone to oversights in data privacy and security in dynamic and distributed power data environments. The lack of flexible permission adjustments and fine-grained access control makes it difficult to cope with complex and ever-changing needs, affecting the efficiency and quality of data sharing. Furthermore, the lack of real-time verification of data integrity makes data susceptible to tampering during transmission and sharing, affecting data reliability and making it difficult to ensure data integrity and privacy protection during power data sharing. This limits the ability to optimize power resource allocation and reduces the stability and efficiency of power grid operation. Therefore, it is necessary to design a power data sharing method to further improve the privacy and security of power data during the sharing process. Summary of the Invention

[0005] The purpose of this invention is to overcome the shortcomings of the prior art by providing a method and device for sharing power data based on privacy computing, thereby further improving the privacy and security of power data during the sharing process.

[0006] The objective of this invention can be achieved through the following technical solutions:

[0007] This invention provides a method for sharing electricity data based on privacy computing, comprising the following steps:

[0008] S1. Collect power data, use homomorphic encryption to perform key generation and data encryption on it, and obtain an encrypted power dataset;

[0009] S2. Use a hash function to generate encrypted logs from the encrypted power dataset, and link them into a chain data structure to generate chained encrypted access logs.

[0010] S3. Based on the operator's role and data access requirements, perform permission analysis on the chained encrypted access logs, dynamically update access rules, allocate and adjust access permissions, and generate a dynamic permission configuration file.

[0011] S4. Encrypt and sequentially encode each data item in the dynamic permission configuration file, perform integrity verification, and obtain the data integrity verification result.

[0012] S5. Perform decryption key matching and decryption process on the encrypted data in the data integrity verification result to obtain privacy-protected power data;

[0013] S6. Perform data synchronization and format conversion on the privacy-preserving power data, and build a privacy computing service network in a microservice architecture;

[0014] S7. Through the privacy computing service network, the privacy-protected power data after data synchronization and format conversion is synchronized to all power market participants, thus completing power data sharing.

[0015] Furthermore, in step S1, the electricity data includes regional electricity consumption data and supply data. The specific process for obtaining the encrypted electricity dataset is as follows:

[0016] S101. Preprocess the power data to obtain a standardized power dataset. The preprocessing includes data cleaning, outlier removal, standardization of time format, standardization of field naming, and filling in missing values.

[0017] S102. Match a unique key to each piece of power data in the standardized power dataset to form a key mapping table that corresponds one-to-one with the data, and obtain a key set.

[0018] S103. Based on the key set, encrypt the power data one by one to obtain an encrypted power dataset.

[0019] Furthermore, in step S2, the chained encrypted access log includes an operator identity log and a timestamp log. The specific process for generating the chained encrypted access log is as follows:

[0020] S201. Extract the operator's identity and timestamp from each power data record in the encrypted power dataset, represent them as identity identifiers and time serialization, integrate them into an indexed data structure, and obtain the operator log metadata.

[0021] S202. Based on the operator log metadata, use a hash function to encrypt the identity identifier and timestamp of each record to obtain a hash-encrypted log.

[0022] S203. Based on the hash-encrypted log, sort each encrypted log entry according to the recording time order, connect them with pointers to form a linear chain structure, and generate a chain-encrypted access log.

[0023] Furthermore, in step S3, the dynamic permission configuration file includes access rules and permission allocation records. The specific process for generating the dynamic permission configuration file is as follows:

[0024] S301. Based on the chain-encrypted access log, collect the identity and data access history of each operator, analyze the data access pattern, classify the operators into administrators, ordinary users and visitors, sort the data access requirements according to the operator category, and generate a role permission requirement mapping table.

[0025] S302. Based on the role permission requirement mapping table, compare the existing access rules with the actual needs of the roles, identify cases of insufficient or excessive permissions, adjust the data access permissions for each role, update the access rule list, and obtain the updated access permission rules.

[0026] S303. Based on the updated access permission rules, create a role-matching permission configuration file for each operator, dynamically adjust the permission settings to match changes in data access, and generate a dynamic permission configuration file.

[0027] Furthermore, in step S4, the data integrity verification result includes an unmodified data identifier and an integrity status code. The specific process for obtaining the data integrity verification result is as follows:

[0028] S401. Based on each data item in the dynamic permission configuration file, assign an encrypted identifier and a sequence number, so that each data item is managed through a unique identifier and a sequence number, forming an encrypted sequence number file;

[0029] S402. Based on the encrypted sequence number file, perform an integrity check on each data item, verify the consistency between the encryption identifier and the number, and obtain the integrity check result;

[0030] S403. Based on the integrity verification result, compare the encryption identifiers of all data items to determine whether the data has been accessed or modified without authorization, and obtain the data integrity verification result.

[0031] Furthermore, in step S5, the specific process for obtaining privacy-preserving electricity data is as follows:

[0032] S501. Based on the data integrity verification result, select a decryption key that matches the encrypted data, verify each key and its corresponding data identifier and verification information, and generate a matching key set;

[0033] S502. Based on the matching key set, perform a decryption operation to convert each encrypted data item into its original format to obtain a decrypted dataset;

[0034] S503. Based on the decrypted dataset, implement data privacy protection measures, and obtain privacy-protected power data through data desensitization and access control applications.

[0035] Furthermore, in step S6, the privacy computing service network includes data synchronization service functions, format conversion service functions, and protocol exchange interfaces. The specific process of building the privacy computing service network is as follows:

[0036] S601. Match the service format requirements in the microservice architecture, adjust the data structure and content encoding of the privacy-protected power data, verify data compatibility and availability, and generate data that matches the microservices;

[0037] S602. Based on the data of the matched microservices, configure the communication parameters and security authentication information of the gRPC protocol, perform data transmission encryption and authentication between services, establish a secure data exchange channel, and obtain the gRPC data exchange configuration.

[0038] S603. Based on the gRPC data exchange configuration, use a symmetric encryption algorithm to calculate the encrypted data stream, connect the data processing flow and interaction protocol between services, and build a privacy computing service network.

[0039] Furthermore, in step S603, the calculation formula for the symmetric encryption algorithm is as follows:

[0040] C = E k (P,t,α,n)

[0041] Where C is the encrypted data, P is the original data, t is the timestamp, α is the security level factor, n is the data block number, k is the symmetric key, and E is the symmetric encryption algorithm.

[0042] Furthermore, the specific process of step S7 is as follows:

[0043] S701. Through the privacy computing service network, a data synchronization mechanism is deployed to keep the power data encrypted on each node in the microservice architecture, and an encrypted data distribution mechanism is generated to ensure the uniform distribution of power data among all power market participants.

[0044] S702. Based on the encrypted data distribution mechanism, monitor the encryption status during the data synchronization process, record the data reception status of each electricity market participant, and obtain the data synchronization monitoring record.

[0045] S703. Based on the data synchronization monitoring records, complete the data reception and confirmation of all electricity market participants, and complete the secure sharing of electricity data.

[0046] The present invention also provides an electronic device, including a memory, a processor, and a program stored in the memory, wherein the processor executes the program to implement the above-described method.

[0047] Compared with the prior art, the present invention has the following beneficial effects:

[0048] This invention proposes a privacy-preserving computing-based method for sharing power data. Homomorphic encryption is used to generate keys and encrypt power data, ensuring privacy and security during the sharing process. This avoids frequent data decryption and encryption processes, thus improving the efficiency of power data sharing. The invention dynamically updates access rules and allocates and adjusts access permissions based on the operator's role and data access needs. Dynamic permission configuration makes the method more adaptable to different user needs and scenarios, improving the flexibility and convenience of data sharing. Integrity checks further determine whether data has been accessed or tampered with, increasing data credibility. Decryption key matching and decryption are performed on encrypted data in the integrity verification results, converting ciphertext to plaintext format and enhancing control over data privacy protection. The invention builds a privacy-preserving computing service network within a microservice architecture, promoting flexibility in data synchronization and format conversion, making data processing more efficient, further improving the privacy and security of power data during sharing, and ensuring the stable operation of the power grid and the continuous supply of energy. Attached Figure Description

[0049] Figure 1 This is a flowchart of the method of the present invention. Detailed Implementation

[0050] The present invention will now be described in detail with reference to the accompanying drawings and specific embodiments. These embodiments are based on the technical solution of the present invention and provide detailed implementation methods and specific operating procedures. However, the scope of protection of the present invention is not limited to the following embodiments.

[0051] Example 1

[0052] This embodiment provides a method for sharing power data based on privacy computing, such as... Figure 1 As shown, it includes the following steps:

[0053] S1. Collect power data, use homomorphic encryption to perform key generation and data encryption to obtain an encrypted power dataset.

[0054] Electricity data includes regional electricity consumption and supply data. The specific process for obtaining encrypted electricity datasets is as follows:

[0055] S101. Preprocess the power data to obtain a standardized power dataset. Preprocessing includes data cleaning, outlier removal, standardization of time format, standardization of field naming, and filling in missing values.

[0056] Based on the electricity consumption and supply dataset, the regional data was first cleaned to remove outliers. This involved calculating the average consumption and supply for each time period, setting a threshold of the average plus or minus three standard deviations, and removing data points outside this range, resulting in a pre-cleaned subset of data. Next, the time format was standardized by converting all time fields in all records to "YYYY-MM-DD HH:MM:SS" format using string parsing and formatting methods. Then, field names were standardized, for example, using "PowerUse" and "PowerSupply" as consistent field names to avoid data processing difficulties caused by inconsistent naming. Finally, missing values ​​were filled by interpolating the average values ​​of adjacent time points for missing electricity consumption and supply values, ensuring data integrity and resulting in a standardized electricity dataset.

[0057] S102. Match a unique key to each piece of power data in the standardized power dataset, form a key mapping table that corresponds one-to-one with the data, and obtain the key set.

[0058] Based on a normalized power dataset, a unique key is matched for each data record. The operation includes extracting primary key fields, such as region code and timestamp, from the normalized dataset, hashing the combination of these two fields to generate a 64-bit unique identifier as the key, and forming a key mapping table that corresponds one-to-one with the data. Specifically, the key and original record of each data are stored in the mapping table to ensure that the corresponding power data record can be quickly retrieved by the key, and the key set is output for the next step of data encryption processing.

[0059] S103. Based on the key set, encrypt the power data one by one to ensure the confidentiality of the data and the possibility of computation, support subsequent analysis and query operations, and obtain the encrypted power dataset.

[0060] Based on the key set, each record of electricity data is encrypted to ensure data confidentiality and computational feasibility. Each record is encrypted using a key. During the encryption process, the electricity consumption and supply fields are encrypted using the AES algorithm to ensure the security of sensitive data during storage and transmission. The encrypted data is stored in the encrypted electricity dataset to support subsequent analysis and query operations.

[0061] S2. Use a hash function to generate encrypted logs from the encrypted power dataset, and link them into a chained data structure to generate a chained encrypted access log.

[0062] The chained encrypted access log includes an operator identity log and a timestamp log. The specific process for generating the chained encrypted access log is as follows:

[0063] S201. Extract the operator's identity and timestamp from each power data record in the encrypted power dataset, represent them as identity identifiers and time serialization, integrate them into an indexed data structure, and obtain the operator log metadata.

[0064] Based on the encrypted power dataset, the operator's identity and timestamp are first extracted from each data record. The operator's identity is then serialized, converting the identity information into a unique numerical identifier, for example, using a sequence of natural numbers to correspond to different operators. At the same time, the timestamp is also serialized, converting all timestamps into seconds since the Unix epoch. Next, the operator's identity identifier and timestamp are integrated to construct an indexed data structure. This structure supports efficient data retrieval and storage, maintaining the temporal order and correlation of the data, thereby obtaining operator log metadata, providing a foundation for subsequent data analysis and auditing.

[0065] S202. Based on the operator log metadata, use a hash function to encrypt the identity identifier and timestamp of each record to ensure the uniqueness and verifiability of the log summary of each record, thus obtaining a hash-encrypted log.

[0066] Based on the operator log metadata, the identifier and timestamp of each record are encrypted. Specifically, a hash function, such as SHA-256, is applied to encrypt the identifier and timestamp of each record, generating a fixed-length hash value. This hash value serves as a unique identifier for the log entry, ensuring that the log digest of each record is not only unique but also irreversibly verifiable. In this way, the hash-encrypted logs not only guarantee data security but also facilitate subsequent verification of the log's integrity and authenticity.

[0067] S203. Based on hash-encrypted logs, each encrypted log entry is sorted according to the recording time order, and a linear chain structure is formed by connecting pointers to generate a chain-like encrypted access log.

[0068] Based on hash-encrypted logs, each encrypted log entry is sorted by time to maintain the temporal continuity and logical order of the logs. The log entries are then sorted according to their recording time and connected by pointers to form a linear chain structure. This chain structure not only facilitates log tracing and access but also enhances the logs' structure and coherence. The resulting chain-encrypted access log provides an effective way to store and query encrypted log information, supporting secure data auditing and access tracking.

[0069] S3. Based on the operator's role and data access requirements, perform permission analysis on the chained encrypted access logs, dynamically update access rules, allocate and adjust access permissions, and generate dynamic permission configuration files.

[0070] Dynamic permission configuration files include access rules and permission assignment records. The specific process for generating a dynamic permission configuration file is as follows:

[0071] S301. Based on chain-encrypted access logs, collect the identity and data access history of each operator, analyze data access patterns, classify operators into administrators, ordinary users and visitors, sort data access requirements according to operator category, and generate a role permission requirement mapping table.

[0072] Based on chained encrypted access logs, the system first collects the identity and data access history of each operator. By analyzing the records, it identifies the behavioral patterns and frequencies of each operator and categorizes them into three main roles: administrators, ordinary users, and visitors. Then, it sorts the data access needs of each category. For example, administrators need unlimited access to all data for system maintenance, ordinary users access relevant data according to their business needs, and visitors are limited to viewing public information. Finally, the categories and needs are integrated to generate a role-permission requirement mapping table, which records in detail the data access needs and permission levels of different roles, providing a basis for subsequent permission adjustments.

[0073] S302. Based on the role-permission requirement mapping table, compare the existing access rules with the actual needs of the roles, identify situations of insufficient or excessive permissions, adjust data access permissions for each role, update the access rule list, and obtain the updated access permission rules.

[0074] Based on the role-permission requirement mapping table, existing access rules are compared with the actual needs of roles to identify deficiencies or excesses in permission configurations. For example, it was found that some ordinary users were incorrectly granted administrator privileges, or some visitors were able to access data that should be restricted. To address these issues, data access permissions for each role were adjusted, lowering or raising the corresponding permission settings to ensure that the permission configuration matches the actual needs. After the adjustments were completed, the access rule list was updated, detailing the latest access permissions for each role. This resulted in updated access permission rules that more accurately reflect the actual data access needs of each role, enhancing the system's security and compliance.

[0075] S303. Based on the updated access permission rules, create a role-matching permission configuration file for each operator, dynamically adjust permission settings to match changes in data access, and generate a dynamic permission configuration file.

[0076] Based on the updated access permission rules, a role-matching permission configuration file is created for each operator. The configuration file details the specific permissions of each role in the current system state. As data access needs change, these permission settings are dynamically adjusted to ensure that the permission configuration always remains consistent with the actual needs of the operators, improving the system's flexibility and responsiveness. The dynamic permission configuration file automatically updates the permission settings by monitoring data access patterns and changes in needs in real time, forming a dynamic permission management mechanism that can adapt to user behavior and system requirements.

[0077] S4. Encrypt and sequentially encode each data item in the dynamic permission configuration file, perform integrity verification, and obtain the data integrity verification result.

[0078] The data integrity verification result includes the unmodified data identifier and the integrity status code. The specific process for obtaining the data integrity verification result is as follows:

[0079] S401. Based on each data item in the dynamic permission configuration file, assign an encrypted identifier and a sequence number, so that each data item can be managed through a unique identifier and a sequence number, forming an encrypted sequence number file.

[0080] Based on each data item in the dynamic permission configuration file, an encrypted identifier is first assigned to each data item. The identifier is generated by applying a hash function to the data content and related metadata (such as timestamps and operator identity), ensuring the uniqueness of each data item. Subsequently, a sequential number is assigned to each data item, which reflects the position and order of the data item in the configuration file, maintaining the organizational structure and logical consistency of the data. Finally, the encrypted identifier and sequential number are combined to form an encrypted sequential number file. The file manages each data item through detailed identifiers and numbers, ensuring the traceability and manageability of the data.

[0081] S402. Based on the encrypted sequential numbering file, perform integrity verification on each data item, check the consistency between the encrypted identifier and the number, ensure that the original attributes and order have not been tampered with after data processing, and obtain the integrity verification result.

[0082] Based on the encrypted sequential numbering file, integrity checks are performed on each data item. Specifically, this involves verifying the encrypted identifier and sequential number of each data item to check for consistency during encryption and numbering; comparing the encrypted identifier of the data item with its hash value during storage to confirm that the data has not been tampered with during processing; and checking whether the sequential number matches the actual location of the data item to ensure that the original attributes and order of the data have not been altered. The resulting integrity check results provide a guarantee of consistency and reliability in data processing and storage.

[0083] S403. Based on the integrity verification results, compare the encryption identifiers of all data items to determine whether the data has been accessed or modified without authorization, verify the data integrity and security, and generate the data integrity verification result.

[0084] Based on the integrity verification results, the encryption identifiers of all data items are further compared to check whether each data item has maintained its original encryption state and has not been subjected to unauthorized access or modification. The encryption identifiers are checked one by one, and the integrity of the data is verified throughout the entire processing and storage process by comparing the encryption identifier of the data item with the original hash value. The comparison process ensures the security of the data items. By systematically checking the encryption state of each data item, the data integrity verification results are obtained, reflecting the security level and protection effect of the data in the system.

[0085] S5. Perform decryption key matching and decryption process on the encrypted data in the data integrity verification result to obtain privacy-protected power data.

[0086] The specific process for obtaining privacy-preserving electricity data is as follows:

[0087] S501. Based on the data integrity verification result, select the decryption key that matches the encrypted data, verify each key and its corresponding data identifier and verification information, ensure the correctness of the key and the correspondence between the data, and generate a matching key set.

[0088] Based on the data integrity verification results, the first step is to select a decryption key that matches the encrypted data. This involves verifying each key and its corresponding data identifier to ensure the uniqueness and correctness of each key. By comparing the encryption identifier of the data item with the records in the key repository, the correspondence between the key and the data is confirmed to be consistent. After completing this process, a matching key set is generated. The key set contains all the keys that can correctly decrypt the corresponding data, providing an accurate tool for subsequent data decryption.

[0089] S502. Based on the matching key set, perform the decryption operation to convert each encrypted data item into the original format, maintaining the integrity of the data structure and content, and obtain the decrypted dataset.

[0090] Based on the matching key set, decryption is performed, processing each encrypted data item with its corresponding decryption key to convert the encrypted data back to its original format. The process maintains the integrity of the data structure and content, ensuring that the decrypted data is consistent with the original data before encryption, without any data loss or tampering. After decryption, a decrypted dataset is obtained, containing all the original format power data, providing a foundation for further analysis and use.

[0091] S503. Based on the decrypted dataset, data privacy protection measures are implemented. Through data anonymization and access control applications, the data is securely stored and used after being converted to plaintext format, thereby obtaining privacy-protected power data.

[0092] Based on the decrypted dataset, data privacy protection measures are implemented, including data anonymization and access control. During the data anonymization process, sensitive information in the decrypted data, such as the operator's identity and specific values, is anonymized, ensuring that the data retains its purpose and analytical value while preventing its traceability to specific individuals. Simultaneously, access control is applied, restricting access to and manipulation of the decrypted data based on user roles and permissions, ensuring that only authorized users can access the corresponding data. These measures collectively form a privacy-protected power data system, ensuring that the data remains securely stored and used even after being converted to plaintext format.

[0093] S6. Perform data synchronization and format conversion for privacy-preserving power data, and build a privacy computing service network in a microservice architecture.

[0094] The privacy-preserving computing service network includes data synchronization service functions, format conversion service functions, and protocol exchange interfaces. The specific process of building the privacy-preserving computing service network is as follows:

[0095] S601. Based on privacy-preserving power data, perform data synchronization, match the service format requirements in the microservice architecture, adjust the data structure and content encoding of the privacy-preserving power data, verify data compatibility and availability, and generate data that matches the microservice.

[0096] Based on the privacy protection of electricity data, the process begins with data synchronization, matching the data to the service format requirements of the microservice architecture. This includes adjusting the data structure to adapt to the service's input and output specifications, and converting the content encoding to meet the service's processing and storage standards. Next, the data's compatibility and availability are verified to ensure that the data can be correctly parsed and utilized within the microservice architecture without compatibility issues. Finally, data matching the microservices is generated, fully complying with the microservices' operational requirements and format standards, providing a foundation for subsequent data operations and service integration.

[0097] S602. Based on the data of the matching microservices, configure the communication parameters and security authentication information of the gRPC protocol, perform data transmission encryption and authentication between services, establish a secure data exchange channel, and obtain the gRPC data exchange configuration.

[0098] Based on the data from the matching microservices, the communication parameters and security authentication information of the gRPC protocol are configured. Detailed operations include setting parameters such as the gRPC communication port, timeout time, and maximum message size, as well as configuring TLS / SSL certificates and keys to ensure encrypted data transmission and authentication between services. Through these configurations, a secure data exchange channel is established, which not only ensures encrypted data transmission but also realizes identity authentication between services, obtaining the gRPC data exchange configuration and laying a solid foundation for subsequent secure communication and data interaction.

[0099] S603, based on gRPC data exchange configuration, uses symmetric encryption algorithms to calculate encrypted data streams, connects data processing flows and interaction protocols between services, and builds a privacy computing service network.

[0100] The specific formula for calculating the symmetric encryption algorithm is as follows:

[0101] C = E k (P,t,α,n)

[0102] Where C is the encrypted data, P is the original data, t is the timestamp to ensure the timeliness of the data, α is the security level factor to enhance data security, n is the data block sequence number to ensure the integrity of data transmission, k is the symmetric key, and E is the symmetric encryption algorithm.

[0103] The execution process is as follows:

[0104] First, the original data P is divided into several data blocks, and each data block is assigned a sequence number n. Then, a timestamp t is added to each data block to record the specific time of encryption. This timestamp is also used for subsequent data verification and synchronization. Next, the data blocks, timestamps, and sequence numbers are encrypted using an encryption function E. At the same time, a security level factor α is introduced, which is adjusted according to the sensitivity of the data. For example, the α value is larger for more sensitive data. Finally, the encryption process is completed using a symmetric key k to generate the encrypted data C.

[0105] S7. Through the privacy-preserving computing service network, the privacy-protected electricity data, after data synchronization and format conversion, is synchronized to all electricity market participants to complete electricity data sharing. The specific process is as follows:

[0106] S701. Through the privacy computing service network, a data synchronization mechanism is deployed to keep power data encrypted on each node in the microservice architecture, and an encrypted data distribution mechanism is generated to ensure the uniform distribution of power data among all power market participants.

[0107] By deploying a data synchronization mechanism through a privacy computing service network, the system first ensures that the processed power data remains encrypted on every node in the microservice architecture, using symmetric encryption algorithms to maintain the ciphertext form of the data during data transmission and storage. Next, a uniform distribution strategy is implemented, adjusting the data distribution logic and scale according to the needs and permissions of each participant in the power market to ensure even distribution and access to data across all participants. Finally, an encrypted data distribution mechanism is generated, ensuring the secure and efficient flow of power data throughout the network through encryption protection and balanced distribution.

[0108] S702. Based on the encrypted data distribution mechanism, monitor the encryption status during the data synchronization process, record the data reception status of each electricity market participant, ensure that the encryption integrity is not compromised during data synchronization, and obtain data synchronization monitoring records.

[0109] Based on the encrypted data distribution mechanism, the encryption status during the data synchronization process is monitored. The operation includes real-time tracking of the data's encryption identifier and transmission path, and recording the data reception status of each participant, such as reception time, data volume, and encryption integrity. Through these records, it is ensured that the encryption status of the data is not compromised during the synchronization process, maintaining the security and integrity of the data. After completing this process, a data synchronization monitoring record is obtained, which reflects the entire process and status of data synchronization in detail, providing an important basis for subsequent security analysis and problem diagnosis.

[0110] S703. Based on data synchronization monitoring records, complete the data reception and confirmation of all electricity market participants, ensure that the data security sharing process complies with privacy protection standards, and complete the secure sharing of electricity data.

[0111] Based on data synchronization monitoring records, the system completes the receipt and confirmation of data from all electricity market participants. This includes verifying the encryption status and content integrity of the data received by each participant. Through these operations, it is ensured that the data obtained by each participant complies with privacy protection standards and has not been subjected to unauthorized access or tampering. Finally, the system achieves secure sharing of electricity data. The sharing process not only complies with privacy protection standards but also ensures data security and trust among all participants in the electricity market through strict data encryption and monitoring.

[0112] Example 2

[0113] This embodiment provides an electronic device, including a memory and a processor. The processor executes a program stored in the memory, the program including several instructions that can perform all or part of the steps of the method described in Embodiment 1. The memory includes a computer-readable storage medium, specifically a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, or any other medium capable of storing program code.

[0114] The above description of the embodiments is provided to enable those skilled in the art to understand and use the invention. It will be apparent to those skilled in the art that various modifications can be made to these embodiments, and the general principles described herein can be applied to other embodiments without inventive effort. Therefore, the present invention is not limited to the above embodiments, and any improvements and modifications made by those skilled in the art based on the disclosure of the present invention without departing from the scope of the invention should be within the protection scope of the present invention.

Claims

1. A method for sharing electricity data based on privacy computing, characterized in that, Includes the following steps: S1. Collect power data, use homomorphic encryption to perform key generation and data encryption on it, and obtain an encrypted power dataset; S2. Use a hash function to generate encrypted logs from the encrypted power dataset, and link them into a chain data structure to generate chained encrypted access logs. S3. Based on the operator's role and data access requirements, perform permission analysis on the chained encrypted access logs, dynamically update access rules, allocate and adjust access permissions, and generate a dynamic permission configuration file. S4. Encrypt and sequentially encode each data item in the dynamic permission configuration file, perform integrity verification, and obtain the data integrity verification result. S5. Perform decryption key matching and decryption process on the encrypted data in the data integrity verification result to obtain privacy-protected power data; S6. Perform data synchronization and format conversion on the privacy-preserving power data, and build a privacy computing service network in a microservice architecture; S7. Through the privacy computing service network, the privacy-protected power data after data synchronization and format conversion is synchronized to all power market participants, thus completing power data sharing.

2. The method for sharing power data based on privacy computing according to claim 1, characterized in that, In step S1, the electricity data includes regional electricity consumption data and supply data. The specific process for obtaining the encrypted electricity dataset is as follows: S101. Preprocess the power data to obtain a standardized power dataset. The preprocessing includes data cleaning, outlier removal, standardization of time format, standardization of field naming, and filling in missing values. S102. Match a unique key to each piece of power data in the standardized power dataset to form a key mapping table that corresponds one-to-one with the data, and obtain a key set. S103. Based on the key set, encrypt the power data one by one to obtain an encrypted power dataset.

3. The method for sharing power data based on privacy computing according to claim 1, characterized in that, In step S2, the chained encrypted access log includes an operator identity log and a timestamp log. The specific process for generating the chained encrypted access log is as follows: S201. Extract the operator's identity and timestamp from each power data record in the encrypted power dataset, represent them as identity identifiers and time serialization, integrate them into an indexed data structure, and obtain the operator log metadata. S202. Based on the operator log metadata, use a hash function to encrypt the identity identifier and timestamp of each record to obtain a hash-encrypted log. S203. Based on the hash-encrypted log, sort each encrypted log entry according to the recording time order, connect them with pointers to form a linear chain structure, and generate a chain-encrypted access log.

4. The method for sharing power data based on privacy computing according to claim 1, characterized in that, In step S3, the dynamic permission configuration file includes access rules and permission allocation records. The specific process for generating the dynamic permission configuration file is as follows: S301. Based on the chain-encrypted access log, collect the identity and data access history of each operator, analyze the data access pattern, classify the operators into administrators, ordinary users and visitors, sort the data access requirements according to the operator category, and generate a role permission requirement mapping table. S302. Based on the role permission requirement mapping table, compare the existing access rules with the actual needs of the roles, identify cases of insufficient or excessive permissions, adjust the data access permissions for each role, update the access rule list, and obtain the updated access permission rules. S303. Based on the updated access permission rules, create a role-matching permission configuration file for each operator, dynamically adjust the permission settings to match changes in data access, and generate a dynamic permission configuration file.

5. The method for sharing power data based on privacy computing according to claim 1, characterized in that, In step S4, the data integrity verification result includes the unmodified data identifier and the integrity status code. The specific process for obtaining the data integrity verification result is as follows: S401. Based on each data item in the dynamic permission configuration file, assign an encrypted identifier and a sequence number, so that each data item is managed through a unique identifier and a sequence number, forming an encrypted sequence number file; S402. Based on the encrypted sequence number file, perform an integrity check on each data item, verify the consistency between the encryption identifier and the number, and obtain the integrity check result; S403. Based on the integrity verification result, compare the encryption identifiers of all data items to determine whether the data has been accessed or modified without authorization, and obtain the data integrity verification result.

6. The method for sharing power data based on privacy computing according to claim 1, characterized in that, In step S5, the specific process for obtaining privacy-preserving electricity data is as follows: S501. Based on the data integrity verification result, select a decryption key that matches the encrypted data, verify each key and its corresponding data identifier and verification information, and generate a matching key set; S502. Based on the matching key set, perform a decryption operation to convert each encrypted data item into its original format to obtain a decrypted dataset; S503. Based on the decrypted dataset, implement data privacy protection measures, and obtain privacy-protected power data through data desensitization and access control applications.

7. The method for sharing power data based on privacy computing according to claim 1, characterized in that, In step S6, the privacy computing service network includes data synchronization service functions, format conversion service functions, and protocol exchange interfaces. The specific process of building the privacy computing service network is as follows: S601. Match the service format requirements in the microservice architecture, adjust the data structure and content encoding of the privacy-protected power data, verify data compatibility and availability, and generate data that matches the microservices; S602. Based on the data of the matched microservices, configure the communication parameters and security authentication information of the gRPC protocol, perform data transmission encryption and authentication between services, establish a secure data exchange channel, and obtain the gRPC data exchange configuration. S603. Based on the gRPC data exchange configuration, use a symmetric encryption algorithm to calculate the encrypted data stream, connect the data processing flow and interaction protocol between services, and build a privacy computing service network.

8. A method for sharing power data based on privacy computing according to claim 7, characterized in that, In step S603, the calculation formula for the symmetric encryption algorithm is as follows: C=E k (P,t,α,n) Where C is the encrypted data, P is the original data, t is the timestamp, α is the security level factor, n is the data block number, k is the symmetric key, and E is the symmetric encryption algorithm.

9. A method for sharing power data based on privacy computing according to claim 1, characterized in that, The specific process of step S7 is as follows: S701. Through the privacy computing service network, a data synchronization mechanism is deployed to keep the power data encrypted on each node in the microservice architecture, and an encrypted data distribution mechanism is generated to ensure the uniform distribution of power data among all power market participants. S702. Based on the encrypted data distribution mechanism, monitor the encryption status during the data synchronization process, record the data reception status of each electricity market participant, and obtain the data synchronization monitoring record. S703. Based on the data synchronization monitoring records, complete the data reception and confirmation of all electricity market participants, and complete the secure sharing of electricity data.

10. An electronic device comprising a memory, a processor, and a program stored in the memory, characterized in that, When the processor executes the program, it implements the method as described in any one of claims 1-8.

Citation Information

Patent Citations

  • Electric power data sharing analysis system and method based on differential privacy

    CN117235770A

  • System for privacy protection during IoT secure data sharing and method thereof

    US20230087557A1