Smart grid data aggregation method based on w event-level local differential privacy
By adopting w event-level local differential privacy method in the smart grid, using sliding windows and privacy budget absorption strategies, smart meters perform data preprocessing and disturbance processing, solving the problem of privacy protection and aggregation accuracy under dynamic changes of users, and achieving efficient user privacy protection and accurate data aggregation.
Patent Information
- Application Number
- CN202310213668.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-08
- Publication Date
- 2025-08-22
- Estimated Expiration
- 2043-03-08
AI Technical Summary
In a smart grid, how to accurately aggregate and analyze user's electricity usage data while protecting user privacy from being leaked, especially in the case of dynamic changes in users and lack of trusted third parties, how to ensure the accuracy of aggregation results.
Using a method based on w event-level local differential privacy, the privacy budget and sliding window are released through the control center, the smart meter performs data preprocessing, correlation judgment and disturbance processing, the Laplace noise mechanism is used to protect data locally, and aggregate calculation is performed through the gateway, and the privacy budget absorption strategy is used to allocate the privacy budget.
It realizes that while protecting user privacy, it reduces computing and storage overhead and ensures the accuracy of aggregated results. Attackers cannot obtain real electricity consumption data, and the aggregated results are highly correlated with real results.
Smart Images

Figure CN116471040B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to smart grid information security technology and relates to a smart grid data aggregation method based on w event-level local differential privacy. Background Art
[0002] With the rapid development of smart grids, a vast amount of user electricity usage data has been accumulated across various aspects of power system operations, equipment status monitoring, and power consumption information collection. In the smart grid system architecture, smart meters record electricity usage data every 15 minutes or less, encrypt it, and send it to other smart devices or aggregators (gateways). This fine-grained data can reveal user behavior patterns and routines, household finances and income status, and personal preferences. Therefore, how to accurately aggregate and analyze user electricity usage data while protecting user privacy in smart grids is a critical issue.
[0003] Privacy protection schemes for smart grid data aggregation scenarios are primarily based on cryptographic algorithms such as homomorphic encryption and masked data collection schemes. Some cryptographic schemes impose a heavy computational burden on smart meters. Masked schemes typically involve an entity assigning a series of noise values to each smart meter, with each smart meter obfuscating the data with these noise values. A typical implementation of this technique uses differential privacy. However, in real life, trusted third parties are difficult to find. Therefore, local differential privacy (LDP) has been proposed and widely used.
[0004] LDP does not require a trusted third party, allowing users to process data locally. However, in smart grid systems, users may join and leave at any time, and each user's user data changes dynamically. Furthermore, data from consecutive moments does not change significantly. Therefore, applying LDP to electricity consumption data streams and ensuring the accuracy of user aggregation results is a key issue. Summary of the Invention
[0005] Purpose of the invention: The present invention provides a smart grid data aggregation method based on w-event-level local differential privacy, which is mainly used to protect users' electricity consumption data and behavior patterns, ensure the accuracy of gateway aggregation results, and realize the control center's analysis of electricity consumption and distribution in a certain area.
[0006] In order to achieve the above-mentioned purpose of the invention, the technical solution provided by the present invention is as follows.
[0007] A smart grid data aggregation method based on w event-level local differential privacy includes the following steps:
[0008] S1. The control center publishes the privacy budget and sliding window size required in the aggregation process. The control center obtains the total electricity consumption in the area through the gateway. The sliding window size is w, and the privacy budget of each smart meter in the w-length window is ε.
[0009] S2, pre-processing stage: Each smart meter will store historical data, denoted as d history , for d history Perform disturbance processing and find the optimal two thresholds τ by minimizing the error head and τ tail , when the data at the smart meter is too large or too small, use τ head and τ tail Truncated data, where the error is defined as:
[0010] For each smart meter, assuming that the electricity consumption data at each moment is between [min, max], d' is the estimated value of the value d, and the expected square error of d' is composed of the variance after perturbation and the truncated deviation, that is:
[0011] E[(d'-d)]=Var[d']+Bias[d'] 2
[0012] Bias is mainly composed of absolute errors caused by truncation. Bias occurs only when data is too large or too small and truncated. Bias is defined as follows:
[0013]
[0014] Since the perturbation uses the Laplace mechanism, the variance can be defined as:
[0015]
[0016] Where Δ represents the sensitivity of the data. In the case of local differential privacy, Δ=(τ tail -τ head ).
[0017] S3. At each timestamp, the data with little change is divided into a group based on the data deviation distance. Then the value of the current timestamp is compared with the similarity between the groups to decide whether to perturb the data at that moment. The deviation function can be used to calculate the error between the data and the average value. The deviation distance is defined as:
[0018]
[0019] Among them, G t It is a temporary grouping at the current moment, which is the union of the grouping at the previous moment and the current moment value.
[0020] S4. Through step S3, if disturbance processing is required, add Laplace noise to the data at that moment and submit it to the gateway. The sensitivity of the Laplace noise mechanism is determined by step S2; otherwise, submit the published value of the last publishing moment to the gateway.
[0021] S5. The gateway receives data published by a large number of users at a certain moment, performs aggregation calculations on the data at this moment, and publishes the aggregation results to the control center.
[0022] Furthermore, step S2 includes the following specific processes:
[0023] In the data domain [min, max], take s values as τ head and τ tail Domain B head and B tail , In each experiment, two values are taken as τ head and τ tail , the historical data is perturbed through steps S3 and S4, and the two thresholds with the smallest expected average error are found as the truncation endpoint values, and then the data is truncate using the two endpoint values.
[0024] Furthermore, the specific method of step S3 is as follows:
[0025] Video P t-1 is the grouping of the previous moment. When the new moment t arrives, assuming that the data after t is truncated There is no significant change from the previous moment, so Find group G t Deviation distance f dev (G t ), when the deviation distance is less than a threshold θ, the data is considered unchanged, and the disturbance value at the previous release time is submitted. The group at the current moment is P t =G t Otherwise, the data needs to be disturbed and a new group is created.
[0026] Furthermore, in step S4, the smart meter needs to add Laplace noise to the data according to the grouping situation. In order to meet the w-event-level local differential privacy, the present invention uses the privacy budget absorption method to allocate a privacy budget to each timestamp: under the window of length w, the privacy budget of each moment is pre-set to If no perturbation is required, set the current privacy budget to 0. If perturbation is required, calculate the time when the privacy budget is 0 within the previous w-1 moments. A The privacy budget at this moment is
[0027] After allocating the privacy budget, the smart meter adds Laplace noise to the data to be disturbed according to the threshold in step S2. The calculation process is as follows:
[0028]
[0029] In a further solution, in step S5, after the gateway receives the disturbance value from the smart meter, it does not need to know other parameters and directly aggregates the values reported by all users in a certain area to obtain a total estimated value.
[0030] Beneficial Effects: This invention provides a technology for publishing smart grid data streams that maintains event-level local differential privacy. It also finds an optimal threshold to reduce data sensitivity, leverages correlations between grid data, and performs grouped perturbation processing on the data. Finally, the gateway performs aggregate calculations. While maintaining local differential privacy, the aggregated results for test data still achieve a high degree of accuracy. Compared with existing technologies, this invention's outstanding features and significant improvements are primarily reflected in the following aspects:
[0031] (1) Compared with traditional smart grid encryption methods, the present invention only requires simple calculation grouping and perturbation processing of numbers, has a smaller computational overhead, and does not need to consider the storage performance of smart meter equipment, thus reducing storage overhead.
[0032] (2) In the present invention, under the setting of local differential privacy, each smart meter only needs to perform all operations locally, and the data sent is perturbed data, so attackers cannot obtain the user's real electricity usage data.
[0033] (3) When perturbing the data and allocating the privacy budget, instead of allocating the same privacy budget at each moment, a privacy budget absorption scheme is adopted to further improve the accuracy of the estimation. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 It is the overall flow chart of the present invention;
[0035] Figure 2 This is a flow chart of data correlation judgment and disturbance processing by the smart meter of the present invention. DETAILED DESCRIPTION
[0036] In order to illustrate the technical solution disclosed by the present invention in detail, further elaboration is given below in conjunction with the accompanying drawings and specific embodiments.
[0037] First, in view of the problem of insufficient protection of grid data in existing smart grid systems, the present invention is a smart grid data aggregation method based on w-event-level local differential privacy. The present invention includes a preprocessing stage, followed by grouping the electricity consumption data according to its correlation, allocating the privacy budget at consecutive moments according to the grouping situation, and finally processing the data disturbance. The gateway receives the noise value after the disturbance and performs aggregation calculation on the data.
[0038] Specifically, see Figure 1 As shown in Figure 1, a smart grid data aggregation method based on event-level local differential privacy is proposed. The steps are as follows:
[0039] (1) During the initialization phase, the gateway needs to pass the required parameters to the smart meter, including the length of the sliding window w, the privacy budget ε, the maximum length of the user group l, and the time interval for collecting data.
[0040] (2) After the smart meter collects the parameters, it performs preprocessing. The preprocessing requires the historical data of the smart meter. The proposed perturbation method is used to head and B tail Find the endpoint value τ with the minimum error head and τ tail , truncate the data that exceeds the threshold. Assume that the data at the smart meter at time t is d t , the calculation process of truncation is as follows:
[0041]
[0042] (3) At time t, combined Figure 2 The smart meter first needs to determine the relevance of electricity usage data. The criterion for determining data relevance is the deviation distance. When the deviation distance is small, the data is considered to be evenly distributed. First, assuming that the data has not changed significantly, it can be merged into the grouping at the previous moment. The deviation distance of the temporary grouping is calculated. When the deviation distance is less than a given threshold, the data is considered to have not changed significantly. Otherwise, a new grouping is created.
[0043] In order to adapt to the change of power consumption data, the threshold value changes with time. In this invention, a PID correction threshold value is used, in which the absolute error between the original data and the disturbance data is used as the feedback error. The PID error can be calculated by feedback error:
[0044]
[0045] PID controller, composed of proportion, integral and derivative. To simplify the calculation, only proportion and integral are considered. p and K i Represents the proportional gain and integral gain scale factors, where K p +Ki =1.
[0046] (4) The smart meter chooses whether to allocate a privacy budget for perturbation processing at this moment according to the grouping situation. If perturbation processing is required, the privacy budget ε is allocated. t , after perturbation, it is published to the gateway. If it does not need to be processed or is set to zero during the privacy budget allocation process, the perturbation value of the previous publishing time is directly published to the gateway. The specific perturbation calculation can be expressed as follows:
[0047]
[0048] Regarding the privacy budget allocation method, this paper provides a privacy budget absorption method. The specific calculation process is as follows:
[0049] Pre-set the privacy budget ε at each moment t =ε / w. To satisfy event-level local differential privacy at w, if the privacy budget is absorbed at a certain moment, the same number of moments must be skipped from subsequent timestamps to ensure that the user is available in the active sliding window. Therefore, it is necessary to first calculate the number of moments that need to be blanked and determine whether the moment is blanked. If it is blanked, the privacy budget is set to 0; if no perturbation is required, the privacy budget is also set to 0; if perturbation is required, the privacy budget is calculated as follows:
[0050]
[0051] Among them, t A It is the number of moments required to absorb.
[0052] (5) After the disturbance of the smart meter is completed, the gateway needs to aggregate and calculate the massive amount of data. The aggregation result is:
[0053]
[0054] Where n is the number of smart meters in this area, represents the result of the disturbance of the i-th smart meter at time t. Finally, the gateway sends this aggregated result to the control center for further analysis and processing.
[0055] Based on the above calculation process, the following are the experimental results of the present invention.
[0056] The experiment used the Irish electricity consumption dataset (CER), a real-world dataset that collects electricity usage data from over 5,000 Irish households and businesses during 2009 and 2010, with data reported every 30 minutes. The experiment selected electricity usage data from two consecutive days, totaling 96 time points, with a window size of 10 and privacy budget values of 0.5, 1, 2, 3, 4, and 5. Because this dataset represents real user electricity usage data, the present invention calculates aggregation results for each of the 96 time points. The estimated aggregation results are compared with the actual aggregation results, using the mean relative error and the correlation coefficient of the data streams as metrics. The final results obtained by selecting the privacy budget absorption strategy are shown in Table 1.
[0057] Experimental results show that as the privacy budget increases, the protection level decreases, and the error of the present invention decreases, increasing the correlation between the estimated and true results. When the privacy budget is set to a minimum of 0.5, the error of the present invention is also small, with the data flow correlation reaching 63%, ensuring accuracy.
[0058] Table 1 Error between gateway estimated aggregation results and true aggregation results
[0059]
[0060] The foregoing description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Those skilled in the art will readily appreciate that various modifications and variations of the present invention are possible. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present invention shall be included within the scope of protection of the present invention.
Claims
1. A smart grid data aggregation method based on event-level local differential privacy, characterized by: The following processing steps are included: S1. The control center publishes the sliding window size w required in the aggregation process and the privacy budget ε of each smart meter under the w-length window; S2, preprocessing stage: according to the historical data d stored in each smart meter history , for d history Perform disturbance processing and find the optimal two thresholds τ by minimizing the error head and τ tail , when the data at the smart meter is too large or too small, use τ head and τ tail Truncated data, where the error is defined as: For each smart meter, assuming that the electricity consumption data at each moment is between [min, max], d' is the estimated value of the value d, and the expected square error of d' is composed of the variance after perturbation and the truncated deviation, that is: E[(d'-d)]=Var[d']+Bias[d'] 2 Bias is mainly composed of absolute errors caused by truncation. Bias occurs only when data is too large or too small and truncated. Bias is defined as follows: Since the perturbation uses the Laplace mechanism, the variance is defined as: Where Δ represents the sensitivity of the data. In the case of local differential privacy, Δ=(τ tail -τ head ); S3. At each timestamp, the data with little change is divided into several groups based on the data deviation distance. Then the value of the current timestamp is compared with the similarity between the groups to decide whether to perturb the data at that moment. The deviation function is used to calculate the error between the data and the average value to measure the variability of the data. The deviation distance is defined as: Among them, G t It is a temporary grouping at the current moment, which is the union of the grouping at the previous moment and the value at the current moment; S4. For data that needs disturbance processing after step S3, add Laplace noise to the data at that moment and submit it to the gateway. The sensitivity of the Laplace noise mechanism is determined by step S2. Otherwise, submit the published value at the last publishing moment to the gateway. S5. When the gateway receives the data published by the user at a certain moment, it performs aggregation calculation on the data at that moment and publishes the aggregation result to the control center.
2. The smart grid data aggregation method based on w event-level local differential privacy according to claim 1 is characterized in that: Step S2 includes the following process: In the data domain [min, max], take s values as τ head and τ tail Domain B head and B tail , Each time we take two values as τ head and τ tail , the historical data is perturbed through steps S3 and S4, and the two thresholds with the smallest expected average error are found as the truncation endpoint values, and then the data is truncate using the two endpoint values.
3. The smart grid data aggregation method based on w event-level local differential privacy according to claim 1 is characterized in that Step S3 includes the following process: Video P t-1 is the grouping of the previous moment. When the new moment t arrives, assuming that the data after t is truncated There is no significant change from the previous moment, so Find group G t Deviation distance f dev (G t ), when the deviation distance is less than a threshold θ, the data is considered unchanged, and the disturbance value at the previous release time is submitted. The group at the current moment is P t =G t Otherwise, the data needs to be disturbed and a new group is created.
4. The smart grid data aggregation method based on w event-level local differential privacy according to claim 1 is characterized in that Step S4 includes the following process: Smart meters need to add Laplace noise to the data according to the grouping situation. In order to meet the w-event-level local differential privacy, the method uses the privacy budget absorption method to allocate a privacy budget to each timestamp: under the window of length w, the privacy budget of each moment is pre-set as If no perturbation is required, set the current privacy budget to 0. If perturbation is required, calculate the time when the privacy budget is 0 within the previous w-1 moments. A The privacy budget at this moment is After allocating a privacy budget, the smart meter adds Laplace noise to the data to be disturbed based on the threshold in step S2. The calculation process is as follows:
5. The smart grid data aggregation method based on w event-level local differential privacy according to claim 1 is characterized in that: Step S5 includes the following process: after receiving the disturbance value from the smart meter, the gateway directly aggregates the values reported by all users in a certain area without knowing other parameters to obtain a total estimated value.