Data privacy protection method, device, system, equipment, medium and program product

By clustering and adding noise to smart meter data, the privacy issue in the data transmission process of smart meters in the smart grid is solved, enabling secure data merging and analysis, and improving transmission efficiency and security.

CN118821199BActive Publication Date: 2025-11-04CHINA MOBILE GROUP ANHUI +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410194972.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-02-21
Publication Date
2025-11-04
Estimated Expiration
2044-02-21

AI Technical Summary

Technical Problem

In smart grids, smart meter data lacks privacy encryption protection during transmission, which threatens user privacy. Furthermore, existing data encryption methods are inefficient and make it difficult to securely merge and analyze data from multiple data sources.

Method used

By obtaining encrypted datasets of smart meters and performing clustering, target clusters are selected, and noise is added to the target data with the farthest distance from the cluster center. The placement of the noise in the dataset is determined to form a perturbed dataset to protect privacy.

Benefits of technology

It achieves privacy and security protection during the data transmission process of smart meters, improves data transmission efficiency, and solves the problem of secure merging and analysis between multiple data sources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118821199B_ABST
    Figure CN118821199B_ABST
Patent Text Reader

Abstract

The application discloses a data privacy protection method, device, system, equipment, medium and program product. The method comprises the following steps: acquiring a first data set, wherein the first data set is a data set obtained by aggregating encrypted data of at least one smart meter; clustering the first data set to obtain N clusters, wherein N is a positive integer; selecting a target cluster from the N clusters; selecting a target data farthest from the cluster center of the target cluster in the target cluster; obtaining a noise set added to the first data set based on the target data and the cluster center, wherein the noise set contains at least one noise; determining the placement position of each noise in the first data set; and placing each noise in the first data set based on the placement position to obtain perturbed data. The privacy and security of the smart meter data can be ensured in the process of sending the smart meter data collected by the smart grid to the server through the grid communication.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of information security, and in particular to a data privacy protection method, device, system, equipment, medium and program product. BACKGROUND

[0002] With the development of communication technology, and the emergence of cellular mobile communication, cellular wireless networking is used to connect terminals and network devices through wireless channels, and then realize mutual communication between users. In smart grid communication, distributed smart meters can generate data reports and transmit them to remote cloud servers through cellular networks for further analysis. When the smart meter collects data and transmits the data, it must ensure the privacy, reliability and security of the data. Data privacy protection has become a valuable issue in the field of data publishing.

[0003] Currently, in the process of transmitting smart meter data collected by the smart grid to the server through grid communication, the smart meter data is not encrypted for privacy protection during transmission, which threatens the privacy of users. SUMMARY

[0004] The purpose of the embodiments of the present application is to provide a data privacy protection method, device, system, equipment, medium and program product to ensure the privacy and security of smart meter data in the process of transmitting smart meter data collected by the smart grid to the server through grid communication.

[0005] The technical solution of the present application is as follows:

[0006] In a first aspect, a data privacy protection method is provided, comprising:

[0007] obtaining a first data set, wherein the first data set is a data set obtained by aggregating encrypted data of at least one smart meter;

[0008] clustering the first data set to obtain N clusters, wherein N is a positive integer;

[0009] selecting a target cluster from the N clusters;

[0010] selecting a target data in the target cluster that is farthest from the cluster center of the target cluster;

[0011] obtaining a noise set added to the first data set based on the target data and the cluster center, wherein the noise set contains at least one noise;

[0012] determining the placement position of each noise in the first data set;

[0013] Based on the placement position, each noise is placed in the first data set to obtain a target data set.

[0014] In a second aspect, a data privacy protection apparatus is provided, which comprises:

[0015] An acquisition module is configured to acquire a first data set, wherein the first data set is a data set obtained by aggregating encrypted data of at least one smart meter;

[0016] A clustering module is configured to cluster the first data set to obtain N clusters, wherein N is a positive integer;

[0017] A first selection module is configured to select a target cluster from the N clusters;

[0018] A second selection module is configured to select a target data in the target cluster, which is farthest from a cluster center of the target cluster;

[0019] A first determination module is configured to obtain a noise set added to the first data set based on the target data and the cluster center, wherein the noise set contains at least one noise;

[0020] A second determination module is configured to determine a placement position of each noise in the first data set;

[0021] A third determination module is configured to place each noise in the first data set based on the placement position to obtain a target data set.

[0022] In a third aspect, an embodiment of the present application provides a data privacy protection system, which comprises a processor, and the processor is configured to:

[0023] Acquire a first data set, wherein the first data set is a data set obtained by aggregating encrypted data of at least one smart meter;

[0024] Cluster the first data set to obtain N clusters, wherein N is a positive integer;

[0025] Select a target cluster from the N clusters;

[0026] Select a target data in the target cluster, which is farthest from a cluster center of the target cluster;

[0027] Obtain a noise set based on the target data and the cluster center, wherein the noise set contains at least one noise;

[0028] Determine a placement position of each noise in the first data set;

[0029] Place each noise in the first data set based on the placement position to obtain a target data set.

[0030] In a fourth aspect, an electronic device is provided, which includes a processor, a memory, and a program or instructions stored in the memory and executable on the processor, and the program or instructions, when executed by the processor, implement the steps of the data privacy protection method according to any of the embodiments of the present application.

[0031] In a fifth aspect, a readable storage medium is provided, which stores a program or instructions, and the program or instructions, when executed by a processor, implement the steps of the data privacy protection method according to any of the embodiments of the present application.

[0032] In a sixth aspect, a computer program product is provided, and the instructions in the computer program product, when executed by a processor of an electronic device, enable the electronic device to perform the steps of the data privacy protection method according to any of the embodiments of the present application.

[0033] The embodiments of the present application provide at least the following beneficial effects:

