User daily electricity consumption mode analysis method capable of protecting privacy

By using the power supply side to standardize the user's daily electricity data in the smart grid, and disturbing the data based on differential privacy, the problem of user privacy leakage and inaccurate data analysis results in the smart grid is solved, and the problem of inaccurate user privacy leakage and data analysis results is realized. The dual goal of protecting privacy and ensuring the accuracy of analysis results.

CN119397269APending Publication Date: 2025-02-07NANJING UNIV OF SCI & TECH +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411382005.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-30
Publication Date
2025-02-07

AI Technical Summary

Technical Problem

In a smart grid, the user's electricity consumption data collected by the smart meter may lead to the leakage of user privacy information, and traditional differential privacy solutions will affect the accuracy of data analysis results in user daily electricity consumption mode analysis.

Method used

A method of user daily electricity model analysis to protect privacy is proposed. User daily electricity data is standardized and clustered through the power supply side, and the data is disturbed based on differential privacy, and the disturbed data set is obtained, and the power sales side is based on The perturbation data set calculates the estimated user daily electricity pattern.

Benefits of technology

Without sharing original electricity consumption data, ensure the accuracy of user daily electricity consumption pattern analysis results, protect user privacy, and avoid the negative impact of data disturbance on analysis results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119397269A_ABST
    Figure CN119397269A_ABST
Patent Text Reader

Abstract

The invention discloses a user daily electricity consumption mode analysis method for protecting user privacy, which comprises the following steps: a power supply side collects original user daily electricity consumption data from an intelligent electric meter deployed at a user side, summarizes the original user daily electricity consumption data into an original data set, and standardizes the user daily electricity consumption data to obtain a standard data set; the power supply side extracts an original user daily power consumption mode according to the standard data set, and obtains the category of each daily power consumption mode in the standard data set; the power supply side performs data perturbation on the standard data set based on differential privacy to obtain a perturbation data set; and the electricity selling side calculates and estimates a daily electricity consumption mode extraction result of the user according to the category of the daily electricity consumption mode and the disturbance data set obtained in the process. According to the method, the original power consumption data is analyzed on the power supply side, and the power selling side obtains the estimated analysis result through disturbed data calculation, so that the original power consumption data is isolated from the power selling side, and the privacy of the power consumption data of the user is protected.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a daily electricity usage pattern analysis technology, and in particular to a user's daily electricity usage pattern analysis method that protects privacy. Background Art

[0002] With the development of the Internet of Things and big data technologies, traditional power systems are gradually evolving towards new smart grids. At this stage, a large-scale, distributed energy network structure has been initially formed. In the era of big data, data is the most important basic resource. Big data technology improves the ability and efficiency of obtaining information from data. In smart grids, it is a development trend to combine edge computing, the Internet of Things and other technologies to collect, store and analyze a large amount of electricity consumption data. This highly efficient power data analysis solution can continuously optimize the management of power resources, improve the efficiency of power system operation and reduce costs, while providing users with a stable power supply.

[0003] In smart grids, smart meters collect users' electricity consumption data for power data analysis, such as short-term load forecasting, demand-side response, and extraction of users' daily electricity consumption patterns. Smart meters can collect users' electricity consumption information in real time and at high frequency. These data are closely related to users' lives. If they are not used in a standardized manner, they may lead to the leakage of users' personal privacy information. Users' privacy concerns about this fine-grained data collection may also hinder the popularization of smart grids. Therefore, for the electricity consumption data collected by smart meters, how to make full use of the data value and solve users' privacy concerns is an urgent problem to be solved in the data analysis task of the new smart grid.

[0004] Clustering-based analysis of daily electricity consumption patterns of users is a classic application of power data analysis. Extracting typical daily electricity consumption patterns from the electricity consumption data of users in a certain area, and providing convenience for both users and power companies in the area based on these electricity consumption patterns, can enable the power system to operate stably and long-term. For example, power companies can dynamically formulate time-of-use electricity price strategies based on typical daily electricity consumption patterns and their frequencies, and users will adjust their electricity consumption strategies in a timely manner according to electricity prices, thereby reducing peak electricity consumption and optimizing power energy production. Users can also choose to purchase electricity during low-price periods to reduce electricity costs.

