Electric energy meter data desensitization storage method, system and device based on differential privacy
Patent Information
- Application Number
- CN202610778327.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-02
- Publication Date
- 2026-09-15
- Estimated Expiration
- 2046-06-02
AI Technical Summary
[0004]本申请通过提供基于差分隐私的电能表数据脱敏存储方法、系统及设备,通过接收电能表原始用电数据并按属性分类为刚性计费数据与柔性分析数据,利用加密密钥对两类数据联合加密,生成保持原始数据点欧氏距离不变的等距变换密文,生成有界随机扰动噪声并叠加至密文的柔性分析数据段完成脱敏,将脱敏后的柔性密文与刚性计费密文重构整合为融合存储数据包,上传云端存储等技术手段,解决了现有电能表数据存储存在的无法对同一数据源中的不同类型数据实施差异化安全保护的技术问题,达到了在同一数据存储体系中兼顾计费精度与用户行为隐私的技术效果
[0014] This application also provides an electronic device, including: a memory for storing executable instructions; and a processor for implementing a differential privacy-based data anonymization storage method for electricity meters when executing the executable instructions stored in the memory.
Smart Images

Figure CN122333505B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing, and in particular to a method, system and device for de-identifying and storing electricity meter data based on differential privacy. Background Technology
[0002] Electricity consumption data collected by electricity meters is the core basis for electricity billing and grid operation analysis in the power system. Its integrity and accuracy directly affect the economic benefits and power supply service quality of power companies. Currently, the industry generally uses plaintext storage or unified encryption of all data to store and manage electricity meter data, including directly storing the collected raw data into a relational database or using a general encryption algorithm to uniformly encrypt and decrypt all data. However, existing methods lack the ability to differentiate between the absolute accuracy required for billing data and the privacy protection required for behavioral data. This leads to either introducing errors into billing data to protect privacy, resulting in settlement disputes, or completely abandoning privacy protection for behavioral data to ensure billing accuracy. It is impossible to simultaneously address the different security needs of both types of data within the same storage system.
[0003] Currently, in related technologies, there is a technical problem with data storage for electricity meters: the inability to implement differentiated security protection for different types of data from the same data source. Summary of the Invention
[0004] This application provides a method, system, and device for desensitizing and storing electricity meter data based on differential privacy. It receives raw electricity consumption data from the meter and categorizes it into rigid billing data and flexible analysis data according to their attributes. It then uses an encryption key to jointly encrypt both types of data, generating equidistant transformed ciphertext that maintains the Euclidean distance between the original data points. Bounded random perturbation noise is generated and superimposed onto the flexible analysis data segment of the ciphertext to complete the desensitization. Finally, the desensitized flexible ciphertext and rigid billing ciphertext are reconstructed and integrated into a fused storage data package, which is then uploaded to cloud storage. These technical means solve the technical problem of existing electricity meter data storage methods that cannot implement differentiated security protection for different types of data from the same data source. This achieves the technical effect of balancing billing accuracy and user behavior privacy within the same data storage system.
[0005] This application provides a method for de-identifying and storing electricity meter data based on differential privacy, comprising: receiving raw electricity consumption data collected by an electricity meter; classifying the raw electricity consumption data into data attributes to obtain rigid billing data and flexible analysis data; jointly encrypting the rigid billing data and the flexible analysis data based on an encryption key to obtain equidistant transformed ciphertext, wherein the equidistant transformed ciphertext maintains the Euclidean distance between the raw electricity consumption data points in the ciphertext space; generating bounded random perturbation noise; adding the bounded random perturbation noise to the flexible analysis data portion of the equidistant transformed ciphertext to obtain de-identified perturbation ciphertext; reconstructing the data using the de-identified perturbation ciphertext and the rigid billing data portion of the equidistant transformed ciphertext to obtain a fused storage data packet; and uploading the fused storage data packet to the cloud for storage.
[0006] In a possible implementation, the following process is performed: the encryption key is constructed based on a chaotic system and a sparse orthogonal matrix.
[0007] In a possible implementation, the following processing is performed: a chaotic mapping model is selected, chaotic parameters and initial values are set, a pseudo-random sequence is generated iteratively through the chaotic mapping model, and the pseudo-random sequence is copied and spliced to construct a translation matrix; a random square matrix is generated, and the rows or columns of the random square matrix are randomly arranged using a random shuffling algorithm to obtain a permutation matrix, wherein the random square matrix is a square matrix with the absolute value of 1 for its diagonal elements; a sparse orthogonal matrix construction algorithm is called to perform feature dimension analysis on the original electricity consumption data to construct a sparse orthogonal matrix; the permutation matrix, the sparse orthogonal matrix, and the translation matrix are combined to obtain the encryption key.
[0008] In a possible implementation, a sparse orthogonal matrix construction algorithm is invoked to parse the feature dimensions of the original electricity consumption data, construct a sparse orthogonal matrix, and perform the following processing: the sparse orthogonal matrix construction algorithm is invoked to divide the feature dimensions of the original electricity consumption data into multiple small-scale dimension groups, and each small-scale dimension group in the multiple small-scale dimension groups is orthogonalized to obtain multiple small-scale orthogonal matrices; the multiple small-scale orthogonal matrices are arranged along the diagonal, and the elements outside the diagonal are set to zero to obtain a sparse orthogonal matrix.
[0009] In a possible implementation, bounded random perturbation noise is generated and added to the flexible analysis data portion of the isometric transformation ciphertext to obtain desensitized perturbation ciphertext. The following processing is then performed: the Euclidean distance between all data point pairs in the isometric transformation ciphertext is calculated, and the minimum absolute value in the calculation result is taken as the minimum distance difference; a theoretical bound on the noise standard deviation is determined based on the minimum distance difference, wherein the theoretical bound on the noise standard deviation is proportional to the minimum distance difference; bounded random perturbation noise following a Gaussian distribution is generated using the theoretical bound on the noise standard deviation as a constraint; and the bounded random perturbation noise is added to each dimension of the data corresponding to the flexible analysis data portion to obtain the desensitized perturbation ciphertext.
[0010] In a possible implementation, the Euclidean distance between all pairs of data points in the isometric transformation ciphertext is calculated, and the minimum absolute value in the calculation result is taken as the minimum distance difference. The following processing is then performed: a locality-sensitive hash data structure is constructed, and multiple independent hash tables are created, where each hash table uses a set of independent hash functions; for each data point in the isometric transformation ciphertext, its bucket number in the multiple hash tables is calculated and stored in the corresponding bucket; for each data point, the set of candidate points in the same bucket is queried, and the true distance between the data point and each candidate point in the set of candidate points is calculated, and multiple minimum distance values are extracted; the minimum absolute value among the multiple minimum distance values is extracted and taken as the minimum distance difference.
[0011] In a possible implementation, the rigid billing data portion in the desensitized perturbation ciphertext and the equidistant transformation ciphertext is reconstructed to obtain a fused storage data packet. The following processing is then performed: extracting the flexible analysis data ciphertext portion that has undergone bounded random perturbation processing from the desensitized perturbation ciphertext; extracting the rigid billing data ciphertext portion that has not undergone bounded random perturbation processing from the equidistant transformation ciphertext; and concatenating the flexible analysis data ciphertext portion and the rigid billing data ciphertext portion according to the original data dimension order in the original electricity consumption data to restore the complete data dimension structure and obtain the fused storage data packet.
[0012] In a possible implementation, the following process is performed: in response to a data query request in the cloud, the stored fused storage data packet is decrypted by inverse transformation to obtain de-identified electricity consumption data.
[0013] This application also provides a data anonymization and storage system for electricity meter data based on differential privacy, comprising: a data attribute classification module for receiving raw electricity consumption data collected by the electricity meter, classifying the raw electricity consumption data into data attributes to obtain rigid billing data and flexible analysis data; a joint encryption module for jointly encrypting the rigid billing data and the flexible analysis data based on an encryption key to obtain equidistant transformed ciphertext, wherein the equidistant transformed ciphertext maintains the Euclidean distance between the original electricity consumption data points in the ciphertext space; a random perturbation module for generating bounded random perturbation noise, adding the bounded random perturbation noise to the flexible analysis data portion of the equidistant transformed ciphertext to obtain anonymized perturbation ciphertext; and a data reconstruction module for reconstructing the data between the anonymized perturbation ciphertext and the rigid billing data portion of the equidistant transformed ciphertext to obtain a fused storage data packet, and uploading the fused storage data packet to the cloud for storage.
[0014] This application also provides an electronic device, including: a memory for storing executable instructions; and a processor for implementing a differential privacy-based data anonymization storage method for electricity meters when executing the executable instructions stored in the memory.
[0015] The proposed method, system, and device for de-identifying and storing electricity meter data based on differential privacy, as described in this application, first receives raw electricity consumption data collected by the electricity meter. The raw electricity consumption data is then classified according to data attributes to obtain rigid billing data and flexible analysis data. Next, the rigid billing data and the flexible analysis data are jointly encrypted using an encryption key to obtain equidistant transformed ciphertext. The equidistant transformed ciphertext maintains the Euclidean distance between the original electricity consumption data points in the ciphertext space. Then, bounded random perturbation noise is generated and added to the flexible analysis data portion of the equidistant transformed ciphertext to obtain de-identified perturbation ciphertext. Finally, the de-identified perturbation ciphertext and the rigid billing data portion of the equidistant transformed ciphertext are reconstructed to obtain a fused storage data packet, which is then uploaded to the cloud for storage. The method, system, and device proposed in this application achieve the technical effect of balancing billing accuracy and user behavior privacy within the same data storage system. Attached Figure Description
[0016] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings of the embodiments of the present invention will be briefly described below. Flowcharts are used in this application to illustrate the operations performed by the system according to the embodiments of the present application. It should be understood that the preceding or following operations are not necessarily performed precisely in sequence. Instead, various steps can be processed in reverse order or simultaneously as needed. Furthermore, other operations can be added to these processes, or one or more steps can be removed from these processes.
[0017] Figure 1 This is a flowchart illustrating the method for de-identifying and storing electricity meter data based on differential privacy, as provided in an embodiment of this application.
[0018] Figure 2 This is a schematic diagram of the structure of a differential privacy-based energy meter data desensitization and storage system provided in an embodiment of this application.
[0019] Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.
[0020] Figure labeling: Data attribute classification module 10, joint encryption module 20, random perturbation module 30, data reconstruction module 40. Detailed Implementation
[0021] The above description is only an overview of the technical solution of this application. In order to better understand the technical means of this application and to implement it in accordance with the contents of the specification, and in order to make the above and other objects, features and advantages of this application more obvious and understandable, the following are specific embodiments of this application.
[0022] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description of this application will be provided in conjunction with the accompanying drawings. The described embodiments should not be considered as limitations on this application. All other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0023] In the following description, references to "some embodiments" describe a subset of all possible embodiments; however, it is understood that "some embodiments" may be the same or different subsets of all possible embodiments and may be combined with each other without conflict. The terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or server that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or modules not explicitly listed or inherent to such processes, methods, products, or devices. Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only.
[0024] This application provides a method for de-identifying and storing electricity meter data based on differential privacy, such as... Figure 1 As shown, the method includes:
[0025] Step S100: Receive raw electricity consumption data collected by the electricity meter, classify the raw electricity consumption data by data attributes, and obtain rigid billing data and flexible analysis data.
[0026] Specifically, the raw electricity consumption data collected by the electricity meter is input in the form of a structured data table, with each record corresponding to a multi-dimensional measurement value at a specific point in time. For the received raw electricity consumption data, the data attribute tags for each data dimension are read one by one. These data attribute tags are pre-stored in the electricity meter's data dictionary, and each tag identifies whether the corresponding data dimension belongs to the metering or monitoring category. Based on the data attribute tags, metering data dimensions that have a direct multiplicative-accumulator relationship with the electricity bill amount are classified as rigid billing data, specifically including cumulative electricity consumption and incremental electricity consumption. Simultaneously, monitoring data dimensions related to grid operation status monitoring or user electricity consumption behavior analysis are classified as flexible analysis data, specifically including active power, reactive power, voltage, and current. After the above classification, rigid billing data and flexible analysis data share the same encryption key, and the relative positional relationship between the two types of data in the ciphertext space remains unchanged during subsequent processing.
[0027] Step S200: The rigid billing data and the flexible analysis data are jointly encrypted based on the encryption key to obtain equidistant transformed ciphertext, wherein the equidistant transformed ciphertext maintains the Euclidean distance between the original electricity consumption data points in the ciphertext space, and the encryption key is constructed based on a chaotic system and a sparse orthogonal matrix.
[0028] Specifically, joint encryption is a holistic encryption method, which involves concatenating rigid billing data and flexible analysis data into a complete data matrix according to their original data dimensions. This complete matrix is then subjected to a unified matrix multiplication linear transformation to ensure that the two types of data maintain their predefined relative positions in the ciphertext space. Iso-distance transformation ciphertext means that after the original data matrix undergoes an orthogonal transformation using the encryption key, the Euclidean distance between any two data points (i.e., the row vectors of the data matrix) in the ciphertext space is completely equal to the Euclidean distance in the original space. The encryption key is constructed from a pseudo-random sequence generated by a chaotic system and a sparse orthogonal matrix. The construction of the encryption key and the joint encryption process are specifically implemented through steps S210 to S240.
[0029] In one possible implementation, step S200 further includes step S210: selecting a chaotic mapping model, setting chaotic parameters and initial values, iteratively generating a pseudo-random sequence through the chaotic mapping model, and copying and concatenating the pseudo-random sequence to construct a translation matrix. Specifically, a chaotic mapping model is selected as the pseudo-random sequence generator. For example, a logistic chaotic mapping is selected, with the chaotic parameter set to 3.99 and the initial value set to 0.5. A pseudo-random sequence of a preset length is iteratively generated through this chaotic mapping model. This pseudo-random sequence is repeatedly copied and concatenated end-to-end to construct a translation matrix that matches the dimensions of the original electricity consumption data. The translation matrix is a column vector with the same number of rows as the total number of feature dimensions of the original data. Each element value of this matrix is directly taken from the concatenated pseudo-random sequence and is used to add a translation amount to the data in each dimension during encryption.
[0030] Step S220: Generate a random square matrix. Use a random shuffling algorithm to randomly arrange the rows or columns of the random square matrix to obtain a permutation matrix. The random square matrix is a square matrix where the absolute value of each diagonal element is 1. Specifically, construct a permutation matrix. The permutation matrix is a square matrix with only 0 or 1 elements, where each row has exactly one 1 and each column has exactly one 1. Its function is to reorder the rows or columns of the data matrix through matrix multiplication. First, generate an identity matrix with the same number of feature dimensions as the original electricity consumption data. This identity matrix is a square matrix where all diagonal elements are 1 and all off-diagonal elements are 0. Then, use a random shuffling algorithm to randomly arrange the rows of this identity matrix. Specifically, the Fisher-Yers shuffling algorithm is used: traverse each row of the identity matrix. For the current row index i (counting from 0), generate a random integer j between i and the total number of rows minus one. Swap all elements in the i-th row with all elements in the j-th row. After traversal, the resulting matrix is a permutation matrix. In another implementation, the same random shuffling algorithm can be used to randomly arrange the columns of the identity matrix to obtain a permutation matrix. This permutation matrix serves as part of the encryption key and is used to shuffle the dimensional order of the original electricity consumption data.
[0031] Step S230: The sparse orthogonal matrix construction algorithm is invoked to analyze the feature dimensions of the original electricity consumption data and construct a sparse orthogonal matrix. Specifically, the sparse orthogonal matrix is a large square matrix in which most elements are 0, and non-zero elements only appear in blocks near the diagonal. The core of this algorithm is to decompose the encryption problem of the high-dimensional feature space into the encryption problem of multiple low-dimensional subspaces. The low-dimensional subspaces ensure the distance preservation property through orthogonal matrices, and the orthogonal matrices of each subspace are combined into a whole sparse orthogonal matrix by block diagonalization. This matrix is an orthogonal matrix with fewer than a preset threshold of non-zero elements, that is, the transpose of the matrix is equal to its inverse matrix.
[0032] Step S240: Combine the permutation matrix, the sparse orthogonal matrix, and the translation matrix to obtain the encryption key. Specifically, the encryption key is a composite transformation matrix, which is calculated as follows: first, multiply the original data matrix by the permutation matrix to achieve dimensional rearrangement; then multiply by the sparse orthogonal matrix to achieve isometric transformation; finally, add the translation matrix to complete the final ciphertext generation.
[0033] In one possible implementation, a sparse orthogonal matrix construction algorithm is invoked to parse the feature dimensions of the original electricity consumption data and construct a sparse orthogonal matrix. Step S230 further includes step S231, invoking the sparse orthogonal matrix construction algorithm to divide the feature dimensions of the original electricity consumption data into multiple small-scale dimension groups, and performing orthogonalization processing on each of the multiple small-scale dimension groups to obtain multiple small-scale orthogonal matrices. Specifically, the number of feature dimensions of the original electricity consumption data is obtained, and this number is denoted as the total number of feature dimensions. The parity of the total number of feature dimensions is determined. When the total number of feature dimensions is even, a two-dimensional orthogonal matrix with half the total number of feature dimensions is generated. Each two-dimensional orthogonal matrix is obtained as follows: two linearly independent two-dimensional vectors are randomly generated, and the two two-dimensional vectors are subjected to Schmidt orthogonalization to obtain an orthonormal basis. The orthonormal basis is used as the column vectors of the matrix to form a two-dimensional orthogonal matrix. When the total number of feature dimensions is odd, a three-dimensional orthogonal matrix and several two-dimensional orthogonal matrices are generated. The three-dimensional orthogonal matrix is obtained as follows: three linearly independent three-dimensional vectors are randomly generated, and the three-dimensional vectors are subjected to Schmidt orthogonalization to obtain an orthonormal basis. The orthonormal basis is used as the column vectors of the matrix to form a three-dimensional orthogonal matrix.
[0034] Step S232: Arrange the multiple small-scale orthogonal matrices along the diagonal, and set all elements outside the diagonal to zero to obtain a sparse orthogonal matrix. Specifically, arrange all the generated two-dimensional orthogonal matrices sequentially on the diagonal. When the total number of feature dimensions is odd, arrange the three-dimensional orthogonal matrix and all two-dimensional orthogonal matrices sequentially on the diagonal, and set all elements outside the diagonal to zero to obtain a sparse orthogonal matrix.
[0035] Step S300: Generate bounded random perturbation noise, and add the bounded random perturbation noise to the flexible analysis data part of the isometric transformation ciphertext to obtain the desensitized perturbation ciphertext.
[0036] Specifically, bounded random perturbation noise is a type of random noise with controlled amplitude. Its generation satisfies the sensitivity constraint in differential privacy. The core principle is that adding noise cannot alter the proximity relationship between any two data points in the ciphertext space. That is, points that are close remain close after adding noise, and points that are far remain far. This protects the privacy of user electricity consumption behavior while preserving the relative structural information of the data in cluster analysis. This step is achieved by controlling the upper bound of the standard deviation of the noise; the specific execution flow is shown in steps S310 to S340.
[0037] In one possible implementation, bounded random perturbation noise is generated and added to the flexible analysis data portion of the isometric transformation ciphertext to obtain desensitized perturbation ciphertext. Step S300 further includes step S310, calculating the Euclidean distance between all data point pairs in the isometric transformation ciphertext, and using the minimum absolute value in the calculation results as the minimum distance difference. Specifically, the minimum distance difference is a key parameter for determining the upper limit of noise intensity. Since calculating the Euclidean distance of all data point pairs is computationally expensive when the data volume is large, this step uses locality-sensitive hashing for acceleration. The input is the isometric transformation ciphertext output from step S200, and the output is a scalar value, namely the global minimum Euclidean distance.
[0038] Step S320: Determine the theoretical upper limit of the noise standard deviation based on the minimum distance difference, wherein the theoretical upper limit of the noise standard deviation is proportional to the minimum distance difference. Specifically, the theoretical upper limit of the noise standard deviation = constant × minimum distance difference, where the constant is less than 1. For example, the theoretical upper limit of the noise standard deviation = 1 / 3 × minimum distance difference.
[0039] Step S330: Using the theoretical upper limit of the noise standard deviation as a constraint, generate bounded random perturbation noise following a Gaussian distribution. Specifically, determine the number of flexible analysis data dimensions for which noise needs to be added, denoted as the total number of flexible dimensions. Create an empty list to store the final generated noise values; the length of this list is equal to the total number of flexible dimensions. For each dimension in the total number of flexible dimensions, independently execute the following cyclic sampling process: 1. Call the standard Gaussian distribution sampling algorithm, which outputs a random value following a standard normal distribution; 2. Multiply this random value by the theoretical upper limit of the noise standard deviation determined in the previous step to obtain a noise value to be determined; 3. Determine whether the absolute value of the noise value to be determined exceeds a preset truncation threshold, which is set to twice the theoretical upper limit of the noise standard deviation; 4. If the absolute value of the noise value to be determined exceeds the truncation threshold, discard the value and return to step 1 to re-execute sampling; 5. If the absolute value of the noise value to be determined does not exceed the truncation threshold, store the noise value to be determined as the final bounded random perturbation noise for that dimension in the noise list. Repeat the above process until a bounded random perturbation noise that satisfies the truncation condition is generated for each dimension of the flexible analysis data.
[0040] Step S340: The bounded random disturbance noise is added to each dimension of the flexible analysis data to obtain the desensitized disturbance ciphertext. Specifically, all columns belonging to the flexible analysis data are extracted from the equidistant transformed ciphertext data matrix output in step S200 to form a flexible analysis data ciphertext submatrix. The number of rows in this submatrix is the same as the number of records in the original electricity consumption data, and the number of columns is equal to the total number of flexible dimensions. For each flexible analysis data dimension, the noise value corresponding to that dimension is taken from the noise list generated in step S330, and the noise value is added to all data points in that dimension column. That is, for the m-th flexible dimension, the bounded random disturbance noise value corresponding to that dimension is added to each data point in that dimension column. After performing the above addition operation, the flexible analysis data ciphertext submatrix is converted into a desensitized disturbance ciphertext submatrix.
[0041] In one possible implementation, the Euclidean distance between all pairs of data points in the isometric transformation ciphertext is calculated, and the smallest absolute value in the calculation result is taken as the minimum distance difference. Step S310 further includes step S311, constructing a locality-sensitive hash data structure and creating multiple independent hash tables, wherein each hash table uses a set of independent hash functions. Specifically, each hash function is a hash function based on random projection, which involves generating a random vector with the same dimension as the data points, calculating the projection value of the data points on the random vector (i.e., the dot product), dividing the projection value by a preset bucket width, and rounding down the quotient to obtain the integer, which is the hash bucket number.
[0042] Step S312: For each data point in the isometrically transformed ciphertext, calculate its bucket number in multiple hash tables and store it in the corresponding bucket. Specifically, for each data point in the isometrically transformed ciphertext, calculate its bucket number in multiple hash tables and store the data point in the corresponding bucket. Specifically, create an empty list of hash tables. For each data point in the ciphertext, traverse each hash table. For each set of hash functions in the current hash table, calculate its projection value according to the method in step S311, determine the bucket number, and then store the index of the data point and the data itself in the linked list corresponding to the hash bucket. Repeat this process until all data points have been processed.
[0043] Step S313: For each data point, query the set of candidate points in the same bucket, calculate the true distance between the data point and each candidate point in the set, and extract multiple minimum distance values. Specifically, initialize an empty list to store distance values. For each data point, locate its bucket from each hash table. Combine the data point with other data points (candidate points) in the bucket. For each combination, calculate its true distance using the Euclidean distance formula. Add all calculated distance values to the list. After traversing all hash tables, find the minimum value in the list and record it as the minimum distance value for that data point.
[0044] Step S314: Extract the smallest absolute value among multiple minimum distance values and use it as the minimum distance difference. Specifically, iterate through the list of minimum distance values of all data points obtained in step S313, and find the value with the smallest absolute value. This value is the global minimum distance difference of the entire dataset.
[0045] Step S400: Reconstruct the data by combining the desensitized perturbation ciphertext with the rigid billing data portion of the isometric transformation ciphertext to obtain a fused storage data packet, and upload the fused storage data packet to the cloud for storage.
[0046] Specifically, data reconstruction refers to recombining the ciphertext of flexible analysis data (after noise addition processing) with the ciphertext of rigid billing data (maintaining original accuracy) according to the dimensional order at the time of original data acquisition into a complete data matrix. In this fused storage data package, the ciphertext of rigid billing data retains accurate Euclidean distance information to support direct distance calculation and cluster analysis in the cloud; the ciphertext of flexible analysis data hides the precise distance due to the addition of bounded random perturbations to protect user electricity usage privacy. The specific execution flow of data reconstruction is shown in steps S410 to S430.
[0047] In one possible implementation, the rigid billing data portion in the desensitized perturbation ciphertext and the isometric transformation ciphertext is reconstructed to obtain a fused storage data package. Step S400 further includes step S410, extracting the flexible analysis data ciphertext portion processed by bounded random perturbation from the desensitized perturbation ciphertext. Specifically, a new fused storage data matrix is created, with the same number of rows as the original electricity consumption data records and the same number of columns as the total number of feature dimensions of the original electricity consumption data. Data is read column by column from the desensitized perturbation ciphertext submatrix output in step S340, where each column corresponds to a flexible analysis data dimension. Each column of data is copied sequentially to the corresponding column position in the fused storage data matrix according to the column position of the flexible analysis data dimension in the original electricity consumption data. The column position of the flexible analysis data ciphertext portion in the fused storage data matrix is completely consistent with the arrangement order of the flexible analysis data dimensions in the original electricity consumption data.
[0048] Step S420: Extract the rigid billing data ciphertext portion that has not undergone bounded random perturbation processing from the equidistant transformed ciphertext. Specifically, extract all columns belonging to rigid billing data from the equidistant transformed ciphertext data matrix output in step S200 to form a rigid billing data ciphertext submatrix. Each column of this submatrix corresponds to a rigid billing data dimension. Copy each extracted column of data to the corresponding column position in the fused storage data matrix created in step S410, according to the column position of the rigid billing data dimension in the original electricity consumption data. The column positions of the rigid billing data ciphertext portion in the fused storage data matrix are completely consistent with the arrangement order of the rigid billing data dimensions in the original electricity consumption data.
[0049] Step S430: The encrypted portion of the flexible analysis data and the encrypted portion of the rigid billing data are concatenated according to the original data dimension order in the original electricity consumption data to restore the complete data dimension structure and obtain the fused storage data package. Specifically, after steps S410 and S420 are completed, each column of the fused storage data matrix is filled with the corresponding encrypted data. The column corresponding to the rigid billing data retains the encrypted precise value, while the column corresponding to the flexible analysis data carries bounded random perturbation noise. This fused storage data matrix is the fused storage data package. For example, if the dimension order of the original electricity consumption data is cumulative electricity consumption, active power, and voltage, then the rigid billing data portion corresponds to the cumulative electricity consumption dimension, and the flexible analysis data portion corresponds to the active power and voltage dimensions. When reconstructing the fused storage data package, the first column contains the encrypted rigid billing data, i.e., the encrypted cumulative electricity consumption data; the second column contains the active power dimension data from the desensitized perturbation encrypted text; and the third column contains the voltage dimension data from the desensitized perturbation encrypted text. After completing the above splicing, the merged storage data package is encapsulated in the form of binary data blocks, and timestamps and device identifiers are added as metadata. The data is then uploaded to the cloud storage server through the network interface.
[0050] In one possible implementation, the method further includes step S500, in response to a data query request in the cloud, performing an inverse transformation and decryption on the stored fused storage data packet to obtain de-identified electricity consumption data.
[0051] Specifically, the inverse transformation decryption process is the reverse operation of the joint encryption process in step S200, executing each transformation step in the reverse order of encryption. First, the fused storage data packet is read from cloud storage. The target data is located based on the timestamp and device identifier in the metadata. The binary data block is parsed into a data matrix. The number of rows in this data matrix is the same as the number of records in the original electricity consumption data, and the number of columns is the same as the total number of feature dimensions in the original electricity consumption data. Second, the translation matrix generated in step S210 is subtracted from this data matrix. That is, for each data point in the data matrix, the translation amount of the corresponding dimension in the translation matrix is subtracted to obtain the de-translated data matrix. Then, the de-translated data matrix is multiplied by the inverse of the sparse orthogonal matrix. Since the sparse orthogonal matrix is an orthogonal matrix, its inverse is equal to its transpose. Therefore, the product of this data matrix and the transpose of the sparse orthogonal matrix is directly calculated to obtain the de-orthogonalized data matrix. Finally, the data matrix after orthogonal transformation is multiplied by the inverse of the permutation matrix. Since the permutation matrix is an orthogonal matrix, its inverse is equal to its transpose. Therefore, the product of the data matrix and the transpose of the permutation matrix is directly calculated to obtain the decrypted data matrix. After the above four-step inverse transformation operation, in the decrypted data matrix, the rigid billing data part is restored to the original plaintext value at the time of collection, which can be accurately used for electricity bill settlement; the flexible analysis data part still retains the bounded random disturbance noise generated in step S330. This noisy flexible analysis data constitutes desensitized electricity consumption data, which can be used for analysis tasks such as power grid load forecasting and user behavior pattern clustering, but cannot deduce the precise electricity consumption value of a single user, thus achieving differential privacy protection. The decrypted desensitized electricity consumption data is returned to the data query requester.
[0052] This application's embodiments address the technical problem of existing electricity meter data storage methods that fail to provide differentiated security protection for different types of data from the same data source. By receiving raw electricity consumption data from electricity meters and classifying it into rigid billing data and flexible analysis data according to their attributes, and by using encryption keys to jointly encrypt both types of data, generating equidistant transformed ciphertext that maintains the Euclidean distance between the original data points, generating bounded random disturbance noise and superimposing it onto the flexible analysis data segment of the ciphertext to complete desensitization, and then reconstructing and integrating the desensitized flexible ciphertext and rigid billing ciphertext into a fused storage data package and uploading it to cloud storage, this approach solves the technical problem of existing electricity meter data storage methods that fail to implement differentiated security protection for different types of data from the same data source. This achieves the technical effect of balancing billing accuracy and user behavior privacy within the same data storage system.
[0053] In the above text, refer to Figure 1 This paper describes in detail a method for de-identifying and storing electricity meter data based on differential privacy, according to embodiments of the present invention. Next, reference will be made to... Figure 2 This invention describes a differential privacy-based data anonymization and storage system for electricity meters according to an embodiment of the present invention.
[0054] The differential privacy-based electricity meter data anonymization storage system according to embodiments of the present invention addresses the technical problem of existing electricity meter data storage systems' inability to implement differentiated security protection for different types of data from the same data source, achieving a balance between billing accuracy and user behavior privacy within the same data storage system. The differential privacy-based electricity meter data anonymization storage system includes: a data attribute classification module 10, a joint encryption module 20, a random disturbance module 30, and a data reconstruction module 40.
[0055] The data attribute classification module 10 is used to receive raw electricity consumption data collected by the electricity meter, classify the raw electricity consumption data into data attributes, and obtain rigid billing data and flexible analysis data. The joint encryption module 20 is used to jointly encrypt the rigid billing data and the flexible analysis data based on the encryption key to obtain equidistant transformed ciphertext, wherein the equidistant transformed ciphertext maintains the Euclidean distance between the original electricity consumption data points in the ciphertext space. The random perturbation module 30 is used to generate bounded random perturbation noise, add the bounded random perturbation noise to the flexible analysis data part of the equidistant transformed ciphertext, and obtain desensitized perturbation ciphertext. The data reconstruction module 40 is used to reconstruct the data by combining the desensitized perturbation ciphertext with the rigid billing data part of the equidistant transformed ciphertext, obtain a fused storage data packet, and upload the fused storage data packet to the cloud for storage.
[0056] The detailed description of the specific configuration of the joint encryption module 20 is explained as follows: As mentioned above, the joint encryption module 20 may further include: the encryption key is constructed based on a chaotic system and a sparse orthogonal matrix.
[0057] The joint encryption module 20 may further include: a translation matrix construction unit for selecting a chaotic mapping model, setting chaotic parameters and initial values, iteratively generating a pseudo-random sequence through the chaotic mapping model, and copying and splicing the pseudo-random sequence to construct a translation matrix; a permutation matrix generation unit for generating a random square matrix, randomly arranging the rows or columns of the random square matrix using a random shuffling algorithm to obtain a permutation matrix, wherein the random square matrix is a square matrix with the absolute value of 1 for its diagonal elements; a sparse orthogonal matrix construction unit for calling a sparse orthogonal matrix construction algorithm to perform feature dimension analysis on the original electricity consumption data and construct a sparse orthogonal matrix; and an encryption key acquisition unit for combining the permutation matrix, the sparse orthogonal matrix, and the translation matrix to obtain the encryption key.
[0058] The process involves calling a sparse orthogonal matrix construction algorithm to analyze the feature dimensions of the original electricity consumption data and construct a sparse orthogonal matrix. The sparse orthogonal matrix construction unit may further include: an orthogonalization processing subunit, which calls the sparse orthogonal matrix construction algorithm to divide the feature dimensions of the original electricity consumption data into multiple small-scale dimension groups, and performs orthogonalization processing on each of the multiple small-scale dimension groups to obtain multiple small-scale orthogonal matrices; and a matrix arrangement subunit, which arranges the multiple small-scale orthogonal matrices along the diagonal and sets the elements outside the diagonal to zero to obtain a sparse orthogonal matrix.
[0059] The specific configuration of the random perturbation module 30 is described in detail below: As mentioned above, bounded random perturbation noise is generated and added to the flexible analysis data portion of the isometric transformation ciphertext to obtain the desensitized perturbation ciphertext. The random perturbation module 30 may further include: an Euclidean distance calculation unit for calculating the Euclidean distance between all data point pairs in the isometric transformation ciphertext, and using the minimum absolute value in the calculation result as the minimum distance difference; a theoretical bound determination unit for determining the theoretical bound of the noise standard deviation based on the minimum distance difference, wherein the theoretical bound of the noise standard deviation is proportional to the minimum distance difference; a bounded random perturbation noise generation unit for generating bounded random perturbation noise that follows a Gaussian distribution, constrained by the theoretical bound of the noise standard deviation; and a noise addition unit for adding the bounded random perturbation noise to each dimension of the data corresponding to the flexible analysis data portion to obtain the desensitized perturbation ciphertext.
[0060] The calculation of the Euclidean distance between all pairs of data points in the equidistant transformed ciphertext, using the minimum absolute value in the calculation results as the minimum distance difference, can be further divided into: a hash table creation subunit for constructing a locality-sensitive hash data structure and creating multiple independent hash tables, each using a set of independent hash functions; a bucket number calculation subunit for calculating the bucket number of each data point in the equidistant transformed ciphertext in the multiple hash tables and storing it in the corresponding bucket; a minimum distance value extraction subunit for querying the set of candidate points in the same bucket for each data point and calculating the true distance between the data point and each candidate point in the set, extracting multiple minimum distance values; and a minimum absolute value extraction subunit for extracting the minimum absolute value among the multiple minimum distance values and using it as the minimum distance difference.
[0061] The detailed configuration of the data reconstruction module 40 is explained as follows: As described above, the rigid billing data portion in the desensitized perturbation ciphertext and the equidistant transformation ciphertext is reconstructed to obtain a fused storage data package. The data reconstruction module 40 may further include: a flexible analysis data ciphertext extraction unit for extracting the flexible analysis data ciphertext portion processed by bounded random perturbation from the desensitized perturbation ciphertext; a rigid billing data ciphertext extraction unit for extracting the rigid billing data ciphertext portion that has not been processed by bounded random perturbation from the equidistant transformation ciphertext; and a ciphertext splicing unit for splicing the flexible analysis data ciphertext portion and the rigid billing data ciphertext portion according to the original data dimension order in the original electricity consumption data to restore the complete data dimension structure and obtain the fused storage data package.
[0062] The system may further include: a decryption module for responding to a data query request in the cloud, performing inverse transformation decryption on the stored fused storage data packet to obtain de-identified electricity consumption data.
[0063] The differential privacy-based energy meter data desensitization and storage system provided in this invention can execute the differential privacy-based energy meter data desensitization and storage method provided in any embodiment of this invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0064] Although this application makes various references to certain modules in the system according to the embodiments of this application, any number of different modules can be used and run on user terminals and / or servers. The various units and modules included are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be achieved; in addition, the specific names of each functional unit are only for easy distinction between each other and are not used to limit the scope of protection of this invention.
[0065] Based on the foregoing embodiments, this application also provides an electronic device. Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention, showing a block diagram of an exemplary electronic device suitable for implementing the embodiments of the present invention. Figure 3 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments of the present invention. This electronic device is in the form of a general-purpose computing device, and its components may include, but are not limited to, an input device 301, a processor 302, a memory 303, and an output device 304. The processor 302 may be one or more; the memory 303 may include a computer-readable medium and at least one program product having a set (at least one) of program modules configured to perform the functions of the embodiments of this application.
[0066] The memory 303 shown in this embodiment of the invention can be any combination of one or more computer-readable media. The computer-readable storage medium can be, but is not limited to, infrared, semiconductor systems, devices or components, or any combination thereof, used to store software programs, computer-executable programs and modules, such as the program instructions / modules corresponding to the differential privacy-based energy meter data desensitization storage method in this embodiment of the invention. The processor 302 executes various functional applications and data processing of the computer device by running the software programs, instructions and modules stored in the memory 303, thereby realizing the above-mentioned differential privacy-based energy meter data desensitization storage method.
[0067] The specific embodiments described above do not constitute a limitation on the scope of protection of this application. Those skilled in the art should understand that various modifications, combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this application should be included within the scope of protection of this application. In some cases, the actions or steps described in this application can be performed in a different order than that shown in the embodiments and still achieve the desired results. Furthermore, the processes depicted in the accompanying drawings do not necessarily require a specific or sequential order to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
Claims
1. A method for de-identifying and storing electricity meter data based on differential privacy, characterized in that, The method includes: Receive raw electricity consumption data collected by the electricity meter, classify the raw electricity consumption data by data attributes, and obtain rigid billing data and flexible analysis data; The rigid billing data and the flexible analysis data are jointly encrypted using an encryption key to obtain isometric transformation ciphertext. The encryption key is constructed based on a chaotic system and sparse orthogonal matrices. The joint encryption involves concatenating the rigid billing data and the flexible analysis data into an original data matrix according to their original data dimensions, and then uniformly performing a matrix multiplication linear transformation on the original data matrix. The isometric transformation ciphertext means that after the orthogonal transformation in the encryption key, the Euclidean distance between any two row vectors of the original data matrix in the ciphertext space is completely equal to the Euclidean distance in the original space. Generate bounded random perturbation noise, and add the bounded random perturbation noise to the flexible analysis data part of the isometric transformation ciphertext to obtain desensitized perturbation ciphertext; The rigid billing data portion in the desensitized perturbation ciphertext and the isometric transformation ciphertext is reconstructed to obtain a fused storage data packet, which is then uploaded to the cloud for storage. Specifically, a bounded random perturbation noise is generated, and this bounded random perturbation noise is added to the flexible analysis data portion of the isometric transformation ciphertext to obtain the desensitized perturbation ciphertext, including: Calculate the Euclidean distance between all data point pairs in the isometric transformation ciphertext, and take the minimum absolute value in the settlement result as the minimum distance difference; The theoretical upper bound of the noise standard deviation is determined based on the minimum distance difference, wherein the theoretical upper bound of the noise standard deviation is proportional to the minimum distance difference; Using the theoretical upper bound of the noise standard deviation as a constraint, bounded random perturbation noise that follows a Gaussian distribution is generated; The bounded random perturbation noise is added to each dimension of the data corresponding to the flexible analysis data to obtain the desensitized perturbation ciphertext.
2. The method for de-identifying and storing electricity meter data based on differential privacy as described in claim 1, characterized in that, include: A chaotic mapping model is selected, chaotic parameters and initial values are set, pseudo-random sequences are generated iteratively through the chaotic mapping model, and the pseudo-random sequences are copied and spliced to construct a translation matrix. A random square matrix is generated, and the rows or columns of the random square matrix are randomly arranged using a random shuffling algorithm to obtain a permutation matrix, wherein the random square matrix is a square matrix whose diagonal elements have an absolute value of 1. The sparse orthogonal matrix construction algorithm is called to analyze the feature dimensions of the original electricity consumption data and construct a sparse orthogonal matrix. The encryption key is obtained by combining the permutation matrix, the sparse orthogonal matrix, and the translation matrix.
3. The method for de-identifying and storing electricity meter data based on differential privacy as described in claim 2, characterized in that, The sparse orthogonal matrix construction algorithm is invoked to analyze the feature dimensions of the original electricity consumption data and construct a sparse orthogonal matrix, including: The sparse orthogonal matrix construction algorithm is called to divide the feature dimensions of the original electricity consumption data into multiple small-scale dimension groups. Orthogonalization is performed on each of the multiple small-scale dimension groups to obtain multiple small-scale orthogonal matrices. Arrange the multiple small-scale orthogonal matrices along the diagonal and set the elements outside the diagonal to zero to obtain sparse orthogonal matrices.
4. The method for de-identifying and storing electricity meter data based on differential privacy as described in claim 1, characterized in that, Calculate the Euclidean distance between all pairs of data points in the isometrically transformed ciphertext, and take the minimum absolute value in the settlement result as the minimum distance difference, including: Construct a locality-sensitive hash data structure by creating multiple independent hash tables, where each hash table uses an independent set of hash functions; For each data point in the equidistant transformed ciphertext, calculate its bucket number in multiple hash tables and store it in the corresponding bucket; For each data point, query the set of candidate points in the same bucket, calculate the true distance between the data point and each candidate point in the set, and extract multiple minimum distance values; Extract the minimum absolute value among multiple minimum distance values and use it as the minimum distance difference.
5. The method for de-identifying and storing electricity meter data based on differential privacy as described in claim 1, characterized in that, The desensitized perturbation ciphertext and the rigid billing data portion of the isometric transformation ciphertext are reconstructed to obtain a fused storage data packet, including: Extract the flexible analytical data ciphertext portion that has undergone bounded random perturbation processing from the desensitized perturbation ciphertext; Extract the rigid billing data ciphertext portion that has not undergone bounded random perturbation processing from the isometric transformation ciphertext; The encrypted portion of the flexible analysis data and the encrypted portion of the rigid billing data are concatenated according to the original data dimension order in the original electricity consumption data to restore the complete data dimension structure and obtain the fused storage data package.
6. The method for de-identifying and storing electricity meter data based on differential privacy as described in claim 1, characterized in that, In response to a data query request from the cloud, the stored fused data packet is decrypted by inverse transformation to obtain de-identified electricity consumption data.
7. A data anonymization and storage system for electricity meters based on differential privacy, characterized in that, The system is used to implement the differential privacy-based data anonymization and storage method for electricity meters as described in any one of claims 1-6, and the system comprises: The data attribute classification module is used to receive raw electricity consumption data collected by the electricity meter, classify the raw electricity consumption data into data attributes, and obtain rigid billing data and flexible analysis data. The joint encryption module is used to jointly encrypt the rigid billing data and the flexible analysis data based on the encryption key to obtain equidistant transformed ciphertext, wherein the equidistant transformed ciphertext maintains the Euclidean distance between the original electricity consumption data points in the ciphertext space. A random perturbation module is used to generate bounded random perturbation noise, and add the bounded random perturbation noise to the flexible analysis data part of the isometric transformation ciphertext to obtain desensitized perturbation ciphertext. The data reconstruction module is used to reconstruct the rigid billing data portion of the desensitized perturbation ciphertext and the isometric transformation ciphertext to obtain a fused storage data packet, and upload the fused storage data packet to the cloud for storage.
8. An electronic device, characterized in that, The electronic device includes: Memory, used to store executable instructions; The processor, when executing executable instructions stored in the memory, implements the differential privacy-based data desensitization storage method for electricity meters as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Data sharing privacy protection enhancement method and system in power grid cloud environment
CN119109681A
Computer-implemented privacy engineering system and method
WO2017187207A1