[0034] In the embodiments of the present application, the first data set obtained by aggregating the encrypted data corresponding to each smart meter is obtained, and then the first data set is clustered to obtain N clusters, a target cluster is selected from the N clusters, a target data farthest from the cluster center of the target cluster is selected in the target cluster, and then a noise set added to the first data set can be obtained based on the target data and the cluster center, the placement position of each noise in the first data set in the noise set is determined, and each noise is placed in the first data set to obtain a target data set. Since the data in the obtained target data set is disturbed data with added noise, the user privacy is protected, and the privacy and security of the data transmitted by the meter to the server are ensured.

[0035] It should be understood that the foregoing general description and the following detailed description are only exemplary and explanatory, and cannot limit the present application. BRIEF DESCRIPTION OF DRAWINGS

[0036] The accompanying drawings, which are incorporated into and form part of the specification, illustrate embodiments consistent with the present application and, together with the specification, serve to explain the principles of the present application, and do not constitute an undue limitation on the present application.

[0037] Figure 1 is a structural schematic diagram of a data privacy protection system provided by an embodiment of the present application;

[0038] Figure 2 is a structural schematic diagram of a data privacy protection system provided by an embodiment of the present application;

[0039] Figure 3 is a structural schematic diagram of a data privacy protection system provided by an embodiment of the present application;

[0040] Figure 4 is a flow schematic diagram of a data privacy protection method provided by an embodiment of the present application;

[0041] Figure 5 is a structural schematic diagram of a data privacy protection device provided by an embodiment of the present application;

[0042] Figure 6 is a structural schematic diagram of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION

[0043] In order for those skilled in the art to better understand the technical solutions of the present application, the technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the accompanying drawings. It should be understood that the specific embodiments described herein are intended to explain the present application only, not to limit the present application. The present application can be implemented without some of these specific details by those skilled in the art. The following description of the embodiments is merely to provide a better understanding of the present application by showing examples of the present application.

[0044] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. The implementation described in the following exemplary embodiments does not represent all implementations consistent with the present application. Rather, they are merely examples consistent with some aspects of the present application as detailed in the appended claims.

[0045] Before introducing the technical solutions of the embodiments of the present application, first introduce the background technology of the embodiments of the present application:

[0046] The user's power consumption data is a private asset for the user and a resource for research institutions or illegal network agencies to carry out user research or commercial transactions. Generally, the user wants to keep his or her power consumption data secret for personal privacy, but in certain circumstances, the smart grid needs to collect the user's data for research and analysis to make appropriate responses to ensure the user's safe and affordable power consumption. In practice, users can provide their private data to these third-party agencies for free or for a fee, but throughout the data sharing process, users still focus on data privacy protection. Therefore, a challenging problem arises: how to securely transmit the user's private data to prevent attackers from stealing data and gaining illegal benefits. In the field of smart grids, cloud storage technology solves the problem of storing user private data. For the widespread use of cloud storage services, data cloud storage should address the key issue of data privacy. During data analysis, there are often private information of users. On the one hand, if the data holder does not take appropriate privacy protection technology and directly uploads the data during the data upload process, it will cause the user's privacy to be leaked. On the other hand, during the data analysis process, a series of cases of user privacy leakage show that the operation of removing identifiers cannot guarantee the safety of user privacy information. How to ensure the safety of user uploaded data while extracting valuable information from user data sets without leaking user privacy is a pressing problem.

[0047] In the data analysis publishing phase, since the third-party data analysis agency is not always trustworthy, it may steal user data during data analysis, even if it cannot obtain a single data of a user, the theft of overall data is also extremely harmful. Therefore, during data analysis, user privacy should be effectively protected and data availability should be maximized.

[0048] Data anonymization methods, data perturbation methods, and data encryption methods are commonly used in data mining with privacy data protection. Data anonymization methods mainly achieve data privacy protection by anonymizing data. Data perturbation methods mainly achieve data privacy protection by adding randomized noise data to the original private data without destroying the distribution of the original data. Data encryption methods mainly achieve privacy protection by combining homomorphic encryption with secure multi-party computation technology. The first two methods are easy to implement, but the data security is weaker than the third method, while the data encryption-based method has higher security, but has large computational and communication overheads.

[0049] To solve the above problems, the embodiment of the present application provides a data privacy protection method, device, system, equipment, medium and program product. The first data set obtained by aggregating the encrypted data corresponding to each smart meter is acquired, and then the first data set is clustered to obtain N clusters. A target cluster is selected from the N clusters, and a target data farthest from the cluster center of the target cluster is selected in the target cluster. Then, based on the target data and the cluster center, a noise set added to the first data set is obtained. The placement position of each noise in the first data set is determined, and each noise is placed in the first data set to obtain a target data set. Since the data in the obtained target data set is perturbed data with added noise, the user privacy is protected, and the privacy and security of the data transmitted by the smart meter to the server are ensured.

[0050] The data privacy protection method provided by the embodiment of the present application will be described in detail in combination with the drawings, specific embodiments and application scenarios.

[0051] Before introducing the data privacy protection method of the embodiment of the present application, the data privacy protection system for implementing the data privacy protection method provided by the embodiment of the present application is introduced first.

[0052] Figure 1 is a structural schematic diagram of a data privacy protection system provided by the embodiment of the present application, as Figure 1 shown, the data privacy protection system 100 provided by the embodiment of the present application can include a processor 110. The processor 110 is configured to:

[0053] acquire a first data set;

[0054] cluster the first data set to obtain N clusters;

[0055] select a target cluster from the N clusters;

[0056] select a target data farthest from the cluster center of the target cluster in the target cluster;

[0057] based on the target data and the cluster center, obtain a noise set, wherein the noise set contains at least one noise;

[0058] determine the placement position of each noise in the first data set;

[0059] based on the placement position, place each noise in the first data set to obtain a target data set.

[0060] The first data set can be a data set obtained by aggregating the encrypted data of at least one smart meter. One smart meter can correspond to one user, and the acquisition of the encrypted data of one smart meter will be described in detail in subsequent embodiments.