[0005] There are two classic technical solutions for protecting data privacy, namely data encryption and data perturbation. Data encryption is based on cryptography to protect the data itself. Encrypted data can only be decrypted and viewed with a key, so it is very secure. However, key management of cryptographic systems has always been a difficult problem to solve, and key leakage can lead to serious consequences. In addition, cryptography-based solutions have certain requirements for equipment in terms of computational complexity. For high-frequency and large-scale data collection, the computing power of the equipment is required to be high, and the transmission of the calculated ciphertext in the network will also bring a lot of burden in terms of communication. The data perturbation solution allows the trusted entity to perturb the data, such as adding noise or randomly mapping to other value domains, so that the data obtained by the data analyst is no longer real data. Because of the perturbation, the data analyst cannot attribute the specific data to a certain owner, but can obtain unbiased statistical results based on these data analyses, so this solution is widely used in the field of data analysis. However, the data perturbation solution will destroy the characteristics of the data itself, so it is not suitable for fields with high numerical accuracy.

[0006] Differential privacy is a privacy definition that quantifies the mathematical relationship between the degree of data perturbation and the degree of privacy protection. Therefore, it is widely used in the field of privacy protection. Before the emergence of differential privacy, privacy protection was usually related to the background knowledge of the attacker. When the attacker has enough background knowledge, he can always differentiate the data to obtain sensitive information of a specific individual. Differential privacy uses a randomization mechanism to prevent the attacker from accurately determining the source of the data even if he obtains the data. Therefore, no matter how much background knowledge the attacker has, he cannot obtain the data of a specific individual, so the privacy of the individual is protected. The data perturbation mechanism based on differential privacy to protect privacy has been widely used in the field of data analysis. However, the use of randomization mechanism to perturb the value will have an irreparable impact on the data, which is reflected in the unreliability of the data analysis results. In the analysis of users' daily electricity consumption patterns, the use of traditional solutions to perturb electricity consumption data will directly affect the results of data analysis, which is reflected in the large deviation between the electricity consumption pattern obtained by clustering and the actual result, and the frequency of the typical pattern is different from the actual result. Summary of the invention

[0007] In order to solve the problems existing in the above-mentioned technology and prevent the power sales side from accessing the original power consumption data but being able to obtain accurate analysis results of the user's daily power consumption pattern, the present invention proposes a privacy-protected user daily power consumption pattern analysis method, which can share the results of power consumption data clustering analysis with the power sales side without sharing the original power consumption data, while ensuring that the results have good accuracy.

[0008] The technical solution to achieve the purpose of the present invention is: a privacy-protecting method for analyzing a user's daily electricity usage pattern, comprising:

[0009] The power supply side collects the original daily electricity consumption data of users from the smart meters deployed on the user side, aggregates them into original data sets, and normalizes the daily electricity consumption data of users to obtain normalized data sets;

[0010] The power supply side extracts the original user daily power consumption pattern according to the standard data set, and obtains the category to which each daily power consumption pattern in the standard data set belongs;

[0011] The power supply side perturbs the standard data set based on differential privacy to obtain a perturbed data set.

[0012] The electricity sales side calculates the estimated user daily electricity consumption pattern based on the category of each daily electricity consumption pattern and the disturbance data set.

[0013] Preferably, the power supply side collects original daily electricity consumption data of users from smart meters deployed on the user side, aggregates the data into an original data set, and normalizes the daily electricity consumption data of users to obtain a normalized data set, including:

[0014] User daily electricity consumption data collection module: responsible for collecting the value sequence of the corresponding user's electricity consumption within a daily cycle and sending it to the smart meter pre-installed on the user side;

[0015] User daily electricity consumption data preprocessing module: summarizes the user daily electricity consumption data collected by all smart meters in the area. Because the extreme values ​​of each user's daily electricity consumption data are different, a normalized conversion function is used to map the user's daily electricity consumption data to a fixed interval to obtain the corresponding user's daily electricity consumption pattern. Only the trend and peak information required for electricity consumption pattern analysis are retained, without reflecting the actual electricity consumption data value.

