Asynchronous federal learning method for realizing lightweight privacy protection in Internet of Vehicles
By introducing a lightweight asynchronous federated learning method in the Internet of Vehicles, using public key exchange to generate shared keys for encryption and decryption, the problems of vehicle model privacy leakage and communication optimization in the Internet of Vehicles are solved, and efficient and secure global model aggregation is achieved.
Patent Information
- Application Number
- CN202411636903.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-15
- Publication Date
- 2025-04-01
- Estimated Expiration
- 2044-11-15
AI Technical Summary
In the existing Internet of Vehicles federal learning scheme, there is a lack of effective asynchronous aggregation methods and privacy protection mechanisms, resulting in privacy leakage and communication optimization problems of vehicle models.
A lightweight asynchronous federated learning method is proposed to generate a shared key through public key exchange between the vehicle and the roadside computing unit (RSU) and the base station, which is used to encrypt and decrypt the gradient information of the vehicle model and realize secure asynchronous aggregation.
Without increasing the calculation and communication consumption of vehicles and RSUs, this method realizes privacy protection of vehicle data and efficient global model aggregation, adapting to the problems of instability in communication and delayed transmission in the Internet of Vehicles.
Smart Images

Figure CN119743249A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the cross-technical field of federated learning and Internet of Vehicles, and specifically relates to an asynchronous federated learning method for realizing lightweight privacy protection in the Internet of Vehicles. Background Art
[0002] In recent years, with the help of Internet of Things technology, the Internet of Vehicles has become a key part of smart cities, making people's lives more convenient. In the Internet of Vehicles, various smart vehicles or transportation infrastructure can collect a large amount of data, including traffic flow, driving behavior, road conditions, etc. Federated learning is a distributed machine learning algorithm that allows participants to jointly train machine learning models without leaking personal privacy. In order to improve the performance of the Internet of Vehicles and take into account the privacy protection of vehicle data, federated learning has been applied to the field of the Internet of Vehicles. It has broad application prospects and has been widely used in predicting and optimizing traffic flow, assisting autonomous driving systems, improving vehicle safety, and energy conservation and emission reduction.
[0003] In traditional federated learning, the roadside computing unit (RSU) needs to wait for all vehicles to complete uploading local models before global model aggregation can be performed. However, due to the different local data sizes and computing capabilities of vehicles, their local training time is also different. In addition, the differences in vehicle positions and speeds will also lead to different transmission delays, so different vehicles have different effects on global aggregation. In order to solve this problem, people began to introduce asynchronous federated learning in the Internet of Vehicles, but most of the existing federated learning solutions in the Internet of Vehicles are still focused on synchronous aggregation, lacking discussion on asynchronous aggregation. A few asynchronous aggregation solutions in the Internet of Vehicles also do not consider the privacy protection and communication optimization of vehicle models. For example, in general Internet of Vehicles federated learning solutions, the models uploaded by vehicles are not encrypted. After receiving the model, RSU can easily launch reasoning attacks on vehicles and obtain local data features of vehicles. Considering the solution of protecting vehicle privacy in the Internet of Vehicles, differential privacy or homomorphic encryption technology is often used. The former will damage the learning efficiency of RSU, and the latter will increase the computational and communication volume of the system. Therefore, it is necessary to provide a lightweight asynchronous aggregation solution that protects privacy in the Internet of Vehicles environment. Summary of the invention
[0004] In view of this, an object of the present invention is to provide a lightweight privacy-preserving asynchronous aggregation method in an Internet of Vehicles environment, which can efficiently and securely implement federated learning in the Internet of Vehicles.
[0005] The technical solution for implementing the present invention is as follows:
[0006] A lightweight privacy-preserving asynchronous aggregation method in an Internet of Vehicles environment comprises the following steps:
[0007] Step 1: The station and the base station exchange public keys and calculate the shared secret key based on the public keys exchanged by both parties;
[0008] Step 2: The vehicle obtains the latest global model parameters from the roadside computing unit RSU for local model update, and uses local data to train the local model;
[0009] Step 3: Generate random numbers based on the shared key and training rounds, add random numbers to the gradients of the trained local model parameters to encrypt the local model parameters, and send the vehicle information, encrypted gradient information, and training rounds to the RSU;
[0010] Step 4: The RSU forwards the acquired vehicle information and training rounds to the base station. The base station searches for the shared key corresponding to the vehicle information and calculates the sum of random numbers based on the training rounds. The RSU decrypts and aggregates the encrypted gradient information based on the sum of random numbers and updates the global model parameters.
[0011] Step 5: The RSU broadcasts the global model parameters, and the vehicle uses the global model parameters to update the local model, and then continues the next round of training until the training is completed.
[0012] Furthermore, the specific process of step 1 of the present invention is:
[0013] First, when the vehicle enters the communication range of the base station, it sends its identity information and public key to the base station. After receiving the information sent by the vehicle, the base station also sends its public key to the vehicle.
[0014] Secondly, the base station and the vehicle respectively calculate the shared key using the received public key.
[0015] Furthermore, the secret key sent by the vehicle of the present invention is The secret key sent by the base station is The calculated shared key is
[0016] Furthermore, the random number described in the present invention is generated by using a shared secret key and the current training round as seeds and using a random number generator to generate random numbers.
[0017] Furthermore, the seed of the present invention is key i +t i ,key i is the shared key, t i is the training round.
[0018] Furthermore, the specific process of step 4 of the present invention is:
[0019] Step 4.1: Determine the aggregation condition: At the end of the time slot, the RSU performs aggregation judgment on the gradient information received in the time slot. If the number of gradient information does not exceed 1, this round of aggregation is skipped and the received gradient information participates in the next round of aggregation. Otherwise, it goes to step 4.2 to continue this round of aggregation.
[0020] Step 4.2: Calculate the sum of random numbers: RSU organizes the information of the models in this time slot, and sends the round of each model and its corresponding vehicle identity information to the base station. The base station uses the same shared key and training round as the vehicle as the seed of the random number generator to generate random numbers, and sends the sum of the random numbers of the models in the same training round to the RSU;
[0021] Step 4.3: Calculate aggregation weight: RSU calculates the outdated weight according to the training round of the model uploaded by the vehicle, and RSU calculates the training progress weight according to the global training progress. Both weights will be used in global aggregation;
[0022] Step 4.4: Update the global model: RSU aggregates the local model according to different training rounds, subtracts the sum of the random numbers received from the base station in that round from the aggregation result, and then weights the aggregation results of different rounds according to the corresponding outdated weights and training weights to update the global model of this round.
[0023] Furthermore, the training progress weight γ of the present invention is:
[0024]
[0025] Among them, α represents the progress parameter, t global Indicates the global training round for RSU calculation.
[0026] Furthermore, the outdated weight β of the present invention is:
[0027]
[0028] Among them, T limit represents the expiration threshold, t i represents the global training round during vehicle local training, t global Indicates the global training round for RSU calculation.
[0029] Furthermore, the global model of the present invention is updated as follows:
[0030]
[0031] Among them, w t represents the global model parameters that have not been updated in this round, w t+1 represents the updated global model parameters, N newN is the number of vehicle gradients that arrive normally without being affected by delays. last represents the number of outdated vehicle gradients, |U j | represents the number of outdated models in round j, represents the sum of random numbers of the model trained in round t, Δw n ' ew represents the encrypted vehicle gradient sent to the RSU on time in this round of iteration, Δw i ′ represents the encrypted vehicle gradient of training round i received by RSU in this round of iteration, Represents the sum of random numbers in the latest training round.
[0032] Furthermore, the local model described in the present invention is a convolutional neural network with two 5×5 convolutional layers, the first layer has 32 output channels, the second layer has 64 output channels, and each convolutional layer is followed by a 2×2 maximum pooling layer.
[0033] Beneficial effects:
[0034] The present invention proposes a lightweight asynchronous federated learning scheme, which will not bring additional communication and computing volume to the federated learning in the Internet of Vehicles; in response to the privacy leakage problem existing in the existing Internet of Vehicles, the present invention proposes a lightweight encryption and decryption method, which can achieve secure aggregation without increasing the computing and communication consumption of vehicles and RSUs; in response to the problems of unstable communication and prolonged transmission in the Internet of Vehicles, the present invention proposes an asynchronous federated learning scheme, which can asynchronously aggregate vehicle models, can cope with the situation where vehicles are disconnected during the learning process, and improve the efficiency of federated learning.
[0035] After the vehicle of the present invention is encrypted, the subsequent decryption and global aggregation by the RSU do not require the participation of the vehicle, allowing the vehicle to leave the training midway. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments 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.
[0037] Figure 1 This is a flowchart of the asynchronous federated learning of Internet of Vehicles of the present invention. DETAILED DESCRIPTION
[0038] The embodiments of the present invention are described in detail below with reference to the accompanying drawings.
[0039] It should be noted that the following embodiments and features in the embodiments may be combined with each other in the absence of conflict; and, based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in the field without making any creative work are within the scope of protection of the present disclosure.
[0040] It should be noted that various aspects of the embodiments within the scope of the appended claims are described below. It should be apparent that the aspects described herein may be embodied in a wide variety of forms, and any specific structure and / or function described herein is merely illustrative. Based on the present disclosure, it should be understood by those skilled in the art that an aspect described herein may be implemented independently of any other aspect, and two or more of these aspects may be combined in various ways. For example, any number of aspects described herein may be used to implement the device and / or practice the method. In addition, other structures and / or functionalities other than one or more of the aspects described herein may be used to implement this device and / or practice this method.
[0041] In order to solve the problem of inconsistent arrival time of vehicle models in the Internet of Vehicles, while realizing privacy protection of vehicle data and reducing communication and computing overhead, an embodiment of the present application proposes an asynchronous federated learning method for realizing lightweight privacy protection in the Internet of Vehicles. The method uses lightweight encryption primitives to encrypt the vehicle local model, and realizes decryption and aggregation at the RSU end through collaboration with the base station.
[0042] The federated learning method in the embodiment of the present application includes three types of entities: base stations, vehicles, and roadside computing units (RSUs). The system assumes that there are several vehicles, a single base station, and a single RSU; the base station can capture information of the entire system, the vehicle is a client participating in the federated learning of the Internet of Vehicles, and the RSU is responsible for processing and aggregating vehicle models in federated learning.
[0043] The embodiment of the present application provides an asynchronous federated learning method for realizing lightweight privacy protection in an Internet of Vehicles, which mainly includes global initialization, local training encryption, and global model aggregation. The specific process is as follows:
[0044] Step 1: The station and the base station exchange and share keys, and calculate the shared key based on the keys exchanged by both parties; the process of this step is:
[0045] Step 1.1: Vehicle sends key and identity information ID i To the base station, the base station sends the key to vehicles;
[0046] Step 1.2: The vehicle and base station calculate the shared key respectively: The base station stores the vehicle's keys and identity information.
[0047] In this step, the keys calculated by the vehicle and the base station are the same, thereby achieving key exchange.
[0048] Step 2: The vehicle obtains the latest global model parameters from the roadside computing unit RSU for local model update, and uses local data to train the local model;
[0049] Local model initialization: Before local model training begins, the RSU needs to initialize the global model for the first round of vehicle learning. The vehicle obtains the latest global model parameters from the RSU to initialize the local model.
[0050] Local model training: The vehicle uses the stochastic gradient descent algorithm and local data for model training. The vehicles here refer to all vehicles within the communication range of the RSU, and multiple vehicles perform local training in parallel.
[0051] In this embodiment, the number of vehicles is assumed to be 100, and the local data of the vehicles are sampled from the MNIST data set. The model used for training is a convolutional neural network with two 5×5 convolutional layers. The first layer has 32 output channels, and the second layer has 64 output channels. Each convolutional layer is followed by a 2×2 maximum pooling layer. 450 samples are taken for each vehicle, and local training is performed using the stochastic gradient descent algorithm. The training learning rate is 0.01, the training momentum is 0.9, and the weight decay is 5e-3. After one round of local training, the local model is obtained.
[0052] In this embodiment, multiple vehicles can also train the local model simultaneously. The number of vehicles selected to participate in the aggregation in each round is 20, and the transmission delay of the vehicle is 5 to 1000ms, which obeys the Gaussian distribution.
[0053] Step 3: The vehicle adds random numbers to the gradient of the local model parameters to encrypt the local model parameters, and sends the vehicle information, encrypted gradient information, and training rounds to the RSU for global model aggregation.
[0054] In this embodiment, the vehicle adds a random number to the gradient of the local model parameters. The random number is generated using a random number generator, and the seed used is the sum of the vehicle shared key and the current training round, that is, key i +t i ;t i is the current training round.
[0055] Step 4: RSU decrypts and aggregates the received gradients.
[0056] Step 4.1: The length of each RSU time slot is 200ms. At the end of the time slot, the RSU judges the aggregation condition. If the received gradient information does not exceed 1, the current round of aggregation is skipped and the received model gradient information is used in the next round of aggregation. Otherwise, the current round of aggregation is continued in step 4.2.
[0057] Step 4.2: Encrypted random number calculation: RSU organizes the information of the models in this time slot, and sends the round of each model and its corresponding vehicle identity information to the base station. The base station finds its corresponding shared key based on the vehicle information. i , use the random number generator to generate a random number r i , the seed is the key i +t i , calculate the sum of random numbers in the same training round Return to RSU, |U j | represents the number of outdated models in the jth round. The outdated models are the updated models. For example, in the jth round of training, the training round t i The model corresponding to a value less than j is called an outdated model.
[0058] Step 4.3: Calculate aggregation weight: RSU calculates the outdated weight according to the training round of the model uploaded by the vehicle, and RSU calculates the training progress weight according to the global training progress. Both weights will be used in global aggregation;
[0059] The specific expression of the training progress weight γ is as follows:
[0060]
[0061] Among them, γ represents the training progress weight, α represents the progress parameter, which is 0.2 in this example, and t global Indicates the global training round for RSU calculation.
[0062] The specific expression of outdated weight β is as follows:
[0063]
[0064] Among them, β represents the outdated weight, T limit Represents the outdated threshold. Models exceeding this threshold will not be adopted into the aggregation. i represents the global training round during vehicle local training, t global Indicates the global training round for RSU calculation.
[0065] Step 4.4: Global model update: RSU eliminates the encrypted information and aggregates the local model parameters of the vehicle to complete the global model update. The specific expression is as follows:
[0066]
[0067] Among them, w t represents the global model parameters that have not been updated in this round, w t+1 represents the updated global model parameters, N new N is the number of vehicle gradients that arrive normally without being affected by delays. last represents the number of outdated vehicle gradients, |U j | represents the number of outdated models in round j, Indicates the tth i The sum of random numbers of the model in rounds of training, Δw n ' ew represents the encrypted vehicle gradient sent to the RSU on time in this round of iteration, Δw i ′ represents the encrypted vehicle gradient of training round i received by RSU in this round of iteration, Represents the sum of random numbers in the latest training round.
[0068] Step 5: RSU broadcasts the global model. RSU sends the global model to all vehicles within the communication range. Vehicles use the global model parameters to update their local models and then continue with the next round of training until the training is completed.
[0069] In summary, the above are only preferred embodiments of the present invention and are not intended to limit the protection scope of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A lightweight privacy-preserving asynchronous aggregation method in a connected vehicle environment, characterized in that: The steps include: Step 1: The station and the base station exchange public keys and calculate the shared secret key based on the public keys exchanged by both parties; Step 2: The vehicle obtains the latest global model parameters from the roadside computing unit RSU for local model update, and uses local data to train the local model; Step 3: Generate random numbers based on the shared key and training rounds, add random numbers to the gradients of the trained local model parameters to encrypt the local model parameters, and send the vehicle information, encrypted gradient information, and training rounds to the RSU; Step 4: The RSU forwards the acquired vehicle information and training rounds to the base station. The base station searches for the shared key corresponding to the vehicle information and calculates the sum of random numbers based on the training rounds. The RSU decrypts and aggregates the encrypted gradient information based on the sum of random numbers and updates the global model parameters. Step 5: The RSU broadcasts the global model parameters, and the vehicle uses the global model parameters to update the local model, and then continues the next round of training until the training is completed.
2. The lightweight privacy-preserving asynchronous aggregation method in a connected vehicle environment according to claim 1, characterized in that: The specific process of step 1 is: First, when the vehicle enters the communication range of the base station, it sends its identity information and public key to the base station. After receiving the information sent by the vehicle, the base station also sends its public key to the vehicle. Secondly, the base station and the vehicle respectively calculate the shared key using the received public key.
3. The lightweight privacy-preserving asynchronous aggregation method in a connected vehicle environment according to claim 2, characterized in that: The secret key sent by the vehicle is The secret key sent by the base station is The calculated shared key is 4. The lightweight privacy-preserving asynchronous aggregation method in a connected vehicle environment according to claim 3, characterized in that: The random number is generated by using a shared secret key and the current training round as seeds and using a random number generator to generate a random number.
5. The lightweight privacy-preserving asynchronous aggregation method in a connected vehicle environment according to claim 4, characterized in that: The seed is key i +t i ,key i is the shared key, t i is the training round.
6. The lightweight privacy-preserving asynchronous aggregation method in a connected vehicle environment according to claim 1, characterized in that: The specific process of step 4 is as follows: Step 4.1: Determine the aggregation condition: At the end of the time slot, the RSU performs aggregation judgment on the gradient information received in the time slot. If the number of gradient information does not exceed 1, this round of aggregation is skipped and the received gradient information participates in the next round of aggregation. Otherwise, it goes to step 4.2 to continue this round of aggregation. Step 4.2: Calculate the sum of random numbers: RSU organizes the information of the models in this time slot, and sends the round of each model and its corresponding vehicle identity information to the base station. The base station uses the same shared key and training round as the vehicle as the seed of the random number generator to generate random numbers, and sends the sum of the random numbers of the models in the same training round to the RSU; Step 4.3: Calculate aggregation weight: RSU calculates the outdated weight according to the training round of the model uploaded by the vehicle, and RSU calculates the training progress weight according to the global training progress. Both weights will be used in global aggregation; Step 4.4: Update the global model: RSU aggregates the local model according to different training rounds, subtracts the sum of the random numbers received from the base station in that round from the aggregation result, and then weights the aggregation results of different rounds according to the corresponding outdated weights and training weights to update the global model of this round.
7. The lightweight privacy-preserving asynchronous aggregation method in a connected vehicle environment according to claim 6, characterized in that: The training progress weight γ: Among them, α represents the progress parameter, t global Indicates the global training round for RSU calculation.
8. The lightweight privacy-preserving asynchronous aggregation method in a connected vehicle environment according to claim 6, characterized in that: The outdated weight β: Among them, T limit represents the expiration threshold, t i represents the global training round during vehicle local training, t global Indicates the global training round for RSU calculation.
9. The lightweight privacy-preserving asynchronous aggregation method in a connected vehicle environment according to claim 6, characterized in that: The global model is updated as follows: Among them, w t represents the global model parameters that have not been updated in this round, w t+1 represents the updated global model parameters, N new N represents the number of vehicle gradients that arrive normally without being affected by delays. last represents the number of outdated vehicle gradients, |U j | represents the number of outdated models in round j, represents the sum of random numbers of the model trained in round t, Δw n ' ew represents the encrypted vehicle gradient sent to the RSU on time in this round of iteration, Δw i ′ represents the encrypted vehicle gradient of training round i received by RSU in this round of iteration, Represents the sum of random numbers in the latest training round.
10. The lightweight privacy-preserving asynchronous aggregation method in a connected vehicle environment according to claim 1, characterized in that: The local model is a convolutional neural network with two 5×5 convolutional layers. The first layer has 32 output channels and the second layer has 64 output channels. Each convolutional layer is followed by a 2×2 maximum pooling layer.
Citation Information
Patent Citations
Federal learning method based on Internet of Vehicles, roadside unit, vehicle node and base station
CN114492739A
Privacy protection federated learning system and method in unmanned aerial vehicle assisted internet of vehicles
CN115438355A
Hierarchical asynchronous federated learning privacy protection method for Internet of Vehicles
CN117708872A
Block chain-based personalized model and data sharing method in complex Internet of Vehicles
CN117763037A
Federal learning-based intelligent network connection vehicle track prediction method and related device
CN118337367A
Cited By
Internet of vehicles-oriented packet negotiation condition asynchronous federated learning data privacy protection method
CN120850351A
A Data Privacy Preservation Method for Packet Negotiation Conditional Asynchronous Federated Learning in Vehicle-to-Everything (V2X)
CN120850351B
