Virtual power plant user privacy protection method based on scene data accurate desensitization
By adopting a layered desensitization method of scenario-based data and a variety of desensitization technologies in virtual power plants, the challenge of data privacy protection of virtual power plants is solved, and efficient and secure data management and use are achieved.
Patent Information
- Application Number
- CN202411658817.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-20
- Publication Date
- 2025-03-14
AI Technical Summary
During the efficient operation of virtual power plants, they face the challenges of protecting user data privacy. The existing technology desensitization methods are difficult to meet the diverse and highly sensitive user data needs, and there are problems such as excessive or weak desensitization intensity and accuracy.
The hierarchical desensitization method based on scenario-based data is adopted, and sensitive information in the data is accurately identified through the sensitive attribute identification module. Combined with hierarchical analysis method and K-means clustering algorithm, suitable desensitization intensity and strategies are determined, and efficient data classification processing and access control are realized through blockchain, Merkle tree, IPFS and zero-knowledge proof technologies.
It realizes the efficiency of data usage while protecting user privacy, enhances data security and privacy protection capabilities, and is suitable for efficient and secure management of user data in virtual power plant environments.
Smart Images

Figure CN119622796A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of virtual power plant user privacy protection, and specifically to a virtual power plant user privacy protection method based on precise desensitization of scenario-based data. Background Art
[0002] With the continuous development of intelligent power systems, virtual power plants (VPPs) have gradually become an important means of power dispatching and energy management. Virtual power plants integrate distributed energy, energy storage devices and loads through intelligent control technology, and centrally manage and optimize scheduling to achieve optimal resource allocation. However, the efficient operation of virtual power plants depends on the collection and analysis of a large amount of user data, such as user electricity consumption behavior, equipment location, real-time power consumption, etc. The collection and use of this data inevitably involves the issue of user privacy protection.
[0003] Traditional privacy protection methods, mainly including de-identification and data encryption, can effectively protect user privacy, but they usually have problems such as excessive or weak desensitization intensity and accuracy. On the one hand, excessive desensitization may affect the availability of data and reduce the efficiency of business processes; on the other hand, insufficient desensitization may cause the risk of user privacy leakage. In addition, the user data of virtual power plants is diverse and highly sensitive, so the existing single desensitization method is difficult to meet the privacy protection needs of virtual power plants. Summary of the invention
[0004] In order to protect the privacy security of various information of virtual power plant users in multiple scenarios, the present invention proposes a privacy protection method for virtual power plant users based on scenario-based data accurate desensitization. Its purpose is to flexibly set the desensitization intensity and strategy according to the sensitivity of the data and the usage scenario through a layered desensitization method, so as to ensure that data privacy is protected while achieving accurate data desensitization operations, so as to solve the problem of virtual power plants improving user data privacy security while ensuring data usage efficiency.
[0005] The solution adopted by the present invention to solve the technical problem is:
[0006] The present invention provides a method for protecting user privacy of a virtual power plant based on scenario-based data accurate desensitization, the method comprising the following steps:
[0007] Step 1: Use a layered desensitization method to set different desensitization strengths according to the sensitivity of the data. Select different desensitization technologies for encryption processing or access control according to the purpose, usage scenario and business service requirements of the data to achieve privacy protection and accurate desensitization.
[0008] Step 2: Use the sensitive attribute identification module to accurately identify sensitive information in the data set and match it with a suitable desensitization layer, and then match the appropriate desensitization intensity and a desensitization strategy that meets the data usage scenario to ensure that data leakage can be effectively prevented and inefficient data usage or obstructed business processes caused by excessive desensitization can be avoided;
[0009] Step 3: Use data tiered storage and encrypted transmission to ensure that data at different levels are properly processed according to privacy protection requirements;
[0010] Step 4: Set reasonable data access control policies based on different scenarios and data sensitivity to ensure that users' privacy data will not be accessed or abused without authorization, while avoiding overly strict access control that affects the normal use efficiency of data.
[0011] Furthermore, in step 1, in order to solve the problem that different users have different degrees of protection for sensitive data and cannot measure the sensitivity of all attributes in the data set, a general clustering-based sensitive attribute identification model is established. The sensitivity of each attribute is calculated by the hierarchical analysis method, and then the good partitioning effect of the K-means clustering algorithm is considered to further identify and analyze the sensitive attributes, thereby obtaining a sensitive attribute set and a non-sensitive attribute set.
[0012] Furthermore, the hierarchical analysis method first constructs a hierarchical structure, the target layer is sensitive information N, and the criterion layer is all attribute fields a1, a2, ..., a in the structured data table. n ,N{a1,a2,...,a n}. Then construct a judgment matrix and compare all attributes of the criterion layer. ij Indicates attribute field a i with a j The sensitivity of the samples was compared and scored on a scale of 1 to 9.
[0013] Therefore, the judgment matrix obtained by comparing the attribute fields of the criterion layer is:
[0014]
[0015] Finally, the weights are calculated using the eigenvalue method. In this process, the maximum eigenvalue of the judgment matrix A and its corresponding eigenvector must be calculated first. Assume that the maximum eigenvalue is λ max , and its corresponding eigenvector is T = [t1t2 … t n ], then the corresponding weight vector is:
[0016] W=[W1 W2 ... W n ]
[0017]
[0018] The weights obtained through the hierarchical analysis method are used as the sensitivity of each attribute field. The higher the weight, the more sensitive the attribute is and the higher the degree of protection required. Conversely, the lower the weight, the less sensitive the attribute is and the lower the degree of protection required.
[0019] Furthermore, in step 2, a sensitive attribute recognition module is used to utilize a sensitivity partitioning method based on K-means. Clustering (K-means) analysis is an important unsupervised machine learning algorithm in data mining. Its principle is to divide data points with higher similarity into the same cluster and data points with lower similarity into different clusters based on the similarity principle, so that data points in the same cluster have higher similarity than data points in other clusters.
[0020] (K-means clustering) Assume that the data set T = {x1, x2, ··, x m}, which contains the data information that needs to be mined. According to the principle of the shortest distance, the data set can be divided into k clusters, and the clusters do not intersect with each other. The specific algorithm flow is as follows:
[0021] (1) First, k data points are randomly selected from the data set T as the initial center points of k clusters {μ1,μ2,…,μ k};
[0022] (2) Then calculate the distance between each remaining point in T and the above k cluster center points: d ij =||x i -μ j ||2, divide the data point into the cluster with the closest distance, that is, d ij The smallest cluster is found, and the center of the cluster is updated. The second step is repeated until all cluster centers are not updated or the number of iterations reaches the maximum value set.
[0023] (3) Finally, it is divided into k clusters C = {C1, C2, ..., C k}
[0024] Furthermore, in step 3, the data in the basic data layer has a lower impact on privacy, so its desensitization strength is relatively low. Therefore, desensitization strategy 1 is formulated as follows: the data in the basic data layer is encrypted by a hash function to generate a hash value. All hash values are combined into a Merkle tree to generate a root hash value. Each time new data is generated, the root hash value will be automatically updated to ensure the integrity of the entire data set. Any data tampering will cause the root hash value to change, and the system can quickly detect the node whose data has been modified. Privacy is ensured by verifying the root hash value of the Merkle tree without accessing all data.
[0025] Furthermore, the data in the business-critical data layer involves real-time scheduling, optimization and prediction, and the desensitization intensity is moderate. Therefore, the desensitization strategy is formulated as follows: on the basis of strategy 1, the RSA encryption algorithm is added to the data storage. The data after RSA encryption becomes unreadable ciphertext. Even if the desensitized data is accessed or leaked, it is difficult to obtain the original information. It needs to be decrypted in a specific scenario, and only authorized personnel holding the private key can decrypt the ciphertext. In addition, RSA encryption supports signature verification function, which can verify the integrity of the data. The signature can be used to confirm the source of the data and prevent the data from being tampered with.
[0026] Furthermore, data in the highly sensitive data layer requires strong desensitization processing, so the desensitization strategy is formulated as follows: Based on strategy 1, the data is encrypted using a homomorphic encryption algorithm. Homomorphic encryption allows the data to remain encrypted during the calculation process, thereby preventing sensitive data from being leaked to untrusted computing service providers. The elliptic curve encryption algorithm is used to protect data transmission. Compared with traditional public key encryption algorithms such as RSA, ECC can provide the same level of security, but uses a smaller key. This allows ECC to use less bandwidth and computing resources during transmission, and is particularly suitable for secure data transmission in environments with limited bandwidth or computing resources.
[0027] Furthermore, in step 4, the data in the basic data layer requires a low level of desensitization, so the merkle tree in the blockchain is directly used to verify and manage permissions, data integrity and security, and then complete access control. The Merkle tree can efficiently perform permission verification. When it is necessary to verify whether a user has a certain permission, the hash value of the corresponding node can be quickly calculated through the Merkle tree and compared with the root hash value. If the hash value matches, it means that the permission has not been tampered with and the user can access the resource. It is more efficient than the traditional method of directly storing all permission information, especially when processing a large amount of permission data. The data desensitization intensity in the business-critical data layer is moderate, so an attribute encryption access control method based on IPFS is adopted. The data owner specifies the access policy to control which users can read which parts of the information, that is, fine-grained access control is allowed for process data at the partial message level to achieve data access control in multi-party business processes. The data in the highly sensitive data layer requires strong desensitization processing, so the access control method of user attribute encryption verification based on zero-knowledge proof is adopted. By using zero-knowledge proof, anonymous verification can be achieved. Users can hide their identity attributes from all roles on the chain, and can prove that their attributes meet the decryption requirements without providing specific attribute information to the server. This not only protects the privacy of users, but also ensures that only users who meet specific attribute requirements can decrypt data.
[0028] Positive effect: the technical solution of the present invention has the following advantages:
[0029] A. Accurate identification of data sensitivity is achieved through layered desensitization methods and sensitive attribute identification modules. Selecting appropriate desensitization technology according to different business needs, usage scenarios and data purposes can not only protect user privacy, but also provide effective privacy protection under the premise of ensuring business service efficiency, avoiding efficiency loss caused by excessive desensitization.
[0030] B. Through layered storage and encrypted transmission, data is divided into basic data, business-critical data and highly sensitive data, and desensitization methods of different strengths such as hash encryption, RSA encryption and homomorphic encryption are used to achieve efficient classification and processing of data. This not only enhances data security, but also can flexibly respond to access needs of data of different sensitivities.
[0031] C. The sensitive attribute recognition model based on the hierarchical analysis method and K-means clustering algorithm is adopted, combined with the calculation of attribute sensitivity and clustering division, which effectively improves the recognition accuracy of data sensitive attributes. By calculating the attribute weight to distinguish fields with different sensitivities, accurate protection of highly sensitive attributes is achieved, while reducing over-protection of low-sensitivity attributes.
[0032] D. According to different scenarios and data sensitivity, a multi-level access control strategy based on blockchain Merkle tree, IPFS attribute encryption and zero-knowledge proof is adopted to ensure the access security of different data levels. The Merkle tree structure of the blockchain and IPFS attribute encryption not only ensure the integrity and security of permissions, but also meet the fine-grained access requirements of data in multi-party collaboration scenarios. Zero-knowledge proof technology provides anonymity of user identity and avoids the exposure of privacy during the access of sensitive data.
[0033] E. Verifying data integrity through the root hash value of the Merkle tree in the basic data layer, the signature verification function of RSA encryption in the business-critical data layer, and ECC transmission encryption in the highly sensitive data layer all effectively prevent the risk of data tampering during transmission and storage. The application of this method ensures the security and integrity of data throughout its life cycle.
[0034] The method of the present invention combines a variety of desensitization technologies through a layered desensitization method, and performs selective desensitization and encryption processing according to data sensitivity, purpose and usage scenario, ensuring data usage efficiency while protecting user privacy. The present invention also uses a sensitive attribute identification module to accurately identify sensitive information in the data, and realizes efficient data storage and transmission encryption through blockchain, Merkle tree and other technologies, thereby improving the security and privacy protection capabilities of user data in virtual power plants.
[0035] The method described in the present invention is based on different data scenarios and sensitivity levels, and achieves accurate desensitization and protection of user privacy data through technologies such as layered desensitization, sensitive attribute identification, layered storage encryption and access control. It is suitable for efficient and secure management of user data in a virtual power plant environment. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] In order to more clearly illustrate the specific embodiments of the present invention, the drawings required for use in the specific embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0037] Figure 1 is a flow chart of the method provided by the present invention;
[0038] Figure 2 It is a Merkle tree model diagram provided by the present invention;
[0039] Figure 3 The hash function SHA-256 provided by the present invention is DETAILED DESCRIPTION
[0040] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all of the embodiments. The components of the embodiments of the present invention generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the drawings is not intended to limit the scope of the claimed invention, but merely represents selected embodiments of the present invention. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0041] In the present invention, all embodiments, implementations and features of the present invention can be combined with each other without contradiction or conflict. In the present invention, conventional equipment, devices, components, etc. can be purchased commercially or made according to the contents disclosed in the present invention. In the present invention, in order to highlight the key points of the present invention, some conventional operations and equipment, devices, components are omitted or only briefly described.
[0042] See also Figures 1 to 3 , a method for protecting user privacy of a virtual power plant based on scenario-based data accurate desensitization, comprising the following steps:
[0043] [S001] Data encryption at the basic data layer: User data in the virtual power plant, such as the user's basic electricity consumption behavior, historical electricity consumption, etc., is encrypted through a hash function. Each piece of data (such as a user's energy consumption record within one second) will generate a hash value. The generated hash value is then stored as metadata for the virtual power plant system.
[0044] A hash function is a mathematical algorithm that converts data of any length into a hash value of a fixed length. The process is usually expressed as h = H(m), where H represents the hash function, m is the input message, and h is the generated hash value. These functions have the characteristics of one-way, compressibility, and randomness. The one-way property means that for a given hash value h, it is computationally infeasible to find an input message m that satisfies H(m) = h. This ensures the security of the hash function, making it impossible to easily restore the original data from the hash value; compressibility means that the hash function can compress input messages of any length into an output string of a fixed length, which helps with data storage and transmission efficiency; randomness means that an ideal hash function should exhibit randomness during operation, that is, for any two input messages m1 and m2, their hash values H(m1) and H(m2) should be different, which helps reduce the occurrence of hash conflicts.
[0045]
S002
[0046] [S003] Data encryption at the business-critical data layer. The RSA encryption algorithm is a well-known public key cryptographic algorithm, and its security depends on the difficulty of factoring large prime numbers. RSA =(Gen,Enc,Dec) is described as follows:
[0047] (1) Key generation algorithm Gen:
[0048] ① Calculate n=pq and φ(n)=(p-1)(q-1), where p and q are two large prime numbers.
[0049] ②Randomly select d and e so that gcd(e,φ(n)) and ed≡1modφ(n).
[0050] ③ Output the public key pk used for encryption RSA =(e,n) and the private key sk for decryption RSA =(d,n).
[0051] (2) Encryption algorithm Enc: It is a plaintext message space. Use the public key pk RSA =(e,n) Encrypt the plaintext m∈Μ to get the ciphertext
[0052] c=Enc(m,pk RSA )=m e (modn)
[0053] (3) Decryption algorithm Dec: using private key sk RSA =(d,n) decrypt c to get the plaintext
[0054] m=Dec(c,sk RSA )=c d (modn)
[0055] (4) Multiplication homomorphism: using public key pk RSA =(e,n) Encrypt two plaintexts m1, m2∈Μ to get ciphertext and The product of c1 and c2 is equal to the encrypted product of m1 and m2, as shown below:
[0056]
[0057]
S004
[0058] (1) Data Owner (DO): The data owner DO is responsible for uploading data and access control policies to SDM. SDM is responsible for data encryption and returning a globally unique message ID to DO. DO can send the message ID to users who need to share data.
[0059] (2) Data User (DU): If a DU wants to obtain plaintext data, it must first apply for an access key from the SKM. If the attributes of the DU meet the access control policy set by the DO, its access key can decrypt the ciphertext and obtain the relevant plaintext data.
[0060] (3) Attribute Authenticator (AC): This role owns a blockchain account and is responsible for managing user attribute information.
[0061] (4) Security Data Manager (SDM): This role has a blockchain account and is the core role of attribute encryption access control. It is responsible for generating attribute encryption key pairs (PK, MK) and using DO's access policy to attribute encrypt plaintext information. SDM is a stateless component that does not store user key-related information. After generating the master key pair (PK, MK) and ciphertext, it will package them together and send them to IPFS, and store the returned IPFS link in the smart contract.
[0062] (5) Security Key Manager (SKM): This role has a blockchain account and is the core role of attribute encryption access control. It is responsible for generating user access keys SK and using SK to decrypt ciphertext information. SKM is a stateless component and does not store information related to user keys. When a user sends a key generation request to SKM, SKM generates the user access key SK and returns it to the user. When a user sends a data decryption request to SKM, SKM will use the key SK to decrypt the ciphertext requested by the user.
[0063] (6) InterPlanetary File System (IPFS): IPFS is a decentralized file storage system that is responsible for storing encrypted information data and improving the scalability and security of the blockchain system.
[0064] (7) Smart Contract (SC): responsible for storing and querying user attributes and IPFS links of data ciphertext.
[0065] Besides, the designed method includes two channels, both of which are secure channels based on TLS.
[0066] (1) On-chain channel: This on-chain channel refers to the public chain, that is, the public blockchain network. All messages on this channel are sent and received in the form of transactions. The attribute authenticator AC, the security data manager SDM, and the security key manager SKM have blockchain accounts, which will connect to the nodes in the blockchain and implement attribute user query, obtain IPFS link and other functions by calling smart contracts.
[0067] (2) Off-chain channels: This off-chain channel refers to all channels that are not related to the public blockchain network. This channel includes the channel when the user initially registers with AC, accesses SDM and SKM to use attribute encryption services, and accesses IPFS.
[0068]
S005
[0069] (1) Key generation algorithm Gen:
[0070] ① Randomly select two large prime numbers p and q of equal length so that they satisfy gcd(pq,(1-p)(1-q))=1.
[0071] ② Calculate n=pq and λ=lcm(p-1,q-1).
[0072] ③Randomly select an integer So that gcd(n,L(g λ(modn 2 )))=1, where L(x)=(x-1) / n. ④ Obtain the public key pk Paillier =(n,g) and private key sk Paillier =(n,g).
[0073] (2) Encryption algorithm Enc: The plaintext message space is Random Selection For plaintext m∈Μ, use the public key pk paillier =(n,g) to calculate the ciphertext
[0074] c=Enc(m,pk paillier ) = g m r m (modn 2 ).(2.4)
[0075] (3) Decryption algorithm Dec: using private key sk paillier=(p,q) Decrypt the ciphertext c to get the plaintext
[0076]
[0077] (4) Additive homomorphism: For two plaintexts m1, m2∈Μ, use the public key pk paillier =(n,g) encrypted to get ciphertext and The product of c1 and c2 is equal to the result of encrypting the sum of m1 and m2, as shown below:
[0078]
[0079] (5) Multiplication homomorphism: Since it supports addition homomorphism, Paillier encryption also supports multiplication homomorphism. paillier =(n,g) encrypted to get ciphertext The product of plaintext m2∈Μ and c1 is equal to the result of encrypting the product of m1 and m2, that is:
[0080]
[0081] As a relatively new public key encryption technology, ECC can use a shorter key length while providing the same security as RSA, thereby reducing the amount of calculation and storage requirements and improving encryption and decryption efficiency. Therefore, according to the specific application scenario and security requirements, users can choose a suitable public key encryption algorithm to encrypt attribute information.
[0082] The principle of elliptic curve encryption algorithm can be explained as assuming that the private key and public key are d and Q respectively, that is, Q = dG, where G is the base point. It is very difficult to calculate d if G and dG are known on the elliptic curve. In other words, it is very difficult to calculate the private key if the public key and the base point are known.
[0083] The public key encryption process is to select a random number r and generate a ciphertext C from the message M. The ciphertext is a point pair, C = {rG, M + rQ}, where Q is the public key.
[0084] The private key decryption process is M+rQ-d(rG)=M+r(dG)-d(rG)=M, where d and Q are the private key and public key respectively.
[0085]
S006
[0086] (1) User: Here, the DO and DU mentioned in the previous sections are abstracted as general users. Users use anonymous identities PS to communicate in the system and use the services provided by SP. When a user wants to obtain data in the blockchain, he needs to use zero-knowledge proof to prove that he has the attributes required to decrypt the ciphertext, and after obtaining verification from SKM, he can obtain the access key SK that can decrypt the ciphertext.
[0087] (2) Attribute Authenticator (AC): This role has a blockchain account and is responsible for managing user (data owner, data user, etc.) attribute information and issuing user certificates. In order to prevent the certificate from leaking user privacy attributes, it does not contain user identity attributes (Primary Identity Attribute, PIA), such as ID number, and non-identifiable user general attributes (Minor Identity Attribute, MIA). In addition, in order to prevent AC from doing evil, AC does not know the user's pseudonym (PS). Because the user on the chain uses the pseudonym PS, the user's true identity is hidden from all roles on the chain. However, in order to prevent the problem of malicious users being difficult to hold accountable due to high anonymity, the blockchain smart contract is called based on the Shamir's Secret Sharing (SSS) algorithm to realize the accountability and traceability of malicious users.
[0088] (3) Service Provider (SP): Here, the SDM and SKM in the attribute encryption system are abstracted as general service providers. This role has a blockchain account and is responsible for providing services to users. In addition, the SP can require users to have specific identity attributes to use its services.
[0089] (4) Verifier (V): Responsible for collecting, verifying and packaging transactions into blocks and adding blocks to the blockchain. It is also responsible for keeping the user's SSS sharing information and PIA verification process.
[0090] (5) PS: represents the public blockchain address of users, validators, SPs, and ACs, which can sign and send transactions anonymously.
[0091] (6) Smart Contract (SC): mainly helps to store and query the identity attributes promised by users.
[0092] Besides, the designed method includes two channels, both of which are secure channels based on TLS.
[0093] (1) On-chain channel: This on-chain channel refers to the public chain, that is, the public blockchain network. All messages on this channel are sent and received in the form of transactions. The attribute authenticator AC, the security data manager SDM, and the security key manager SKM have blockchain accounts, which will connect to the nodes in the blockchain and implement attribute verification, accountability and traceability by calling smart contracts.
[0094] (2) Off-chain channel: This off-chain channel refers to all channels that are not related to the public blockchain network. This channel includes the channel when the user initially registers with the AC, accesses the SDM and SKM to use the attribute encryption service, and accesses the SP channel.
[0095]
S007
[0096] If a user is suspected of malicious behavior, the system can trigger the identity tracing process through a smart contract. This process requires relevant nodes in the blockchain network to provide the identity information fragments they store. When enough information fragments are collected, the system can reconstruct the user's complete identity information and conduct further investigation and processing based on it.
[0097] Principle of Threshold Secret Sharing Scheme (SSS Algorithm)
[0098] Secret representation: The secret is represented as a number S.
[0099] Parameter selection: Choose a threshold k (the number of shares required) and a total number of shares n. Usually, k ≤ n.
[0100] Random polynomial generation:
[0101] a. Generate a random polynomial f(x) of degree k-1, such that f(0=S) (i.e. the constant term is secret).
[0102] For example, f(x=S+a1x+a2x 2 +...+a {k-1} x {k-1} ), where a1, a2, a3....a k-1 are randomly generated coefficients.
[0103] Generate share:
[0104] For each participant i (from 1 to n), calculate f(i) and use the result as that participant's share.
[0105] Participant i’s share is (i,f(i))
[0106] Secret Reconstruction:
[0107] When at least k participants combine their shares, the polynomial f(x) can be reconstructed using Lagrange interpolation to obtain f(0) and regain the secret S.
[0108] Example 1
[0109] The present invention provides an embodiment, which is a method for accurately desensitizing data at the basic data layer. Specifically, the basic user data in the virtual power plant is protected for privacy and verified for data integrity through a Merkle tree and a hash function.
[0110] The present invention comprises the following steps:
[0111] Step 1: Data processing: the energy consumption data of each user in the virtual power plant is processed by a hash function such as Figure 3 The data is encrypted as shown to generate a hash value. A corresponding hash value is calculated for each user's one-second data block (such as load, power generation, response status, etc.).
[0112] Step 2: Merkle tree construction, combine all users' hash values into a Merkle tree and generate a root hash value. Each time new data is generated, the root hash value will be automatically updated to ensure the integrity of the entire data set. Any data tampering will cause the root hash value to change, and the system can quickly detect the node where the data has been modified.
[0113] In step 3, the verification process, the system can ensure that the user data has not been tampered with by verifying the root hash value of the Merkle tree. At the same time, it can verify the integrity of local information through a small amount of additional data without accessing all data to ensure privacy.
[0114] In step 1, according to the prepared data to be hashed, data filling, block processing, initialization of hash value, compression function, output of hash value and other operations are performed. In combination with the Merkle tree, it is specifically expressed as:
[0115] 1) Leaf node hash calculation
[0116] For each transaction data T i , calculate its SHA-256 hash value:
[0117] H i =SHA-256(T i ), for i=1,2,....,n
[0118] Where n is the total number of transaction data, H i is the hash value of the i-th leaf node.
[0119] 2) Parent node hash calculation
[0120] For each pair of adjacent leaf nodes, hash H 2j-1 and H 2j , calculate the hash value of the parent node:
[0121] P j =SHA-256(H 2j-1 ||H 2j ), for j=1,2,...,m
[0122] Where m=n / 2 is the number of parent nodes, and the symbol || represents the connection operation.
[0123] 3) Root node hash calculation
[0124] Continue calculating upward until the root node hash value R of the Merkle tree is generated:
[0125] R = SHA-256(P1||P2||...||P k ), where k = m / 2
[0126] In step 2, the specific construction process of the Merkle tree structure in this case is as follows:
[0127] 1) Store the input data in order in k n ×k nIf the number of input data is less than the number of squares, the integer 0 will be stored in the square without data.
[0128] 2) Select the hash encryption function SHA256 to encrypt each stored data and obtain a series of k n ×k n A square grid, n ×k n The encrypted data is used as the first-level leaf node of the Merkle tree.
[0129] 3) Select a convolution kernel of size k×k, which stores k×k set integers: S1, S2, …, S k×k The second layer is convolved with a step size of k. The result of each convolution calculation is saved in the corresponding position of the next layer, and a k n-1 ×k n-1 The square matrix serves as the second layer of the Merkle tree.
[0130] 4) Repeat step 3) to get a k n-2 ×k n-2 , as the third layer of the Merkle tree.
[0131] 5) Repeat step 3) until you get a 1×1 matrix as the last layer of the Merkle tree. Then stop the calculation, and this value is the root node value of the Merkle tree.
[0132] In step 3, according to the verification process, a transaction T is to be verified. k Is it in the Merkle tree? Calculate its hash value:
[0133] H k =SHA-256(T k )
[0134] Get with H k The hash value of the related sibling node and the hash value of the parent node. Let H k+1 is the hash of the sibling node, P j is the hash of the parent node:
[0135] P j =SHA-256(H k ||H k-1 )
[0136] Combine the parent node hash value with the hash values of other parent nodes and continue upward to calculate the root hash:
[0137] R1=SHA-256(P j ||P j-1||...)
[0138] Finally, check whether the calculated root node hash R1 is equal to the root node hash R of the Merkle tree:
[0139]
[0140] Example 2
[0141] Based on the same inventive concept, the embodiment of the present invention also provides a data access control method for high desensitization intensity. Specifically, it is considered to use zero-knowledge proof to verify the participation qualification of virtual power plant users without exposing their identity and detailed behavior information, so as to achieve efficient privacy protection and identity authentication.
[0142] The present invention comprises the following steps:
[0143] Step 1, application of zero-knowledge proof: When the virtual power plant needs to provide auxiliary services, the user needs to prove to the system that he has the ability to provide services (such as load response capability, backup power supply, etc.). The user proves through the zero-knowledge proof attribute encryption mechanism without providing specific identity information or behavior data. The user generates a zero-knowledge proof using encryption to prove that he meets the service requirements while protecting his privacy.
[0144] Step 2, assisted by encryption algorithms: To further ensure the security of the verification process, zero-knowledge proof is combined with elliptic curve cryptography (ECC) to ensure that the generated zero-knowledge proof is secure and cannot be reverse-engineered to reveal the user's identity information or behavior details.
[0145] Step 3, auxiliary service execution: Once the user passes the zero-knowledge proof verification, the virtual power plant will record their participation qualifications and execute the smart contract through the blockchain for service settlement. Users do not need to worry about privacy leakage, and the system can also ensure that participants have actual execution capabilities.
[0146] In step 1, the user has certain auxiliary service capabilities, such as load response capability L and backup power capacity B. These capability data need to be proven to meet the minimum requirements of the system L min and B min , but the specific value does not need to be disclosed. The user's capability data is defined as: c = {L, B}.
[0147] Users encrypt their capability data to ensure the privacy and integrity of the data. The commitment function C used can be expressed as:
[0148] C(c,r)=H(c||r)
[0149] Among them, H is a secure hash function, and r is a random number, which is used to ensure the randomness and unpredictability of the commitment.
[0150] The user generates a zero-knowledge proof to prove that their ability data meets the system requirements L≥L min and B≥B min , without revealing the specific values of L and B. The zero-knowledge proof can be formalized as:
[0151]
[0152] Select the commitment value: The user selects a random number r and calculates the commitment value C(c,r).
[0153] Generate the proof: Using the AH-ZKP protocol, the user generates a proof π to prove that their ability data meets the above inequality constraints without revealing the specific values of L and B.
[0154] The user submits the commitment value C(c,r) and the zero-knowledge proof π to the blockchain network together. At this time, the commitment value ensures the privacy of the data, while the proof π ensures that the ability data meets the system requirements.
[0155] In step 2, the RSA encryption algorithm used consists of 6 steps. It is expressed as:
[0156] 1) The user randomly selects 2 large prime numbers λ1, λ2 and secretly stores them.
[0157] 2) Multiply the 2 large prime numbers λ1, λ2 to obtain the modulus K. The formula is as follows:
[0158] K = λ1λ2
[0159] μ(K) = (λ1 - 1)(λ2 - 1)
[0160] In the formula, μ(K) represents the Euler's totient function of K. The selection of the modulus plays an important role in user data encryption, aiming to limit the key length and the range of values during the encryption process.
[0161] 3) Set the decryption private key of the data to a, where 1 < a < μ(K) and it satisfies:
[0162] F(a,μ(K)) = 1
[0163] In the formula, F(a,μ(K)) represents the greatest common divisor of the private key a and μ(K).
[0164] 4) According to the private key a in step 3), calculate the service data m using the following formula, and set m as the public key and make it public.
[0165] m×a (mod μ(K)) = 1
[0166] 5) Encrypt the data ciphertext x according to the encrypted public key m. The specific encryption method is as follows:
[0167] y=x m (modK)
[0168] The encrypted ciphertext is y.
[0169] 6) Based on the ciphertext y calculated in step 5) and the
[0170] Private key a, then according to the ciphertext y and private key a, the user executes the following formula and decrypts the ciphertext of the virtual power plant data. The result is as follows:
[0171] x=y a (modK)
[0172] In step 3, after the system (verifier) receives C(c, r) and π submitted by the user, it verifies the validity of the zero-knowledge proof to confirm that the user is indeed capable of providing auxiliary services without knowing the specific values of L and B. The verification process can be expressed as:
[0173]
[0174] If the verification is successful, the system confirms that the user has the ability to provide the corresponding auxiliary services and records the corresponding information in the blockchain.
[0175] Once the verification is passed, the user's commitment value C(c,r) and proof π will be packaged into a new block to ensure the immutability of the transaction and the privacy of the data.
[0176] Example 3
[0177] Based on the same inventive concept, an embodiment of the present invention also provides a reliability method for ensuring the privacy and security system of virtual power plant users. Specifically, in order to cope with system crashes or node failures, the Shamir secret sharing algorithm is used to split and store user sensitive data (such as encryption keys, authentication information) on multiple nodes. This mechanism ensures that even if some nodes fail, the system can recover key data and ensure the continued operation of the system. In addition, the Shamir secret sharing algorithm is also used for authority allocation to ensure that only users or nodes with sufficient authority can access and control the system. And if the user violates the system policy, the system can trace back to his true identity through zero-knowledge proof and SSS algorithm, thereby ensuring the security of the system and preventing malicious users from abusing the system.
[0178] The specific steps are as follows:
[0179] Step 1, key segmentation and distribution: The key data of the virtual power plant (such as user sensitive information, authentication keys, etc.) is segmented through the Shamir secret sharing algorithm and stored on different nodes. Each node only stores part of the key fragment, and only when enough key fragments are obtained can the complete data be restored.
[0180] Step 2: Response to special situations: If some nodes in the system fail due to hardware failure or attack, the system can reassemble the key through the remaining node fragments to ensure the integrity and security of critical data. In the event of partial node failure, the system can still operate normally without affecting the daily operation of the virtual power plant.
[0181] Step 3, authority control and identity tracing: The Shamir secret sharing algorithm is also used for authority control of virtual power plants. Only users or administrators with sufficient authority can access and control these distributed keys, thus ensuring the security of the system. In the event of a failure or attack, the system rebuilds authority and resumes operation through the remaining nodes.
[0182] In steps 1, 2, and 3, Shamir's (k, n) secret sharing algorithm divides the secret S into n sub-secrets. Any k sub-secrets can restore S, while any k-1 sub-secrets cannot restore S.
[0183] Encryption process: Assume there is a secret S, and take any random number a1, a2, ..., a k-1 Let a0 = S, and construct the polynomial as follows: f(x) = a0 + a1x + a2x 2 +...+a k-1 x k-1 , where all operations are performed in the finite field F, and any n numbers x1, x2, ..., x n Substitute the polynomials into the equations to get f(x1), f(x2),…, f(x n ), (x1,f(x1)),(x2,f(x2)),…,(x n ,f(x n )) are stored on n servers respectively.
[0184] Decryption process: Take any data from k servers, assuming that they are {x1, y1}, {x2, y2}, …, {x k ,y k} and solve for the polynomial coefficients.
[0185]
[0186]
[0187]
[0188] This can be expressed using matrix multiplication as follows:
[0189]
[0190] Find a1, a2, …, a k-1 Then we can construct the polynomial f(x)=a0+a1x+a2x 2 +...+a k-1 x k-1 , substituting x=0 into the polynomial, we can find the original secret S=a0.
[0191] Anything not described in the present invention is applicable to the prior art.
[0192] Obviously, the above embodiments are merely examples for the purpose of clear explanation, and are not intended to limit the implementation methods. For those skilled in the art, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to list all the implementation methods here. However, the obvious changes or modifications derived therefrom are still within the scope of protection of the present invention.
Claims
1. A method for protecting user privacy of virtual power plants based on scenario-based data accurate desensitization, characterized in that: The method comprises the following steps: Step 1: Use a layered desensitization method to set different desensitization strengths according to the sensitivity of the data. Select different desensitization technologies for encryption processing or access control according to the purpose, usage scenario and business service requirements of the data to achieve privacy protection and accurate desensitization. Step 2: Use the sensitive attribute identification module to accurately identify sensitive information in the data set and match it with a suitable desensitization layer, and then match the appropriate desensitization intensity and a desensitization strategy that meets the data usage scenario to ensure that data leakage can be effectively prevented and inefficient data usage or obstructed business processes caused by excessive desensitization can be avoided; Step 3: Use data tiered storage and encrypted transmission to ensure that data at different levels are properly processed according to privacy protection requirements; Step 4: Set reasonable data access control policies based on different scenarios and data sensitivity to ensure that users' privacy data will not be accessed or abused without authorization, while avoiding overly strict access control that affects the normal use efficiency of data.
2. According to claim 1, a method for protecting user privacy of a virtual power plant based on scenario-based data accurate desensitization is characterized in that: The step 1 adopts a layered desensitization method, which is mainly divided into a basic data layer, including device ID, user's basic electricity consumption behavior, historical electricity consumption and other data; Business-critical data layer, including real-time electricity, load forecast, demand response and other data; A highly sensitive data layer, including data such as user personal identity, device location, family member information, etc.
3. According to claim 2, a method for protecting user privacy of a virtual power plant based on scenario-based data accurate desensitization is characterized in that: The data in the basic data layer has a low impact on privacy, so its desensitization intensity is low, and basic de-identification processing such as hash processing and field desensitization can be adopted; The data in the business-critical data layer involves real-time scheduling, optimization, and prediction. The desensitization intensity is moderate. RSA encryption, elliptic curve encryption and other technologies can be used to ensure that the data cannot be traced back to specific users. Data in the highly sensitive data layer requires strong desensitization processing and can be protected using technologies such as encrypted storage, homomorphic encryption, and zero-knowledge proof.
4. According to claim 1, a method for protecting user privacy of a virtual power plant based on scenario-based data accurate desensitization is characterized in that: In step 2, a sensitive attribute identification module is used to first calculate the weights of all its attributes using the hierarchical analysis method, and quantify them into sensitivity, thereby converting qualitative decisions into quantitative data representation.
5. According to claim 4, a method for protecting user privacy of a virtual power plant based on scenario-based data accurate desensitization is characterized in that: The sensitivity of each attribute is calculated by the hierarchical analysis method, and then the good partitioning effect of the K-means clustering algorithm is considered to further identify and analyze the sensitive attributes, so as to obtain the sensitive attribute set and the non-sensitive attribute set.
6. According to claim 1, a method for protecting user privacy of a virtual power plant based on scenario-based data accurate desensitization is characterized in that: The data hierarchical storage in step 3 adopts the application of Merkle tree in blockchain to achieve efficient data storage, verification and security protection.
7. According to claim 6, a method for protecting user privacy of a virtual power plant based on scenario-based data accurate desensitization is characterized in that: The desensitized data is encrypted through a hash function and stored in a Merkle tree and aggregated layer by layer to generate a unique "Merkle root" and store it on the blockchain to ensure the data's immutability and integrity.
8. According to claim 1, a method for protecting user privacy of a virtual power plant based on scenario-based data accurate desensitization is characterized in that: The data encryption transmission in step 3 selects the elliptic encryption algorithm so that only the recipient with the private key can decrypt the data, preventing the data from being stolen or tampered with during the transmission process.
9. According to claim 1, a method for protecting user privacy of a virtual power plant based on scenario-based data accurate desensitization is characterized in that: In step 4, an attribute-based access control method is adopted to implement fine-grained access control on blockchain applications and reduce computational overhead.
10. According to claim 1, a method for protecting user privacy of a virtual power plant based on scenario-based data accurate desensitization is characterized in that: The attribute encryption access control based on zero-knowledge proof adopted in step 4 is suitable for scenarios with high desensitization intensity.
Citation Information
Cited By
User privacy data encryption protection method for commodity supply chain platform
CN119918080A
A user privacy data encryption protection method of a commodity supply chain platform
CN119918080B
Financial big data information processing system based on block chain
CN120910886A