[0016] The power consumption data is t-dimensional vector d, and the power consumption pattern is a vector of the same dimension p. The normalized conversion function is as follows:

[0017] p i =(d i -d min ) / (d max -d min ).

[0018] Where p i d i Represents the i-th dimension component of vector p and d respectively, min Indicates the minimum value of the corresponding daily electricity consumption data sample, d max Indicates the maximum value of the corresponding daily electricity consumption data sample.

[0019] Preferably, the power supply side extracts the original user daily power consumption pattern according to the standard data set, and obtains the category to which each daily power consumption pattern in the standard data set belongs, including:

[0020] According to the predefined number of electricity consumption pattern categories K, K samples are randomly selected from the standard data set as the initial centroid of each subset;

[0021] Calculate the Euclidean distance from the remaining samples in the standard data set to the K centroids, and classify each sample into the closest subset based on the distance;

[0022] Calculate the sample mean of each subset as the new centroid;

[0023] Repeat until the samples in each subset no longer change.

[0024] After clustering analysis, the standard data set is divided into K subsets, denoted by C i is the i-th subset, and the number of samples in this subset is |C i |, the centroid of the subset is the average value of all samples in it, and the K centroids are the extracted daily electricity consumption patterns of users.

[0025] Preferably, the power supply side performs data perturbation on the standard data set based on differential privacy to obtain a perturbed data set, including:

[0026] According to the predefined privacy budget ε, based on differential privacy, all values ​​in the canonical data set are perturbed one by one according to the randomized perturbation mechanism.

[0027] The differential privacy is a rigorous mathematical definition. For a randomization mechanism M, its domain is D and its range is Range(M), then for any x1,x2∈D, and x * ∈Range(M), the following holds:

[0028] Pr[M(x1)=x * ]≤exp(ε)×Pr[M(x2)=x * ].

[0029] Where Pr[M(x1)=x * ] indicates that the randomization mechanism inputs x1 and obtains x * The probability of * , then according to the above randomization mechanism, the probability that the third party infers that the original data is x1 or x2 is That is, the smaller ε is, the closer the third party's guess of the true value of the original data is to random guessing. In this way, even if the third party guesses the original data, the user has a reasonable reason to deny that the data belongs to him. In this way, the user's privacy is protected.

[0030] Where ε is a constant greater than zero.

[0031] Preferably, the randomization mechanism M is characterized by comprising:

[0032] The output of the randomization mechanism M is determined according to the probability distribution function, where the probability distribution function is as follows:

[0033]

[0034] Where p i represents the input of the randomization mechanism M, Represents the perturbation output value of the randomization mechanism M.

[0035] The specific perturbation process is as follows: i , according to the probability in the probability distribution function Sample a Bernoulli variable u, if u = 1, then perturb the output result to Otherwise, the output result is disturbed to

[0036] The result obtained after perturbing all the data in the standard data set is the perturbed data set.

[0037] Preferably, the electricity sales side calculates the estimated daily electricity consumption pattern of the user according to the category of each daily electricity consumption pattern and the disturbance data set, including:

[0038] The data receiving module is responsible for receiving the analysis and disturbance results of the standard data set by the power supply side, and dividing the disturbance data set into K subsets according to the analysis results of the standard data set;

[0039] The daily electricity consumption pattern calculation module is responsible for calculating the original daily electricity consumption pattern analysis results according to the subset of the disturbance data set divided by the data receiving module.

[0040] Preferably, the data receiving module includes:

[0041] Obtaining the extraction result of the standard data set from the power supply side, and obtaining the sample number of the data set and the number of the subset to which it belongs;

[0042] Obtain the disturbance result of the standard data set from the power supply side, and obtain the sample number of the data set and the corresponding disturbance vector;

[0043] The above results are integrated according to the same number to obtain the division result of the perturbation data set.

[0044] Preferably, the daily electricity consumption pattern calculation module includes:

[0045] According to the K subsets divided by the disturbance data set, the sample average of each subset is calculated to obtain the calculation result of the user's daily electricity consumption pattern. The specific calculation process is as follows:

