Energy storage battery active simulation enhanced differential privacy data aggregation method and system
By employing a differential privacy data aggregation method enhanced through active simulation of energy storage batteries, combined with conditional generative adversarial networks and differential privacy protection mechanisms, the problem of balancing electricity consumption privacy protection and data availability in smart grids is solved, achieving stronger privacy protection and data accuracy.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- STATE GRID JIANGXI ELECTRIC POWER CO LTD RES INST
- Filing Date
- 2026-03-10
- Publication Date
- 2026-07-07
AI Technical Summary
Existing privacy protection technologies struggle to balance electricity privacy and data availability in smart grids, exhibiting issues such as fixed privacy budgets, passive noise addition, simplistic virtual load template generation methods, and failure to consider data quality differences during multi-user data aggregation.
A differential privacy data aggregation method enhanced by active simulation of energy storage batteries is adopted. Virtual load templates are generated through conditional generative adversarial networks. Combined with the active simulation strategy and differential privacy protection mechanism of energy storage batteries, the privacy budget and sensitivity are dynamically adjusted. Noise is generated using the Laplace mechanism, and data aggregation is performed based on credibility weights.
It significantly enhances privacy protection, improves the ability to identify adversarial attacks, improves data accuracy and availability, prevents attackers from inferring users' electricity consumption patterns, and ensures the accuracy of regional total load data.
Smart Images