[0061] The target cluster can be one cluster selected from N clusters. The specific selection of the target cluster is described in subsequent embodiments, and N is a positive integer.

[0062] The target data can be one data in the target cluster that is farthest from the cluster center of the target cluster.

[0063] The target data set can be a data set obtained by placing each noise in the first data set according to the placement position of each noise.

[0064] In the embodiments of the present application, the specific implementation process of the processor 110 is described in subsequent embodiments.

[0065] In the embodiments of the present application, the processor obtains a first data set obtained by aggregating the encrypted data corresponding to each smart meter, then clusters the first data set to obtain N clusters, selects a target cluster from the N clusters, selects target data in the target cluster that is farthest from the cluster center of the target cluster, and then obtains a noise set added to the first data set based on the target data and the cluster center, determines the placement position of each noise in the first data set in the noise set, and places each noise in the first data set to obtain a target data set. Since the data in the obtained target data set is perturbed data added with noise, the user privacy is thus protected, and the privacy and security of the data transmitted by the meter to the server are further ensured.

[0066] In the prior art, traditional data encryption technology is often used for user uploading data to the cloud. n users each encrypt their data and upload it to the cloud, and then the cloud decrypts the data and performs data analysis. However, this method is inefficient. This is because when multiple data sources want to jointly mine their data knowledge, each data owner does not fully trust the other party, but needs to integrate their data for necessary data analysis, so the data owner is difficult to allow untrusted users to access their sensitive data, which also limits the access and use of data by other users. This problem can be solved by using data aggregation technology. The aggregator first aggregates the encrypted data of n users together and then sends it to the cloud. After decryption in the cloud, only the aggregation result can be obtained, and the individual data of each user cannot be obtained. However, at this time, if an external malicious attacker blocks the communication between the user and the aggregator during the user uploading data process, causing the user data to be unable to be uploaded to the cloud for data analysis, or the malicious attacker blocks the communication of a certain user and steals or modifies the user information and sends it to the aggregator, which will destroy the integrity of the data analysis in the cloud.

[0067] To solve the above problems, in some embodiments of the present application, with reference to Figure 2 The data privacy protection system 100 described above can further include:

[0068] at least one smart meter 120, each smart meter being configured to collect raw data corresponding to the smart meter, encrypt and sign the raw data collected by the smart meter, obtain encrypted data corresponding to the smart meter, and send the encrypted data to the aggregator 130;

[0069] the aggregator 130 being configured to, in a case where the signature corresponding to each smart meter is verified, aggregate the encrypted data corresponding to each smart meter, obtain aggregated data, encrypt the aggregated data, obtain encrypted aggregated data, and send the encrypted aggregated data to the data center 140;

[0070] the data center 140 being configured to decrypt the encrypted aggregated data, obtain a first data set, and send the first data set to the processor 110.

[0071] The raw data can be data collected by the smart meter, such as current, voltage, and power of the smart meter.

[0072] The encrypted data can be data obtained by encrypting the raw data of the smart meter. The aggregated data can be data obtained by aggregating the encrypted data of each smart meter. The encrypted aggregated data can be data obtained by encrypting the aggregated data.

[0073] In some embodiments of the present application, each smart meter transmits the raw data corresponding to the smart meter to the aggregator after encrypting and signing the raw data. The aggregator verifies whether the signature is correct. In a case where the signature is correct, the aggregator aggregates the encrypted data, obtains encrypted aggregated data, and sends the encrypted aggregated data to the data center. The data center decrypts the encrypted aggregated data to obtain a first data set. The processor performs reversible perturbation processing on the first data set to obtain perturbed data.

[0074] In the embodiments of the present application, the aggregator is used to aggregate the raw data of the smart meter corresponding to each user in the data uploading phase. The digital signature technology is introduced to verify the integrity of the encrypted data uploaded by each smart meter, thereby solving the problem of data being stolen or modified by malicious attackers in the data uploading process.

[0075] In some embodiments of the present application, the aggregator is used to aggregate the raw data of the smart meter corresponding to each user in the data uploading phase. The digital signature technology is introduced to verify the integrity of the encrypted data uploaded by each smart meter, thereby solving the problem of data being stolen or modified by malicious attackers in the data uploading process. Figure 3The aforementioned system may further include: an authorized smart meter 150, which may be a smart meter corresponding to an authorized user. This authorized smart meter can obtain the data mining results and perturbation data after the processor performs data mining processing on the first dataset. Once the authorized smart meter obtains the perturbation data, it can process the perturbation data to obtain the first dataset. Thus, for the user corresponding to the authorized smart meter, they can access the data of other users' smart meters, and other users do not need to worry about their data being leaked.

[0076] Continue to refer to Figure 3 The system mentioned above may also include a third-party operation center 160, which is used to generate system parameters and keys during the entire system processing.

[0077] like Figure 3 As shown, the data center 140 and processor 110 are deployed in the cloud, which improves the efficiency of data processing.

[0078] The following details the processing flow of each part of the system's equipment:

[0079] The system operation process consists of five steps: system initialization, encryption aggregation stage, signature authentication stage, decryption stage, and data perturbation stage. In the initialization stage, the third-party operation center 160 generates and publishes system parameters and key pairs. In the encryption stage, each smart meter 120 generates a key to encrypt the raw data collected in real time and sends the ciphertext to the aggregator 130, while simultaneously generating a signature and sending it to the aggregator 130. In the signature authentication stage, the aggregator 130 receives the ciphertext and the signature, verifies the correctness of the signature, and reports the aggregated ciphertext to the data center 140. In the decryption stage, the data center 140 decrypts the aggregated ciphertext to obtain the plaintext of the aggregated data (i.e., decrypts the encrypted aggregated data to obtain the first dataset). Finally, in the data perturbation stage, the processor 110 reversibly perturbs the plaintext data, ultimately obtaining perturbed data for data analysis and publication.