[0046] Note:i is the ith subset divided by the perturbation data set. The number of samples in this subset is |P i |, calculate P i The sample mean of is taken as the centroid of the subset.

[0047] According to the above method, the centroid of each subset is calculated to obtain the estimated values ​​of the K centroids extracted by the power supply side, which is the estimated result of the user's daily electricity consumption pattern obtained by the power sales side.

[0048] A computer device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the steps of the above method are implemented when the processor executes the program.

[0049] A computer-readable storage medium stores a computer program, which implements the steps of the above method when executed by a processor.

[0050] Compared with the prior art, the significant advantages of the present invention are: in view of the privacy concerns that may arise from the transmission of electricity consumption data between the user side, the power supply side and the power sales side in the smart grid, the present invention proposes a privacy-protected user daily electricity consumption pattern analysis method, which uses the differential privacy mechanism to hand over the data analysis task to the power supply side, and the power sales side only needs to calculate and estimate the real data analysis results. Using the above scheme, there is no direct real data interaction between the user side and the power sales side, and the power sales side can calculate and estimate the typical user daily electricity consumption pattern results extracted by the power supply side. The power supply side first preprocesses the electricity consumption data, and then performs data analysis and data perturbation on the preprocessed normative data respectively. The results of data analysis are used for calculation and estimation on the power sales side, and the results of data perturbation are used as the data source for calculation on the power sales side. Since the results of data analysis are real, in the clustering-based analysis of user daily electricity consumption patterns, the results obtained by the power sales side will not have frequency differences with the real results, avoiding the impact of data perturbation on the data analysis results. The real cluster centroids are calculated based on the perturbed data instead of publishing them after perturbing the centroids, which further reduces the result errors caused by randomness and improves the accuracy of the calculation results. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] Figure 1 The present invention is a flow chart of a method for analyzing a user's daily electricity usage pattern in a privacy-protecting manner.

[0052] Figure 2 It is a data collection and preprocessing flow chart of the present invention.

[0053] Figure 3 This is a specific implementation framework diagram of a privacy-protecting user daily electricity usage pattern analysis method of the present invention.

[0054] Figure 4This is a comparison chart of a typical user's daily electricity consumption pattern extracted by the present invention and the actual result.

[0055] Figure 5 This is a comparison chart of a typical user's daily electricity consumption pattern 2 extracted by the present invention and the actual result. DETAILED DESCRIPTION

[0056] In order to better understand the present invention, the contents of the present invention are further described below in conjunction with the accompanying drawings and embodiments of the specification.

[0057] A privacy-preserving method for analyzing daily electricity consumption patterns of users. The specific process is as follows: Figure 1 As shown, including:

[0058] Step 1: The power supply side collects the original daily electricity consumption data of users from the smart meters deployed on the user side, aggregates them into an original data set, and normalizes the daily electricity consumption data of users to obtain a standardized data set;

[0059] Step 2: The power supply side extracts the original user daily power consumption pattern according to the standard data set, and obtains the category to which each daily power consumption pattern in the standard data set belongs;

[0060] Step 3: Based on differential privacy, the power supply side perturbs the standard data set to obtain a perturbed data set;

[0061] Step 4: The electricity sales side calculates the estimated user daily electricity consumption pattern based on the category of each daily electricity consumption pattern obtained in step 2 and the disturbance data set obtained in step 3.

[0062] In step 1, the daily electricity consumption data collected by the smart meter deployed on the user side is time series data about electricity consumption. These data will have different performance characteristics according to different patterns of user electricity consumption behavior. Therefore, the data needs to be preprocessed for further data analysis. The specific data collection and preprocessing process can be divided into two modules, such as Figure 2 shown.

[0063] User daily electricity consumption data collection module: responsible for collecting the value sequence of the corresponding user's electricity consumption within a daily cycle and sending it to the smart meter pre-installed on the user side;

[0064] User daily electricity consumption data preprocessing module: summarizes the user daily electricity consumption data collected by all smart meters in the area. Because each user's daily electricity consumption data is different, a normalized conversion function is used to map the user's daily electricity consumption data to a fixed interval to obtain the corresponding user's daily electricity consumption pattern. Only the trend and peak information required for electricity consumption pattern analysis is retained, without reflecting the actual electricity consumption data value.