Figure CN121808846B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of smart grid privacy protection technology, specifically to a differential privacy data aggregation method and system for active simulation enhancement of energy storage batteries. Background Technology
[0002] With the rapid development of smart grids, the collection and analysis of user electricity consumption data is of great significance for grid dispatching, load forecasting, and demand response. However, electricity consumption data contains users' private information such as lifestyle habits and daily routines, and directly uploading it to the grid poses a risk of privacy leakage.
[0003] Existing privacy protection technologies primarily employ differential privacy mechanisms, which protect privacy by adding noise to electricity consumption data. However, these technologies have the following drawbacks: First, they use fixed privacy budgets and sensitivity parameters, failing to consider differences in time periods, battery status, and electricity consumption fluctuations, making it difficult to balance noise and data quality. Second, they rely solely on passively adding noise or delaying uploads, lacking proactive obfuscation methods, allowing attackers to still identify user electricity consumption patterns through long-term observation. Third, the generation method for virtual load templates is simple and deviates from the actual electricity consumption distribution. Fourth, the aggregation of multi-user data does not consider differences in data quality, resulting in high-noise data reducing the accuracy of the aggregation results. Summary of the Invention
[0004] This invention provides a differential privacy data aggregation method and system for active simulation enhancement of energy storage batteries, which solves the problem of difficulty in balancing electricity privacy protection and data availability in the prior art.
[0005] To achieve the above objectives, the present invention provides the following technical solution:
[0006] The present invention provides a differential privacy data aggregation method for energy storage batteries with active simulation enhancement, comprising:
[0007] S100: Collect historical electricity consumption data of users, preprocess the historical electricity consumption data, generate a virtual load template by using a conditional generative adversarial network and introducing physical feasibility constraints, and the virtual load template contains power sequences under different conditions.
[0008] S200: Based on the virtual load template, the energy storage battery is controlled to execute an active simulation strategy. When the user has no electricity consumption activity, the energy storage battery performs charging and discharging operations according to the virtual load template and sends simulated electricity consumption signals to the grid side. When the user has electricity consumption activity and the energy storage battery's charge status meets the power supply conditions, the energy storage battery supplies power and shields the real electricity consumption data from the grid side.
[0009] S300: Real-time monitoring of the energy storage battery's power status and the user's instantaneous power demand. When the energy storage battery's power status is lower than a preset threshold or the user's instantaneous power demand exceeds the energy storage battery's maximum output power, a differential privacy protection mechanism is triggered.
[0010] S400: After the differential privacy protection mechanism is triggered, the privacy budget and sensitivity are dynamically determined by taking the energy storage battery power status, current time period information and user power consumption fluctuation rate as inputs, and the Laplace mechanism is used to generate noise based on the privacy budget and sensitivity. The noise is then superimposed on the power consumption data and uploaded to the power grid.
[0011] S500: When aggregating electricity consumption data from multiple users, it calculates a confidence weight based on the energy storage battery status and noise level of each user, and then performs a weighted summation of the data from multiple users based on the confidence weight to generate the total regional load data.
[0012] As a preferred technical solution of the present invention, in S100, the conditional generative adversarial network includes a generator and a discriminator. The generator adopts a deconvolutional neural network structure and generates a power sequence with random noise vector and conditional vector as input. The conditional vector includes time type, weekday and holiday type, season type and user category information.
[0013] As a preferred technical solution of the present invention, the physical feasibility constraint in S100 is added to the loss function of the generator in the form of a penalty term, the penalty term including a power limit penalty term and an energy limit penalty term.
[0014] As a preferred embodiment of the present invention, in S200, the step of the energy storage battery performing charging and discharging operations according to the virtual load template when the user has no electricity consumption includes:
[0015] Select a power sequence from the virtual load template that is different from the current time period;
[0016] The charging and discharging power and duration of the energy storage battery are controlled according to the power value at each moment in the power sequence.
[0017] As a preferred embodiment of the present invention, in S200, the energy storage battery's state of charge satisfying the power supply conditions includes:
[0018] The energy storage battery's charge level is higher than a preset threshold;
[0019] The user's instantaneous power demand shall not exceed the maximum output power of the energy storage battery.
[0020] As a preferred embodiment of the present invention, in S400, the fuzzy inference includes:
[0021] Using a combination of three variables—energy storage battery charge status, current time period information, and user power consumption fluctuation rate—as input conditions, the privacy budget and sensitivity are jointly determined through fuzzification processing, fuzzy rule reasoning, and centroid method defuzzification.
[0022] As a preferred embodiment of the present invention, in S500, the calculation of the credibility weight based on the energy storage battery state and noise level of each user includes:
[0023] Calculate battery status reliability based on the energy storage battery's state of charge;
[0024] The noise confidence level is calculated using a negative exponential function based on the noise level.
[0025] The user's credibility is obtained by multiplying the battery status credibility by the noise credibility.
[0026] The credibility scores of multiple users are normalized to obtain the credibility weight of each user.
[0027] This invention also proposes a differential privacy data aggregation system for active simulation enhancement of energy storage batteries, comprising:
[0028] The virtual load template generation module is used to collect users' historical electricity consumption data, preprocess the historical electricity consumption data, and generate a virtual load template by introducing physical feasibility constraints through a conditional generative adversarial network. The virtual load template contains power sequences under different conditions.
[0029] The active simulation control module is used to control the energy storage battery to execute an active simulation strategy based on the virtual load template. When the user has no electricity consumption activity, the energy storage battery performs charging and discharging operations according to the virtual load template and sends simulated electricity consumption signals to the grid side. When the user has electricity consumption activity and the energy storage battery's charge status meets the power supply conditions, the energy storage battery supplies power and shields the real electricity consumption data from the grid side.
[0030] The privacy protection trigger module is used to monitor the energy storage battery's power status and the user's instantaneous power demand in real time. When the energy storage battery's power status is lower than a preset threshold or the user's instantaneous power demand exceeds the energy storage battery's maximum output power, the differential privacy protection mechanism is triggered.
[0031] The dynamic differential privacy disturbance module is used to dynamically determine the privacy budget and sensitivity after the differential privacy protection mechanism is triggered, taking the energy storage battery power status, current time period information, and user power consumption fluctuation rate as inputs, and using fuzzy inference to generate noise based on the privacy budget and sensitivity using the Laplace mechanism. The noise is then superimposed on the power consumption data and uploaded to the power grid.
[0032] The credibility weighted aggregation module is used to aggregate electricity consumption data from multiple users. It calculates credibility weights based on the energy storage battery status and noise level of each user, and then performs a weighted summation of the data from multiple users based on the credibility weights to generate the total regional load data.
[0033] The beneficial effects of this invention are:
[0034] 1. This invention combines an active simulation strategy for energy storage batteries with a differential privacy mechanism to form a dual privacy protection mechanism of active obfuscation and passive disturbance. Compared with the existing technology that relies solely on adding noise for protection, this invention significantly enhances the strength of privacy protection and effectively prevents attackers from inferring users' actual electricity consumption patterns through long-term observation.
[0035] 2. This invention uses a conditional generative adversarial network and introduces physical feasibility constraints to generate virtual load templates, making the statistical distribution of the generated templates approximate the actual user electricity consumption distribution. Compared with the existing technology that uses cluster analysis, it has stronger resistance to non-intrusive load monitoring attacks based on pattern recognition.
[0036] 3. This invention takes a combination of three variables as input: the energy storage battery's power status, current time period information, and the user's power consumption fluctuation rate. It uses fuzzy inference to jointly and dynamically determine the privacy budget and sensitivity. Compared with the existing technology's single-variable independent calculation method, it achieves a better balance between privacy protection and data availability.
[0037] 4. This invention calculates the credibility weight based on the energy storage battery's power status and noise level, and performs weighted aggregation on multi-user data, giving higher weight to high-quality data and significantly improving the accuracy of regional total load data. Attached Figure Description
[0038] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings:
[0039] Figure 1 This is a flowchart illustrating the differential privacy data aggregation method for active simulation enhancement of energy storage batteries according to the present invention.
[0040] Figure 2 This is a schematic diagram of the differential privacy data aggregation system for active simulation enhancement of energy storage batteries according to the present invention. Detailed Implementation
[0041] The preferred embodiments of the present invention will be described below with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are for illustration and explanation only and are not intended to limit the present invention.
[0042] Example 1: As Figure 1As shown, the present invention provides an active simulation-enhanced differential privacy data aggregation method for energy storage batteries, comprising:
[0043] S100: Collect historical electricity consumption data of users, preprocess the historical electricity consumption data, generate a virtual load template by using a conditional generative adversarial network and introducing physical feasibility constraints, and the virtual load template contains power sequences under different conditions.
[0044] Furthermore, in S100, the conditional generative adversarial network includes a generator and a discriminator. The generator adopts a deconvolutional neural network structure and generates a power sequence with a random noise vector and a conditional vector as input. The conditional vector contains information on time type, weekday and holiday type, season type, and user category.
[0045] Specifically, the collected historical electricity consumption data of users is preprocessed, and an improved Z-score method is used to remove outliers. For each data point in the historical electricity consumption data sequence... Outliers are identified using a sliding window and rolling standard deviation. The sliding window length is set. Calculate dynamic threshold :
[0046] ;
[0047] in, This represents the power consumption value at the current data point. This represents the average power value within the sliding window. For rolling standard deviation. If the data point is found to be an outlier, it will be removed.
[0048] The preprocessed data is divided into multiple analysis periods according to time windows, with each period having a length of... , recorded as One sample period. The power sequence corresponding to each period is: ,in This represents the number of sampling points within a period. It also records the condition vector for each period. It includes information on time type, weekday / holiday type, season type, and user category, providing power sequences for all periods. and its corresponding condition vector This constitutes the training dataset.
[0049] Construct a conditional generative adversarial network, including a generator. and discriminator The generator employs a deconvolutional neural network structure, using random noise vectors... and condition vector As input, output virtual load power sequence Discriminator Given a power sequence and a conditional vector as input, the output is the probability that the sequence represents a true sample. The training objective function is:
[0050] ;
[0051] in, For generator, For the discriminator, The game value function between the generator and the discriminator; For the true power sequence, For conditional vectors, The joint distribution of the real samples; This represents the expected log probability that the discriminator classifies a real sample as true. The larger this term is, the stronger the discriminator's ability to identify real samples. It is a random noise vector. For the noise prior distribution, The distribution of the condition vector; For generators and The virtual power sequence generated for the input; This represents the expected log probability that the discriminator will classify a generated sample as fake. A larger value indicates a stronger ability of the discriminator to identify fake samples. During training, the generator... Minimize the objective function, discriminator By maximizing this objective function, the two learners engage in adversarial training and play against each other, ultimately making the virtual load sequence output by the generator statistically approximate the real electricity consumption data.
[0052] Furthermore, in S100, the physical feasibility constraint is added to the generator's loss function in the form of a penalty term, which includes a power limit penalty term and an energy limit penalty term.
[0053] Specifically, to ensure that the virtual load template output by the generator can be accurately executed by the energy storage battery, the generator's loss function consists of three parts: an adversarial loss term, a power limitation penalty term, and an energy limitation penalty term. It contains no other sub-terms besides these three. Specifically:
[0054] ;
[0055] in, The loss function for the generator; To counteract the loss term, it is represented in the random noise vector Follows prior noise distribution Conditional vector Follows conditional distribution Under the joint distribution, the negative log probability expectation of the sample generated by the generator being judged as a real sample by the discriminator is the smaller this term, the stronger the generator's deceptive ability. This is a power limitation penalty term used to constrain the power value at each moment in the generated sequence from not exceeding the maximum output power of the energy storage battery. This is an energy-limiting penalty term used to constrain the cumulative energy of the generated sequence within one cycle from not exceeding the maximum usable energy of the energy storage battery. These are the penalty coefficients for the power limit penalty and the energy limit penalty, respectively, used to balance the weight between adversarial losses and physical feasibility constraints. A larger value indicates a stricter enforcement of the physical constraints. Power Limit Penalty and energy limit penalty The specific calculation formula is as follows:
[0056] ;
[0057] ;
[0058] in To generate the first in the sequence The power value at each moment, The number of sampling points within the period. The sampling time interval, This corresponds to the penalty coefficient. Virtual load templates are generated through adversarial training. All generated templates satisfy physical constraints and can be directly executed by the energy storage battery.
[0059] in, This is a power limit penalty item. This is an energy limitation penalty. The total number of sampling points within one analysis period; To generate the first in the sequence The power value corresponding to each moment; This refers to the maximum allowable charge and discharge power of the energy storage battery. Indicates when the first The generation power at time exceeds When the value exceeds the limit, the penalty is accumulated into the loss; if the value does not exceed the limit, the penalty is zero. The result is obtained by summing over all sampling times. This ensures that the power of the generated sequence at each time does not exceed the physical power limit of the energy storage battery. The time interval between adjacent sampling points; To generate the cumulative energy of the sequence over a complete analysis period, the absolute value is taken to constrain the total energy in both the charging and discharging directions simultaneously. This refers to the maximum allowable charge / discharge energy of the energy storage battery within a single analysis cycle. This means that only when the cumulative energy exceeds Penalties are only incurred when the energy demand exceeds the limit; any excess is recorded as a loss, while no excess is penalized. This ensures that the total energy demand of the virtual load template within a single cycle does not exceed the capacity limit of the energy storage battery.
[0060] S200: Based on the virtual load template, the energy storage battery is controlled to execute an active simulation strategy. When the user has no electricity consumption activity, the energy storage battery performs charging and discharging operations according to the virtual load template and sends simulated electricity consumption signals to the grid side. When the user has electricity consumption activity and the energy storage battery's charge status meets the power supply conditions, the energy storage battery supplies power and shields the real electricity consumption data from the grid side.
[0061] Specifically, based on the generated virtual load template, the energy storage battery executes different control strategies according to the user's actual power consumption. The specific control logic is as follows:
[0062] ;
[0063] in, The actual power consumption of the user The state of charge (SOC) of an energy storage battery indicates the percentage of the battery's total capacity currently charged.
[0064] Furthermore, in S200, the step of the energy storage battery performing charging and discharging operations according to the virtual load template when the user has no electrical activity includes:
[0065] Select a power sequence from the virtual load template that is different from the current time period;
[0066] The charging and discharging power and duration of the energy storage battery are controlled according to the power value at each moment in the power sequence.
[0067] Specifically, when the user has no electricity consumption activity, that is The energy storage battery performs charging and discharging operations based on the virtual load template, sending simulated power consumption signals to the grid. Specifically, it selects a power sequence from the virtual load template that is different from the current time period. This power sequence contains power values at different points in time. According to each moment in the power sequence... The power value controls the charging and discharging power and duration of the energy storage battery, causing the battery to charge or discharge according to a preset power curve. In this way, the electricity consumption signal sent to the grid is a power mode of a virtual load template, rather than a true zero-power state, thus confusing the user's actual electricity consumption behavior.
[0068] Furthermore, in S200, the energy storage battery's state of charge satisfying the power supply conditions includes:
[0069] The energy storage battery's charge level is higher than a preset threshold;
[0070] The user's instantaneous power demand shall not exceed the maximum output power of the energy storage battery.
[0071] Specifically, when a user has electricity activity, that is... It is necessary to determine whether the energy storage battery's charge level meets the power supply requirements. Power supply requirements include two aspects:
[0072] First, the energy storage battery's state of charge is higher than a preset threshold, i.e., SOC > 20%. This threshold ensures that the energy storage battery retains sufficient charge for subsequent active simulation operations, avoiding over-discharge of the battery.
[0073] Second, the user's instantaneous power demand shall not exceed the maximum output power of the energy storage battery, i.e. ,in This represents the maximum output power of the energy storage battery.
[0074] When both of the above conditions are met, the energy storage battery directly supplies power to the user. At this time, the power consumption signal sent to the grid side is zero or the power value of the virtual load template, thereby shielding the user's actual power consumption data.
[0075] When the energy storage battery's charge level is below 20% or the user's instantaneous power demand exceeds the energy storage battery's maximum output power, a direct grid power supply mode is adopted. In this mode, a differential privacy protection mechanism needs to be triggered to disturb the actual power consumption data before uploading it to the grid.
[0076] S300: Real-time monitoring of the energy storage battery's power status and the user's instantaneous power demand. When the energy storage battery's power status is lower than a preset threshold or the user's instantaneous power demand exceeds the energy storage battery's maximum output power, a differential privacy protection mechanism is triggered.
[0077] Specifically, when the state of charge (SOC) of the energy storage battery falls below a preset threshold (SOC < 20%), the battery cannot continue to supply power and must draw power from the grid. Alternatively, when the user's instantaneous power demand exceeds the battery's maximum output power... At this point, the output capacity of the energy storage battery cannot meet the user's needs, and power needs to be supplemented from the grid.
[0078] In both of the above scenarios, the system needs to upload real electricity consumption information to the power grid, triggering the differential privacy protection mechanism. Once triggered, the system will perturb the user's real electricity consumption data by adding noise to protect the user's electricity consumption privacy and prevent the power grid from inferring the user's specific electricity consumption behavior patterns from the data.
[0079] The monitoring process is continuous and real-time, ensuring timely response when the energy storage battery power status or user power demand changes. When necessary, a differential privacy protection mechanism is activated to ensure that user power demand is met while effectively protecting power privacy.
[0080] S400: After the differential privacy protection mechanism is triggered, the privacy budget and sensitivity are dynamically determined by taking the energy storage battery power status, current time period information and user power consumption fluctuation rate as inputs, and the Laplace mechanism is used to generate noise based on the privacy budget and sensitivity. The noise is then superimposed on the power consumption data and uploaded to the power grid.
[0081] Furthermore, in S400, the fuzzy inference takes the combination of three variables—energy storage battery power status, current time period information, and user power consumption fluctuation rate—as input conditions. After fuzzification processing, fuzzy rule inference, and centroid method defuzzification, the privacy budget and sensitivity are jointly determined.
[0082] Specifically, the privacy decision engine collects the following three input variables in real time:
[0083] The State of Charge (SOC) of the energy storage battery has a value range of [0, 100].
[0084] Current time period information, in terms of time sensitivity Characterization:
[0085] ;
[0086] in For the current moment, This refers to the peak load time of the day.
[0087] User power consumption fluctuation This reflects the degree of fluctuation in a user's electricity consumption behavior during the current period:
[0088] ;
[0089] in To adjust the sliding window size, For the first in the sliding window Power consumption at any given moment The average power within the sliding window. Rated power for the user.
[0090] The three input variables mentioned above are fuzzified, and their precise values are converted into membership degrees of fuzzy sets. These variables include the state of charge (SOC) of the energy storage battery and time sensitivity. User power consumption fluctuation rate Each variable is divided into three fuzzy sets: low (L), medium (M), and high (H). The membership functions of each variable are as follows:
[0091] Membership function of the State of Charge (SOC) of an energy storage battery:
[0092] ;
[0093] ;
[0094] ;
[0095] Time sensitivity Membership function:
[0096] ;
[0097] ;
[0098] ;
[0099] User power consumption fluctuation Membership function:
[0100] ;
[0101] ;
[0102] ;
[0103] The system output variable is the privacy budget adjustment coefficient. and sensitivity adjustment coefficient The two output variables are also divided into three fuzzy sets: low (L), medium (M), and high (H), with a value range of [0.5, 1.5].
[0104] Fuzzy rules are constructed to describe the logical relationships between input and output variables. The fuzzy rules adopt the IF-THEN form, and typical rule examples are as follows:
[0105] R1: IF SOC is high (H) AND For high (H), THEN It is relatively small (0.6). It is relatively small (0.7);
[0106] R2: IF SOC is high (H) AND For low (L), THEN It is relatively large (1.3). Medium (1.0);
[0107] R3: IF SOC is low (L) AND For high (H) AND For high (H), THEN It is very small (0.5). It is very small (0.5);
[0108] R4: IF SOC is low (L) AND For high (H) AND For low (L), THEN It is relatively small (0.7). It is relatively small (0.6);
[0109] R5: IF SOC is low (L) AND For low (L), THEN It is rated as medium (1.0). Medium (1.0);
[0110] R6: IF SOC is M AND For high (H) AND For high (H), THEN It is relatively small (0.7). It is relatively small (0.8);
[0111] R7: IF SOC is M AND For (M) AND For the middle (M), THEN It is rated as medium (1.0). Medium (1.0);
[0112] For each rule, the minimum operator is used to calculate the rule strength:
[0113] ;
[0114] in The first In the rules, SOC, , The corresponding fuzzy set. Each rule produces an output fuzzy set. Its membership function is:
[0115] ;
[0116] in For the first Each rule outputs a fuzzy set corresponding to the variable. For output variables. The maximum operator is used to synthesize the fuzzy sets of all rule outputs:
[0117] ;
[0118] The centroid method was used for defuzzification, and the privacy budget adjustment coefficients were obtained respectively. and sensitivity adjustment coefficient :
[0119] ;
[0120] ;
[0121] Calculate the privacy budget at the current moment based on the adjustment coefficient obtained from fuzzy inference. and sensitivity :
[0122] ;
[0123] ;
[0124] in Based on the baseline privacy budget, As a baseline sensitivity, and These are the fuzzy sets of synthetic outputs corresponding to privacy budget and sensitivity, respectively.
[0125] Based on a dynamically determined privacy budget and sensitivity Noise is generated using the Laplace mechanism, with specific scale parameters. The calculation is as follows:
[0126] ;
[0127] Random numbers are generated by sampling from a uniform distribution. Output Laplace noise:
[0128] ;
[0129] in This is a sign function. The noise is added to the user's actual power consumption. The power data uploaded to the power grid is obtained from the above.
[0130] ;
[0131] in, This is the power data uploaded to the power grid after noise has been added.
[0132] S500: When aggregating electricity consumption data from multiple users, it calculates a confidence weight based on the energy storage battery status and noise level of each user, and then performs a weighted summation of the data from multiple users based on the confidence weight to generate the total regional load data.
[0133] Furthermore, in S500, the calculation of the credibility weight based on each user's energy storage battery state of charge and noise level includes:
[0134] Calculate battery status reliability based on the energy storage battery's state of charge;
[0135] The noise confidence level is calculated using a negative exponential function based on the noise level.
[0136] The user's credibility is obtained by multiplying the battery status credibility by the noise credibility.
[0137] The credibility scores of multiple users are normalized to obtain the credibility weight of each user.
[0138] Specifically, when aggregating electricity consumption data from multiple users, a reliability weight needs to be calculated based on the data quality of each user. Data quality is affected by two factors: the state of charge of the energy storage battery and the noise level.
[0139] First, the battery state reliability (BCi) is calculated based on the battery's state of charge. Battery state reliability reflects the degree to which user data is affected by the battery's power supply capability; its calculation formula is as follows:
[0140] ;
[0141] in, For the first Reliability of a user's battery status For the first The percentage of state of charge of a user's energy storage battery. The higher the battery level, the more likely the user data is to come directly from the battery without added noise, and therefore the higher its reliability.
[0142] Secondly, the noise confidence level is calculated using a negative exponential function based on the noise level. When the level of noise added to user data is high, the authenticity and credibility of the data decrease. The formula for calculating noise credibility is:
[0143] ;
[0144] ;
[0145] in, For the first Noise level indicators for individual users For sensitivity, For privacy budget, This is the attenuation coefficient, with a value ranging from 0.5 to 1.0, used to control the degree of influence of noise on reliability. The larger the value, the higher the noise level. The closer to 0; The smaller, The closer it is to 1, the higher the final credibility limit is 1.
[0146] Then, the battery status confidence level With noise credibility Multiplication yields user credibility :
[0147] ;
[0148] in, For the first individual users at any time Credibility weight, Let be the total number of users in the region. The denominator is the sum of the credibility scores of all users, which is normalized to ensure that the sum of the credibility weights of all users is 1.
[0149] Ultimately, for the region Individual users, in time Power value Perform a weighted summation to aggregate the total load data for the region:
[0150] ;
[0151] in, For a moment Regional aggregation power, For the first The credibility weight of each user For the first individual users at any time Uploaded disturbance power value.
[0152] The final output after aggregation is a time series data. This data includes timestamps, aggregated regional power, and the number of users in the region. The actual power data, anonymous IDs, and weighting information of all individual users are not saved immediately after aggregation; only the aggregation result is retained. The aggregated data will be sent to platforms such as the power grid dispatch center and energy management system to support functions such as real-time monitoring of regional load curves, short-term load forecasting, electricity price planning optimization, and power grid anomaly detection.
[0153] Through a credibility-weighted aggregation mechanism, user data with high battery power and low noise levels are given greater weight, thereby reducing the impact of noise on the accuracy of regional total load data during the aggregation process and ensuring that the aggregation results protect user privacy while maintaining high data availability.
[0154] Example 2: A smart community is equipped with a distributed energy storage system, comprising 200 residential users, each with a home energy storage battery and a smart meter. To prevent certain companies from inferring users' daily routines, family member numbers, and other private information from electricity consumption data, while simultaneously meeting regional load forecasting requirements, this community employs the differential privacy data aggregation system enhanced by active simulation of energy storage batteries, as described in this invention. Figure 2 As shown, it includes: a virtual load template generation module, an active simulation control module, a privacy protection trigger module, a dynamic differential privacy perturbation module, and a credibility weighted aggregation module.
[0155] The virtual load template generation module collects historical electricity consumption data from each user, preprocesses it, and then generates a virtual load template for each user through a conditional generative adversarial network and by introducing physical feasibility constraints. The active simulation control module controls the energy storage battery to send simulated signals according to the virtual load template when the user has no electricity consumption activity. When the user has electricity consumption activity and the battery has sufficient power, the battery supplies power to shield the real data, forming an active obfuscation mechanism. The privacy protection trigger module monitors battery power and user power demand in real time. When the battery power is below a threshold or the power demand exceeds the limit, differential privacy protection is triggered. The dynamic differential privacy perturbation module takes the energy storage battery power status, current time period information, and user electricity power fluctuation rate as input, and uses fuzzy inference to dynamically determine the privacy budget and sensitivity to avoid data distortion. The credibility weighted aggregation module calculates credibility weights based on each user's battery status and noise level, and weights and aggregates the data from 200 users to generate the regional total load, giving higher weight to high-quality data.
[0156] After three months of operation, the system of this invention has ensured the availability of aggregated data while protecting user privacy. It has prevented attackers from inferring the privacy information of individual users through long-term observation, and has provided reliable data support for power grid load forecasting and demand response, thus verifying the effectiveness and practicality of the invention.
[0157] Finally, it should be noted that the above descriptions are merely preferred embodiments of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A differential privacy data aggregation method for active simulation enhancement of energy storage batteries, characterized in that, include: S100: Collect historical electricity consumption data of users, preprocess the historical electricity consumption data, and generate a virtual load template using a conditional generative adversarial network with embedded physical feasibility constraints. The virtual load template contains power sequences under different conditions. The conditional generative adversarial network includes a generator and a discriminator. The generator adopts a deconvolutional neural network structure and generates a power sequence with random noise vector and conditional vector as input. The conditional vector contains information on time type, weekday and holiday type, season type and user category. The physical feasibility constraints are added to the generator's loss function as penalty terms, which include power limitation penalty terms and energy limitation penalty terms; specifically: ; in, The loss function for the generator; To counteract the loss term, it is represented in the random noise vector Obey the prior noise distribution Conditional vector Follows conditional distribution Under the joint distribution, the negative log probability expectation of the sample generated by generator G being identified as a real sample by discriminator D; This is a power limit penalty item; This is an energy limitation penalty. , These are the penalty coefficients for the power limit penalty and the energy limit penalty, respectively: ; ; in To generate the power value at time step i in the sequence, The number of sampling points within the period. The sampling time interval, This refers to the maximum allowable charge and discharge power of the energy storage battery. This refers to the maximum allowable charge / discharge energy of the energy storage battery within a single analysis cycle. Indicates when the first The generation power at time exceeds When the penalty exceeds the limit, the excess is added to the total loss as a penalty; if the penalty does not exceed the limit, the penalty is zero. This means that only when the cumulative energy exceeds Penalties are only incurred when the penalty is exceeded; any excess is recorded as a loss, while no penalty is imposed if the penalty is not exceeded. S200: Based on the virtual load template, the energy storage battery is controlled to execute an active simulation strategy. When the user has no electricity consumption activity, the energy storage battery performs charging and discharging operations according to the virtual load template and sends simulated electricity consumption signals to the grid side. When the user has electricity consumption activity and the energy storage battery's charge status meets the power supply conditions, the energy storage battery supplies power and shields the real electricity consumption data from the grid side. S300: Real-time monitoring of the energy storage battery's power status and the user's instantaneous power demand. When the energy storage battery's power status is lower than a preset threshold or the user's instantaneous power demand exceeds the energy storage battery's maximum output power, a differential privacy protection mechanism is triggered. S400: After the differential privacy protection mechanism is triggered, the privacy budget and sensitivity are dynamically determined by taking the energy storage battery power status, current time period information and user power consumption fluctuation rate as inputs, and the Laplace mechanism is used to generate noise based on the privacy budget and sensitivity. The noise is then superimposed on the power consumption data and uploaded to the power grid. S500: When aggregating electricity consumption data from multiple users, it calculates a confidence weight based on the energy storage battery status and noise level of each user, and then performs a weighted summation of the data from multiple users based on the confidence weight to generate the total regional load data.
2. The differential privacy data aggregation method for active simulation enhancement of energy storage batteries according to claim 1, characterized in that, In S200, the step of the energy storage battery performing charging and discharging operations according to the virtual load template when the user has no electricity consumption includes: Select a power sequence from the virtual load template that is different from the current time period; The charging and discharging power and duration of the energy storage battery are controlled according to the power value at each moment in the power sequence.
3. The differential privacy data aggregation method for active simulation enhancement of energy storage batteries according to claim 1, characterized in that, In S200, the energy storage battery's state of charge satisfies the following power supply conditions: The energy storage battery's charge level is higher than a preset threshold; The user's instantaneous power demand shall not exceed the maximum output power of the energy storage battery.
4. The differential privacy data aggregation method for active simulation enhancement of energy storage batteries according to claim 1, characterized in that, In S400, the fuzzy inference includes: Using a combination of three variables—energy storage battery charge status, current time period information, and user power consumption fluctuation rate—as input conditions, the privacy budget and sensitivity are jointly determined through fuzzification processing, fuzzy rule reasoning, and centroid method defuzzification.
5. The differential privacy data aggregation method for active simulation enhancement of energy storage batteries according to claim 1, characterized in that, In S500, the calculation of the credibility weight based on each user's energy storage battery state and noise level includes: Calculate battery status reliability based on the energy storage battery's state of charge; The noise confidence level is calculated using a negative exponential function based on the noise level. The user's credibility is obtained by multiplying the battery status credibility by the noise credibility. The credibility scores of multiple users are normalized to obtain the credibility weight of each user.
6. A differential privacy data aggregation system for active simulation enhancement of energy storage batteries, characterized in that, The method for implementing the active simulation enhancement differential privacy data aggregation method for energy storage batteries according to any one of claims 1-5 includes: The virtual load template generation module is used to collect users' historical electricity consumption data. After preprocessing the historical electricity consumption data, it uses a conditional generative adversarial network with embedded physical feasibility constraints to generate a virtual load template. The virtual load template contains power sequences under different conditions. The active simulation control module is used to control the energy storage battery to execute an active simulation strategy based on the virtual load template. When the user has no electricity consumption activity, the energy storage battery performs charging and discharging operations according to the virtual load template and sends simulated electricity consumption signals to the grid side. When the user has electricity consumption activity and the energy storage battery's charge status meets the power supply conditions, the energy storage battery supplies power and shields the real electricity consumption data from the grid side. The privacy protection trigger module is used to monitor the energy storage battery's power status and the user's instantaneous power demand in real time. When the energy storage battery's power status is lower than a preset threshold or the user's instantaneous power demand exceeds the energy storage battery's maximum output power, the differential privacy protection mechanism is triggered. The dynamic differential privacy disturbance module is used to dynamically determine the privacy budget and sensitivity after the differential privacy protection mechanism is triggered, taking the energy storage battery power status, current time period information, and user power consumption fluctuation rate as inputs, and using fuzzy inference to generate noise based on the privacy budget and sensitivity using the Laplace mechanism. The noise is then superimposed on the power consumption data and uploaded to the power grid. The credibility weighted aggregation module is used to aggregate electricity consumption data from multiple users. It calculates credibility weights based on the energy storage battery status and noise level of each user, and then performs a weighted summation of the data from multiple users based on the credibility weights to generate the total regional load data.