Intelligent Internet of Vehicles streaming data privacy protection method and system based on federated learning
By adopting pairwise similarity strategies and dynamic data storage strategies to replace flow data in the intelligent network of vehicles framework, the catastrophic forgetting and convergence problems of flow data processing in federated learning are solved, the generalization performance and training efficiency of the model are improved, and the overallization performance and training efficiency are reduced. Data breach risk.
Patent Information
- Application Number
- CN202410928285.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-11
- Publication Date
- 2024-11-08
- Estimated Expiration
- 2044-07-11
AI Technical Summary
Within the Smart Vehicle Network framework that supports federated learning, we face catastrophic forgetting and difficult convergence problems when processing and learning streaming data, resulting in reduced model generalization performance and increased training costs.
The pairwise similarity strategy is used to replace new and old data points in the training sample, and the new and old data points are stored in the buffer through a dynamic data storage strategy, keeping the size of the local training data set unchanged, thereby solving the problem of catastrophic forgetting and convergence.
By replacing new and old data points, maintaining the consistency of data distribution, reducing overfitting, ensuring effective convergence and performance improvement of the model, reducing training overhead and data leakage risks.
Smart Images

Figure CN118921191A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of Internet of Vehicles, and specifically relates to a method and system for protecting privacy of intelligent Internet of Vehicles streaming data based on federated learning. Background Art
[0002] The Internet of Vehicles (IoV) is a key component of the Fourth Industrial Revolution, fundamentally changing the vehicle communication paradigm through interconnected devices to improve productivity and efficiency. At the same time, IoV networks require intelligent information processing frameworks to handle big data, and the widespread adoption of artificial intelligence (AI) enables vehicles in IoV to train models locally, so that they can efficiently perform tasks in various fields, from autonomous driving to real-world IoV applications in smart cities and transportation. In this context, the emergence of federated learning (FL) has significantly improved the application of IoV, especially in the areas of data privacy and scalability. More precisely, FL enables vehicle nodes in IoV to collaboratively train global shared models without directly exchanging data, thereby achieving privacy protection and substantial scalability. In practice, researchers are actively involved in addressing and enhancing various challenges related to robustness, privacy, and 6G in the field of FL.
[0003] However, existing studies seem to have overlooked a fundamental challenge within the FL-enabled IoV framework: the processing and learning of IoV streaming data. In particular, IoV streaming data can be defined as real-time data streams that are continuously generated or collected by IoV nodes while they are running locally. This category includes a range of streaming data, including but not limited to real-time surveillance videos captured by cameras and instant traffic conditions recorded by intelligent traffic devices. Unlike traditional static data types, streaming data is dynamic and presents challenges in capturing fixed distribution patterns. Importantly, existing studies have emphasized that streaming data has the potential to cause trained models to fall into catastrophic forgetting or hinder their convergence. However, in order for the FL-enabled IoV framework to effectively adapt to complex and dynamic IoV environments, streaming data must be integrated with local data. This integration enables continuous participation in model training and ensures the continued effectiveness of business operations. Summary of the invention
[0004] In view of this, the present invention aims to provide a method and system for privacy protection of streaming data in intelligent Internet of Vehicles based on federated learning, which is specifically aimed at IoV streaming data scenarios, improves the overall performance of the IoV model, and skillfully copes with streaming data challenges in IoV environments, including catastrophic forgetting and convergence-related challenges.
[0005] In order to achieve the above object, the technical solution provided by the present invention is as follows:
[0006] In a first aspect, the present invention provides a method for protecting privacy of streaming data in an intelligent vehicle network based on federated learning. In an intelligent vehicle network framework based on federated learning, a pairwise similarity strategy is used to replace old and new training samples of streaming data generated in the framework, and a dynamic data storage strategy is used to keep the total size of local training data unchanged.
[0007] Among them, the pairwise similarity strategy is to use the data points that meet the preset similarity conditions between the data points in the old stream data used as training samples and the newly generated stream data as the data points that need to be replaced, and replace the corresponding data points in the newly generated stream data with the training samples;
[0008] The dynamic data storage strategy is to use a buffer to store newly generated stream data and replace old data points.
[0009] Furthermore, the pairwise similarity strategy uses the following formula to determine the similarity probability between data samples, as follows:
[0010] p ij =(p j∣i +p i∣j ) / 2,
[0011]
[0012] In the formula, p ij represents the similarity probability between samples i and j, p j∣i and p i∣j denote the similarity from j to i and from i to j respectively, κ is the temperature hyperparameter, z i 、z j and z h Respectively represent the feature representation of data samples i, j and h, n k is the number of samples at the kth node.
[0013] Furthermore, the training process of the intelligent Internet of Vehicles framework based on federated learning includes:
[0014] The IoV node obtains the initial global model generated by the central server during the initialization phase;
[0015] The initial global model is trained based on local training samples to obtain a local model. During the training process, the pairwise similarity strategy and dynamic data storage strategy are used to continuously update the training samples.
[0016] The IoV node uploads the parameters of the trained local model to the central server for model aggregation.
[0017] Furthermore, the initialization phase includes:
[0018] The central server performs parameter configuration;
[0019] Select the evaluation criteria used to assess the effectiveness of the global model;
[0020] Initialize the global model and deliver the initialized global model to each IoV node.
[0021] Furthermore, during the training process, a pairwise similarity strategy is used for data replacement, including:
[0022] IoV nodes continuously collect new data during model training;
[0023] A pairwise similarity strategy is used to determine similar data between new data and local training samples;
[0024] Perform data replacement of local training samples based on similar data.
[0025] Furthermore, during the training process, a dynamic data storage strategy is used to continuously update the training samples, including:
[0026] A dedicated buffer is used to store replaced data and new data in local training samples;
[0027] Replace similar data in the new data with local training samples to obtain new training samples.
[0028] Furthermore, model aggregation is to aggregate local model parameters from IoV nodes to obtain parameters of a new global model, thereby updating the global model.
[0029] Furthermore, the parameter update of the global model is based on the following formula:
[0030]
[0031] Where w is the local model parameter, t is the federated learning round, is the learning rate of client k, is the gradient of the local data of client k, n′ k is the number of samples after data replacement on the kth node, and N′ is the total number of current samples.
[0032] Furthermore, in each training interval of the IoV node, a pairwise similarity strategy is used for data replacement.
[0033] In a second aspect, the present invention further provides a smart car networking streaming data privacy protection system based on federated learning, comprising: a central server and an IoV node, wherein the central server and the IoV node constitute a smart car networking framework based on federated learning, wherein the streaming data generated in the framework adopts a pairwise similarity strategy to replace the old and new training samples, and a dynamic data storage strategy is adopted to keep the total size of the local training data unchanged;
[0034] The pairwise similarity strategy is to use the data points that meet the preset similarity conditions between the old stream data and the newly generated stream data as the data points that need to be replaced, and replace the corresponding data points in the newly generated stream data with the training samples;
[0035] The dynamic data storage strategy is to use a buffer to store newly generated stream data and replace old data points.
[0036] In summary, the present invention provides a method and system for protecting privacy of streaming data in an intelligent vehicle network based on federated learning. In the framework of an intelligent vehicle network based on federated learning, a paired similarity strategy is used to replace old and new training samples in the streaming data generated in the framework, and a dynamic data storage strategy is used to keep the total size of the local training data unchanged; wherein, the paired similarity strategy is to use the data points that meet the preset similarity conditions between the data points of the newly generated streaming data in the old streaming data used as training samples as the data points that need to be replaced, and replace the corresponding data points in the newly generated streaming data with the training samples; the dynamic data storage strategy is to use a buffer to store the newly generated streaming data and the replaced old data points. The present invention adopts a paired similarity strategy and a dynamic data storage strategy, uses samples in the streaming data to replace similar samples in the original data set and keeps the number of training samples unchanged, solves the problem of catastrophic forgetting by keeping the data distribution unchanged, and ensures the effective convergence of the FL training process by the invariance of the number of local training samples. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0038] Figure 1 A schematic diagram of the FedStream framework provided by an embodiment of the present invention;
[0039] Figure 2 A schematic diagram of a pairwise similarity strategy provided by an embodiment of the present invention;
[0040] Figure 3 Performance diagram of FedStream and FedAvg for CIFAR10 data set provided by the embodiment of the present invention;
[0041] Figure 4 Performance graph of FedStream and FedAvg for the MNIST data set provided by the embodiment of the present invention;
[0042] Figure 5 Performance graph of FedStream and baseline provided by embodiments of the present invention during training on the CIFAR-10 dataset;
[0043] Figure 6 Performance graph of FedStream and baseline during training on the MNIST dataset provided for embodiments of the present invention. DETAILED DESCRIPTION
[0044] In order to make the purpose, features and advantages of the present invention more obvious and easy to understand, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described below are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0045] The prior art is first further introduced below.
[0046] As mentioned before, the challenges of processing and learning streaming data within the IoV framework supporting FL are as follows:
[0047] (C1. Catastrophic Forgetting): In IoV scenarios, it is a huge challenge to effectively learn FL models from live data streams generated locally by IoV devices. The continuous generation of streaming data poses a significant obstacle as it forces the FL model to constantly adapt to new data distributions, potentially causing it to forget previously encountered distributions. As a result, repeated training of streaming data samples characterized by changing distributions can easily lead to overfitting or catastrophic forgetting within the FL model. This phenomenon significantly affects the generalization performance of IoV models.
[0048] (C2. Difficult to converge): In addition, within the FL-enabled IoV framework, the inclusion of unlearned samples introduces the non-independent and identically distributed (non-IID) data problem, which hinders the effective convergence of the FL training process. This means that when using FL optimization methods to train IoV devices, the continuously generated real-time data streams are consistently integrated into the local training data of the IoV nodes, resulting in a significant non-IID problem. As the degree of non-IID increases, the training cost of IoV nodes continues to rise, which has a profound impact on the progress of FL optimization and poses significant challenges to the computational power and convergence of IoV.
[0049] In response to the above problems, lifelong learning proposed a dynamic task sequencing method to solve the impact of task sequencing on model performance and forgetting rate in lifelong learning. This method aims to make the lifelong learning system better adapt to new tasks and reduce forgetting by adaptively adjusting the task sequence. Kirkpatrick et al. used a technique called "elastic weight consolidation" (EWC) to overcome the catastrophic forgetting problem in neural networks. Mendez et al. mainly used neural network-based methods to achieve lifelong learning of complex, gradually built structures. Through the neural network method, it can continuously expand its structure to adapt to new inputs and tasks when facing new tasks, and maintain flexibility and adaptability when facing new tasks. When processing real-time data streams, traditional neural network methods merge new data with old data and then use these data to retrain the model, but this will result in a lot of time and space resources. Waste.
[0050] Many important advances have been made in the field of continuous learning. Researchers have proposed various methods and algorithms, including memory-based methods, incremental learning, forgetting suppression, and meta-learning. Researchers have also focused on challenges in continuous learning, such as the forgetting problem, and proposed corresponding solutions. The replay buffer is a certain number of past samples stored in memory. When the model needs to be trained on a new task, these past samples are used together with the samples of the current task to train the model. By revisiting and utilizing these past samples during the training process, the model is helped to retain knowledge of previous tasks, thereby mitigating the "catastrophic forgetting" caused by learning new tasks. Based on this view, Matthew Riemer et al. proposed ER, which focuses on regulating model updates. However, the above schemes require frequent access to data, which may infringe on the data privacy issues of the system.
[0051] Existing incremental learning methods, such as knowledge distillation and retaining a small number of examples from old categories, are difficult to scale to a large number of categories. Wu et al. proposed a simple and effective method to address the problem of data imbalance, namely correcting the fully connected layers through two bias parameters and a linear model, and achieved remarkable results. Castro et al. addressed the problem that current neural network architectures require the entire dataset to update the model by proposing a method that only utilizes new data and a small number of samples from old classes. Their method is based on a loss function that incorporates a distillation metric to retain knowledge from old categories and a cross-entropy loss to learn new categories. Zhang et al. proposed a class-based incremental learning paradigm called Deep Model Merger (DMC), which first trains a single model only for the new class and then combines the two separate models using a double distillation training objective to merge the existing models. In this way, the difficulty of unavailability of original training data can be overcome.
[0052] In response to the above technical problems, the present invention provides a method and system for protecting privacy of streaming data in an intelligent Internet of Vehicles based on federated learning, which is specifically aimed at IoV streaming data scenarios, improves the overall performance of the IoV model, and skillfully copes with streaming data challenges in the IoV environment, including challenges related to catastrophic forgetting and convergence.
[0053] The following is a detailed introduction to an embodiment of a method for protecting privacy of intelligent vehicle network flow data based on federated learning according to the present invention.
[0054] This embodiment provides a method for protecting privacy of intelligent vehicle network streaming data based on federated learning. In an intelligent vehicle network framework based on federated learning, a pairwise similarity strategy is used to replace old and new training samples of streaming data generated in the framework, and a dynamic data storage strategy is used to keep the total size of local training data unchanged.
[0055] Among them, the pairwise similarity strategy is to use the data points that meet the preset similarity conditions between the data points in the old stream data used as training samples and the newly generated stream data as the data points that need to be replaced, and replace the corresponding data points in the newly generated stream data with the training samples;
[0056] The dynamic data storage strategy is to use a buffer to store newly generated stream data and replace old data points.
[0057] It should be noted that this embodiment is a privacy protection strategy designed specifically for intelligent vehicle networking, which aims to process continuously generated streaming data through a federated learning (FL) framework while ensuring data privacy, efficient use of resources, and maintaining the continuous learning ability of the model.
[0058] In the intelligent Internet of Vehicles environment, vehicles continuously generate a large amount of data, which is of great value for improving driving safety, optimizing route planning, etc. However, directly aggregating this data for centralized processing will lead to the risk of privacy leakage. Therefore, the use of federated learning has become an ideal choice, which allows data to be processed locally and only shares model updates, rather than the original data itself.
[0059] In response to the challenges of processing and learning streaming data in an IoV framework that supports FL, this embodiment first adopts a pairwise similarity strategy to ensure that the model can absorb new streaming data information in a timely manner while avoiding storing outdated or redundant data. This strategy requires the system to monitor newly generated streaming data and search for data points in old training samples that match its data points under a preset similarity standard. Once a match is found, the corresponding data point in the old sample is replaced with the new data point to ensure that the model can learn the latest data pattern.
[0060] In addition, this embodiment also adopts a dynamic data storage strategy. Under the constraints of limited onboard resources, storage space is managed efficiently. This strategy requires the use of a buffer to temporarily save newly generated stream data and old data points that are about to be replaced. Through this strategy, even if new data continues to flow in, the total size of the local training data set can be ensured to remain basically unchanged, avoiding the problem of unlimited data growth.
[0061] The federated learning architecture itself avoids the centralization of raw data, and combined with the above strategies, it further reduces the risk of data leakage. The dynamic data storage strategy reasonably allocates limited on-board storage resources to ensure that the system operates efficiently under resource constraints.
[0062] The method provided in this embodiment has the following advantages:
[0063] 1. Solve catastrophic forgetting: By replacing rather than accumulating new and old data, maintaining the consistency of data distribution helps alleviate the problem of the model forgetting old knowledge when learning new knowledge, thereby reducing the occurrence of overfitting during training. In the dynamic environment of the IoV streaming data environment, this refinement significantly helps enhance model generalization and overall performance.
[0064] 2. Ensure convergence: By using a dynamic data storage strategy, the number of local training samples is maintained unchanged, ensuring that the model is trained at a uniform computing cost. This is conducive to the stable update of model parameters in the federated learning process, promotes the effective convergence of the model, and prevents the convergence speed of FL under IoV flow data from slowing down due to the increase in computing overhead.
[0065] See also Figure 1 and 2 , Figure 1 A FL-based IoV stream data learning framework (i.e., FedStream) is shown; Figure 2The process of implementing data replacement using the pairwise similarity strategy is shown.
[0066] The following combination Figure 1 and 2 Some embodiments of the present invention are introduced.
[0067] like Figure 1 As shown in the figure, the key entities in the framework include: Central server, responsible for coordinating FL training and performing FL training configuration, such as model delivery, parameter configuration, model initialization, etc. IoV node: IoV nodes, such as industrial machines, robots, sensors, etc., are responsible for performing local training, data collection, data processing, etc. Local model: The model trained by the IoV node using its local data. Global model: The initial global model is provided to the IoV node by the central server, and the global model is updated during model iteration. Data buffer: Used to store newly collected IoV flow data.
[0068] The key functions of the framework include: IoV flow data acquisition: IoV nodes use sensors to continuously collect newly generated data, such as traffic flow, GPS, etc. Pairwise similarity strategy: used to calculate pairwise similarities between two sets of sample sets for effective data replacement. Dynamic data storage strategy: Utilize data buffer to continuously store new data and replace old data. Model update: IoV nodes perform local training and obtain new model updates. Model aggregation: The central server collects and uses model aggregation rules to aggregate model updates and obtain a new global model.
[0069] FedStream achieves seamless interaction between nodes and central servers in the context of IoV streaming data, and alleviates the problems of catastrophic forgetting and difficulty in convergence during training. Specifically, in this framework, the present invention introduces the concept of pairwise similarity, and constructs an efficient streaming data training method through a pairwise similarity strategy to meet the challenges brought by streaming data in IoV. When an IoV node performs local training, the FedStream framework proposed in the present invention allows the newly collected data to be effectively replaced with local old data and merged into the local training set, making local training more robust. In addition, the present invention uses a dynamic data storage strategy to keep the size of the local data set fixed, thereby reducing training overhead and accelerating convergence. Therefore, FedStream provides a practical approach for IoV streaming data processing and learning.
[0070] The following introduces the stream data processing and learning problems in the framework in combination with the problem definition.
[0071] First, consider an IoV network with K IoV nodes and a central server S, which are responsible for collecting, processing and learning real-time streaming data locally. In particular, the nodes use the FL framework to train a shared global model without sharing data. Specifically, the IoV nodes interact with the central server and seek to collaborate to find a global model parameterized by ω that minimizes the empirical risk. Therefore, the research problem is specifically defined as follows:
[0072]
[0073] Where F(w) represents the global loss, f k (w) represents the local data set on the i-th client The local loss of k refers to the number of samples on the kth node, l i refers to the local loss function, and w refers to the local model parameter, then:
[0074]
[0075] In the context of IoV, IoV nodes generate and collect dynamic sensor data in real time, which means that the local training dataset D of the node i Based on the dynamic changes of data collected in real time. To this end, the present invention assumes that N'=n1+...+n' k +...+n k is the total number of current data samples, where n k and N become n′ respectively k and N′. In some embodiments, by aggregating updates from IoV node k, the central server updates are calculated as follows:
[0076]
[0077] in, is the gradient on the local data of client k, is the learning rate of client k. Therefore, in the IoV streaming data scenario, the problems studied by FL have undergone some subtle changes, that is, the local data is dynamic, in which case the global model needs to seek effective convergence.
[0078] Based on the above problem definition, this paper introduces an efficient streaming data training strategy based on pairwise similarity, such as Figure 2As shown. Pairwise similarity is a method for measuring the degree of similarity between two samples. In the method of the present invention, a symmetric t-distributed stochastic neighbor embedding (t-SNE) similarity metric is introduced to capture the similarity distribution between global features. In addition, the similarity metric of symmetric SNE is based on a Gaussian kernel function to describe the similarity between objects. Therefore, for two given samples i and j, the present invention uses a Gaussian kernel function based on the Euclidean distance between objects to calculate the similarity probability, as shown below:
[0079] p ij =(p j∣i +p i∣j ) / 2,
[0080]
[0081] In the formula, p ij represents the similarity probability between samples i and j, p j∣i and p i∣j denote the similarity from j to i and from i to j respectively, κ is the temperature hyperparameter, z i 、z j and z h Respectively represent the feature representation of data samples i, j and h, n k is the number of samples on the kth node. It is worth noting that the sum of the similarity probabilities of all objects is equal to 1.
[0082] In some embodiments, it is assumed that each IoV node initially has n k samples. After each S training interval, the IoV node generates N′ new samples. The present invention calculates the pairwise similarity between the new and old training samples, and then selects N′ samples with consistent labels of the new samples and high pairwise similarity from the initial sample set of each node for replacement. In this way, the present invention uses a pairwise similarity scheme to replace the features of the new and old training samples. In addition, the present invention keeps the number of samples for each node unchanged during the training process. Therefore, the strategy replaces training samples by pairwise similarity, thereby solving the problem of catastrophic forgetting by keeping the data distribution unchanged.
[0083] In addition, the present invention emphasizes that using a pairwise similarity strategy to construct an efficient streaming data training strategy can improve model performance and maintain the diversity of the training sample set. At the same time, the characteristic of replacing data based on pairwise similarity ensures that redundant or old data is continuously replaced, alleviating the overfitting phenomenon caused by repeated training samples. In addition, the invariance of the number of local training samples of the node also ensures the effective convergence of the FL training process.
[0084] In some embodiments, based on the pairwise similarity strategy and the dynamic data storage strategy, the FedStream training process includes three key stages: model initialization, data replacement, and model aggregation. Next, the present invention will explain the above three key stages as follows:
[0085] Phase 1: Initialization
[0086] Step 1: Parameter configuration. The central server is responsible for setting multiple parameters, including the selected test dataset, global model, number of iterations, and batch size. The number of iterations and batch size are adjusted according to the size of the dataset. The key task of this stage is to ensure the rationality and coordination of the parameters.
[0087] Step 2: Establish evaluation criteria. In order to evaluate the effectiveness of FedStream, the present invention selects accuracy as the main evaluation criterion in the IoV stream data scenario.
[0088] Step 3: Initial global model deployment. After completing the above configuration, the central server delivers its initialized global model to each IoV node. Note that this model is the starting point of FL and provides a unified basis for further local training in the local environment.
[0089] Phase 2: Data Replacement
[0090] Step 1: Continuous data collection during training. In the second stage, nodes continuously collect new samples during the ongoing training process. This ensures that the model can adapt to dynamically changing data distribution and enhances its sensitivity to real-time information.
[0091] Step 2: Application of pairwise similarity techniques. When new data is introduced, the node uses pairwise similarity techniques to identify a set of historical data that is most similar to the new data for replacement. This dynamic similarity matching and data replacement helps select the most representative and relevant prior data.
[0092] Step 3: Data filtering and temporary storage. After completing the similarity matching, the present invention filters out the data with the highest similarity to the new data and temporarily stores it in a dedicated buffer. The purpose of this step is to avoid the repeated participation of these highly similar data in subsequent training to improve the diversity and robustness of the model.
[0093] Step 4: Data merging and subsequent training. The remaining data is then merged with the new data to participate in the subsequent training process. This step ensures that the global data distribution is maintained while the model is continuously updated. The entire process aims to make full use of the new data while maintaining the effectiveness and performance of the model.
[0094] Phase 3: Model aggregation
[0095] Step 1: Aggregate local model updates. During iterative training, IoV nodes upload model updates to the central server. The central server aggregates model updates through aggregation algorithms such as FedAvg. Note that the updated global model will be distributed to each node again. In addition, during the iterative training process, the data replacement strategy and dynamic data storage strategy of the second phase need to be continuously executed until there is no new data influx and the model reaches stable convergence.
[0096] The effectiveness of the method proposed in the present invention is verified by experiments as follows.
[0097] Datasets. To evaluate the effectiveness of the proposed FedStream framework, comprehensive simulation experiments are conducted using the CIFAR-10 dataset and the MNIST dataset. Throughout the training phase, the CIFAR10 training set and the MNIST training set are partitioned into two complete components: the client part, which consists of 40,000 samples of the CIFAR-10 training set, or 50,000 samples of the MNIST training set, and the server part, which both include 10,000 samples specified to be included in the training regimen. The Dirichlet sampling method is used to generate statistically heterogeneous partitions for CIFAR-10 and MNIST, with special attention to setting the parameter of the Dirichlet function to 0.3.
[0098] Model Architecture. For the model architecture, the present invention uses a convolutional neural network (CNN), characterized by two convolutional layers, two maximum pooling layers, and two fully connected layers, with ReLU as the specified activation function. The convolutional layers use a kernel size of 5×5, with 32 convolution kernels in the first layer and 64 convolution kernels in the second layer. After each convolutional layer, a pooling operation is performed using a kernel of size (2, 2). After the two convolutional layers, two additional pooling operations are performed, each using two (2, 2) kernels. Finally, two fully connected layers including 512 and 10 neurons, respectively, are used to produce the final classification output.
[0099] Hyperparameters. The present invention considers a set of 10 IoV nodes, each of which iteratively trains a local model using a stochastic gradient descent (SGD) algorithm. Throughout the experimental scheme, the present invention maintains a fixed batch size m=256, a local training epoch E=5, and a learning rate set to η=0.01. In order to ensure a comprehensive evaluation of the performance of the FedStream framework in complex scenarios, the present invention conducted a total of 300 rounds of experiments. During the training process, new data is introduced every S rounds, where S takes a value from the set {1, 5, 10, 15, 20, 25}. Accordingly, the number of training samples to be added is denoted as N′, where N′ takes a value from the set {3, 10, 30, 50, 50, 80}. In addition, the present invention conducts two sets of ablation experiments to evaluate the efficacy of the framework of the present invention. The first set of experiments keeps the cycle period unchanged while increasing the sample size. The second set of experiments keeps the number of added samples unchanged while exploring changes in the cycle duration.
[0100] Overall performance comparison of FedStream and FedAvg. First, the present invention uses the classic FedAvg as a baseline and compares the overall performance of FedStream and the baseline solution. Figure 3 and Figure 4 As shown, the introduction of the FedStream framework consistently outperforms the standard FedAvg method in various parameter configurations (i.e., S and N). This observation highlights the effectiveness of the FedStream framework in mitigating the harmful effects of catastrophic forgetting associated with the introduction of new training samples, thereby maintaining the accuracy of the model. In addition, when considering the frequency S of introducing new training samples, it is clear that the improvement in accuracy is not strictly proportional to the frequency of added training samples. This means that there is a clear trade-off between learning from existing data and learning from newly introduced data. In addition, the present invention also deeply studies the impact of increasing the amount of data samples N′ on the performance of the framework. Although the FedAvg method on the CIFAR-10 dataset and the MNIST dataset shows relatively stable accuracy as N′ increases, the FedStream framework shows greater improvements, indicating its powerful ability to utilize additional data. It is worth noting that on the CIFAR-10 dataset, FedStream achieves the most significant performance improvement when S is set to 20 and N′ is 50, and when S is 25 and N′ is at 80. In addition, on the MNIST dataset, FedStream achieves the best results when S is set to 15, N′ is set to 50, and when S is set to 25, N′ is set to 80.
[0101] Figure 3 and Figure 4It is also shown that the rate of accuracy improvement may show diminishing returns as the number of epochs S increases. This observation suggests that the model could have absorbed as much information as possible from the existing data, reaching a saturation point in its learning capacity. These insights are invaluable for subsequent experiments aimed at optimizing the frequency and magnitude of data addition to maximize learning efficiency and improve overall model performance. In summary, the experimental results confirm the effectiveness of the FedStream framework in effectively learning knowledge from IoV streaming data.
[0102] Convergence performance comparison between FedStream and FedAvg. Next, the present invention further studies the convergence performance comparison between the proposed FedStream framework and FedAvg. Figure 5 and Figure 6 As shown in the figure, the accuracy of the FedStream algorithm on both the CIFAR-10 dataset and the MNIST dataset shows a rapid upward trend in the early training stage. The CIFAR-10 dataset reaches a relatively stable high accuracy level after about 50 rounds of training, while the MNIST dataset reaches a relatively stable low accuracy level after about 25 rounds of training. This shows the actual convergence. In contrast, the accuracy of the FedAvg algorithm gradually improves on both datasets, with the CIFAR-10 dataset only beginning to stabilize around 150 rounds and the MNIST dataset only beginning to stabilize around 50 rounds. Therefore, in terms of convergence performance, the FedStream algorithm is superior to the FedAvg algorithm.
[0103] Ablation experiment. Finally, the present invention conducts two sets of ablation experiments on the CIFAR-10 dataset and the MNIST dataset to study the impact of hyperparameters N′ and S on the performance of the framework. Specifically, the present invention keeps the number of cycles S unchanged to analyze the impact of the additional data amount N′ on the accuracy. Similarly, the present invention fixes the additional data amount N to evaluate the influence of the number of cycles S on the accuracy. The results are summarized in Tables 1 and 2. The experimental results show that the accuracy performance of the method proposed in the present invention remains stable as the data sample size N′ increases. This stability highlights the robustness of the method of the present invention in various scenarios involving different data volume growth. On the contrary, no matter how the value of S fluctuates, the method of the present invention exhibits relatively stable accuracy when 50 data samples are merged in each instance.
[0104] Table 1: Ablation experiment results on the MNIST dataset
[0105]
[0106] Table 2: Ablation experiments on the CIFAR-10 dataset
[0107]
[0108] The following introduces an embodiment of a smart vehicle network flow data privacy protection system based on federated learning of the present invention.
[0109] This embodiment provides a smart car network streaming data privacy protection system based on federated learning, including: a central server and an IoV node, the central server and the IoV node constitute a smart car network framework based on federated learning, wherein the streaming data generated in the framework adopts a pairwise similarity strategy to replace the old and new training samples, and adopts a dynamic data storage strategy to keep the total size of the local training data unchanged;
[0110] The pairwise similarity strategy is to use the data points that meet the preset similarity conditions between the old stream data and the newly generated stream data as the data points that need to be replaced, and replace the corresponding data points in the newly generated stream data with the training samples;
[0111] The dynamic data storage strategy is to use a buffer to store newly generated stream data and replace old data points.
[0112] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for protecting the privacy of intelligent vehicle network flow data based on federated learning, characterized in that: In the intelligent vehicle networking framework based on federated learning, the streaming data generated in the framework adopts a pairwise similarity strategy to replace the old training samples with the new ones, and a dynamic data storage strategy is used to keep the total size of the local training data unchanged. The pairwise similarity strategy is to use the data points whose similarity with the newly generated stream data satisfies the preset similarity condition in the old stream data used as the training sample as the data points to be replaced, and replace the corresponding data points in the newly generated stream data with the training sample; The dynamic data storage strategy is to use a buffer to store newly generated stream data and replaced old data points.
2. The method for protecting privacy of intelligent vehicle network flow data based on federated learning according to claim 1 is characterized in that: The pairwise similarity strategy uses the following formula to determine the similarity probability between data samples, as follows: p ij =(p j∣i +p i∣j ) / 2, In the formula, p ij represents the similarity probability between samples i and j, p j∣i and p i∣j denote the similarity from j to i and from i to j respectively, κ is the temperature hyperparameter, z i 、z j and z h Respectively represent the feature representation of data samples i, j and h, n k is the number of samples at the kth node.
3. The method for protecting privacy of intelligent vehicle network flow data based on federated learning according to claim 1 is characterized in that: The training process of the intelligent vehicle networking framework based on federated learning includes: The IoV node obtains the initial global model generated by the central server during the initialization phase; The initial global model is trained based on local training samples to obtain a local model, and the training samples are continuously updated using the pairwise similarity strategy and the dynamic data storage strategy during the training process; The IoV node uploads the parameters of the trained local model to the central server for model aggregation.
4. The method for protecting privacy of intelligent vehicle network flow data based on federated learning according to claim 3 is characterized in that: The initialization phase includes: The central server performs parameter configuration; Selecting an evaluation criterion for evaluating the effectiveness of the global model; The global model is initialized, and the initialized global model is delivered to each IoV node.
5. The method for protecting privacy of intelligent vehicle network flow data based on federated learning according to claim 3 is characterized in that: During the training process, the pairwise similarity strategy is used to perform data replacement, including: IoV nodes continuously collect new data during model training; Determine similar data between the new data and the local training samples using the pairwise similarity strategy; The data of the local training sample is replaced based on the similar data.
6. The method for protecting privacy of intelligent vehicle network flow data based on federated learning according to claim 5 is characterized in that: During the training process, the dynamic data storage strategy is used to continuously update the training samples, including: Using a dedicated buffer to store the replaced data in the local training sample and the new data; Similar data in the new data are replaced with the local training samples to obtain new training samples.
7. The method for protecting privacy of intelligent vehicle network flow data based on federated learning according to claim 3 is characterized in that: The model aggregation is to aggregate the local model parameters from the IoV nodes to obtain new parameters of the global model, thereby updating the global model.
8. The method for protecting privacy of intelligent vehicle network flow data based on federated learning according to claim 7 is characterized in that: The parameter update of the global model is based on the following formula: Where w is the local model parameter, t is the federated learning round, is the learning rate of client k, is the gradient of the local data of client k, n′ k is the number of samples after data replacement on the kth node, and N′ is the total number of current samples.
9. The method for protecting privacy of intelligent vehicle network flow data based on federated learning according to claim 3 is characterized in that: In each training interval of the IoV node, the pairwise similarity strategy is used to perform data replacement.
10. A smart vehicle network streaming data privacy protection system based on federated learning, characterized in that: include: A central server and an IoV node, wherein the central server and the IoV node constitute an intelligent vehicle network framework based on federated learning, wherein the stream data generated in the framework is replaced with new and old training samples using a pairwise similarity strategy, and a dynamic data storage strategy is used to keep the total size of local training data unchanged; The pairwise similarity strategy is to use the data points whose similarity with the newly generated stream data satisfies the preset similarity condition in the old stream data used as the training sample as the data points to be replaced, and replace the corresponding data points in the newly generated stream data with the training sample; The dynamic data storage strategy is to use a buffer to store newly generated stream data and replaced old data points.
Citation Information
Patent Citations
Internet of vehicles federal learning hierarchical knowledge security migration method based on gradient memory
CN114492833A
Federal incremental learning method, system and device for streaming data and medium
CN116431679A
Power data distributed federated learning system and method based on data similarity aggregation
CN116796864A
Hybrid deep federated learning framework and intelligent access control method based on framework
CN117459974A
Energy federal learning data selection method and device and energy federal learning system
CN117592580A