[0065] Before normalizing the electricity consumption data, it is necessary to filter out the data entries that are incomplete and cannot show obvious trends and peaks in the original electricity consumption data. Generally speaking, incomplete data accounts for a very small proportion of the overall sample, so it can be deleted directly. In addition, some electricity consumption data cannot show the fluctuation trend characteristics required for daily electricity consumption pattern analysis, so they also need to be filtered.

[0066] The electricity consumption data that cannot show the trend and peak information required for electricity consumption pattern analysis is recorded as stable data. The specific process of filtering stable data is to calculate the variance of the electricity consumption data sample. If the variance is less than 0.1, it means that the daily electricity power fluctuation of the sample does not exceed 100 watts. Therefore, the sample is meaningless for the daily electricity consumption pattern extraction task, so the sample is deleted from the data set.

[0067] The specific process of normalizing the power consumption data is to record the power consumption data as a t-dimensional vector d, and the power consumption pattern as a vector p of the same dimension. The normalization conversion function is as follows:

[0068] p i =(d i -d min ) / (d max -d min ).

[0069] Where p i d i Represents the i-th dimension component of vector p and d respectively, min Indicates the minimum value of the corresponding daily electricity consumption data sample, d max Indicates the maximum value of the corresponding daily electricity consumption data sample.

[0070] In step 2, assume that there are N smart meters in a certain area to collect electricity consumption data of corresponding users, and the standard data set is denoted as P. Then P consists of N electricity consumption data samples. composition.

[0071] According to the predefined number of typical electricity consumption mode categories K, K samples are randomly selected from the standard data set as the initial centroid vector set:

[0072] Z={Z1,Z2,…,Z k}.

[0073] Start iteration and divide each sample into different patterns based on Euclidean distance.

[0074] Based on the Euclidean distance formula Calculate the sample and each center Z k The distance vector D i .

[0075] According to the principle of the closest distance, the sample p (i)into the appropriate subsets.

[0076] Update the centroids of the K subsets.

[0077] The new centroid calculation formula is:

[0078] Where Z k For subset C k The number of samples in this subset is |C k |.

[0079] Calculate the value of the clustering objective function, and stop the iteration when the difference between the current objective function value and the previous objective function value meets the constraint condition or reaches the maximum number of iterations.

[0080] The calculation formula of the objective function is:

[0081]

[0082] The constraint condition is ||J (t+1) -J (t) ||≤δ, where δ is usually a constant greater than zero. This constraint means that after iteration, all centroids are not updated, that is, the optimal partition is achieved.

[0083] After clustering analysis, the standard data set is divided into K subsets, denoted by C i is the i-th subset, and the number of samples in this subset is |C i |, the centroid of the subset is the average value of all samples in it, and the K centroids are the extracted daily electricity consumption patterns of users.

[0084] The step three specifically includes:

[0085] According to the predefined privacy budget ε, based on differential privacy, all values ​​in the canonical data set are perturbed one by one according to the randomized perturbation mechanism.

[0086] The differential privacy is a rigorous mathematical definition, characterized by: for a randomization mechanism M, whose domain is D and range is Range(M), then for any x1,x2∈D, and x * ∈Range(M), the following holds:

[0087] Pr[M(x1)=x * ]≤exp(ε)×Pr[M(x2)=x * ].

[0088] Where Pr[M(x1)=x * ] indicates that the randomization mechanism inputs x1 and obtains x *The probability of * , then according to the above randomization mechanism, the probability that the third party infers that the original data is x1 or x2 is That is, the smaller ε is, the closer the third party's guess of the true value of the original data is to random guessing. In this way, even if the third party guesses the original data, the user has a reasonable reason to deny that the data belongs to him. In this way, the user's privacy is protected.

[0089] Where ε is a constant greater than zero.

[0090] The randomization mechanism M comprises:

[0091] The output of the randomization mechanism M is determined according to the probability distribution function, where the probability distribution function is as follows:

[0092]

[0093] Where p i represents the input of the randomization mechanism M, Represents the perturbation output value of the randomization mechanism M.