[0080] In this embodiment of the application, the algorithm used in the signature authentication stage may be the RSA signature authentication algorithm. During the execution of the RSA signature authentication algorithm, an RSA key needs to be generated, and the key is used to sign the data.

[0081] The following section details the RSA key generation and encryption process involved in the five stages of the system operation workflow:

[0082] To generate an RSA key, the following steps must be completed:

[0083] (1) Choose the value of e as 3 or 2.5537;

[0084] (2) Randomly generate a large prime p until gcd(e, p - 1) = 1; where gcd(a, b) means the greatest common divisor of a and b;

[0085] (3) Randomly generate a large prime q different from p until gcd(e, q - 1) = 1;

[0086] (4) Compute n = pq, j(n) = (p - 1)(q - 1);

[0087] (5) Compute d such that d e = 1 (mod j(n)); here mod( ) is the modulo function, and the above formula means that d minus 1 is divisible by j(n); e

[0088] (6) Compute d mod (p - 1) and d mod (q - 1); here the formula means that a number minus d is divisible by (p - 1), and similarly, a number minus d is divisible by q - 1;

[0089] (7) Compute (q - 1) mod p; here the formula means that a number minus q - 1 is divisible by p;

[0090] (8) Put n, e into the RSA public key, and put n, e, d mod (p - 1), d mod (q - 1), and (q - 1) mod p into the RSA private key.

[0091] II. Encryption process

[0092] The encryption rule is E k (x) = x b mod n, where the formula is as above, x is the data component in the plaintext data D, and k represents the length of the PKCS format.

[0093] The input of the encryption process is: plaintext data D (i.e. original data), modulus n, encryption exponent e (public key encryption) or decryption exponent d (private key encryption), b is the public key encryption exponent e when encrypting with the public key, and b is the private key encryption exponent d when encrypting with the private key. The output is the ciphertext. The length of D does not exceed [log2n] - 11, to ensure that the number of padding strings is not 0 when converted to the PKCS format.

[0094] (1) Format the plaintext. Use the PKCS format: EB = 00 || BT || PS || 00 || D, where BT represents the type of block, PS is the padding string, and D is the plaintext data. The beginning 0 ensures that the length of EB is greater than k. When encrypting with the public key, BT = 02, and when decrypting with the private key, BT = 01. When BT = 02, PS is a non-zero random number; when BT = 01, the value of PS is FF. ​

[0095] (2) The plaintext is converted from character type data to integer type data.

[0096] (3) RSA calculation. Make a modular exponentiation on the integer encryption block x: y = x c mod n, 0 ≤ y ≤ n, where y is the ciphertext, c is the public key encryption exponent when the public key is encrypted, and c is the private key encryption exponent when the private key is encrypted.

[0097] (4) The ciphertext is converted from integer type data to character type data.

[0098] III. Decryption process

[0099] The decryption rule is D k (x) = y c mod n;

[0100] x is the plaintext. The input of the decryption process is: ciphertext y c ; modulus n; encryption exponent e (public key decryption) or decryption exponent d (private key decryption), c is the public key encryption exponent e when the public key is encrypted, and c is the private key encryption exponent d when the private key is encrypted, and the result is the plaintext.

[0101] (1) Ciphertext integerization.

[0102] (2) RSA calculation. Make a modular exponentiation on the ciphertext: x = y c mod n, 0 ≤ x ≤ n, where x is the plaintext.

[0103] (3) At this time, the plaintext is integer type data, which is converted to ASCII type data to obtain the plaintext in PKCS format.

[0104] (4) Separate the original plaintext from the plaintext in PKCS format. The process of separating the plaintext from the PKCS format is also the process of checking the integrity of the data. If the following problems occur, the decryption fails: cannot be clearly divided; the padding character is less than 64 bits or does not match the type indicated by the BT; the BT does not match the actual operation type.

[0105] IV. RSA digital signature algorithm

[0106] The process of the RSA digital signature algorithm is: A makes a decryption transformation on the plaintext m: (the public key is used for encryption, the private key is used for decryption, and the digital signature is completed with the private key, so it is called decryption transformation) D k (m) = m d mod n, where d and n are A's private key, and only A knows it; after B receives A's signature, it uses A's public key and encryption transformation to get the plaintext, because E k (s) = E k (D k (m)) = (m d )e modn, again d e = 1 (modj(n)), i.e. de = lj(n) + 1, according to Euler's theorem m j(n) = 1 x modn, so E k (s) = m lj(n)+1 = [m lj(n) ] e m = m mod n. If the plaintext m and the signature s are sent to user B, B can be sure that the information is really sent by A. At the same time, A cannot deny sending the information, because no one but A himself can generate s from the plaintext m. Therefore, the RSA digital signature scheme is feasible.

[0107] However, the RSA digital signature algorithm has the weakness that the signature is easy to be forged and the computation time is long due to the isomorphism of the computation method itself. Therefore, before actually signing the file, the message needs to be transformed by the message-digest algorithm 5 (MD5).

