Generative adversarial network-based power grid flow data privacy protection method and system
By generating the TA-GAN model of the adversarial network, extracting and obfuscating the grid flow characteristics, the problem of privacy leakage of electricity consumption behavior in the digital power grid is solved, the defense against traffic analysis attacks is realized, and the security of the grid system is enhanced.
Patent Information
- Application Number
- CN202411247915.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-06
- Publication Date
- 2024-12-27
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The power grid flow data in the digital power grid is susceptible to traffic analysis attacks during transmission, resulting in the privacy leakage of users' electricity use behavior. Traditional security measures cannot completely prevent such attacks.
Using the TA-GAN model based on the generative adversarial network, the local characteristics of the power grid flow are extracted, and the associated timing characteristics are constructed, and the target attack model is analyzed using convolutional neural network pre-trained traffic, and the perturbed traffic characteristics are generated to obfuscate the attack model, so as to realize Privacy protection of grid traffic data.
It effectively protects the privacy of users' electricity use behavior, reduces the identification ability of traffic analysis attackers, enhances the security of the digital power grid, and does not affect the practicality and operation efficiency of the power grid data.
Smart Images

Figure CN119210801A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of digital power grid communication technology, and in particular to a power grid flow data privacy protection method and system based on a generative adversarial network, which aims to protect actual power grid data flow, thereby preventing potential flow analysis attacks. Background Art
[0002] With the rapid development of digital grid technology, the monitoring, management and automated control of power systems are increasingly dependent on the transmission and processing of real-time data. However, the data communication security and user privacy protection issues of digital grids have gradually become the focus of social attention. A large amount of sensitive information is contained in the grid data flow, such as the user's electricity consumption pattern, and the leakage of this information may lead to serious privacy violations and security risks. Digital grids collect users' electricity consumption data through smart meters and other monitoring devices. This data can reflect sensitive information such as users' living habits and daily activity patterns. For example, meter data may show the time a user is at home, the type of electrical appliances used, and may even infer the user's economic status or family size. If this data is leaked without proper protection, it may lead to privacy violations and may even be used for improper purposes, such as targeted marketing harassment or worse.
[0003] Traditional network security measures, such as data encryption and firewalls, provide protection to a certain extent, but they cannot completely prevent traffic analysis attacks. In recent years, with the advancement of artificial intelligence and machine learning, traffic analysis attackers can use artificial intelligence methods to analyze the patterns and characteristics of encrypted traffic, infer users' network behavior, and even identify specific communication content. With the help of artificial intelligence models, power grid traffic analysis attacks are trained through a large amount of normal traffic data to learn the statistical characteristics and behavior patterns of power grid traffic. These characteristics may include packet size, transmission rate, protocol type, connection duration, etc., and then identify users' electricity consumption behavior. This attack method poses a huge challenge to the privacy protection of digital power grids. Summary of the invention
[0004] Purpose of the invention: In order to solve the above technical problems, the purpose of the present invention is to provide a method and system for protecting the privacy of power grid traffic data based on a generative adversarial network, aiming to solve the problem of privacy leakage of user electricity consumption behavior in digital power grid communications.
[0005] Technical solution: In the first aspect, a method for protecting the privacy of power grid flow data based on a generative adversarial network comprises the following steps:
[0006] Traffic feature extraction step: Extract local traffic features F from the power grid network traffic l , including burst packet size and directionality characteristics;
[0007] Source dataset construction step: Using local flow features F l Constructing an associated time series feature F2, where the associated time series feature is an expression of continuous data packets in different directions of traffic; and constructing a source data set using the associated time series feature F2, where each associated time series feature F2 corresponds to an original traffic;
[0008] Traffic analysis attack target model pre-training step: using the constructed source data set, pre-training the traffic analysis attack target model, the traffic analysis attack target model is constructed based on a convolutional neural network and is used to identify the user's electricity consumption behavior from the grid traffic time series correlation features in the source data set;
[0009] TA-GAN model pre-training steps: training a TA-GAN model based on a generative adversarial network, the TA-GAN model comprising a generator, a discriminator, and a traffic analysis attack target model, the generator receiving traffic-related time series feature characteristics from a source data set as input, and generating perturbed traffic-related time series features; the discriminator receiving the associated time series characteristics from the source data set and the perturbed traffic-related time series features generated by the generator, and attempting to distinguish between the two; the traffic analysis attack target model is used to identify potential user electricity consumption behaviors in power grid traffic, and during the alternating training process of the generator and the discriminator, the output of the traffic analysis attack target model is used to guide the update of the generator;
[0010] Original traffic obfuscation step: The associated timing features of the original power grid traffic are input into the trained TA-GAN model. The generator in the TA-GAN model outputs an obfuscated associated timing feature based on the input associated timing features, and decodes the obfuscated associated timing features back to the original traffic data packet sequence to achieve the purpose of power grid traffic data privacy protection.
[0011] In the second aspect, a power grid flow data privacy protection system based on a generative adversarial network includes:
[0012] The flow feature extraction module is used to extract local flow features F from the power grid network flow. l , including burst packet size and directionality characteristics;
[0013] Source dataset building module for utilizing local traffic features F l Constructing an associated time series feature F2, where the associated time series feature is an expression of continuous data packets in different directions of traffic; and constructing a source data set using the associated time series feature F2, where each associated time series feature F2 corresponds to an original traffic;
[0014] A traffic analysis attack target model pre-training module is used to use the constructed source data set to pre-train the traffic analysis attack target model. The traffic analysis attack target model is constructed based on a convolutional neural network and is used to identify the user's electricity consumption behavior from the grid traffic time series correlation characteristics in the source data set;
[0015] A TA-GAN model pre-training module is used to train a TA-GAN model based on a generative adversarial network. The TA-GAN model includes a generator, a discriminator, and a traffic analysis attack target model. The generator receives traffic-related time series feature characteristics from a source data set as input and generates perturbed traffic-related time series features; the discriminator receives the associated time series characteristics from the source data set and the perturbed traffic-related time series features generated by the generator, and attempts to distinguish between the two; the traffic analysis attack target model is used to identify potential user electricity consumption behaviors in power grid traffic. In the process of alternating training of the generator and the discriminator, the output of the traffic analysis attack target model is used to guide the update of the generator;
[0016] The original traffic obfuscation module is used to input the associated timing features of the original power grid traffic into the trained TA-GAN model. The generator in the TA-GAN model outputs an obfuscated associated timing feature based on the input associated timing feature, and decodes the obfuscated associated timing feature back to the original traffic data packet sequence, thereby achieving the purpose of protecting the privacy of power grid traffic data.
[0017] In a third aspect, the present invention also provides a computer device, comprising: one or more processors; a memory; and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the one or more processors, and when the programs are executed by the processors, the steps of the power grid flow data privacy protection method based on a generative adversarial network as described above are implemented.
[0018] In a fourth aspect, the present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method for protecting privacy of power grid flow data based on a generative adversarial network as described above.
[0019] Beneficial effects: The present invention proposes a method for protecting the privacy of power grid traffic data based on a generative adversarial network. By generating adversarial traffic, the present invention effectively protects the privacy of the electricity consumption behavior of digital power grid users and prevents the leakage of users' electricity consumption behavior. The similarity between the generated adversarial traffic and the real traffic makes it difficult for attackers to distinguish which is real data and which is generated interference data. The method can mislead potential attackers who analyze power grid traffic and reduce their ability to infer user behavior by analyzing power grid traffic. By protecting power grid data traffic from attacks, the present invention enhances the security of the entire digital power grid system and achieves data privacy protection without sacrificing the practicality of power grid data and the efficiency of power grid operation. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 It is a flow chart of the privacy protection method of power grid flow data based on generative adversarial network.
[0021] Figure 2 It is a schematic diagram of the TA-GAN model. DETAILED DESCRIPTION
[0022] In order to make the purpose, technical solutions and advantages of the present invention more clear, the present invention is further described in detail below through specific implementations and in conjunction with the accompanying drawings.
[0023] As a powerful generative model, Generative Adversarial Network (GAN) has achieved remarkable results in the fields of image generation and speech synthesis. The core idea of GAN is to train the generator and discriminator through adversarial training. The generator is responsible for generating realistic data, while the discriminator evaluates the authenticity of the data. This mechanism provides a new idea for the privacy protection of power grid traffic.
[0024] The present invention is based on GAN technology, and proposes a method for protecting the privacy of power grid traffic, and constructs a generative adversarial network model TA (traffic analysis) TA-GAN for power grid traffic. The TA-GAN model includes a generator module, a discriminator module, and a target neural network module. The generator module is used to embed adversarial perturbations in real power grid traffic to generate synthetic traffic that is similar to real traffic but difficult to be identified by traffic analysis attackers. The discriminator module is used to distinguish between real power grid traffic and adversarial traffic. The introduction of the discriminator module further improves the quality and concealment of adversarial traffic. The target neural network module is the target model of traffic analysis attack, which is used to simulate the attack behavior of traffic analysis attackers in real scenarios, so that the system can generate adversarial traffic that can mislead attackers in a targeted manner. The role of the TA-GAN model is to make the generated adversarial traffic similar to the real power grid traffic while misleading the target model of traffic analysis attack.
[0025] The embodiment of the present invention provides a method for protecting the privacy of power grid flow data based on a generative adversarial network. The basic idea is to use a flow feature extraction tool to extract local features of power grid flow and use the local features to construct time series correlation features, then use the time series correlation features as input to pre-train the flow analysis attack target model, and then pre-train the TA-GAN model based on the generative adversarial network. The TA-GAN model receives the associated time series features from the source data set as input and generates the perturbed associated time series features. These adversarial samples are intended to make the flow analysis attack target model (F) unable to accurately identify the user's electricity consumption behavior corresponding to the original flow. The power grid flow privacy protection method based on the generative adversarial network proposed by the present invention achieves the purpose of confusing the original flow by generating the associated time series features after adding the perturbation, so as to make the flow analysis attack target model (F) misclassify, solve the power grid flow privacy leakage caused by the power grid flow analysis attack with the help of the artificial intelligence model, and provide a more secure and reliable environment for the digital power grid environment.
[0026] Reference Figure 1 , a privacy protection method for power grid flow data based on generative adversarial network includes the following steps:
[0027] S1, extracting traffic features: extracting local traffic features F from the power grid network traffic l , including burst and directionality characteristics. The burst and directionality characteristics can be obtained from the power grid source traffic pcap file.
[0028] According to an embodiment of the present invention, extracting traffic features includes:
[0029] S11, multi-source similar flow merging: multi-source flow merging based on cosine similarity. When performing network flow analysis, processing and integrating similar flow data from different sources is a key task. To achieve this goal, a method based on cosine similarity can be used to analyze and merge multi-source flows. Cosine similarity is an indicator that measures the similarity between two flows, and its calculation formula is described in formula (1). When the cosine similarity of two flows reaches or exceeds a preset threshold τ, it can be considered that the two flows have a high similarity, so they can be merged. The threshold τ can be determined based on actual experience.
[0030]
[0031] Among them, v and s represent two different flows, M represents the dimension of the feature, and i represents the i-th flow feature.
[0032] As an example, the raw traffic data (pcap format) collected from the power grid is as follows:
[0033]
[0034] Similarity is calculated based on the five elements of timestamp, packet size, source IP, destination IP, and direction as traffic features. The cosine similarity of the two flows is calculated using formula (1). When the cosine similarity of the two flows reaches or exceeds the preset threshold, the two flows can be considered similar and can be merged. The merged result is averaged using features. The packet size feature of the merged flow is the average of the packet size features of the original two flows. The merged result is still a five-tuple. Note that if the two flows to be merged have different source IPs, destination IPs, and directions, these two flows are retained and not merged.
[0035] S12, local feature extraction of merged flow: Based on S11, find suspicious burst signals (Burst) and their transmission directions (Direction) in the merged similar flows, such as the number of transmission packets in different directions, and construct local traffic features F l .
[0036] The local flow characteristics are as follows: l :[+500,-300,+450,+600,+200…,], F l Features include the size of the burst data packets and the transmission direction of the burst data packets. + and - represent different directions of the power grid network flow. Burst signals usually indicate a significant increase in the number of data packets in a short time window. This may be caused by bursty data transmission. Time series analysis is performed on the merged flow data to count the number of data packets in each time window (such as per second, per minute). Bursts are usually manifested as spikes in these time series, that is, the number of data packets is much higher than the average level. A threshold can be set, and when the number of data packets exceeds this threshold, it is marked as a burst.
[0037] S2, construct source dataset: using local traffic feature F l Construct burst and periodic correlation time series features F2, and use the correlation time series features F2 to construct a source data set. Each correlation time series feature F2 corresponds to an original flow.
[0038] According to the local flow feature F extracted from S12 l Construct the associated time series feature F2, convert the pcap format data of the original traffic into a numerical expression in the form of [+1,-1,+1,+1,+1…,], and lTo F2, the size of the data packet is normalized to 1. Among them, + and - represent different directions of the power grid network flow. The number 1 here represents a continuous data packet flowing from the user to the power grid or from the power grid to the user. In other words, a time series feature sequence is formed by representing an incoming data packet as -1 and an outgoing data packet as +1. The source data set is constructed using the associated time series feature F2, and each associated time series feature F2 corresponds to an original flow.
[0039] S3, pre-trained traffic analysis attack target model: using the source data set constructed in S2, pre-train the traffic analysis attack target model. This recognition model is based on a convolutional neural network and can identify the user's electricity consumption behavior from the grid traffic time series correlation characteristics in the source data set. The traffic analysis attack target model is used to simulate the opponent's attack behavior.
[0040] The process of associating time series features into the convolutional neural network to obtain the result is given by formula (2), where W is the convolution kernel and b is the bias.
[0041]
[0042] S31, Dataset preparation: In order to train a traffic analysis attack target model that can identify user power usage behavior, you first need to build a source dataset. This dataset should contain a variety of different power usage behavior patterns, and each pattern is labeled as a specific category. The source dataset contains input features: associated time series features, labels: power usage behavior categories (for example, low-power devices, high-power devices, etc.), different associated time series features correspond to different power usage behavior categories, and different power usage behaviors correspond to different associated time series features.
[0043] S32, data preprocessing: standardize the source data set to ensure that the input data has a similar scale, and divide the data into training and validation sets to ensure the effectiveness of model training and validation.
[0044] S32, forward propagation: The associated time series feature F2 is used as input and feature extraction is performed through a one-dimensional convolutional layer. The calculation formula of the convolutional layer is shown in formula (2). After being processed by an activation function (such as ReLU), the features are nonlinearly transformed. The pooling layer (such as maximum pooling or average pooling) further compresses the feature representation and reduces the amount of calculation. The fully connected layer integrates the features extracted by the convolutional layer and provides input for the output layer.
[0045] S33, loss calculation: Use the cross-entropy loss function to calculate the error between the model output and the actual label, as shown in formula (3).
[0046]
[0047] S34, Back Propagation and Parameter Update: Calculate the gradient through the back propagation algorithm and use the optimization algorithm (such as Adam or SGD) to update the model parameters.
[0048] S35, Model Verification: Evaluate model performance on the validation set, and measure the model's ability to identify user electricity usage behavior through indicators such as accuracy, precision, and recall.
[0049] S4, pre-training TA-GAN model based on generative adversarial network: TA-GAN mainly consists of three parts, generator (G), discriminator (D), traffic analysis attack target model (F), such as Figure 2 As shown in Figure 1, the generator is the core part of TA-GAN and is responsible for generating adversarial samples. It receives the associated time series features F2 from the source data set as input and generates the perturbed associated time series features F′2. These adversarial samples are designed to make the traffic analysis attack target model (F) unable to accurately identify the user electricity consumption behavior corresponding to the original traffic. The task of the discriminator is to distinguish between real samples and adversarial samples generated by the generator. It receives the associated time series features F2 from the source data set and the associated time series features F′2 generated by the generator, and tries to distinguish between the original and adversarial samples. The traffic analysis attack target model is a component used to evaluate the effectiveness of the generated adversarial samples. It is a power grid traffic classifier pre-trained by the method of step S3, which is used to identify potential user electricity consumption behaviors in power grid traffic. During the training process of TA-GAN, the output of the traffic analysis attack target model (F) is used to guide the update of the generator. The training process of TA-GAN is a typical adversarial training process, involving alternating training of the generator and the discriminator.
[0050] For the sake of clarity and convenience, the associated temporal features F2 from the source dataset are denoted by S below, that is, the source dataset S refers to the associated temporal features F2 from the source dataset. The adversarial sample ADV generated by the generator refers to the associated temporal features F′2 generated by the generator.
[0051] S41, train the discriminator: extract original samples from the source dataset S, which represent normal network traffic, and use the generator G to generate adversarial samples ADV based on the samples of the source dataset S. The generator G generates adversarial samples through a series of neural network layers (such as convolutional layers and fully connected layers). The goal of these adversarial samples is to maintain similarity to real traffic, but with perturbations in key features, making it difficult for the discriminator D to distinguish. The discriminator D attempts to distinguish between real samples (from S) and adversarial samples (from ADV). Forgery loss L DAs shown in formula (4), during the training process of the discriminator, the discriminator needs to maximize L D The loss is used to enhance the discriminator's ability to distinguish adversarial samples from original samples.
[0052]
[0053] E: represents the expected value of all samples. D(x): The discriminator D judges the input sample x and outputs a value between [0,1], which represents the probability that the sample is a true sample.
[0054] S42, train the generator: the generator uses samples in the source dataset S as input, and the generator’s loss function L G Including adversarial loss (L adv ), forgery loss (L D ), and distance loss (L dist ). The adversarial loss encourages the adversarial samples generated by the generator to make the traffic analysis attack target model misclassify, as shown in formula (5), the adversarial loss (L adv ) is defined as the difference between the original label t (i.e., the predicted label of the traffic analysis attack target model F for the original sample x) and the maximum logits value of all labels except t. Logits is the original predicted value output by the traffic analysis attack target model. The generator minimizes L adv The loss is used to make the traffic analysis attack target model misclassify the adversarial samples.
[0055]
[0056] E: represents the expected value of all samples. x′: adversarial sample. This sample is generated by adding perturbations to the original sample. F(x′) t : The logits value of the adversarial sample x′ at the target label t. F(x ′ ) i : The logits value of the adversarial sample x′ at other labels i. The adversarial loss goal is to find the smallest perturbation so that the model's prediction result is inconsistent with the original label.
[0057] Forgery loss L D As shown in formula (4), the discriminator needs to maximize the forgery loss to enhance the discriminator's ability to distinguish adversarial samples from original samples, while the generator needs to minimize L D The loss is used to make the generated adversarial samples less different from the original samples.
[0058] The distance loss limits the degree of variation between the generated adversarial samples and the original samples, as shown in formula (6).
[0059]
[0060] E: Expected value operator, which means taking the expected value of all samples. ||G(x)-x||1: The L1 norm distance between the generated adversarial sample and the original sample, which is used to measure the size of the perturbation.
[0061] Finally, by minimizing the adversarial loss (L adv ), forgery loss (L D ), and distance loss (L dist ) and is used to train the generator, as shown in formula (7), where α and β are hyperparameters used to control the relative importance of each objective.
[0062] minimizeL G =L adv +αL D +βL dist (7)
[0063] S5, obfuscate the original power grid traffic based on the TA-GAN model: Based on the TA-GAN model based on the generative adversarial network pre-trained in S4, the associated timing features of the original power grid traffic are input into the pre-trained generator G. Generator G generates obfuscated associated timing features based on the input associated timing features. This process only involves the work of the generator. According to the previous training, the generator outputs the obfuscated features by performing nonlinear transformation and perturbation on the input features. Based on the associated timing features, the sending sequence of the adversarial power grid traffic is constructed, and the obfuscated associated timing features are decoded back into the data packet sequence. For example, F2 = [+1, -1, -1, +1, +1, +1, -1], which is decoded into a data packet direction sequence: outbound, inbound, inbound, outbound, outbound, outbound, inbound. According to the decoded data packet direction sequence, a specific network data packet is generated. These data packets can be implemented by inserting virtual data packets or adjusting existing data packets. The purpose of protecting the privacy of power grid traffic data is achieved.
[0064] By introducing adversarial traffic, the present invention can effectively confuse and protect the actual grid data traffic without significantly affecting the normal operation of the grid, prevent potential traffic analysis attacks, and thus enhance the privacy protection capability of the digital grid. The design goal of this method is to enable the generated adversarial traffic to mislead the target model, that is, the traffic analysis attack model, while maintaining similarity with the real traffic, to prevent it from accurately analyzing the user's electricity consumption behavior.
[0065] Another embodiment of the present invention provides a power grid flow data privacy protection system based on a generative adversarial network, comprising:
[0066] The flow feature extraction module is used to extract local flow features F from the power grid network flow. l, including burst packet size and directionality characteristics;
[0067] Source dataset building module for utilizing local traffic features F l Constructing an associated time series feature F2, where the associated time series feature is an expression of continuous data packets in different directions of traffic; and constructing a source data set using the associated time series feature F2, where each associated time series feature F2 corresponds to an original traffic;
[0068] A traffic analysis attack target model pre-training module is used to use the constructed source data set to pre-train the traffic analysis attack target model. The traffic analysis attack target model is constructed based on a convolutional neural network and is used to identify the user's electricity consumption behavior from the grid traffic time series correlation characteristics in the source data set;
[0069] A TA-GAN model pre-training module is used to train a TA-GAN model based on a generative adversarial network. The TA-GAN model includes a generator, a discriminator, and a traffic analysis attack target model. The generator receives traffic-related time series feature characteristics from a source data set as input and generates perturbed traffic-related time series features; the discriminator receives the associated time series characteristics from the source data set and the perturbed traffic-related time series features generated by the generator, and attempts to distinguish between the two; the traffic analysis attack target model is used to identify potential user electricity consumption behaviors in power grid traffic. In the process of alternating training of the generator and the discriminator, the output of the traffic analysis attack target model is used to guide the update of the generator;
[0070] The original traffic obfuscation module is used to input the associated timing features of the original power grid traffic into the trained TA-GAN model. The generator in the TA-GAN model outputs an obfuscated associated timing feature based on the input associated timing feature, and decodes the obfuscated associated timing feature back to the original traffic data packet sequence, thereby achieving the purpose of protecting the privacy of power grid traffic data.
[0071] It should be understood that the power grid flow data privacy protection system based on generative adversarial network in the embodiment of the present invention can implement all the technical solutions in the above-mentioned method embodiment, and the functions of its various functional modules can be specifically implemented according to the power grid flow data privacy protection method based on generative adversarial network in the above-mentioned method embodiment. The specific implementation process can refer to the relevant description in the above-mentioned embodiment, which will not be repeated here.
[0072] Another embodiment of the present invention also provides a computer device, comprising: one or more processors; a memory; and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the one or more processors, and when the programs are executed by the processors, the steps of the power grid flow data privacy protection method based on the generative adversarial network as described above are implemented.
[0073] Another embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method for privacy protection of power grid flow data based on a generative adversarial network as described above.
[0074] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, devices (systems), computer equipment or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0075] The present invention is described with reference to a flowchart of a method according to an embodiment of the present invention. It should be understood that each process in the flowchart and a combination of processes in the flowchart can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the process in the flowchart. Figure 1 A device that specifies functions in a process or multiple processes.
[0076] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A function specified in a process or multiple processes.
[0077] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 The steps of a specified function in a process or multiple processes.
Claims
1. A method for protecting privacy of power grid flow data based on generative adversarial networks, characterized in that: The following steps are involved: Traffic feature extraction step: Extract local traffic features F from the power grid network traffic l , including burst packet size and directionality characteristics; Source dataset construction steps: Using local traffic features F l Constructing an associated time series feature F2, where the associated time series feature is an expression of continuous data packets in different directions of traffic; and constructing a source data set using the associated time series feature F2, where each associated time series feature F2 corresponds to an original traffic; Traffic analysis attack target model pre-training step: using the constructed source data set, pre-training the traffic analysis attack target model, the traffic analysis attack target model is constructed based on a convolutional neural network and is used to identify the user's electricity consumption behavior from the grid traffic time series correlation features in the source data set; TA-GAN model pre-training step: training a TA-GAN model based on a generative adversarial network, wherein the TA-GAN model includes a generator, a discriminator, and a traffic analysis attack target model, wherein the generator receives traffic-related time series feature features from a source data set as input and generates perturbed traffic-related time series features; The discriminator receives the associated time series characteristics from the source data set and the perturbed traffic associated time series characteristics generated by the generator, and tries to distinguish the two; the traffic analysis attack target model is used to identify potential user electricity consumption behaviors in the power grid traffic. During the alternating training process of the generator and the discriminator, the output of the traffic analysis attack target model is used to guide the update of the generator; Original traffic obfuscation step: The associated timing features of the original power grid traffic are input into the trained TA-GAN model. The generator in the TA-GAN model outputs an obfuscated associated timing feature based on the input associated timing features, and decodes the obfuscated associated timing features back to the original traffic data packet sequence to achieve the purpose of power grid traffic data privacy protection.
2. The method according to claim 1, characterized in that In the flow feature extraction step, the similar flows of the power grid network flow are first merged, and then the local flow features are extracted from the merged flows.
3. The method according to claim 2, characterized in that Similar flow merging of power grid network traffic includes: Calculate the similarity of two flows. When the similarity of two flows reaches or exceeds the preset threshold τ, they are merged. The similarity calculation method is as follows: Among them, v and s represent two different flows, M represents the dimension of the feature, and i represents the i-th flow feature.
4. The method according to claim 1, characterized in that: The associated time series feature F2 is obtained by l The data is converted into a numerical expression in the form of [+1,-1,-1,-1,…,+1,+1,+1], where + and - represent different directions of the power grid network flow, and the number 1 represents a continuous data packet flowing from the user into the power grid or from the power grid to the user.
5. The method according to claim 1, characterized in that The pre-training steps of the traffic analysis attack target model include: Dataset preparation: The input features are associated time series features, and the labels are electricity consumption behavior categories. Different associated time series features correspond to different electricity consumption behavior categories. Data preprocessing: standardize the source data set and divide the data into training set and validation set; Forward propagation: The training set associated time series feature F2 is used as input, and feature extraction is performed through a one-dimensional convolutional layer. The calculation formula of the convolutional layer is: Where W is the convolution kernel and b is the bias. The features extracted by the convolution layer are processed by the activation function, the pooling layer compresses the feature representation, and the fully connected layer integrates it. Loss calculation: Use the cross entropy loss function to calculate the error between the model output and the actual label; Back propagation and parameter update: The gradient is calculated through the back propagation algorithm, and the model parameters are updated using the optimization algorithm; Model validation: Evaluate model performance on the validation set and measure the model's ability to identify user electricity usage behavior through specified indicators.
6. The method according to claim 1, characterized in that During the training process of the discriminator, the discriminator maximizes the forgery loss L D To enhance the discriminator's ability to distinguish adversarial samples from original samples: E represents the expected value of all samples, D(x) represents the discriminant D's judgment result on the input sample x, and outputs a value between [0,1], indicating the probability that the sample is a true sample; X ADV Represents the generator G based on the source dataset X S The adversarial sample set generated by samples.
7. The method according to claim 6, characterized in that The loss function L of the generator G Including adversarial loss (L adv ), forgery loss (L D ), and distance loss (L dist ): minimize L G =L adv +αL D +βL dist Where α and β are hyperparameters used to control the relative importance of each target; ||G(x)-x||1 represents the L1 norm distance between the generated adversarial sample and the original sample, which is used to measure the size of the perturbation; x′ represents the adversarial sample, which is generated by adding perturbations to the original sample; F(x′) t represents the logits value of the adversarial sample x′ at the target label t; F(x′) i Represents the logits value of the adversarial sample x′ at other labels i.
8. A power grid traffic data privacy protection system based on generative adversarial network, characterized in that: include: The flow feature extraction module is used to extract local flow features F from the power grid network flow. l including burst packet size and directionality characteristics; Source dataset building module for utilizing local traffic features F l Constructing an associated time series feature F2, where the associated time series feature is an expression of continuous data packets in different directions of traffic; and constructing a source data set using the associated time series feature F2, where each associated time series feature F2 corresponds to an original traffic; The traffic analysis attack target model pre-training module is used to use the constructed source data set to pre-train the traffic analysis attack target model. The recognition model is based on a convolutional neural network and can identify the user's electricity consumption behavior from the grid traffic time series correlation characteristics in the source data set; A TA-GAN model pre-training module is used to train a TA-GAN model based on a generative adversarial network, wherein the TA-GAN model includes a generator, a discriminator, and a traffic analysis attack target model. The generator receives traffic-related time series feature features from a source data set as input and generates perturbed traffic-related time series features; The discriminator receives the associated time series characteristics from the source data set and the perturbed traffic associated time series characteristics generated by the generator, and tries to distinguish the two; the traffic analysis attack target model is used to identify potential user electricity consumption behaviors in the power grid traffic, and its output is used to guide the update of the generator; The original power grid traffic obfuscation module is used to input the associated timing features of the original power grid traffic into the model based on the pre-trained TA-GAN model based on the generative adversarial network. The model outputs an obfuscated associated timing feature, and constructs the sending sequence of the adversarial power grid traffic based on the associated timing feature, so as to achieve the purpose of protecting the privacy of power grid traffic data.
9. A computer device, characterized in that: include: one or more processors; Memory; as well as One or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the one or more processors, and when the programs are executed by the processors, the steps of the method for privacy protection of power grid flow data based on a generative adversarial network as described in any one of claims 1-7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method for privacy protection of power grid flow data based on a generative adversarial network as described in any one of claims 1 to 7 are implemented.
Citation Information
Cited By
Data leakage risk assessment system
CN120217434A
Large-scale micro-grid safety communication flow confusion processing method and system
CN120602174A
A large-scale micro-grid secure communication traffic obfuscation processing method and system
CN120602174B
Image classification model robustness enhancement method and system based on improved generative adversarial network
CN121010835A