[0094] The randomization mechanism M satisfies the definition of differential privacy, as shown below:

[0095] According to the above probability distribution function, let the output of the randomization mechanism M be p * , then for any input p1, p2, the following holds:

[0096]

[0097] It is not difficult to see that when the value of p1 in the above formula is less than 1, the above formula is less than e ε .

[0098] Therefore, we only need to map the numerical input to the interval (-1,1) to meet the definition of differential privacy.

[0099] The specific perturbation process is as follows: first, the input p i Perform a linear transformation to map it to the interval (-1,1). The specific linear transformation formula is:

[0100] p i =2(p i -p min ) / (p max -p min )-1.

[0101] Where p i is the component in the sample vector, p min is the minimum value of the sample component, p maxis the maximum value of the component of this sample.

[0102] Then according to the probability in the probability distribution function Sample a Bernoulli variable u, if u = 1, then perturb the output result to Otherwise, the output result is disturbed to

[0103] The result obtained after perturbing all the data in the standard data set is the perturbed data set.

[0104] The value after disturbance is the original value p i The unbiased estimate of is shown as follows:

[0105]

[0106] The step 4 specifically includes:

[0107] The data receiving module is responsible for receiving the analysis and disturbance results of the standard data set by the power supply side, and dividing the disturbance data set into K subsets according to the analysis results of the standard data set;

[0108] The daily electricity consumption pattern calculation module is responsible for calculating the original daily electricity consumption pattern analysis results according to the subset of the disturbance data set divided by the data receiving module.

[0109] The data receiving module comprises:

[0110] Obtaining the extraction result of the standard data set from the power supply side, and obtaining the sample number of the data set and the number of the subset to which it belongs;

[0111] Obtain the disturbance result of the standard data set from the power supply side, and obtain the sample number of the data set and the corresponding disturbance vector;

[0112] The above results are integrated according to the same number to obtain the division result of the perturbation data set.

[0113] The daily electricity consumption mode calculation module includes:

[0114] According to the K subsets divided by the disturbance data set, the sample average of each subset is calculated to obtain the calculation result of the user's daily electricity consumption pattern. The specific calculation process is as follows:

[0115] Note: i is the ith subset divided by the perturbation data set. The number of samples in this subset is |P i |, calculate P i The sample mean of is taken as the centroid of the subset.

[0116] According to the above method, the centroid of each subset is calculated to obtain the estimated values ​​of the K centroids extracted by the power supply side, which is the estimated result of the user's daily electricity consumption pattern obtained by the power sales side.

[0117] To better understand the present invention, the following is an experimental result of the present invention. The experimental framework is as follows: Figure 3 shown.

[0118] Taking the electricity sales market as an example, there are electricity purchasing customers (users), power supply grids (power supply side) and power sales companies (power sales side) in the electricity sales market. Customers are electricity consumers who draw electricity from the grid and pay electricity bills according to the time-of-use electricity price of the power sales company. Obviously, there is an inevitable exchange of electricity consumption data between the grid and customers, so the grid is responsible for protecting the security of electricity consumption data and protecting the privacy of customers. Since electricity data is closely related to the lives of customers, it contains a lot of private information. Based on electricity consumption data, it is not difficult to infer the customer's living habits, the composition of household appliances and even more detailed family situations. Therefore, the grid must ensure that the customer's electricity consumption data is not leaked. However, electricity consumption data is also the most valuable data for big data analysis of the power system, which can provide important support for the stable, efficient and long-term operation of the power system. For example, by analyzing customer electricity consumption data, a time-of-use electricity price strategy can be formulated to allow customers to allocate electricity consumption time periods according to electricity demand and electricity price standards, which can effectively reduce the peak load of the power grid and ensure the safe and stable operation of the power system.

[0119] Under the above requirements, the present invention proposes a privacy-protecting user daily electricity consumption pattern analysis method, which is characterized in that the data analysis task is handed over to the data holder, and the original data is perturbed, and the calculation basis and the perturbed data are released to the data demander according to the results of the data analysis. The data demander calculates the analysis results based on the calculation basis and perturbed data provided by the data holder. In this way, the data demander does not need to access the original data, which protects the privacy of the user.