[0108] The MD5 function is a one-way hash function which compresses a message of arbitrary length into a 128-bit message digest. The one-way property (i.e. given a hash value, it is difficult to compute the message) and the collision resistance (i.e. given a message M, it is difficult to find another message M' which satisfies the hash values of both) of the application of MD5 can realize the integrity check of the information. In addition, the function is designed directly without any assumption and cryptographic system, and the execution speed is fast, so it is a widely recognized one-way hash algorithm.

[0109] The RSA digital signature algorithm includes a signature algorithm and a verification signature algorithm. First, the message is hashed by the MD5 algorithm. The signature process needs the private key of the user, and the verification process needs the public key of the user. A processes the message in the form of a string into a signature by the signature algorithm; B verifies whether the signature is the signature of A on the message by the verification signature algorithm, confirms that the message is sent by A, and that the message has not been tampered with.

[0110] The signature algorithm includes two steps: message digest calculation and RSA encryption.

[0111] (1) Message digest calculation. The message is first calculated by MD5 before signing, to generate a 128-bit message digest.

[0112] (2) RSA calculation on the digest. The message digest is encrypted by the encryption algorithm using the private key of the signer, to obtain the encrypted string.

[0113] The verification signature algorithm includes two steps: RSA decryption of the signature's message digest, and the verifier's calculation of the digest of the original message, and comparison of the two message digests. The process of verifying the signature is inputted with the message, the signature's public key, and the signature; and outputted with the result of verification, i.e. whether it is a correct signature.

[0114] (1) RSA decryption. The signature is actually an encrypted string. The encrypted string is decrypted using the signature's public key. The result of decryption should be a 128-bit message digest. In the decryption process, if the type of the obtained encrypted block is not 01, the decryption fails. The signature is incorrect.

[0115] (2) Message digest calculation and comparison. The verifier recalculates the message digest using the MD5 algorithm, and obtains the verifier's own message digest. The verifier compares the decrypted message digest with the verifier's own message digest. If the two are the same, the verification succeeds, and the integrity of the message and the signature can be confirmed to be indeed the signature of the signature; otherwise, the verification fails.

[0116] It should be noted that the generation of the RSA key, the encryption process, the decryption process, and the RSA digital signature algorithm described above all belong to the prior art, and will not be described in more detail here.

[0117] The following describes the five stages in the system operation process based on the generation of the RSA key, the encryption process, the decryption process, and the RSA digital signature algorithm described above:

[0118] I. System initialization

[0119] First, the TPOC generates a key pair for the encryption process. First, two large prime numbers P and Q are randomly generated (i.e. the large prime numbers p and q in the generation of the RSA key described above), and the public modulus N = P x Q and

[0120] Second, the public key E is calculated. The value of E must be an integer, E and must be co-prime, and

[0121] Third, the private key is calculated. The private key must satisfy the formula:

[0122] Fourth, the parameters required for data perturbation are generated: the number of clusters k, the noise ratio r, the offset ratio a, and the random seed s.

[0123] Fifth, the keys and parameters are distributed. The public key is distributed to each smart meter for encrypted data, and the parameters required for perturbation are sent to the processor in the cloud.

[0124] II. Encryption aggregation stage

[0125] The smart meter encrypts its private data before forwarding it to the aggregator. The raw data of each smart meter can be encrypted according to the following formula (1):

[0126] C = M E mod N (1)

[0127] Where M is the plaintext before encryption, i.e. the raw data collected by the smart meter.

[0128] After each smart meter encrypts its corresponding raw data according to the above formula (1), the aggregator aggregates the ciphertext data of all users {C1, C2, … C i}, i is the number of smart meters. Then the aggregator generates a digital signature to ensure that the data center receiving the data verifies its integrity.

[0129] In some embodiments of the present application, the RSA digital signature algorithm can be used when generating a signature for encrypted data, which includes a signature algorithm and a signature verification algorithm. The implementation process of the specific RSA digital signature algorithm is as follows:

[0130] First, the encrypted data is hashed using the message-digest algorithm 5 (MD5) algorithm. The signature process requires the user's private key, and the verification process requires the user's public key. For example, A uses the signature algorithm to process the message in string form into a signature; B uses the signature verification algorithm to verify whether the signature is A's signature for the message, confirms that it is A's message and has not been tampered with, and A must have sent the message.

[0131] In the signature algorithm, generating a signature using RSA includes two steps: message digest calculation and RSA encryption. Message digest calculation, first the message is calculated by MD5 before signing, generating a 128-bit message digest, then the digest is calculated according to the following formula (2):

[0132] σ C = C D mod N (2)

[0133] Where D and N in formula (2) are the private key of the signer. The signature is the result of D times the message mod N, and the final remainder is the signature. After generating the signature, the aggregator sends {C1, C2, … C i} and σ C to the data center.

[0134] III. Signature authentication phase

[0135] The data center receives {C1, C2, … C i} and σ CAfterwards, the signature in the message is verified first, the signature is verified by RSA, and the verification of the signature algorithm includes two steps: RSA decryption obtains the message digest of the signer, the data center calculates the digest of the original message, and the two message digests are compared. The process of verifying the signature is inputted with the message, the public key of the signer, and the signature; and outputted with the result of verification, i.e. whether it is a correct signature.

[0136] RSA decryption. Based on the following formula (3), the encrypted string is decrypted by using the public key of the signer to obtain the message digest:

[0137]

[0138] Wherein, E and N are the public key of the signer.

[0139] The data center calculates the E power of the signature and mod N to obtain the message obtained by the signature, and then performs verification. It should be noted that the result of decryption should be a 128-bit message digest, which is compared with the message content sent, if σ C C If the signature verification is successful, the data uploading process is not modified by an external attacker, and the integrity of the data is ensured, otherwise the signature verification fails.

[0140] Four, decryption phase

[0141] After the data center verifies the digital signature of the aggregated ciphertext, the data, i.e. the first data set, can be decrypted according to the following formula (4):

[0142] M=C D mod N (4)

[0143] Five, data perturbation phase

[0144] After the data center obtains the data of the user, the data is sent to the processor for data analysis, but since the cloud computing environment is not completely secure, external attackers can also attack the cloud to obtain user data, so the data should also be perturbed before data analysis to protect the data, while ensuring the availability of the data is not damaged. The reversible data perturbation includes two steps: data perturbation and data reversible phase. The specific data perturbation and data reversible phase will be introduced in subsequent embodiments.

[0145] The specific implementation process of the processor 110 is as follows: Figure 1

[0146] Figure 4 is a flowchart of a data privacy protection method provided by the embodiment of the application, and the execution subject of the data privacy protection method can be the processor 110 in the data center, such as the processor 110 in the data center 100. Figure 1 Figure 4 ​​​As shown, the data privacy protection method provided by the embodiments of the present application can include steps 410-470.

[0147] Step 410, obtaining a first data set.

[0148] The first data set is a data set obtained by aggregating encrypted data of at least one smart meter.

[0149] Step 420, clustering the first data set to obtain K clusters.

[0150] K is a positive integer.

[0151] In some embodiments of the present application, K clusters can be obtained by k-means clustering the first data set.

[0152] Step 430, selecting a target cluster from the N clusters.

[0153] The target cluster can be one cluster selected from the N clusters.

[0154] In some embodiments of the present application, in order to accurately determine the target cluster, step 430 can specifically include:

[0155] calculating a sum of squared errors of the encrypted data in each cluster to obtain a first value corresponding to each cluster;

[0156] selecting a cluster with the smallest first value from the first values corresponding to the K clusters as the target cluster.

[0157] For a certain cluster in the K clusters, the first value corresponding to the cluster can be the sum of squared errors of the encrypted data in the cluster.

[0158] In some embodiments of the present application, for each cluster, the sum of squared errors of the encrypted data in the cluster can be calculated to obtain a first value corresponding to the cluster, and then a cluster with the smallest first value can be selected from the first values corresponding to each cluster as the target cluster.

[0159] In the embodiments of the present application, by calculating the sum of squared errors of the encrypted data in each cluster to obtain a first value corresponding to each cluster, and selecting a cluster with the smallest first value from the first values corresponding to the K clusters as the target cluster, the target cluster can be accurately determined.

[0160] Step 440, selecting a target data in the target cluster farthest from the cluster center of the target cluster.

[0161] The target data can be data in the target cluster farthest from the cluster center of the target cluster.

[0162] Step 450, based on the target data and the cluster center, obtaining a noise set added to the first data set, wherein the noise set contains at least one noise.

[0163] In some embodiments of the present application, step 450 can specifically include:

[0164] Based on the target data and the cluster center, according to the following formula (5), a noise set added to the first data set is obtained:

[0165] N = {n1, n2, … n |N|} (5)

[0166] Wherein |N| = |D| × r, n i = d u + α × (distance(c, d)), c is the cluster center, d is the target data, α is the offset ratio, which is a constant, r is the noise ratio of the target cluster, |D| is the number of added noise, N is the public modulus, N = P * Q, d u is the vector corresponding to the target data.

[0167] Step 460, determining the placement position of each noise in the first data set.

[0168] In some embodiments of the present application, in order to accurately determine the placement position of each noise in the first data set, step 460 can specifically include:

[0169] According to the following formula (6), the placement position of each noise in the first data set is determined:

[0170] p i = |D| × Rand(s) (6)

[0171] Wherein Rand(·) is a random function, and s is a random seed.

[0172] Step 470, based on the placement position, placing each noise in the first data set to obtain a target data set.

[0173] Wherein the target data can be the data set obtained after placing the noise in the first data set.

[0174] In some embodiments of the present application, according to the position of each noise in the first data set obtained above, each noise can be placed at the position, that is, noise data can be added to the first data set to obtain a target data set, which is a perturbed data set with noise data added. In this way, the first data set is protected.

[0175] In some embodiments of the present application, the above steps 410-470 are the data perturbation process in the data perturbation phase.

[0176] In some embodiments of the present application, after the authorized smart meter obtains the target data set, the authorized smart meter is to obtain the data before adding noise (i.e. the first data set), so the target data set needs to be processed reversibly, and specifically, the positions of each noise can be found by using the above formula (6), and then the noise is deleted, and the first data set can be obtained.

[0177] In some embodiments of the present application, the random seed for data reversible recovery is saved by the processor, when a user wants to obtain relevant information about the original data from the perturbed data, the processor needs to be applied, and the processor will be sent to the user, and then the original data can be reversibly accessed, that is, the authorized user can reversibly access the original data.

[0178] In the embodiments of the present application, during the transmission of the smart meter data to the server, firstly, considering that the multi-dimensional data uploaded by the user will cause a large amount of calculation, the similarity between the data is calculated to eliminate redundant data, so as to reduce the calculation cost in the process of uploading data by the user; at the same time, the RSA digital signature technology is used to verify the integrity of the data uploaded by the user, by comparing the message digest decrypted by RSA with the calculated digest of the original message by the verifier, if the two are equal, the verification is successful, and the integrity of the message and the signature are confirmed to be indeed the signer. The problem of data being stolen and modified by malicious attackers during data uploading is solved; during data analysis, in order to solve the problem of effectively protecting user privacy and maximizing data availability, the data perturbation technology is used to reversibly perturb the noise added to the data, to ensure the privacy of the mined data result and the availability of the data. And by using the classification algorithm to detect the original data set and the data set after adding noise, and calculating the privacy measure, whether the addition of noise affects the availability of the data is evaluated.

[0179] It should be noted that the data privacy protection method provided by the embodiments of the present application can be executed by a data privacy protection device, or a control module in the data privacy protection device for executing the data privacy protection method.

[0180] Based on the same inventive concept as the above-mentioned data privacy protection method, the present application also provides a data privacy protection device. The following will be described in detail in combination with Figure 5 The data privacy protection device provided by the embodiments of the present application will be described in detail.

[0181] Figure 5 Fig. 1 is a structural schematic diagram of a data privacy protection device according to an example embodiment.

[0182] As shown in Figure 5 , the data privacy protection device 500 can include:

[0183] The acquisition module 510 is used to acquire a first dataset, wherein the first dataset is a dataset obtained by aggregating the encrypted data of at least one smart meter;

[0184] Clustering module 520 is used to cluster the first dataset to obtain K clusters, where K is a positive integer;

[0185] The first selection module 530 is used to select a target cluster from K clusters;

[0186] The second selection module 540 is used to select the target data that is farthest from the cluster center of the target cluster in the target cluster;

[0187] The first determining module 550 is configured to obtain a noise set added to the first dataset based on the target data and the cluster center, wherein the noise set contains at least one noise.

[0188] The second determining module 560 is used to determine the placement position of each noise in the first dataset;

[0189] The third determining module 570 is used to place each noise in the first dataset based on the placement position to obtain disturbance data.

[0190] In the embodiments of this application, a first dataset is obtained by aggregating the encrypted data corresponding to each smart meter. Then, the first dataset is clustered to obtain N clusters. A target cluster is selected from the N clusters. In the target cluster, the target data farthest from the cluster center of the target cluster is selected. Then, based on the target data and the cluster center, a noise set is added to the first dataset. The placement position of each noise in the noise set in the first dataset is determined and placed in the first dataset to obtain the target dataset. Since the data in the obtained target dataset is perturbed data with added noise, user privacy is protected, thereby ensuring the privacy and security of the data transmitted when the meter transmits data to the server.

[0191] In some embodiments of this application, the first selection module 530 is specifically used for

[0192] Calculate the sum of squared errors of the encrypted data in each cluster to obtain the first value corresponding to each cluster;

[0193] Select the cluster with the smallest first value from the K clusters corresponding to the first value as the target cluster.

[0194] In some embodiments of this application, the first determining module 550 may specifically be used for:

[0195] Based on the target data and the cluster center, the noise set is obtained according to the following formula:

[0196] N = {n1, n2, … n |N|}

[0197] wherein, |N| = |D| x r, n i = d u + a x (distance(c, d)), c is the cluster center, d is the target data, a is the offset ratio, r is the noise ratio of the target cluster, D is the data amount, and N is the number of generated noises.

[0198] In some embodiments of the present application, the second determining module 560 can be specifically configured to:

[0199] According to the following formula, the placement position of each noise in the first data set is determined:

[0200] p i = |D| x Rand(s)

[0201] wherein, Rand(·) is a random function, and s is a random seed.

[0202] The data privacy protection apparatus provided by the embodiments of the present application can be used to execute the data privacy protection method provided by each method embodiment, and the implementation principle and technical effects are similar. For brevity, the details are not described here.

[0203] Based on the same inventive concept, the embodiments of the present application further provide an electronic device.

[0204] Figure 6 is a structural schematic diagram of an electronic device provided by the embodiments of the present application. As shown in the figure, Figure 6 the electronic device can include a processor 601 and a memory 602 storing computer programs or instructions.

[0205] Specifically, the processor 601 described above can include a central processing unit (CPU), or a specific integrated circuit (ASIC), or can be configured to implement one or more integrated circuits of the embodiments of the present application.

[0206] The memory 602 can include mass storage for data or instructions. As an example and not by way of limitation, the memory 602 can include a hard disk drive (HDD), a floppy disk drive, flash memory, an optical disc (e.g., a compact disc (CD) or a digital versatile disc (DVD)), a solid-state drive (SSD), a USB drive, or a combination of two or more of these. Where appropriate, the memory 602 can include removable or non-removable (or fixed) media, where appropriate. The memory 602 can be internal or external to the integrated gateway disaster recovery device. In particular embodiments, the memory 602 is non-volatile, solid-state memory. The memory can include read-only memory (ROM), random-access memory (RAM), magnetic disk storage media, optical storage media, flash memory devices, electrical, optical, or other physically tangible storage

[0207] The processor 601 implements any of the data privacy protection methods in the above embodiments by reading and executing computer program instructions stored in the memory 602.

[0208] In one example, the electronic device can further include a communication interface 603 and a bus 610. As shown, the processor 601, the memory 602, and the communication interface 603 are connected through the bus 610 and complete communication among each other. Figure 6

[0209] The communication interface 603 is mainly used to realize the communication between the modules, devices, units and / or devices in the embodiments of the present application.

[0210] ​Bus 610 includes hardware, software, or both, to couple electronic devices to each other in a manner that allows information to be passed between or among them. The bus can include, for example, an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a HyperTransport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an InfiniBand (IB) interconnect, a Low Pin Count (LPC) bus, a memory bus, a Micro Channel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association local (VLB) bus, or another suitable bus or a combination of two or more of these. Where appropriate, bus 610 can include one or more buses. Although the present embodiments describe and show a particular bus, the present embodiments contemplate any suitable bus or interconnect.

[0211] The electronic device can perform the data privacy protection method in the embodiments of the present application, thereby achieving Figure 4 the data privacy protection method described.

[0212] In addition, in combination with the data privacy protection method in the above embodiments, the embodiments of the present application can provide a readable storage medium to implement. The readable storage medium has program instructions stored thereon, and the program instructions are executed by a processor to implement any one of the data privacy protection methods in the above embodiments.

[0213] In addition, in combination with the data privacy protection method in the above embodiments, the embodiments of the present application can provide a computer program product, and instructions in the computer program product are executed by a processor of an electronic device to make the electronic device perform any one of the data privacy protection methods in the above embodiments.

[0214] It needs to be clear that the present application is not limited to the specific configurations and processes described above and shown in the drawings. For the sake of brevity, detailed descriptions of well-known methods are omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present application is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between steps, after understanding the spirit of the present application.

[0215] The functions noted in the description of the structural block diagrams above can be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, they can be, for example, electronic circuits, application specific integrated circuits (ASICs), appropriate firmware, plug-ins, functional cards, and the like. When implemented in software, the elements of the present application are program or code segments that are used to perform the required tasks. The program or code segments can be stored in a machine-readable medium or transmitted through a data signal carried in a carrier wave over a transmission medium or communication link. A "machine-readable medium" includes any medium that can store or transport information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, radio frequency (RF) links, and the like. The code segments can be downloaded via computer networks such as the Internet, intranets, and the like.

[0216] It is also important to note that the examples described herein can be implemented in a variety of systems, including and / or incorporating software, firmware, hardware, and / or circuitry. Also, the present application can be implemented as a system-on-a-chip, where each or various functional circuits or codes are actually implemented as different components of a single integrated circuit or chip. It should be appreciated that the above description and the accompanying drawings are not restrictive on the scope of the application. It should also be understood that the application is not limited to the embodiments described above, but that it includes all alternatives falling within the scope of the application.

[0217] The computer program instructions can also be loaded onto a computer, other programmable data processing apparatus, or other devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other devices to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide processes for implementing the functions / acts specified in the flowchart and / or block diagram block or blocks. Alternatively, computer program implemented steps can be implemented by special purpose logic circuitry, e.g., an FPGA or an ASIC, or by a combination of special purpose logic circuitry and computer hardware. Those skilled in the art will recognize that the present application is not limited to the above-described embodiments, and that various modifications and changes can be made thereto without departing from the scope of the present application. The disclosure is not to be limited to the details shown, since the spirit and scope of the present application are encompassed by the appended claims.

[0218] The above merely describes specific implementation of the present application, and those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described system, module and unit can refer to the corresponding processes in the foregoing method embodiments, which will not be described herein again. It should be understood that the protection scope of the present application is not limited to this, and any person skilled in the art can easily think of various equivalent modifications or replacements within the technical range disclosed by the present application, and these modifications or replacements should be covered within the protection scope of the present application.

Claims

1. A method for data privacy protection, characterized in that, The method comprises: obtaining a first data set, wherein the first data set is a data set obtained by aggregating encrypted data of at least one smart meter; clustering the first data set to obtain K clusters, wherein K is a positive integer; selecting a target cluster from the K clusters; selecting target data farthest from a cluster center of the target cluster in the target cluster; obtaining a noise set added to the first data set based on the target data and the cluster center, wherein the noise set contains at least one noise; determining a placement position of each noise in the first data set; placing each noise in the first data set based on the placement position to obtain a target data set; the selecting a target cluster from the K clusters comprises: calculating a sum of squared errors of encrypted data in each cluster to obtain a first value corresponding to each cluster; selecting a cluster with the smallest first value from the first values corresponding to the K clusters as the target cluster.

2. The method of claim 1, wherein, the obtaining a noise set based on the target data and the cluster center comprises: obtaining a noise set based on the target data and the cluster center according to the following formula: N = {n1, n2,... n |N|} where |N| = |D| x r, n i = d u + a x (distance(c, d)), c is the cluster center, d is the target data, a is the offset ratio, r is the noise ratio of the target cluster, |D| is the number of added noise, d u is the vector corresponding to the target data.

3. The method of claim 2, wherein, the determining a placement position of each noise in the first data set comprises: determining a placement position of each noise in the first data set according to the following formula: p i = |D| x Rand(s) wherein Rand(·) is a random function and s is a random seed.

4. A data privacy protection apparatus, characterized by, The device comprises: an obtaining module configured to obtain a first data set, wherein the first data set is a data set obtained by aggregating encrypted data of at least one smart meter; a clustering module configured to cluster the first data set to obtain K clusters, wherein K is a positive integer; a first selecting module configured to select a target cluster from the K clusters; a second selecting module configured to select target data farthest from a cluster center of the target cluster in the target cluster; a first determining module configured to obtain a noise set added to the first data set based on the target data and the cluster center, wherein the noise set contains at least one noise; a second determining module configured to determine a placement position of each noise in the first data set; a third determining module configured to place each noise in the first data set based on the placement position to obtain a target data set; the first selecting module is specifically configured to calculate a sum of squared errors of encrypted data in each cluster to obtain a first value corresponding to each cluster; and select a cluster with the smallest first value from the first values corresponding to the K clusters as the target cluster.

5. A data privacy protection system, characterized by, The system comprises a processor configured to: obtain a first data set, wherein the first data set is a data set obtained by aggregating encrypted data of at least one smart meter; cluster the first data set to obtain K clusters, wherein K is a positive integer; select a target cluster from the K clusters; select target data farthest from a cluster center of the target cluster in the target cluster; obtain a noise set based on the target data and the cluster center, wherein the noise set contains at least one noise; determine a placement position of each noise in the first data set; and place each noise in the first data set based on the placement position to obtain a target data set. Based on the placement position, each noise is placed in the first data set to obtain a target data set; The selecting the target cluster from the K clusters comprises: Calculating the sum of square errors of the encrypted data in each cluster to obtain a first value corresponding to each cluster; Selecting a cluster with the smallest first value from the first values corresponding to the K clusters as the target cluster.

6. The system of claim 5, wherein, The system further comprises: At least one smart meter, each of the smart meters being configured to collect raw data corresponding to the smart meter, encrypt and sign the raw data collected by the smart meter to obtain encrypted data corresponding to each of the smart meters, and send the encrypted data to the aggregator; The aggregator is configured to, in the case that the signature corresponding to each of the smart meters is verified, aggregate the encrypted data corresponding to each of the smart meters to obtain aggregated data, encrypt the aggregated data to obtain encrypted aggregated data, and send the encrypted aggregated data to the data center; The data center is configured to decrypt the encrypted aggregated data to obtain the first data set, and send the first data set to the processor.

7. An electronic device, comprising: The computer program product comprises a processor, a memory, and a program or instruction stored on the memory and executable on the processor, and the program or instruction is executed by the processor to implement the steps of the data privacy protection method according to any one of claims 1-3.

8. A readable storage medium, characterized by, The readable storage medium stores a program or instruction, and the program or instruction is executed by the processor to implement the steps of the data privacy protection method according to any one of claims 1-3.

9. A computer program product, characterised in that, The instructions in the computer program product are executed by the processor of the electronic device to enable the electronic device to perform the steps of the data privacy protection method according to any one of claims 1-3.

Citation Information

Patent Citations

  • Differential privacy electricity collection data privacy protection method and device based on clustering

    CN113688420A

  • Differential privacy protection based Internet of Things intelligent electric meter encryption method

    CN116595553A