Internet of Things privacy leakage detection method and system based on high-order feature data enhancement
By using deep convolutional autoencoder to generate samples in the IoT privacy detection model, the problem of category imbalance is solved and the detection effect is improved.
Patent Information
- Application Number
- CN202411898861.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-20
- Publication Date
- 2025-04-29
- Estimated Expiration
- 2044-12-20
AI Technical Summary
During the training process, the IoT privacy detection model is difficult to learn the potential distribution of privacy traffic data due to category imbalance, resulting in poor detection results.
The sample generator based on the deep convolutional autoencoder generates traffic data containing privacy information, expands the training sample set, and thus improves the detection effect of the privacy detection model.
The data generated by the sample generator enriches the training data set and improves the generalization ability and identification accuracy of the target privacy detection model.
Smart Images

Figure CN119337372B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a method and system for detecting privacy leakage in the Internet of Things based on high-order feature data enhancement. Background Art
[0002] With the development of blockchain, artificial intelligence and data mining technology, IoT privacy traffic data has become easy to obtain. Traffic detection models detect traffic patterns in the network to find privacy traffic that does not conform to normal traffic patterns, which is of great significance to the data security of IoT networks and devices in actual scenarios.
[0003] However, the training process of privacy detection models usually requires the collection of a large amount of sample data containing both private and non-private information. In actual IoT environments, normal traffic data usually dominates, while traffic data containing private information is less in number and has many categories. This leads to a class imbalance problem in the training dataset, making it difficult for the model to learn the potential distribution of private traffic data, thus affecting the detection effect of a few categories of private traffic. Summary of the invention
[0004] The present application provides an Internet of Things privacy leakage detection method and system based on high-order feature data enhancement, which is used to generate traffic data containing privacy information based on a sample generation network to expand the training samples of the privacy detection model, thereby improving the detection effect of the privacy detection model.
[0005] The first aspect of the embodiment of the present application provides an Internet of Things privacy leakage detection method based on high-order feature data enhancement, including: obtaining a real data set, the real data set including multiple N-dimensional real traffic data collected from the Internet of Things; the N-dimensional real traffic data contains data features of N feature dimensions; N is a positive integer; constructing a target sample set based on the real data set and a sample generator; the samples in the target sample set are divided into a first type of samples and a second type of samples, the first type of samples are obtained by annotating whether the N-dimensional real traffic data contains privacy information; the second type of samples are generated by the sample generator according to the N-dimensional real traffic data containing privacy information; using the target sample set to train an initial privacy detection model to obtain a target privacy detection model, the target privacy detection model is used to detect whether the traffic data in the Internet of Things contains privacy information; wherein the sample generator is trained in the following manner: for the N-dimensional real traffic data containing privacy information, using a deep convolutional autoencoder to extract M-dimensional high-order potential features of the N-dimensional real traffic data, and reconstructing the data based on the M-dimensional high-order potential features to obtain reconstructed N-dimensional reconstructed traffic data; M is a positive integer less than N; training the initial sample generator based on the N-dimensional reconstructed traffic data to obtain a trained sample generator.
[0006] The Internet of Things privacy leakage detection method based on high-order feature data enhancement provided in the embodiment of the present application expands the originally acquired sample data through a sample generator to obtain more data samples including privacy information, so as to enrich the initial training data set acquired in the Internet of Things, thereby improving the generalization ability and recognition accuracy of the target privacy detection model.
[0007] Moreover, the sample generator in the embodiment of the present application is trained based on the reconstructed traffic data of the deep convolutional autoencoder. The privacy information is usually hidden in the specific features or patterns of the data. The deep convolutional autoencoder can learn these features and retain them during the reconstruction process. Therefore, the reconstructed traffic data usually contains rich information, which helps the sample generator to more comprehensively understand the distribution and characteristics of the original data. Therefore, the sample generator can generate data that is more similar to the input data, and the detection accuracy of the privacy detection model trained using the data generated by the sample generator is also higher.
[0008] In combination with the first implementation method of the first aspect, the initial sample generator is trained based on N-dimensional reconstructed traffic data to obtain a trained sample generator, including: performing multiple rounds of adversarial training on the initial sample generator and the initial discriminator based on the N-dimensional reconstructed traffic data until a preset termination condition is met, thereby obtaining a trained sample generator and a trained discriminator; wherein each round of adversarial training process includes: inputting the N-dimensional reconstructed traffic data into the sample generator, and adjusting the data at multiple positions in the N-dimensional reconstructed traffic data through the sample generator to obtain N-dimensional pseudo-traffic data; inputting the N-dimensional pseudo-traffic data into the discriminator, and performing discriminative processing on the N-dimensional pseudo-traffic data through the discriminator to obtain a predicted probability that the N-dimensional pseudo-traffic data is judged as data containing privacy information; based on the predicted probability, adjusting the model parameters of the sample generator and the discriminator.
[0009] In combination with the second implementation method of the first aspect, before using the target sample set to train the initial privacy detection model, the method also includes: inputting the second category of samples in the target sample set into the trained discriminator to obtain the target probability that the second category of samples are discriminated as data containing privacy information; among the second category of samples in the target sample set, removing the second category of samples whose target probability is greater than or equal to a preset probability threshold.
[0010] In combination with the third implementation method of the first aspect, a target sample set is constructed based on a real data set and a target sample generation model, including: for N-dimensional real traffic data containing privacy information, the N-dimensional real traffic data is input into a sample generator, and the data at multiple positions in the N-dimensional real traffic data is adjusted through the sample generator to obtain N-dimensional pseudo-traffic data; and the N-dimensional pseudo-traffic data is used as the second type of sample.
[0011] In combination with the fourth implementation manner of the first aspect, the method also includes: using N-dimensional real traffic data containing privacy information in the first category of samples to train the sample generator.
[0012] In combination with the fifth implementation method of the first aspect, the initial privacy detection model is trained using the target sample set to obtain a target privacy detection model, including: for the samples in the target sample set, using a deep convolutional autoencoder to extract M-dimensional high-order latent features of the samples, and reconstructing the data based on the M-dimensional high-order latent features to obtain reconstructed samples with the same number of feature dimensions as the samples; training the initial privacy detection model based on the reconstructed samples corresponding to each sample to obtain the target privacy detection model.
[0013] In combination with the sixth implementation method of the first aspect, the method also includes: obtaining target traffic data to be detected; using a deep convolutional autoencoder to determine the reconstructed target traffic data corresponding to the target traffic data; inputting the reconstructed target traffic data into a target privacy detection model, and determining whether the target traffic data contains privacy information through the target privacy detection model.
[0014] In combination with the seventh implementation method of the first aspect, the sample generator includes one or more encoder-decoder layers; wherein each encoder-decoder layer is used to determine the correlation score between different positions in the input data based on the self-attention mechanism, and update the data at each position of the input data based on the correlation score.
[0015] In combination with the eighth implementation method of the first aspect, the discriminator includes: one or more encoder layers, and an output layer; each encoder layer is used to extract feature information in the input data based on the self-attention mechanism; wherein the input data of the first encoder layer is N-dimensional pseudo-traffic data, and the input data of other encoder layers is the output data of the previous encoder layer; the output layer is used to determine the predicted probability that the input data contains privacy information based on the feature information extracted by one or more encoder layers.
[0016] The second aspect of an embodiment of the present application provides a training system for a privacy detection model, including: a data acquisition device for collecting N-dimensional real traffic data in the Internet of Things; a data detection device for inputting the N-dimensional real traffic data into the target privacy detection model provided by the first aspect and its possible implementation methods, and determining whether the N-dimensional real traffic data includes privacy information through the target privacy detection model.
[0017] A third aspect of an embodiment of the present application provides an electronic device, comprising: one or more processors; one or more memories; wherein the one or more memories are used to store computer program codes, the computer program codes include computer instructions, and when the one or more processors execute the computer instructions, the electronic device executes the Internet of Things privacy leakage detection method based on high-order feature data enhancement provided by the first aspect and its possible implementation methods.
[0018] The fourth aspect of an embodiment of the present application provides a computer-readable storage medium, which stores computer execution instructions. When the computer execution instructions are run on a computer, the computer executes the training method of the privacy detection model provided by the first aspect and its possible implementation methods.
[0019] A fifth aspect of an embodiment of the present application provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the steps of the training method of the privacy detection model provided by the first aspect and its possible implementation methods.
[0020] Among them, the beneficial effects described in the second to fifth aspects can refer to the beneficial effect analysis of the first aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] The accompanying drawings are used to provide a further understanding of the technical solution of the present invention and constitute a part of the specification. Together with the embodiments of the present application, they are used to explain the technical solution of the present invention and do not constitute a limitation on the technical solution of the present invention.
[0022] Figure 1 A method flow of an IoT privacy leakage detection method based on high-order feature data enhancement provided in an embodiment of the present application Figure 1 ;
[0023] Figure 2 A method flow of an IoT privacy leakage detection method based on high-order feature data enhancement provided in an embodiment of the present application Figure 2 ;
[0024] Figure 3 A method flow of an IoT privacy leakage detection method based on high-order feature data enhancement provided in an embodiment of the present application Figure 3 ;
[0025] Figure 4 A schematic diagram of the model structure of an autoencoder provided in an embodiment of the present application;
[0026] Figure 5 A method flow of an IoT privacy leakage detection method based on high-order feature data enhancement provided in an embodiment of the present application Figure 4 ;
[0027] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0028] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0029] The terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of this application, unless otherwise specified, "plurality" means two or more.
[0030] In the description of this application, it should be noted that, unless otherwise clearly specified and limited, the terms "connected" and "connection" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection. For ordinary technicians in this field, the specific meanings of the above terms in this application can be understood according to specific circumstances. In addition, when describing a pipeline, the "connected" and "connection" used in this application have the meaning of conduction. The specific meaning needs to be understood in conjunction with the context.
[0031] In the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.
[0032] With the development of blockchain, artificial intelligence and data mining technology, IoT privacy traffic data has become easy to obtain. Traffic detection models detect traffic patterns in the network to find privacy traffic that does not conform to normal traffic patterns, which is of great significance to the data security of IoT networks and devices in actual scenarios.
[0033] However, the training process of privacy detection models usually requires the collection of a large amount of sample data containing both private and non-private information. In the Internet of Things (IoT) environment, network traffic data presents a typical imbalanced characteristic. This imbalance is mainly reflected in the difference in the proportion between normal traffic data and traffic data containing private information.
[0034] In IoT networks, most traffic data is usually normal, non-sensitive communications. These traffic flows may include daily communications between devices, status updates, sensor readings, etc. Since these activities are fundamental to the operation of IoT networks, normal traffic data dominates the total volume. In contrast, traffic data containing privacy information is usually smaller in quantity. Privacy traffic may involve users' sensitive information, such as location data, health records, personal communication content, etc. Due to the sensitivity of this information and the need for privacy protection, the amount of privacy traffic is often limited. In addition, the categories of privacy traffic may also be very diverse, including different data types, formats, and transmission methods.
[0035] This difference in the number of normal traffic and privacy traffic leads to the problem of class imbalance in the training dataset. In machine learning and deep learning models, class balance is one of the key factors in training effective models. When the number of samples in a certain category is much smaller than that in other categories, the model may have difficulty learning the underlying distribution and characteristics of the data in that category, resulting in an inability to accurately distinguish between normal traffic and privacy traffic. This may lead to an increased risk of privacy leakage because the model may not be able to identify and protect the transmission of sensitive information in a timely manner.
[0036] Based on this, the embodiment of the present application provides an IoT privacy leakage detection method based on high-order feature data enhancement, which constructs a target sample set through multiple N-dimensional real traffic data collected from the IoT and a sample generator. Among them, the samples in the target sample set are divided into a first type of samples and a second type of samples. The first type of samples are obtained by annotating whether the N-dimensional real traffic data contains privacy information; the second type of samples are generated by the sample generator based on the N-dimensional real traffic data containing privacy information.
[0037] Furthermore, the sample generator in the embodiment of the present application is trained by reconstructing N-dimensional real traffic data containing privacy information using a deep convolutional autoencoder to obtain reconstructed traffic data. The reconstructed data usually contains rich information, which helps the sample generator learn more comprehensive data distribution and characteristics in the N-dimensional real traffic data containing privacy information. Furthermore, the sample generator can generate a second type of sample that is similar to but not exactly the same as the original data based on the N-dimensional real traffic data containing privacy information. Furthermore, the solution of the present application utilizes multiple N-dimensional real traffic data and a sample generator to generate new and diverse sample data based on existing data samples, trains the initial privacy detection model, and obtains a target privacy detection model for detecting whether traffic data in the Internet of Things contains privacy information.
[0038] It can be seen that the solution provided in the embodiment of the present application expands the original acquired sample data through a sample generator to obtain more data samples including privacy information, so as to enrich the initial training data set acquired in the Internet of Things, thereby improving the generalization ability and recognition accuracy of the target privacy detection model.
[0039] Moreover, the sample generator in the embodiment of the present application is trained based on the reconstructed traffic data of the deep convolutional autoencoder. The privacy information is usually hidden in the specific features or patterns of the data. The deep convolutional autoencoder can learn these features and retain them during the reconstruction process. Therefore, the reconstructed traffic data usually contains rich information, which helps the sample generator to more comprehensively understand the distribution and characteristics of the original data. Therefore, the sample generator can generate data that is more similar to the input data, and the detection accuracy of the privacy detection model trained using the data generated by the sample generator is also higher.
[0040] In the embodiment of the present application, for the sake of convenience, the traffic data that does not include privacy information is called normal traffic data, the traffic data that includes privacy information is called privacy traffic data, the actually obtained traffic data is called real traffic data, the traffic data generated by the sample generator is called false traffic data, and the traffic data output by the deep convolutional autoencoder (hereinafter referred to as the autoencoder) is called reconstructed traffic data.
[0041] It should be understood that the IoT privacy leakage detection method based on high-order feature data enhancement provided in the embodiments of the present application is applicable to privacy detection devices deployed with target privacy detection models. Among them, the privacy detection device can be an electronic device, such as a personal computer (PC), a laptop computer, a mobile device, a tablet computer, a laptop computer, etc. The embodiments of the present application do not limit the specific form of the electronic device. Alternatively, the privacy detection device can also be a separate server or a server cluster composed of multiple servers. In some implementations, the server cluster can be a distributed cluster server. The embodiments of the present application do not impose any restrictions on the specific form of the model training device.
[0042] It should be noted that the methods related to model training in the embodiments of the present application, such as the methods for training target privacy detection models or training sample generators, can be applied to the above-mentioned privacy detection devices or to other devices (model training devices). Other devices may also be electronic devices or servers, and the embodiments of the present application do not impose any restrictions on this.
[0043] See also Figure 1 The method for detecting privacy leakage in the Internet of Things based on high-order feature data enhancement provided in the embodiment of the present application comprises the following steps:
[0044] S101. Obtain a real data set.
[0045] The real data set includes multiple N-dimensional real traffic data collected from the Internet of Things; the N-dimensional real traffic data includes data features of N feature dimensions; N is a positive integer;
[0046] In the Internet of Things, the collected data often has multiple dimensions, which may include but are not limited to the following aspects: time dimension, which records the time point or time period of data collection, which helps to analyze the timeliness and trend of the data; spatial dimension, which describes the location or spatial distribution of data collection, which is crucial for geospatial analysis; device dimension, which reflects the status, type, function and other information of different IoT devices, which helps to identify the differences and associations between devices; environmental dimension, including environmental parameters such as temperature, humidity, light, pressure, etc., which helps to understand the conditions of the environment in which the device is located; traffic dimension, which specifically refers to the traffic size, rate, direction, etc. of data transmission, is an indispensable part of IoT data collection.
[0047] In some embodiments, the IoT system generally includes a device layer, a gateway layer, and a cloud service layer. The device layer consists of various physical devices and sensors, and data is transmitted to the cloud service layer through the gateway layer (including wireless networks, gateways, hubs, etc.). The cloud service layer stores relevant traffic data and performs calculations to provide services. As a feasible implementation method, the business traffic data of the cloud service layer can be collected as N-dimensional real traffic data based on the traffic data collection module.
[0048] As a feasible implementation method, the collected raw traffic data can be preprocessed, such as data cleaning, denoising, formatting, etc., to ensure the quality and consistency of the traffic data, and then obtain a real data set.
[0049] It is understandable that traffic data in the Internet of Things mainly includes device information, user personal information, user behavior data, communication data, etc. Therefore, normal traffic data should only include the use status of the device, etc., while traffic data including privacy information usually includes multiple types, such as personal identity information (such as name, ID number, phone number, etc.), biometric information (such as fingerprint, facial recognition data, etc.), location information, network behavior and other data.
[0050] For example, the following are some types of traffic data in the Internet of Things, as well as the difference between normal traffic data and privacy traffic data:
[0051] 1. Equipment information:
[0052] Traffic data: device model, serial number, firmware version, MAC address, IP address, etc.
[0053] The difference between normal traffic data and private traffic data: Normal traffic data may only contain the usage status of the device, but not the serial number or MAC address that can uniquely identify the device. Private traffic data may include the serial number or MAC address of the device.
[0054] 2. User Personal Information:
[0055] Traffic Data: Name, address, phone number, account information, location data, etc.
[0056] The difference between normal traffic data and privacy traffic data: Normal data usually does not involve personal identity information, but only includes device usage data.
[0057] 3. User behavior data:
[0058] Traffic data: usage habits, work and rest time, preference settings, search history, etc.
[0059] The difference between normal traffic data and privacy traffic data: Normal data may only include the time when the device is turned on and off, but not the user's personal behavior habits.
[0060] 4. Communication data:
[0061] Traffic data: communication records, communication content, communication time, communication objects, etc. between devices.
[0062] The difference between normal traffic data and privacy traffic data: Normal data may only record whether the device communicates successfully, without involving the specific content or object of the communication.
[0063] It is understandable that the embodiments of the present application do not limit the dimensions and types of N-dimensional real traffic data. N-dimensional real traffic data may include any of the following: device information, user personal information, user behavior data or communication data, and the present application does not impose any restrictions on this.
[0064] S102: construct a target sample set based on the real data set and the sample generator.
[0065] Among them, the samples in the target sample set are divided into the first category of samples and the second category of samples. The first category of samples are obtained by marking whether the N-dimensional real traffic data contains privacy information; the second category of samples are generated by the sample generator based on the N-dimensional real traffic data containing privacy information.
[0066] It is understandable that the real data set obtained in S101 includes normal traffic data and private traffic data, which need to be labeled, that is, multiple N-dimensional real traffic data are distinguished and divided into normal traffic data that does not include private information and private traffic data that includes private information, and then labeled with different labels. For example, the label "0" can be used to represent normal traffic data, and the label "1" can be used to represent private traffic data. Thus, the first type of samples mentioned above are obtained.
[0067] Since the privacy traffic data in the real data set is usually small and may be of many types, it is difficult for the privacy detection model to learn the data distribution and characteristics in the privacy traffic data by training the privacy detection model with a small amount of privacy traffic data. Therefore, the embodiment of the present application uses a sample generator to generate false privacy traffic data based on N-dimensional real traffic data containing privacy information, and uses it as the second type of sample. It should be understood that the data in the second type of sample are all privacy traffic data, so the corresponding label can be "1".
[0068] In some embodiments, S102 can be specifically implemented as follows: for N-dimensional real traffic data containing privacy information, the N-dimensional real traffic data is input into a sample generator, and the data at multiple positions in the N-dimensional real traffic data is adjusted by the sample generator to obtain N-dimensional pseudo-traffic data; and the N-dimensional pseudo-traffic data is used as the second type of sample.
[0069] As a feasible implementation method, adjusting the data at multiple positions in the N-dimensional reconstructed traffic data can add noise information to the multiple positions of the N-dimensional reconstructed traffic data to obtain N-dimensional pseudo traffic data.
[0070] It should be understood that the type of noise can be Gaussian noise, uniform noise or other types of noise, depending on the application scenario and privacy protection requirements. The distribution and intensity of the noise need to be carefully adjusted to ensure that the generated data has sufficient privacy protection effect without affecting the availability and accuracy of the data.
[0071] As a feasible implementation method, the sample generator can adopt the Transformer architecture, which can capture the long-term dependencies in the sequence data through the self-attention mechanism, and then determine the correlation scores between different positions in the input data, and update the data of each position of the input data based on the correlation score to obtain N-dimensional pseudo traffic data. For a detailed introduction to the Transformer architecture, please refer to the following embodiments, which will not be repeated in this application.
[0072] S103: Use the target sample set to train the initial privacy detection model to obtain a target privacy detection model.
[0073] It should be understood that the target privacy detection model is used to detect whether the traffic data in the Internet of Things contains privacy information.
[0074] Before training the privacy detection model, it is necessary to initialize the privacy detection model, initialize the model's weights and biases, and then input the reconstructed data corresponding to multiple sample traffic data into the initial privacy detection model. The loss function (such as cross entropy loss) is calculated based on the prediction results output by the model and the labels corresponding to the multiple sample traffic data, and the difference between the prediction results and the true labels is obtained. Then, according to the gradient calculated by the loss function, the learning rate, batch size, number of network layers, number of neurons and other hyperparameters of the privacy detection model are updated through back propagation until the iteration stop condition is met to obtain the target privacy detection model.
[0075] It should be noted that the present application does not limit the conditions for stopping the iteration. As a feasible implementation method, the condition for stopping the iteration can be that the number of iterations reaches a preset threshold. As another feasible implementation method, the decision to stop training can be made by monitoring the decrease of the loss function. When the decrease in the loss function value of two adjacent iteration points is less than or equal to a certain small positive number, the iteration is terminated. As another feasible implementation method, a part of the sample traffic data can be selected as a validation set. When the performance indicators on the validation set (such as accuracy, precision, recall, and F1 score) have not been significantly improved over a period of time, it can be considered that the model has been overfitted or is close to the optimal performance, and the iteration is stopped.
[0076] It can be seen that the solution provided in the embodiment of the present application expands the original acquired sample data through a sample generator to obtain more data samples including privacy information, so as to enrich the initial training data set acquired in the Internet of Things, thereby improving the generalization ability and recognition accuracy of the target privacy detection model.
[0077] In some embodiments, since the purpose of the sample generator is to generate close to real privacy data, that is, N-dimensional real traffic data containing privacy information, the sample generator can be directly trained using the N-dimensional real traffic data containing privacy information.
[0078] It is understandable that real data usually contains rich information and details. Using real private data as training samples can enable the generator to learn details such as the real distribution and characteristics of this data, thereby generating samples that are closer to the real private data.
[0079] In other embodiments, the deep convolutional autoencoder can automatically extract high-level features from the input data through multi-layer convolution and pooling operations. These features are very valuable for the sample generator because they contain key information of the original data and help the generator generate more realistic samples. Therefore, the sample generator can be trained with the help of the deep convolutional autoencoder.
[0080] Specifically, in the embodiments of this application, please refer to Figure 2 , the sample generator is trained as follows:
[0081] S11. For N-dimensional real traffic data containing privacy information, a deep convolutional autoencoder is used to extract M-dimensional high-order latent features of the N-dimensional real traffic data, and data is reconstructed based on the M-dimensional high-order latent features to obtain the reconstructed N-dimensional reconstructed traffic data.
[0082] Wherein, M is a positive integer less than N.
[0083] It is understandable that the Deep Convolutional Autoencoder (CAE) is a neural network model that learns to effectively represent data through unsupervised learning. Its core idea is to compress N-dimensional input data into M-dimensional high-order potential features through the encoder, and then reconstruct the original input data from the high-order potential features through the decoder.
[0084] It is understandable that if the encoding dimension (M) is equal to the input dimension (N), the encoder and decoder will learn to directly copy the input to the output without learning any information about the data distribution. Therefore, the encoding dimension needs to be smaller than the input dimension so that the autoencoder can learn the most significant features of the data distribution.
[0085] Here, high-order refers to the complexity or level of abstraction of the feature. It is not directly related to the number of dimensions in the feature space, but refers to how the features are extracted or constructed from the raw data. High-order features are usually obtained by combining, transforming, or applying more complex functions to low-order features (or raw data). These high-order features can capture more complex patterns or relationships in the data, which may improve the performance of the model.
[0086] In an embodiment of the present application, a deep convolutional autoencoder is used to compress the input N-dimensional real traffic data into M dimensions to obtain M-dimensional high-order latent features, and then reconstruct the data based on the M-dimensional high-order latent features to obtain reconstructed N-dimensional reconstructed traffic data.
[0087] Where M is a positive integer less than N. That is, the number of dimensions of the high-order latent features in the feature space is relatively small compared to the number of dimensions of the N-dimensional real traffic data. In machine learning, the feature space is a set of all possible feature values that are used to describe or represent samples in a dataset. A low-dimensional space means that fewer features are used, which helps reduce computational complexity, avoid overfitting, and may improve the generalization ability of the model.
[0088] S12. Train the initial sample generator based on the N-dimensional reconstructed traffic data to obtain a trained sample generator.
[0089] Through the reconstruction process, CAE can learn compressed representations of data, namely features, which capture the core attributes of the input data and can remove noise and redundant information in N-dimensional real traffic data while retaining the most important features.
[0090] It is understandable that while reconstructing the data, it may introduce some minor changes or noise while retaining the main features of the original data. These changes help increase the diversity of the training data, allowing the sample generator to learn richer data features and thus generate more diverse samples. Increasing the amount of data used when training the sample generator helps improve the generalization ability of the sample generator.
[0091] In addition, the process of reconstructing data can emphasize features that are useful for model training and ignore or weaken insignificant features. In other words, the quality of reconstructed data is higher and more targeted. This targeted data can better guide model learning and improve training results, so that the sample generator can converge to the optimal solution faster during training, which helps to shorten training time and improve training efficiency.
[0092] In some embodiments, the training process of the Generative Adversarial Network (GAN) is a dynamic game process, in which the generator and the discriminator continuously improve their respective capabilities in mutual competition. This training method enables GAN to quickly adapt to different data distributions and task requirements. Therefore, when training the sample generator, the characteristics of the generative adversarial network can be used to learn through the mutual confrontation between the sample generator and the discriminator. The two networks constantly compete and evolve together during the training process, ultimately enabling the sample generator to generate high-quality, indistinguishable synthetic data.
[0093] Specifically, S12 in the above embodiment can be specifically implemented as: performing multiple rounds of adversarial training on the initial sample generator and the initial discriminator based on the N-dimensional reconstructed traffic data until a preset termination condition is met.
[0094] It should be understood that the preset termination condition can be any of the following two conditions, which can be determined according to needs in practical applications: when the training time and computing resources are limited, a maximum iteration threshold (number or time) can be set, and when the number of iterations (or iteration time) reaches this threshold, the training is stopped; or an evaluation indicator (such as F1 score, accuracy, etc.) is used to determine the training effect of GAN, and when the evaluation indicator reaches a certain threshold or no longer improves significantly, the training is stopped.
[0095] Among them, see Figure 3 , each round of adversarial training process includes:
[0096] S121. Input the N-dimensional reconstructed traffic data into a sample generator, and adjust the data at multiple positions in the N-dimensional reconstructed traffic data through the sample generator to obtain N-dimensional pseudo traffic data.
[0097] Inside the sample generator, the data at multiple locations in the N-dimensional reconstructed traffic data are adjusted through a specific algorithm or mechanism. As a feasible implementation method, the data at multiple locations in the N-dimensional reconstructed traffic data are adjusted to add noise information to multiple locations of the N-dimensional reconstructed traffic data.
[0098] It should be understood that the type of noise can be Gaussian noise, uniform noise or other types of noise, depending on the application scenario and privacy protection requirements. The distribution and intensity of the noise need to be carefully adjusted to ensure that the generated data has sufficient privacy protection effect without affecting the availability and accuracy of the data.
[0099] As a feasible implementation, the sample generator includes one or more encoder-decoder layers; wherein each encoder-decoder layer is used to determine the correlation scores between different positions in the input data based on the self-attention mechanism, and update the data of each position of the input data based on the correlation score.
[0100] The self-attention mechanism is used to calculate the correlation scores between different positions (or "elements", "tokens" or "features") in the input sequence (here, the representation of the N-dimensional reconstructed traffic data after preliminary transformation). These scores reflect the degree of association or importance between different positions. Based on these correlation scores, the model performs a weighted summation on each position of the input data to generate a new, context-related representation. This process actually updates the data at each position of the input data so that it contains more contextual information about the entire sequence (although the sequence is randomly generated here).
[0101] Specifically, as a feasible implementation method, the sample generator can adopt the Transformer architecture. The Transformer architecture can capture the long-term dependencies in sequence data through the self-attention mechanism, which enables it to better understand the global context when processing data. Therefore, when it acts as a generator, it can generate higher quality text.
[0102] The Transformer model consists of multiple encoder-decoder layers, each of which contains a self-attention layer and a feed-forward neural network. The self-attention layer is one of the core components of the Transformer model, which allows the model to focus on different parts of the input when processing sequence data, thereby capturing the dependencies between features or vocabulary. In the self-attention mechanism, three vectors are generated for each element of the input sequence (such as a word or feature): query, key, and value. A new context-related representation is generated by calculating the correlation between the query vector and all key vectors and weighted summing all value vectors with this weight. This process enables interaction and information transfer between any two positions in the sequence. In traffic data processing, the self-attention mechanism can capture the correlation between different features and help the model understand the interactions and dependencies between features.
[0103] Feedforward neural networks play a role in nonlinear transformation and feature extraction in the Transformer model, further enriching the feature representation of the output of the self-attention layer. The vector at each position independently passes through a subnetwork containing two fully connected layers (FC layers), usually with an activation function (such as ReLU) in the middle to introduce nonlinearity. The feedforward neural network takes the context-related representation output by the self-attention layer as input, and performs nonlinear transformation through two fully connected layers and activation functions to generate more abstract and complex feature representations. This process aims to extract higher-level features and help the model learn deeper structural and semantic information. In traffic data processing, feedforward neural networks can learn nonlinear relationships and help the model capture complex interactions and dependencies between features.
[0104] S122, inputting the N-dimensional pseudo traffic data into a discriminator, performing discriminative processing on the false privacy data through the discriminator, and obtaining a predicted probability that the N-dimensional pseudo traffic data is discriminated as containing privacy information.
[0105] The generated fake private data is then input to the discriminator. The task of the discriminator is to distinguish whether the input data is real private data or fake data generated by the generator. The discriminator is usually a neural network that receives data as input and outputs a probability value indicating the likelihood that the data is considered to be real private data.
[0106] As a feasible implementation method, the discriminator includes: one or more encoder layers, and an output layer; each encoder layer is used to extract feature information from the input data based on the self-attention mechanism; the input data of the first encoder layer is false traffic data, and the input data of other encoder layers are the output data of the previous encoder layer; the output layer is used to determine the predicted probability that the input data contains privacy information based on the feature information extracted by one or more encoder layers.
[0107] Specifically, the discriminator can also adopt the Transformer model architecture, so that the discriminator can capture long-distance dependencies in traffic data, thereby better distinguishing real samples from forged samples.
[0108] Each encoder layer in the discriminator can include a multi-head self-attention layer and a feedforward neural network layer. The multi-head self-attention layer allows the model to simultaneously focus on multiple positions in the sequence when processing the input sequence, thereby capturing the dependencies in the sequence. The multi-head self-attention mechanism enhances the expressiveness of the model by computing multiple self-attention heads in parallel and connecting their outputs. The feedforward neural network layer is used to perform nonlinear transformations on the outputs of the multi-head self-attention layer, further enhancing the expressiveness of the model and obtaining the extracted feature information.
[0109] The output layer in the discriminator can include a linear layer and a Softmax layer, where the linear layer is used to convert the output of the encoder to the required output dimension. For example, in a classification task, the linear layer can map the output of the encoder to a category label. The Softmax layer is used to convert the output of the linear layer into a probability distribution, thereby obtaining the predicted probability that the input data contains private information.
[0110] S123. Based on the predicted probability, adjust the model parameters of the sample generator and the discriminator.
[0111] During the training of GANs, we want the discriminator to accurately distinguish between real and fake data. Therefore, for fake data, we expect the probability of it being identified as real data (i.e., the predicted probability) to be low.
[0112] Specifically, the predicted probability output by the discriminator is used to calculate the loss function. Specifically, the probability that the real data is judged as real data by the discriminator (logD(x)) and the probability that the generated data is judged as fake data by the discriminator (log(1-D(G(z)))) are used as part of the loss function. By minimizing the loss function of the predicted probability, the discriminator and the generator are able to compete with each other and evolve together.
[0113] As a feasible implementation method, training the initial generative adversarial network can include two parts: training the discriminator and training the generator. The process of training the discriminator is: based on the predicted probability, only the parameters of the discriminator are updated so that it can better distinguish between real samples and generated samples. After the discriminator meets certain iteration stop conditions, the generator can be trained, that is, the parameters of the discriminator are kept unchanged, and the parameters of the sample generator are updated so that it can generate samples closer to the real data, so that the discriminator cannot accurately distinguish. Repeat the above steps until the generator can generate high-quality data and the discriminator cannot accurately distinguish between real data and generated data, and a trained generative adversarial network is obtained.
[0114] It can be seen that the method provided in the embodiment of the present application, through the continuous competition and co-evolution of the two networks of the sample generator and the discriminator during the training process, the sample generator gradually learns how to generate new samples similar to real data during the training process. These samples can meet very high standards in quality, and are even difficult to distinguish from real data in some cases. Ultimately, the sample generator is able to generate high-quality, indistinguishable synthetic data. In turn, the number of training samples of the privacy detection model can be increased, thereby solving the problem of low detection accuracy and poor generalization ability of the privacy detection model caused by the scarcity of privacy sample data in real scenarios.
[0115] In some embodiments, since the second type of samples are fake privacy traffic data generated by the sample generator, the generated data may not meet the expected privacy traffic characteristics. For example, if the algorithm does not fully consider the complexity and diversity of real traffic data, the generated data may appear too simple or patterned, resulting in a decrease in the quality of the sample data.
[0116] Therefore, as a feasible implementation method, after obtaining the target sample set (or any second-category sample), the second-category sample can be input into the trained discriminator, and the trained discriminator can be used to perform discrimination processing on it to obtain the target probability that the second-category sample is discriminated as data containing privacy information; and then, when the target probability is less than or equal to the preset probability threshold, the second-category sample corresponding to the target probability is deleted.
[0117] It is understandable that the trained discriminator can be used to more accurately distinguish between real and false data generated by the sample generator. The larger the target probability obtained, the higher the degree of privacy information contained in the second category samples. In other words, the smaller the target probability, the lower the degree of privacy information contained in the second category samples, and the lower the sample quality. Therefore, in order to ensure the sample quality of the second category samples, the second category samples corresponding to the target probability less than or equal to the preset probability threshold are deleted to avoid the low-quality second category samples from interfering with the training of the privacy detection model, thereby improving the quality of the privacy detection model.
[0118] In some embodiments, since the reconstructed data reconstructed by the autoencoder is of higher quality and more targeted, the data reconstructed by the autoencoder can also be used to train the privacy detection model during the training of the privacy detection model.
[0119] Specifically, as a feasible implementation method, S103 may include:
[0120] S1031. For samples in the target sample set, use a deep convolutional autoencoder to extract M-dimensional high-order latent features of the samples, and reconstruct data based on the M-dimensional high-order latent features to obtain reconstructed samples with the same number of feature dimensions as the samples.
[0121] S1032. Train the initial privacy detection model based on the reconstructed sample corresponding to each sample to obtain a target privacy detection model.
[0122] It can be seen that the training method of the privacy detection model provided in this embodiment, during the model training process, inputs the obtained multiple sample traffic data into the autoencoder, extracts the high-order potential features of the sample traffic data through the autoencoder, reconstructs the data based on the high-order potential features, and obtains the reconstructed data corresponding to the sample traffic data. Among them, the high-order potential features are used to characterize the intrinsic structure and key information of the input sample traffic data. The high-order potential features are reconstructed through the autoencoder. The autoencoder can learn the compressed representation of the data, that is, the features, through the reconstruction process. These features capture the core attributes of the input data, can remove noise and redundant information in the sample traffic data, and retain the most important features.
[0123] It is understandable that the reconstructed data is of higher quality and more targeted, so the privacy detection model can converge to the optimal solution faster during the training process, which helps to shorten the training time and improve the training efficiency. In addition, the process of reconstructing the data can emphasize the features that are useful for model training and ignore or weaken the irrelevant features. This kind of targeted data can better guide the learning of the privacy detection model and improve the training effect.
[0124] In some embodiments, in order to facilitate the description of the process of data reconstruction by the autoencoder, the following description is made in conjunction with the network architecture of the autoencoder.
[0125] The model structure of the autoencoder is as follows Figure 4 As shown, it includes an encoder and a decoder. The encoder is used to perform feature extraction, extracting M-dimensional high-order potential features of N-dimensional real traffic data; the decoder is used to reconstruct data, reconstructing data based on the M-dimensional high-order potential features extracted by the encoder, and obtaining reconstructed N-dimensional reconstructed traffic data.
[0126] For details, please continue to refer to Figure 4 , the encoder may include multiple convolutional layers (convolutional layer 1 and convolutional layer 2), multiple activation layers (activation layer 1 and activation layer 2), multiple pooling layers (pooling layer 1 and pooling layer 2) and fully connected layers. The convolutional layer is used to extract the features of the input data, the activation layer is used to increase the nonlinearity of the features through the ReLU activation function, the pooling layer is used to reduce the spatial dimension of the features to retain the important features in the input data, and the fully connected layer is used to map the extracted features to a low-dimensional high-order feature space to obtain low-dimensional high-order features.
[0127] The decoder includes a fully connected layer, multiple upsampling layers (upsampling layer 1 and upsampling layer 2), multiple convolutional layers (convolutional layer 3 and convolutional layer 4), multiple activation layers (activation layer 3 and activation layer 4), and an output layer. Among them, the fully connected layer is used to map high-order potential features back to the data space, the upsampling layer is used to gradually increase the spatial dimension of the features to reconstruct the size of the original data, the convolutional layer is used to further process the upsampled features and gradually restore the details of the data, the activation layer is used to continue to use the activation function to introduce nonlinearity to the decoder, and the output layer is used to generate reconstructed data.
[0128] It should be understood that Figure 4 The model structure of the autoencoder shown does not constitute a limitation. In the actual application process, the number of convolutional layers, activation layers, and pooling layers in the encoder, as well as the number of upsampling layers, convolutional layers, and activation layers in the decoder can be set according to requirements. The embodiment of the present application does not limit this.
[0129] The autoencoder can learn a compressed representation of the data, i.e., features, through the reconstruction process. These features capture the core properties of the input data. Data reconstruction helps in dimensionality reduction, mapping high-dimensional data to a lower-dimensional space, which helps remove noise and redundant information while retaining the most important features. The model is forced to ignore the noise in the input data during the reconstruction process, thereby learning a cleaner and smoother data representation. In addition, the autoencoder introduces an information bottleneck (i.e., the dimension M of the potential feature space is much lower than the dimension N of the input data), forcing the model to learn more abstract and useful features, thereby obtaining higher quality reconstructed data.
[0130] In some embodiments, after obtaining a trained target privacy detection model, the target privacy detection model can be used to detect whether the data in the Internet of Things includes privacy data.
[0131] For details, please refer to Figure 5 , the method provided in the embodiment of the present application also includes:
[0132] S501: Obtain target flow data to be detected.
[0133] It should be understood that the target traffic data is also data obtained from the Internet of Things.
[0134] S502. Determine the reconstructed target flow data corresponding to the target flow data using a deep convolutional autoencoder.
[0135] The target traffic data is input into the deep convolutional autoencoder, and the deep convolutional autoencoder is used to extract features and reconstruct data to obtain the reconstructed target traffic data.
[0136] S503: Input the reconstructed target traffic data into a target privacy detection model, and determine whether the target traffic data contains privacy information through the target privacy detection model.
[0137] It is understandable that in the reconstruction process, it is necessary to accurately capture and restore the features and relationships within the target traffic data to ensure the authenticity and availability of the reconstructed data. In the case where the target traffic data includes private data, the capture and restoration process may face more challenges and difficulties due to the higher complexity of private data compared to normal data, resulting in an increase in reconstruction errors.
[0138] In other words, assuming that the target traffic data includes private data, the data reconstruction process will amplify the difference between it and normal traffic data, making it easier to identify it during privacy detection. Therefore, the reconstructed target traffic data is input into the target privacy detection model, and the target privacy detection model is used to determine whether the target traffic data contains private information. This can more effectively identify the private information that may be contained in the target traffic data, such as personal identity information, transaction records, communication content, etc. This helps to promptly discover and deal with potential privacy leakage risks.
[0139] The embodiment of the present application also provides a privacy detection method, which is applicable to a privacy detection device that deploys the target privacy detection model provided in the above embodiment, wherein the privacy detection device can be a terminal device, such as a personal computer, a laptop computer, a mobile device, a tablet computer, a laptop computer, etc. The embodiment of the present application does not limit the specific form of the electronic device. Alternatively, the privacy detection device can also be a separate server or a server cluster composed of multiple servers. In some implementations, the server cluster can be a distributed cluster server. The embodiment of the present application does not impose any restrictions on the specific form of the privacy detection device.
[0140] The privacy detection method includes the following steps: obtaining target traffic data to be detected; using a deep convolutional autoencoder to determine the reconstructed target traffic data corresponding to the target traffic data; inputting the reconstructed target traffic data into a target privacy detection model, and determining whether the target traffic data contains privacy information through the target privacy detection model.
[0141] The above mainly introduces the solution provided by the embodiment of the present application from the perspective of the method. In order to achieve the above functions, it includes hardware structures and / or software modules corresponding to the execution of each function. It should be easy to realize that the technical goals in this field are combined with the units and algorithm steps of each example described in the embodiments disclosed in this article, and the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical goals can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0142] An embodiment of the present application also provides a training device for a privacy detection model, which includes: an acquisition module, a construction module and a training module.
[0143] The acquisition module is used to acquire a real data set, where the real data set includes multiple N-dimensional real traffic data collected from the Internet of Things; the N-dimensional real traffic data includes data features of N feature dimensions; N is a positive integer;
[0144] The construction module is used to construct a target sample set based on a real data set and a sample generator. The samples in the target sample set are divided into first-category samples and second-category samples. The first-category samples are obtained by annotating whether the N-dimensional real traffic data contains privacy information. The second-category samples are generated by the sample generator based on the N-dimensional real traffic data containing privacy information.
[0145] The training module is used to train the initial privacy detection model using the target sample set to obtain the target privacy detection model. The target privacy detection model is used to detect whether the traffic data in the Internet of Things contains privacy information.
[0146] The training module is also used to train a sample generator in the following manner: for N-dimensional real traffic data containing privacy information, a deep convolutional autoencoder is used to extract M-dimensional high-order potential features of the N-dimensional real traffic data, and data is reconstructed based on the M-dimensional high-order potential features to obtain reconstructed N-dimensional reconstructed traffic data; M is a positive integer less than N; the initial sample generator is trained based on the N-dimensional reconstructed traffic data to obtain a trained sample generator.
[0147] In some embodiments, the training module is specifically used to perform multiple rounds of adversarial training on the initial sample generator and the initial discriminator based on the N-dimensional reconstructed traffic data until a preset termination condition is met; wherein each round of adversarial training process includes: inputting the N-dimensional reconstructed traffic data into the sample generator, adjusting the data at multiple positions in the N-dimensional reconstructed traffic data through the sample generator to obtain N-dimensional pseudo-traffic data; inputting the N-dimensional pseudo-traffic data into the discriminator, performing discriminative processing on the N-dimensional pseudo-traffic data through the discriminator to obtain the predicted probability that the N-dimensional pseudo-traffic data is judged to contain privacy information; based on the predicted probability, adjusting the model parameters of the sample generator and the discriminator.
[0148] In some embodiments, the construction module is specifically used to input the N-dimensional real traffic data containing privacy information into a sample generator, adjust the data at multiple positions in the N-dimensional real traffic data through the sample generator, and obtain N-dimensional pseudo-traffic data; and use the N-dimensional pseudo-traffic data as the second type of sample.
[0149] In some embodiments, the training module is further used to train the sample generator using N-dimensional real traffic data containing privacy information in the first category of samples.
[0150] In some embodiments, the device also includes: an input module, which is used to input the second category samples in the target sample set into a trained discriminator to obtain the target probability that the second category samples are judged as data containing privacy information; a removal module, which is used to remove the second category samples in the target sample set whose target probability is greater than or equal to a preset probability threshold.
[0151] In some embodiments, the training module is also used to extract M-dimensional high-order latent features of samples in the target sample set using a deep convolutional autoencoder, and reconstruct data based on the M-dimensional high-order latent features to obtain reconstructed samples with the same number of feature dimensions as the samples; and train the initial privacy detection model based on the reconstructed samples corresponding to each sample to obtain a target privacy detection model.
[0152] In some embodiments, the acquisition module is also used to acquire the target traffic data to be detected; the device also includes: a determination module, used to use a deep convolutional autoencoder to determine the reconstructed target traffic data corresponding to the target traffic data; an input module, used to input the reconstructed target traffic data into a target privacy detection model, and determine whether the target traffic data contains privacy information through the target privacy detection model.
[0153] In some embodiments, the sample generator includes one or more encoder-decoder layers; wherein each encoder-decoder layer is used to determine the correlation scores between different positions in the input data based on a self-attention mechanism, and update the data of each position of the input data based on the correlation score.
[0154] In some embodiments, the discriminator includes: one or more encoder layers, and an output layer; each encoder layer is used to extract feature information from input data based on a self-attention mechanism; wherein the input data of the first encoder layer is N-dimensional pseudo-traffic data, and the input data of other encoder layers is the output data of the previous encoder layer; the output layer is used to determine the predicted probability that the input data contains privacy information based on the feature information extracted by one or more encoder layers.
[0155] An embodiment of the present application also provides an Internet of Things privacy leakage detection system based on high-order feature data enhancement, including: a data acquisition device for collecting N-dimensional real traffic data in the Internet of Things; a data detection device for inputting the N-dimensional real traffic data into the target privacy detection model in the above embodiment, and determining whether the N-dimensional real traffic data includes privacy information through the target privacy detection model.
[0156] The present application also provides an electronic device. Figure 6 The electronic device 201 includes: one or more memories 121, one or more processors 122, a communication bus 123 and a communication interface 124. The processor 122 is connected to the memory 121 via the communication bus 123; the one or more memories 121 are used to store computer program codes, and the computer program codes include computer instructions; when the one or more processors 122 execute the computer instructions, the electronic device 201 executes the training method of the privacy detection model provided in the above embodiment.
[0157] Optionally, the memory 121 may be a non-temporary computer-readable storage medium, for example, the non-temporary computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device, etc., and the embodiments of the present application do not impose any restrictions on this.
[0158] The processor 122 may be a central processing unit (CPU), a general-purpose processor, a network processor (NP), a digital signal processor (DSP), a microprocessor, a microcontroller, a programmable logic device (PLD), or any combination thereof, and the embodiments of the present application do not impose any limitation on this.
[0159] The communication bus 123 may be an industry standard architecture (ISA) bus, a peripheral component interconnect (PCI) bus, or an extended industry standard architecture (EISA) bus. The communication bus 123 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 6 Just one thick line is used, but it does not mean that there is only one bus or one type of communication bus.
[0160] The communication interface 124 uses any transceiver or other device for communicating with other devices or communication networks, such as control systems, radio access networks (RAN), wireless local area networks (WLAN), etc.
[0161] The embodiments of the present application also provide a computer program product including one or more instructions, where the one or more instructions are stored in a memory of a computer device and executed by a processor to complete the various processes of the above embodiments.
[0162] An embodiment of the present application also provides a computer-readable storage medium, which includes computer execution instructions. When the computer execution instructions are executed on a computer, the computer executes the training method of the privacy detection model provided in the above embodiment.
[0163] Through the description of the above implementation methods, technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0164] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0165] The units described as separate components may or may not be physically separated, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place or distributed in multiple different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0166] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0167] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a device or processor to perform all or part of the steps of each embodiment method of the present application. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard drives, ROM, RAM, magnetic disks or optical disks.
[0168] The above are only specific implementations of the present application, but the protection scope of the present application is not limited thereto, and any changes or substitutions within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A privacy leakage detection method for the Internet of Things based on high-order feature data enhancement, characterized in that: include: Acquire a real data set, where the real data set includes a plurality of N-dimensional real traffic data collected from the Internet of Things; The N-dimensional real traffic data includes data features of N feature dimensions; N is a positive integer; A target sample set is constructed based on the real data set and the sample generator; the samples in the target sample set are divided into a first type of samples and a second type of samples, the first type of samples are obtained by annotating whether the N-dimensional real traffic data contains privacy information; the second type of samples are generated by the sample generator based on the N-dimensional real traffic data containing the privacy information; Using the target sample set to train an initial privacy detection model to obtain a target privacy detection model, wherein the target privacy detection model is used to detect whether the traffic data in the Internet of Things contains the privacy information; The sample generator is trained in the following way: For N-dimensional real traffic data containing privacy information, a deep convolutional autoencoder is used to extract M-dimensional high-order potential features of the N-dimensional real traffic data, and data is reconstructed based on the M-dimensional high-order potential features to obtain reconstructed N-dimensional reconstructed traffic data; M is a positive integer less than N; Based on the N-dimensional reconstructed traffic data, the initial sample generator and the initial discriminator are trained for multiple rounds until the preset termination condition is met, and a trained sample generator and a trained discriminator are obtained; wherein each round of adversarial training process includes: Inputting the N-dimensional reconstructed traffic data into the sample generator, and adjusting the data at multiple positions in the N-dimensional reconstructed traffic data by the sample generator to obtain N-dimensional pseudo traffic data; Inputting the N-dimensional pseudo traffic data into the discriminator, performing discriminative processing on the N-dimensional pseudo traffic data by the discriminator, and obtaining a predicted probability that the N-dimensional pseudo traffic data is discriminated as data containing the privacy information; Based on the predicted probability, model parameters of the sample generator and the discriminator are adjusted.
2. The method according to claim 1, characterized in that Before using the target sample set to train the initial privacy detection model, the method further includes: Inputting the second type of samples in the target sample set into the trained discriminator to obtain a target probability that the second type of samples are discriminated as data containing the private information; Among the second type of samples in the target sample set, the second type of samples whose target probability is greater than or equal to a preset probability threshold are removed.
3. The method according to claim 1, characterized in that The step of constructing a target sample set based on the real data set and the target sample generation model includes: For N-dimensional real traffic data containing privacy information, the N-dimensional real traffic data is input into the sample generator, and the sample generator is used to adjust data at multiple positions in the N-dimensional real traffic data to obtain N-dimensional pseudo traffic data; The N-dimensional pseudo traffic data is used as the second type of samples.
4. The method according to claim 1, characterized in that The method further comprises: The sample generator is trained using N-dimensional real traffic data containing privacy information in the first category of samples.
5. The method according to claim 1, characterized in that The initial privacy detection model is trained by using the target sample set to obtain a target privacy detection model, including: For the samples in the target sample set, using a deep convolutional autoencoder to extract M-dimensional high-order potential features of the samples, and reconstructing data based on the M-dimensional high-order potential features to obtain reconstructed samples with the same number of feature dimensions as the samples; The initial privacy detection model is trained based on the reconstructed samples corresponding to each of the samples to obtain the target privacy detection model.
6. The method according to any one of claims 1 to 5, characterized in that: The method further comprises: Obtain target traffic data to be detected; Determine the reconstructed target flow data corresponding to the target flow data using the deep convolutional autoencoder; The reconstructed target traffic data is input into the target privacy detection model, and the target privacy detection model is used to determine whether the target traffic data contains the privacy information.
7. The method according to claim 1, characterized in that The sample generator includes one or more encoder-decoder layers; wherein each encoder-decoder layer is used to determine the correlation scores between different positions in the input data based on the self-attention mechanism, and update the data of each position of the input data based on the correlation score.
8. The method according to claim 1, characterized in that: The discriminator includes: one or more encoder layers, and an output layer; each encoder layer is used to extract feature information from input data based on a self-attention mechanism; wherein the input data of the first encoder layer is the N-dimensional pseudo-flow data, and the input data of other encoder layers is the output data of the previous encoder layer; The output layer is used to determine the predicted probability that the input data contains the private information based on the feature information extracted by the one or more encoder layers.
9. An IoT privacy leakage detection system based on high-order feature data enhancement, characterized in that: include: Data collection equipment, used to collect N-dimensional real traffic data in the Internet of Things; A data detection device is used to input the N-dimensional real traffic data into the target privacy detection model in the Internet of Things privacy leakage detection method based on high-order feature data enhancement as described in any one of claims 1-8, and determine whether the N-dimensional real traffic data includes privacy information through the target privacy detection model.
Citation Information
Patent Citations
Same-domain remote sensing image classification method based on adversarial learning
CN115564982A
Data enhancement method based on semi-supervised federated learning under privacy protection
CN115829009A
Personal data privacy leakage detection method and device and electronic equipment
CN118194341A