Method and system for generating feature data
Through diffusion model and knowledge distillation technology, the power consumption data of smart grids and IoT terminals are processed, and characteristic data that removes privacy information is generated, which solves the problem that traditional anonymization technology cannot effectively protect user privacy and achieves efficient and good-quality data generation.
Patent Information
- Application Number
- CN202411249559.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-06
- Publication Date
- 2025-02-25
AI Technical Summary
Traditional data anonymization technology cannot fully protect user privacy, and attackers may re-identify by combining other public data sets, and excessive anonymity and ambiguity of data will affect the availability and analytical value of data.
The diffusion model is used for privacy protection, privacy encrypted diffusion data is generated, and the characteristic data of the original electricity consumption data is obtained through knowledge distillation.
The characteristic data generation of removing privacy information is realized, the efficiency of synthesized data is improved, the quality of data generation is ensured, and the security of user privacy and data availability are ensured.
Smart Images

Figure CN119513923A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data protection and generation, and more specifically, to a method and system for generating feature data. Background Art
[0002] With the development of today's society, data has shown higher value than ever before. With the construction of smart grids and the increase in the number of smart IoT terminals, users' huge electricity consumption data has been widely used, so the privacy protection of users' electricity consumption data has become an important issue. Smart grids collect users' electricity consumption data through advanced metering infrastructure (AMI). These data not only include users' electricity consumption patterns, but may also contain sensitive information, such as family activity patterns and living habits. Smart IoT terminals such as smart sockets, smart light bulbs and smart charging piles also collect users' electricity consumption behavior data. If these data are improperly used or leaked, they will seriously threaten users' privacy security.
[0003] Traditional data anonymization techniques, such as removing personally identifiable information (such as name, address) or using data desensitization techniques (such as k-anonymity, differential privacy), may not be able to fully protect user privacy. Attackers may be able to recover the user's true identity by combining it with other public data sets for re-identification. In addition, excessive anonymization and blurring of data may affect the availability and analytical value of the data, making it difficult to use the data for applications such as power grid optimization and demand response. Summary of the invention
[0004] In view of the above problems, the present invention proposes a method for generating feature data, which is characterized by comprising:
[0005] Obtain raw electricity consumption data from smart grids and smart IoT terminals;
[0006] For the original electricity consumption data, a diffusion model is used to perform privacy protection to obtain privacy-encrypted diffusion data;
[0007] The privacy encrypted diffusion data is subjected to knowledge distillation processing to obtain characteristic data of the original electricity consumption data.
[0008] Optionally, raw power usage data, including: user's power usage pattern, timestamp, and device type data.
[0009] Optionally, before using the diffusion model to perform privacy protection, the method further includes:
[0010] Preprocessing the original electricity consumption data;
[0011] The preprocessing comprises:
[0012] The erroneous or inconsistent data records in the original power consumption data are removed, and the missing values in the original power consumption data are filled by interpolation to obtain the supplemented data, and the supplemented data are standardized.
[0013] Optionally, the original electricity consumption data is protected by using a diffusion model to obtain privacy-encrypted diffusion data, including:
[0014] The preprocessed original electricity usage data is used as training data, and a diffusion model is trained using the training data. Noise is gradually added to the original electricity usage data through the diffusion model, and the potential distribution of the original electricity usage data is learned to generate privacy-encrypted diffusion data corresponding to the original electricity usage data.
[0015] Optionally, the diffusion form of the diffusion model is as follows:
[0016]
[0017] Among them, X t is the electricity consumption data, β(t) is the predefined progress function, t is the training time, c is the noise intensity coefficient, W t is the random noise introduced by the Wiener process.
[0018] Optionally, performing knowledge distillation processing on the privacy-encrypted diffusion data includes:
[0019] Generate a teacher model and a student model based on the diffusion model, transfer the feature data of the privacy-encrypted diffusion data to the student model in a knowledge distillation manner based on the teacher model, and use the student model to process the feature data;
[0020] Optionally, generate a teacher model and a student model based on the diffusion model, including:
[0021] The diffusion model is used to extract feature data of the privacy-encrypted diffusion data, a teacher model is trained based on the feature data, and a student model corresponding to the teacher model is obtained by performing knowledge distillation on the teacher model.
[0022] Optionally, the method also includes: using a divergence Kullback Leibler to evaluate the similarity between the generated feature data and the original electricity usage data.
[0023] In another aspect, the present invention further provides a system for generating feature data, comprising:
[0024] A data acquisition unit, used to acquire original power consumption data of smart grid and smart IoT terminals;
[0025] An encryption diffusion unit, used for performing privacy protection on the original power consumption data by using a diffusion model to obtain privacy encrypted diffusion data;
[0026] The distillation unit is used to perform knowledge distillation processing on the privacy encrypted diffusion data to obtain feature data of the original electricity consumption data.
[0027] Optionally, raw power usage data, including: user's power usage pattern, timestamp, and device type data.
[0028] Optionally, the encryption diffusion unit is further used to: pre-process the original power consumption data before using the diffusion model for privacy protection;
[0029] The preprocessing comprises:
[0030] The erroneous or inconsistent data records in the original power consumption data are removed, and the missing values in the original power consumption data are filled by interpolation to obtain the supplemented data, and the supplemented data are standardized.
[0031] Optionally, the original electricity consumption data is protected by using a diffusion model to obtain privacy-encrypted diffusion data, including:
[0032] The preprocessed original electricity usage data is used as training data, and a diffusion model is trained using the training data. Noise is gradually added to the original electricity usage data through the diffusion model, and the potential distribution of the original electricity usage data is learned to generate privacy-encrypted diffusion data corresponding to the original electricity usage data.
[0033] Optionally, the diffusion form of the diffusion model is as follows:
[0034]
[0035] Among them, X t is the electricity consumption data, β(t) is the predefined progress function, t is the training time, c is the noise intensity coefficient, W t is the random noise introduced by the Wiener process.
[0036] Optionally, performing knowledge distillation processing on the privacy-encrypted diffusion data includes:
[0037] Generate a teacher model and a student model based on the diffusion model, transfer the feature data of the privacy-encrypted diffusion data to the student model in a knowledge distillation manner based on the teacher model, and use the student model to process the feature data;
[0038] Optionally, generating a teacher model and a student model based on a diffusion model includes:
[0039] The diffusion model is used to extract feature data of the privacy-encrypted diffusion data, a teacher model is trained based on the feature data, and a student model corresponding to the teacher model is obtained by performing knowledge distillation on the teacher model.
[0040] Optionally, the distillation unit uses the divergence Kullback Leibler to evaluate the similarity between the generated feature data and the original electricity usage data.
[0041] In yet another aspect, the present invention further provides a computing device, comprising: one or more processors;
[0042] a processor for executing one or more programs;
[0043] When the one or more programs are executed by the one or more processors, the above-described method is implemented.
[0044] In yet another aspect, the present invention further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed, the method described above is implemented.
[0045] Compared with the prior art, the present invention has the following beneficial effects:
[0046] The present invention provides a method for generating characteristic data, including: obtaining original electricity consumption data of smart grids and smart Internet of Things terminals; performing privacy protection on the original electricity consumption data using a diffusion model to obtain privacy encrypted diffusion data; and performing knowledge distillation processing on the privacy encrypted diffusion data to obtain characteristic data of the original electricity consumption data. The present invention can obtain characteristic data with privacy information removed by performing encryption diffusion processing and distillation processing on the data, improves the efficiency of synthesizing data, and ensures the quality of data generation. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] Figure 1 is a flow chart of the method of the present invention;
[0048] Figure 2 It is a flow chart of an embodiment of the method of the present invention;
[0049] Figure 3 A schematic diagram of the matching rate under different similarity thresholds of an embodiment of the method of the present invention;
[0050] Figure 4 A schematic diagram of a curve showing the relationship between the maximum mean difference and the total privacy budget in an embodiment of the method of the present invention;
[0051] Figure 5 A comparison chart of the accuracy of load data knowledge distillation in an embodiment of the method of the present invention;
[0052] Figure 6 It is a structural diagram of the system of the present invention. DETAILED DESCRIPTION
[0053] Now, exemplary embodiments of the present invention are described with reference to the accompanying drawings. However, the present invention can be implemented in many different forms and is not limited to the embodiments described herein. These embodiments are provided to disclose the present invention in detail and completely and to fully convey the scope of the present invention to those skilled in the art. The terms used in the exemplary embodiments shown in the accompanying drawings are not intended to limit the present invention. In the accompanying drawings, the same units / elements are marked with the same reference numerals.
[0054] Unless otherwise specified, the terms (including technical terms) used herein have the commonly understood meanings to those skilled in the art. In addition, it is understood that the terms defined in commonly used dictionaries should be understood to have the same meanings as those in the context of the relevant fields, and should not be understood as idealized or overly formal meanings.
[0055] Embodiment 1:
[0056] The present invention proposes a method for generating feature data, such as Figure 1 As shown, including:
[0057] Step 1: Obtain the original power consumption data of smart grid and smart IoT terminals;
[0058] Step 2: For the original electricity consumption data, a diffusion model is used to perform privacy protection to obtain privacy-encrypted diffusion data;
[0059] Step 3: Perform knowledge distillation on the privacy encrypted diffusion data to obtain feature data of the original electricity consumption data.
[0060] The original electricity usage data includes: the user's electricity usage pattern, timestamp and device type data.
[0061] Before using the diffusion model to perform privacy protection, the method further includes:
[0062] Preprocessing the original electricity consumption data;
[0063] The preprocessing comprises:
[0064] The erroneous or inconsistent data records in the original power consumption data are removed, and the missing values in the original power consumption data are filled by interpolation to obtain the supplemented data, and the supplemented data are standardized.
[0065] Wherein, for the original electricity consumption data, a diffusion model is used to perform privacy protection to obtain privacy-encrypted diffusion data, including:
[0066] The preprocessed original electricity usage data is used as training data, and a diffusion model is trained using the training data. Noise is gradually added to the original electricity usage data through the diffusion model, and the potential distribution of the original electricity usage data is learned to generate privacy-encrypted diffusion data corresponding to the original electricity usage data.
[0067] Among them, the diffusion form of the diffusion model is as follows:
[0068]
[0069] Among them, X t is the electricity consumption data, β(t) is the predefined progress function, t is the training time, c is the noise intensity coefficient, W t is the random noise introduced by the Wiener process.
[0070] The knowledge distillation process is performed on the privacy encrypted diffusion data, including:
[0071] Generate a teacher model and a student model based on the diffusion model, transfer the feature data of the privacy-encrypted diffusion data to the student model in a knowledge distillation manner based on the teacher model, and use the student model to process the feature data;
[0072] Among them, the teacher model and student model are generated based on the diffusion model, including:
[0073] The diffusion model is used to extract feature data of the privacy-encrypted diffusion data, a teacher model is trained based on the feature data, and a student model corresponding to the teacher model is obtained by performing knowledge distillation on the teacher model.
[0074] The method further includes: using the divergence Kullback Leibler to evaluate the similarity between the generated feature data and the original electricity consumption data.
[0075] The present invention is further described below in conjunction with specific implementation cases:
[0076] Example steps, such as Figure 2 As shown, specifically including:
[0077] (1) Data collection and preprocessing:
[0078] Collect the original power consumption data X from the smart grid and smart IoT terminals, including the user's power consumption pattern, timestamp, device type and other information, and preprocess the original data based on formula (1). The output training data is X', and the preprocessing operation can be expressed as:
[0079] X'=f preprocess (X) (1)
[0080] Among them, f preprocess This includes removing erroneous or inconsistent data records, filling in missing values in the original data through interpolation, and then standardizing the data to ensure that the data is on the same scale for subsequent processing.
[0081] (2) Privacy encryption diffusion model training:
[0082] The preprocessed raw electricity consumption data is used as training data, and the purpose of privacy encryption is achieved by training the diffusion model. The diffusion model learns the potential distribution of the data through the process of gradually adding noise, and generates perturbed electricity consumption data, so that attackers cannot recover the user's real electricity consumption data from it, while retaining the structural information of the data. The diffusion form of the original electricity consumption data diffusion model is:
[0083]
[0084] Where β(t) is a predefined progress function. The conditional transfer expression of diffusion is:
[0085]
[0086] in Data X in the diffusion process t At time step t, it is expressed as:
[0087]
[0088] where ∈ is the noise sampled from a standard normal distribution, ξ is the latent representation of the data, and α t is the diffusion coefficient at time step t.
[0089] (3) Knowledge distillation:
[0090] The privacy protection of electricity consumption data based on diffusion model training has strong feature retention and data generation capabilities, but the generation speed is slow. Therefore, a complex diffusion model teacher model can be trained in advance, and the electricity consumption data diffusion model with specific similar features in the same substation is set as the student model for encrypted training. Using knowledge distillation technology, the teacher model with rich knowledge and strong capabilities can pass knowledge to its student model, while ensuring the privacy and quality of generated data, and significantly improving the generation speed. The diffusion model teacher model is trained by formula (5):
[0091] L S (x,z)=E[||Enc(x)-G(z)|| 2 ] (5)
[0092] Where: Enc(·) is a diffusion function with data characteristics; G(z) is the hidden variable generated by the generator.
[0093] Assuming that the parameters of the teacher model are θ and the parameters of the student model are φ, the knowledge of the teacher model is transferred to the student model through the objective function of knowledge distillation in formula (6):
[0094]
[0095] Among them, S φ and S θ are the score functions of the student model and the teacher model, respectively, data is the distribution of the data.
[0096] (4) Feature data generation:
[0097] A large amount of synthetic electricity usage data is generated using the trained student model. These synthetic data are similar to the original electricity usage data in statistical characteristics and can reflect the real electricity usage patterns and behaviors, but do not contain any private information that can be traced back to individual users.
[0098] Privacy-encrypted data generated by the student model after knowledge distillation It can be expressed as:
[0099]
[0100] where Z is a random variable in the latent space, g φ is the generating function of the student model.
[0101] The Kullback Leibler (KL) divergence can be used to evaluate the similarity between the generated data and the original data:
[0102]
[0103] Among them, p data and p gen are the distributions of original data and generated data, respectively.
[0104] In order to verify the effectiveness of the present invention and evaluate the quality of synthetic data, three indicators are proposed and verified: privacy ensures that synthetic data cannot reveal any real data information, authenticity requires that synthetic data reflect the distribution of real data, and distillation accuracy reflects the performance improvement of the student model after the teacher's knowledge transfer.
[0105] Privacy of synthetic load data: The privacy evaluation of synthetic load data is based on the ability of attackers to reconstruct real information from synthetic data. By calculating the Euclidean distance between synthetic data samples and real data, the matching rate under different similarity thresholds is evaluated. Since the average value of the minimum Euclidean distance between each load data and other load data is 0.5, 0.30, 0.35, and 0.40 are set as similarity thresholds. Figure 3 It can be seen that when the threshold is 0.40, the matching rate increases with ε and finally stabilizes at about 22%, indicating that there is a risk of leakage. When the similarity threshold is 0.35, the amount of real data matched is very small. At the threshold of 0.30, no synthetic data is found to match the real data, showing that the proposed method maintains good privacy under any total privacy budget.
[0106] Authenticity verification of synthetic load data: By calculating the maximum mean difference (MMD) between synthetic data and real data, the authenticity of synthetic data can be quantitatively evaluated, and the accuracy of the evaluation model in capturing the distribution of real data can be evaluated. MMD The smaller the value, the higher the distribution similarity between the two data sets. Figure 4 As shown in the figure, after implementing differential privacy protection, as the privacy budget ε increases, the MMD between synthetic data and real data gradually decreases. When ε reaches a specific threshold, the MMD converges to a small constant, close to the level without privacy protection. This shows that the proposed method can effectively replicate the distribution of real load data and verify the reliability of synthetic data in terms of authenticity.
[0107] Effectiveness of the distillation model: In order to verify the effectiveness of the diffusion model based on teacher-student distillation in this paper, the accuracy of the synthetic electricity consumption data compared with the original data is evaluated. The experiment part compares the prediction accuracy of sample classification in two cases: using the teacher model to train the student generator and not using the teacher model to transfer knowledge to the student generator. Figure 5 As shown in the figure, after using knowledge distillation, the accuracy of the data synthesized by the student model has been significantly improved.
[0108] Embodiment 2:
[0109] The present invention also proposes a system 200 for generating feature data, such as Figure 6 As shown, including:
[0110] The data acquisition unit 201 is used to acquire the original power consumption data of the smart grid and the smart Internet of Things terminal;
[0111] The encryption diffusion unit 202 is used to perform privacy protection on the original power consumption data by using a diffusion model to obtain privacy encrypted diffusion data;
[0112] The distillation unit 203 is used to perform knowledge distillation processing on the privacy encrypted diffusion data to obtain feature data of the original power consumption data.
[0113] The original electricity usage data includes: the user's electricity usage pattern, timestamp and device type data.
[0114] The encryption diffusion unit 202 is further used to: pre-process the original power consumption data before using the diffusion model for privacy protection;
[0115] The preprocessing comprises:
[0116] The erroneous or inconsistent data records in the original power consumption data are removed, and the missing values in the original power consumption data are filled by interpolation to obtain the supplemented data, and the supplemented data are standardized.
[0117] Wherein, for the original electricity consumption data, a diffusion model is used to perform privacy protection to obtain privacy-encrypted diffusion data, including:
[0118] The preprocessed original electricity usage data is used as training data, and a diffusion model is trained using the training data. Noise is gradually added to the original electricity usage data through the diffusion model, and the potential distribution of the original electricity usage data is learned to generate privacy-encrypted diffusion data corresponding to the original electricity usage data.
[0119] Among them, the diffusion form of the diffusion model is as follows:
[0120]
[0121] Among them, X t is the electricity consumption data, β(t) is the predefined progress function, t is the training time, c is the noise intensity coefficient, W t is the random noise introduced by the Wiener process.
[0122] The knowledge distillation process is performed on the privacy encrypted diffusion data, including:
[0123] Generate a teacher model and a student model based on the diffusion model, transfer the feature data of the privacy-encrypted diffusion data to the student model in a knowledge distillation manner based on the teacher model, and use the student model to process the feature data;
[0124] Among them, the teacher model and student model are generated based on the diffusion model, including:
[0125] The diffusion model is used to extract feature data of the privacy-encrypted diffusion data, a teacher model is trained based on the feature data, and a student model corresponding to the teacher model is obtained by performing knowledge distillation on the teacher model.
[0126] The distillation unit 203 uses the divergence Kullback Leibler to evaluate the similarity between the generated feature data and the original power consumption data.
[0127] The present invention can obtain feature data with privacy information removed by performing encryption diffusion processing and distillation processing on data, improve the efficiency of synthesizing data, and ensure the quality of data generation.
[0128] Embodiment 3:
[0129] Based on the same inventive concept, the present invention also provides a computer device, which includes a processor and a memory, wherein the memory is used to store a computer program, the computer program includes program instructions, and the processor is used to execute the program instructions stored in the computer storage medium. The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. It is the computing core and control core of the terminal, which is suitable for implementing one or more instructions, and is specifically suitable for loading and executing one or more instructions in the computer storage medium to implement the corresponding method flow or corresponding functions, so as to implement the steps of the method in the above embodiment.
[0130] Embodiment 4:
[0131] Based on the same inventive concept, the present invention also provides a storage medium, specifically a computer-readable storage medium (Memory), which is a memory device in a computer device for storing programs and data. It is understandable that the computer-readable storage medium here can include both a built-in storage medium in a computer device and an extended storage medium supported by the computer device. The computer-readable storage medium provides a storage space, which stores the operating system of the terminal. In addition, one or more instructions suitable for being loaded and executed by a processor are also stored in the storage space, and these instructions can be one or more computer programs (including program codes). It should be noted that the computer-readable storage medium here can be a high-speed RAM memory or a non-volatile memory, such as at least one disk memory. The processor can load and execute one or more instructions stored in the computer-readable storage medium to implement the steps of the method in the above embodiment.
[0132] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems, 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. The schemes in the embodiments of the present invention may be implemented in various computer languages, for example, object-oriented programming language Java and literal scripting language JavaScript, etc.
[0133] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, 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 processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0134] 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 process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0135] 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 in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0136] Although the preferred embodiments of the present invention have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.
[0137] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.
Claims
1. A method for generating feature data, characterized in that: include: Obtain raw electricity consumption data from smart grids and smart IoT terminals; For the original electricity consumption data, a diffusion model is used to perform privacy protection to obtain privacy-encrypted diffusion data; The privacy encrypted diffusion data is subjected to knowledge distillation processing to obtain characteristic data of the original electricity consumption data.
2. The method according to claim 1, characterized in that The original electricity usage data includes: the user's electricity usage pattern, timestamp and device type data.
3. The method according to claim 1, characterized in that Before using the diffusion model for privacy protection, the method further includes: Preprocessing the original electricity consumption data; The preprocessing comprises: The erroneous or inconsistent data records in the original power consumption data are removed, and the missing values in the original power consumption data are filled by interpolation to obtain the supplemented data, and the supplemented data are standardized.
4. The method according to claim 1, characterized in that: The method of using a diffusion model to perform privacy protection on the original electricity consumption data to obtain privacy-encrypted diffusion data includes: The preprocessed original electricity usage data is used as training data, and a diffusion model is trained using the training data. Noise is gradually added to the original electricity usage data through the diffusion model, and the potential distribution of the original electricity usage data is learned to generate privacy-encrypted diffusion data corresponding to the original electricity usage data.
5. The method according to claim 1, characterized in that The diffusion form of the diffusion model is as follows: Among them, X t is the electricity consumption data, β(t) is the predefined progress function, t is the training time, c is the noise intensity coefficient, W t is the random noise introduced by the Wiener process.
6. The method according to claim 1, characterized in that The performing knowledge distillation processing on the privacy encrypted diffusion data includes: A teacher model and a student model are generated based on the diffusion model, and the feature data of the privacy-encrypted diffusion data is transferred to the student model in a knowledge distillation manner based on the teacher model, and the feature data is processed using the student model.
7. The method according to claim 6, characterized in that The method of generating a teacher model and a student model based on a diffusion model includes: The diffusion model is used to extract feature data of the privacy-encrypted diffusion data, a teacher model is trained based on the feature data, and a student model corresponding to the teacher model is obtained by performing knowledge distillation on the teacher model.
8. The method according to claim 1, characterized in that: The method further includes: using a divergence KullbackLeibler to evaluate the similarity between the generated feature data and the original power consumption data.
9. A system for generating feature data, characterized in that: include: A data acquisition unit, used to acquire original power consumption data of smart grid and smart IoT terminals; An encryption diffusion unit, used for performing privacy protection on the original power consumption data by using a diffusion model to obtain privacy encrypted diffusion data; The distillation unit is used to perform knowledge distillation processing on the privacy encrypted diffusion data to obtain feature data of the original electricity consumption data.
10. The system according to claim 9, characterized in that The original electricity usage data includes: the user's electricity usage pattern, timestamp and device type data.
11. The system according to claim 9, characterized in that The encryption diffusion unit is further used to: pre-process the original power consumption data before using the diffusion model for privacy protection; The preprocessing comprises: The erroneous or inconsistent data records in the original power consumption data are removed, and the missing values in the original power consumption data are filled by interpolation to obtain the supplemented data, and the supplemented data are standardized.
12. The method according to claim 9, characterized in that The method of using a diffusion model to perform privacy protection on the original electricity consumption data to obtain privacy-encrypted diffusion data includes: The preprocessed original electricity usage data is used as training data, and a diffusion model is trained using the training data. Noise is gradually added to the original electricity usage data through the diffusion model, and the potential distribution of the original electricity usage data is learned to generate privacy-encrypted diffusion data corresponding to the original electricity usage data.
13. The method according to claim 9, characterized in that The diffusion form of the diffusion model is as follows: Among them, X t is the electricity consumption data, β(t) is the predefined progress function, t is the training time, c is the noise intensity coefficient, W t is the random noise introduced by the Wiener process.
14. The system according to claim 9, characterized in that The performing knowledge distillation processing on the privacy encrypted diffusion data includes: A teacher model and a student model are generated based on the diffusion model, and the feature data of the privacy-encrypted diffusion data is transferred to the student model in a knowledge distillation manner based on the teacher model, and the feature data is processed using the student model.
15. The system according to claim 14, characterized in that The method of generating a teacher model and a student model based on a diffusion model includes: The diffusion model is used to extract feature data of the privacy-encrypted diffusion data, a teacher model is trained based on the feature data, and a student model corresponding to the teacher model is obtained by performing knowledge distillation on the teacher model.
16. The system according to claim 9, characterized in that The distillation unit uses the divergence KullbackLeibler to evaluate the similarity between the generated feature data and the original electricity usage data.
17. A computer device, characterized in that: include: one or more processors; a processor for executing one or more programs; When the one or more programs are executed by the one or more processors, the method according to any one of claims 1 to 8 is implemented.
18. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and when the computer program is executed, the method according to any one of claims 1 to 8 is implemented.