[0120] The specific experimental steps are as follows:

[0121] Step 1: Data preparation. The GoiEner dataset is selected. This is a public smart meter dataset that collects long-term electricity consumption data of 25,559 households in Spain on an hourly basis for analyzing electricity consumption patterns.

[0122] Step 2: Cluster analysis. Cluster analysis is the most classic method for analyzing electricity consumption patterns. The data samples are divided based on K-means cluster analysis as the basis for estimation calculation.

[0123] Step 3: Data perturbation: Based on differential privacy, the original data is perturbed and the perturbed data is published.

[0124] Step 4: Estimation calculation: According to the sample division, calculate the mean of the perturbation data and obtain the estimated cluster analysis results.

[0125] In the specific implementation, cluster analysis and data disturbance are performed on the data holder (power supply side), and estimation calculation is performed on the data demander (power sales side).

[0126] In the data preparation stage, since the GoiEner dataset is divided into three parts according to the collection time, the middle part containing the data of 15,562 households from March 1, 2020 to May 30, 2021 is selected without loss of generality. As an example, only one experiment is required, so the median of each household's daily electricity consumption data is calculated as the household's electricity consumption data. In addition, since the characteristics of daily electricity consumption data are relatively simple, data with small data fluctuations not only increase the cost of data analysis, but also have a great impact on the analysis results. Therefore, only data samples with sample variance greater than 0.1 are selected. Finally, 1,263 data samples are selected as the experimental data set.

[0127] The maximum-minimum normalization is used to normalize the data set for cluster analysis. In addition, according to the above data perturbation method, the input of the data perturbation needs to be in the range of [-1,1]. Therefore, in the data perturbation stage, the data needs to be mapped to the range of [-1,1] first, and then restored after the result is calculated. According to the post-processing property of differential privacy, the restored data still satisfies differential privacy.

[0128] In the data perturbation stage, based on differential privacy and according to the above data perturbation method, the data of a power consumption mode data sample after perturbation is shown in Table 1:

[0129] Table 1

[0130]

[0131]

[0132] It can be seen from Table 1 that no matter what the original data value is, according to the above perturbation method, the perturbed data has only two extreme value options, so the perturbed data will not leak the characteristics of the original data. After all samples are perturbed, they are released to the data demander.

[0133] After the data demander obtains the disturbance data and calculation basis, two typical daily electricity consumption patterns are selected. Figure 4 , Figure 5 The calculated result (orange) is basically the same as the real result (blue), which shows that the cluster analysis results obtained using the perturbed data still maintain a high level of usability.

[0134] The above embodiments are merely illustrative of the structure, principle and efficacy of the present invention, and are not intended to limit the present invention. Anyone familiar with the technology may modify or change the above embodiments without violating the spirit and scope of the present invention. Therefore, all equivalent modifications or changes made by a person of ordinary skill in the art without departing from the spirit and technical ideas disclosed by the present invention shall still be covered by the claims of the present invention.

Claims

1. A privacy-preserving method for analyzing a user's daily electricity usage pattern, characterized in that: The method comprises: The power supply side collects the original daily electricity consumption data of users from the smart meters deployed on the user side, aggregates them into original data sets, and normalizes the daily electricity consumption data of users to obtain normalized data sets; The power supply side extracts the original user daily power consumption pattern according to the standard data set, and obtains the category to which each daily power consumption pattern in the standard data set belongs; The power supply side perturbs the standard data set based on differential privacy to obtain a perturbed data set. The electricity sales side calculates the estimated user daily electricity consumption pattern based on the category of each daily electricity consumption pattern and the disturbance data set.

2. The method according to claim 1, characterized in that The power supply side collects original daily electricity consumption data from the smart meters deployed on the user side, aggregates them into an original data set, and normalizes the daily electricity consumption data to obtain a normalized data set, including: The user daily electricity consumption data collection module collects the value sequence of the corresponding user's electricity consumption within a daily cycle and sends it to the smart meter pre-installed on the user side; The user daily electricity consumption data preprocessing module aggregates the user daily electricity consumption data collected by all smart meters in the area, and uses a normalized conversion function to map the user daily electricity consumption data to a fixed interval to obtain the corresponding user daily electricity consumption pattern; The power consumption data is t-dimensional vector d, and the power consumption pattern is a vector of the same dimension p. The normalized conversion function is as follows: p i =(d i -d min ) / (d max -d min ); Where p i ,d i Represents the i-th dimension component of vector p and d respectively, min Indicates the minimum value of the corresponding daily electricity consumption data sample, d max Indicates the maximum value of the corresponding daily electricity consumption data sample.

3. The method according to claim 1, characterized in that The power supply side extracts the original user daily power consumption pattern according to the standard data set, and obtains the category to which each daily power consumption pattern in the standard data set belongs, including: According to the predefined number of electricity consumption pattern categories K, K samples are randomly selected from the standard data set as the initial centroid of each subset; Calculate the Euclidean distance from the remaining samples in the standard data set to the K centroids, and classify each sample into the closest subset based on the distance; Calculate the sample mean of each subset as the new centroid; Repeat until the samples in each subset no longer change; After clustering analysis, the standard data set is divided into K subsets, denoted by C i is the i-th subset, and the number of samples in this subset is |C i |, the centroid of the subset is the average value of all samples in it, and the K centroids are the extracted daily electricity consumption patterns of users.

4. The method according to claim 1, characterized in that: The power supply side performs data perturbation on the standard data set based on differential privacy to obtain a perturbed data set, including: According to the predefined privacy budget ε, all values ​​in the canonical data set are perturbed one by one according to the randomized perturbation mechanism based on differential privacy; For a randomization mechanism M, whose domain is D and range is Range(M), then for any x1, x2∈D, and x * ∈Range(M), the following holds: Pr[M(x1)=x * ]≤exp(ε)×Pr[M(x2)=x * ]; Where Pr[M(x1)=x * ] indicates that the randomization mechanism inputs x1 and obtains x * The probability of * , then according to the above randomization mechanism, the probability that the third party infers that the original data is x1 or x2 is That is, the smaller ε is, the closer the third party's guess of the true value of the original data is to random guessing; where ε is a constant greater than zero.

5. The method according to claim 4, characterized in that The output of the randomization mechanism M is determined according to the probability distribution function, where the probability distribution function is as follows: Where p i represents the input of the randomization mechanism M, represents the perturbation output value of the randomization mechanism M; The specific perturbation process is as follows: i , according to the probability in the probability distribution function Sample a Bernoulli variable u, if u = 1, then perturb the output result to Otherwise, the output result is disturbed to The result obtained after perturbing all the data in the standard data set is the perturbed data set.

6. The method according to claim 1, characterized in that The electricity sales side calculates the estimated user daily electricity consumption pattern according to the category of each daily electricity consumption pattern and the disturbance data set, including: The data receiving module receives the analysis and disturbance results of the standard data set by the power supply side, and divides the disturbance data set into K subsets according to the analysis results of the standard data set; The daily power consumption pattern calculation module calculates the original daily power consumption pattern analysis result according to the subset of the disturbance data set divided by the data receiving module.

7. The method according to claim 6, characterized in that The data receiving module specifically includes: Obtaining the extraction result of the standard data set from the power supply side, and obtaining the sample number of the data set and the number of the subset to which it belongs; Obtain the disturbance result of the standard data set from the power supply side, and obtain the sample number of the data set and the corresponding disturbance vector; The above results are integrated according to the same number to obtain the division result of the perturbation data set.

8. The method according to claim 6, characterized in that The daily electricity consumption pattern calculation module calculates the sample average value of each subset according to the K subsets divided by the disturbance data set to obtain the calculation result of the user's daily electricity consumption pattern. The specific calculation process is as follows: Note: i is the ith subset divided by the perturbation data set. The number of samples in this subset is |P i |, calculate P i The sample mean of is taken as the centroid of the subset; The centroid of each subset is calculated to obtain the estimated values ​​of the K centroids extracted by the power supply side, which is the estimated result of the user's daily electricity consumption pattern obtained by the power sales side.

9. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps of the method described in any one of claims 1 to 8 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of any method described in claims 1-8 are implemented.